Browse Source
Add return type for __init__ and _from_data
pull/8085/head
Harshal Laheri
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
discord/emoji.py
|
|
@ -108,12 +108,12 @@ class Emoji(_EmojiTag, AssetMixin): |
|
|
|
'available', |
|
|
|
) |
|
|
|
|
|
|
|
def __init__(self, *, guild: Guild, state: ConnectionState, data: EmojiPayload): |
|
|
|
def __init__(self, *, guild: Guild, state: ConnectionState, data: EmojiPayload) -> None: |
|
|
|
self.guild_id: int = guild.id |
|
|
|
self._state: ConnectionState = state |
|
|
|
self._from_data(data) |
|
|
|
|
|
|
|
def _from_data(self, emoji: EmojiPayload): |
|
|
|
def _from_data(self, emoji: EmojiPayload) -> None: |
|
|
|
self.require_colons: bool = emoji.get('require_colons', False) |
|
|
|
self.managed: bool = emoji.get('managed', False) |
|
|
|
self.id: int = int(emoji['id']) # type: ignore # This won't be None for full emoji objects. |
|
|
|