diff options
| author | Rapptz <[email protected]> | 2017-05-05 21:45:51 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-05-05 21:45:51 -0400 |
| commit | d7153b1b5ccaa15574d0113c6173c482298a7edc (patch) | |
| tree | 2cb5fab90a9ce604042127b70cd08b2f5854335e | |
| parent | Split on_channel_pins_update as well. (diff) | |
| download | discord.py-d7153b1b5ccaa15574d0113c6173c482298a7edc.tar.xz discord.py-d7153b1b5ccaa15574d0113c6173c482298a7edc.zip | |
Replace hasattr with try except in chunker.
| -rw-r--r-- | discord/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py index 85bbca15..1cd4066c 100644 --- a/discord/client.py +++ b/discord/client.py @@ -129,9 +129,9 @@ class Client: @asyncio.coroutine def _chunker(self, guild): - if hasattr(guild, 'id'): + try: guild_id = guild.id - else: + except AttributeError: guild_id = [s.id for s in guild] payload = { |