Add back PartialEmoji.__hash__ that was deleted due to __eq__.
This commit is contained in:
parent
64d749a13f
commit
72b6b67cf4
@ -81,6 +81,9 @@ class PartialEmoji(namedtuple('PartialEmoji', 'animated name id')):
|
|||||||
if isinstance(other, (PartialEmoji, Emoji)):
|
if isinstance(other, (PartialEmoji, Emoji)):
|
||||||
return self.id == other.id
|
return self.id == other.id
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash((self.id, self.name))
|
||||||
|
|
||||||
def is_custom_emoji(self):
|
def is_custom_emoji(self):
|
||||||
"""Checks if this is a custom non-Unicode emoji."""
|
"""Checks if this is a custom non-Unicode emoji."""
|
||||||
return self.id is not None
|
return self.id is not None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user