Browse Source

Fix type hint for CustomActivity emoji parameter

pull/9594/head
mc_fdc 2 years ago
committed by GitHub
parent
commit
2e4eedf5cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      discord/activity.py

4
discord/activity.py

@ -732,7 +732,9 @@ class CustomActivity(BaseActivity):
__slots__ = ('name', 'emoji', 'state')
def __init__(self, name: Optional[str], *, emoji: Optional[PartialEmoji] = None, **extra: Any) -> None:
def __init__(
self, name: Optional[str], *, emoji: Optional[Union[PartialEmoji, Dict[str, Any], str]] = None, **extra: Any
) -> None:
super().__init__(**extra)
self.name: Optional[str] = name
self.state: Optional[str] = extra.pop('state', name)

Loading…
Cancel
Save