mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-06 11:57:17 +00:00
Add return type for __init__ and _from_data
This commit is contained in:
parent
f82ec46acf
commit
67066937c5
@ -108,12 +108,12 @@ class Emoji(_EmojiTag, AssetMixin):
|
|||||||
'available',
|
'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.guild_id: int = guild.id
|
||||||
self._state: ConnectionState = state
|
self._state: ConnectionState = state
|
||||||
self._from_data(data)
|
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.require_colons: bool = emoji.get('require_colons', False)
|
||||||
self.managed: bool = emoji.get('managed', 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.
|
self.id: int = int(emoji['id']) # type: ignore # This won't be None for full emoji objects.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user