Browse Source
Fix type hint for CustomActivity emoji parameter
pull/9594/head
mc_fdc
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
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) |
|
|
|