diff options
| author | Rapptz <[email protected]> | 2016-12-30 04:34:42 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-03 09:52:06 -0500 |
| commit | dceba9d962483a0f423e53d472e18c8cd84c0759 (patch) | |
| tree | d39c4906807eb0d2ec55070715f237b82ecc12d2 /discord/guild.py | |
| parent | Fix handling of author update and missing type attribute in Message. (diff) | |
| download | discord.py-dceba9d962483a0f423e53d472e18c8cd84c0759.tar.xz discord.py-dceba9d962483a0f423e53d472e18c8cd84c0759.zip | |
Add useful repr to all data classes.
Diffstat (limited to 'discord/guild.py')
| -rw-r--r-- | discord/guild.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/guild.py b/discord/guild.py index d1f1c837..0428398d 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -144,6 +144,10 @@ class Guild(Hashable): def __str__(self): return self.name + def __repr__(self): + chunked = getattr(self, '_member_count', None) == len(self._members) + return '<Guild id={0.id} name={0.name!r} chunked={1}>'.format(self, chunked) + def _update_voice_state(self, data, channel_id): user_id = int(data['user_id']) channel = self.get_channel(channel_id) |