Replace hasattr with try except in chunker.
This commit is contained in:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user