mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add back __repr__ that were deleted in the Asset redesign
The Asset PR (be227ebcf0
) changed some namedtuple-deriving
classes to object-deriving classes, which meant that the free __repr__ provided by namedtuple
was removed
This commit is contained in:
@ -86,6 +86,9 @@ class PartialEmoji:
|
||||
return '<a:%s:%s>' % (self.name, self.id)
|
||||
return '<:%s:%s>' % (self.name, self.id)
|
||||
|
||||
def __repr__(self):
|
||||
return '<{0.__class__.__name__} animated={0.animated} name={0.name!r} id={0.id}>'.format(self)
|
||||
|
||||
def __eq__(self, other):
|
||||
if self.is_unicode_emoji():
|
||||
return isinstance(other, PartialEmoji) and self.name == other.name
|
||||
|
Reference in New Issue
Block a user