mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +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:
@ -140,6 +140,10 @@ class PartialInviteGuild:
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
return '<{0.__class__.__name__} id={0.id} name={0.name!r} features={0.features} ' \
|
||||
'description={0.description!r}>'.format(self)
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""Returns the guild's creation time in UTC."""
|
||||
|
Reference in New Issue
Block a user