mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Make __repr__ slightly more detailed and add a few missing ones.
This includes raw events (which didn't have any) and a few other types that were missing them. Upon review some more useful fields were added to the repr output which would be more useful during debugging.
This commit is contained in:
@ -294,7 +294,9 @@ class Invite(Hashable):
|
||||
return self.url
|
||||
|
||||
def __repr__(self):
|
||||
return '<Invite code={0.code!r}>'.format(self)
|
||||
return '<Invite code={0.code!r} guild={0.guild!r} ' \
|
||||
'online={0.approximate_presence_count} ' \
|
||||
'members={0.approximate_member_count}>'.format(self)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.code)
|
||||
|
Reference in New Issue
Block a user