diff options
| author | Rapptz <[email protected]> | 2016-10-10 20:09:06 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-03 09:51:49 -0500 |
| commit | 45c729b167509deb5e389a7812d0ae8f4cbc4e72 (patch) | |
| tree | 5617af109edb3d7b7fb0e28934bf57e4f664f362 /discord/emoji.py | |
| parent | Remove Message.timestamp and make Message.channel_mentions lazy. (diff) | |
| download | discord.py-45c729b167509deb5e389a7812d0ae8f4cbc4e72.tar.xz discord.py-45c729b167509deb5e389a7812d0ae8f4cbc4e72.zip | |
Switch IDs to use int instead of str
Diffstat (limited to 'discord/emoji.py')
| -rw-r--r-- | discord/emoji.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/discord/emoji.py b/discord/emoji.py index 81d5daba..65a276db 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -54,17 +54,17 @@ class Emoji(Hashable): Attributes ----------- - name : str + name: str The name of the emoji. - id : str + id: int The emoji's ID. - require_colons : bool + require_colons: bool If colons are required to use this emoji in the client (:PJSalt: vs PJSalt). - managed : bool + managed: bool If this emoji is managed by a Twitch integration. - server : :class:`Server` + server: :class:`Server` The server the emoji belongs to. - roles : List[:class:`Role`] + roles: List[:class:`Role`] A list of :class:`Role` that is allowed to use this emoji. If roles is empty, the emoji is unrestricted. """ @@ -76,10 +76,10 @@ class Emoji(Hashable): self._from_data(data) def _from_data(self, emoji): - self.require_colons = emoji.get('require_colons') - self.managed = emoji.get('managed') - self.id = emoji.get('id') - self.name = emoji.get('name') + self.require_colons = emoji['require_colons'] + self.managed = emoji['managed'] + self.id = int(emoji['id']) + self.name = emoji['name'] self.roles = emoji.get('roles', []) if self.roles: roles = set(self.roles) |