diff options
| author | Rapptz <[email protected]> | 2019-05-26 02:28:49 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-05-26 02:32:47 -0400 |
| commit | 2cd6d771eceebfa8aeb641ebd5abb454d8b52d3e (patch) | |
| tree | 9312a08ca2d261c1a547b240e8e4c94a31b7769e /discord/invite.py | |
| parent | Add note for Message.tts (diff) | |
| download | discord.py-2cd6d771eceebfa8aeb641ebd5abb454d8b52d3e.tar.xz discord.py-2cd6d771eceebfa8aeb641ebd5abb454d8b52d3e.zip | |
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.
Diffstat (limited to 'discord/invite.py')
| -rw-r--r-- | discord/invite.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/invite.py b/discord/invite.py index bf1124f6..b487162c 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -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) |