diff options
| author | Rapptz <[email protected]> | 2019-03-20 22:54:53 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-03-20 22:54:53 -0400 |
| commit | 72b6b67cf473f6080bc6ae63dd5ba713b5f748bd (patch) | |
| tree | 8b104f67f5a8de1bbee46991f85b9a49dc8b6ddb /discord/emoji.py | |
| parent | [commands] Ensure handlers are copied even during update. (diff) | |
| download | discord.py-72b6b67cf473f6080bc6ae63dd5ba713b5f748bd.tar.xz discord.py-72b6b67cf473f6080bc6ae63dd5ba713b5f748bd.zip | |
Add back PartialEmoji.__hash__ that was deleted due to __eq__.
Diffstat (limited to 'discord/emoji.py')
| -rw-r--r-- | discord/emoji.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/emoji.py b/discord/emoji.py index b9ead71b..b87a7fd9 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -81,6 +81,9 @@ class PartialEmoji(namedtuple('PartialEmoji', 'animated name id')): if isinstance(other, (PartialEmoji, Emoji)): return self.id == other.id + def __hash__(self): + return hash((self.id, self.name)) + def is_custom_emoji(self): """Checks if this is a custom non-Unicode emoji.""" return self.id is not None |