aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-12-05 16:57:29 -0500
committerRapptz <[email protected]>2015-12-06 03:09:55 -0500
commit80b32e769e9ced10c0be3813208203098b6e491c (patch)
tree164b1ae4754d48ad72a35f58e29a3f567f59bfef /discord/client.py
parentDocumentation fixes in Client.connect. (diff)
downloaddiscord.py-80b32e769e9ced10c0be3813208203098b6e491c.tar.xz
discord.py-80b32e769e9ced10c0be3813208203098b6e491c.zip
Handle GUILD_UPDATE
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py
index 5e0c4b54..15ff41a5 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -231,13 +231,12 @@ class Client:
if event in ('READY', 'MESSAGE_CREATE', 'MESSAGE_DELETE',
'MESSAGE_UPDATE', 'PRESENCE_UPDATE', 'USER_UPDATE',
'CHANNEL_DELETE', 'CHANNEL_UPDATE', 'CHANNEL_CREATE',
- 'GUILD_MEMBER_ADD', 'GUILD_MEMBER_REMOVE',
+ 'GUILD_MEMBER_ADD', 'GUILD_MEMBER_REMOVE', 'GUILD_UPDATE'
'GUILD_MEMBER_UPDATE', 'GUILD_CREATE', 'GUILD_DELETE',
'GUILD_ROLE_CREATE', 'GUILD_ROLE_DELETE', 'TYPING_START',
'GUILD_ROLE_UPDATE', 'VOICE_STATE_UPDATE'):
parser = 'parse_' + event.lower()
- if hasattr(self.connection, parser):
- getattr(self.connection, parser)(data)
+ getattr(self.connection, parser)(data)
else:
log.info("Unhandled event {}".format(event))
@@ -1739,7 +1738,7 @@ class Client:
deny = discord.Permissions.none()
allow.can_mention_everyone = True
deny.can_manage_messages = True
- client.set_channel_permissions(message.channel, message.author, allow, deny)
+ yield from client.set_channel_permissions(message.channel, message.author, allow, deny)
Parameters
-----------