diff --git a/berserk/clients/challenges.py b/berserk/clients/challenges.py index a7e51a6..6c042ed 100644 --- a/berserk/clients/challenges.py +++ b/berserk/clients/challenges.py @@ -29,7 +29,7 @@ def create( color: Color | None = None, variant: Variant | None = None, position: str | None = None, - ) -> Challenge: + ) -> Dict[str, Any]: """Challenge another player to a game. :param username: username of the player to challenge @@ -173,9 +173,7 @@ def accept(self, challenge_id: str) -> None: path = f"/api/challenge/{challenge_id}/accept" self._r.post(path) - def decline( - self, challenge_id: str, reason: DeclineReason = "generic" - ) -> None: + def decline(self, challenge_id: str, reason: DeclineReason = "generic") -> None: """Decline an incoming challenge. :param challenge_id: ID of a challenge diff --git a/berserk/types/challenges.py b/berserk/types/challenges.py index 3d6c0dc..b5cebe1 100644 --- a/berserk/types/challenges.py +++ b/berserk/types/challenges.py @@ -30,6 +30,7 @@ class User(TypedDict): """Challenge User""" + rating: NotRequired[float] provisional: NotRequired[bool] online: NotRequired[bool] @@ -55,6 +56,7 @@ class User(TypedDict): class Variant(TypedDict): """Information about a challenge variant.""" + key: NotRequired[VariantKey] name: NotRequired[str] short: NotRequired[str] @@ -115,4 +117,3 @@ class Challenge(TypedDict): initialFen: NotRequired[str] declineReason: str declineReasonKey: str -