diff --git a/lichess_client/endpoints/challenges.py b/lichess_client/endpoints/challenges.py index 0f9a0bd..feb0958 100644 --- a/lichess_client/endpoints/challenges.py +++ b/lichess_client/endpoints/challenges.py @@ -40,7 +40,8 @@ async def create(self, days: int = None, color: 'ColorType' = ColorType.RANDOM, variant: 'VariantTypes' = VariantTypes.STANDARD, - position: str = None) -> 'Response': + position: str = None, + level = None) -> 'Response': """ Challenge someone to play. The targeted player can choose to accept or decline. If the challenge is accepted, you will be notified on the event stream that a new game has started. @@ -108,6 +109,9 @@ async def create(self, if position is not None: data['position'] = position + if level is not None: + data['level'] = level + response = await self._client.request(method=RequestMethods.POST, url=CHALLENGES_CREATE.format(username=username), data=data,