Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lichess_client/endpoints/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down