Browse Source

Check if member is in list for GUILD_MEMBER_REMOVE.

pull/36/head
Rapptz 10 years ago
parent
commit
60dfd04439
  1. 5
      discord/client.py

5
discord/client.py

@ -308,8 +308,9 @@ class ConnectionState(object):
if server is not None:
user_id = data['user']['id']
member = utils.find(lambda m: m.id == user_id, server.members)
server.members.remove(member)
self.dispatch('member_remove', member)
if member in server.members:
server.members.remove(member)
self.dispatch('member_remove', member)
def handle_guild_member_update(self, data):
server = self._get_server(data.get('guild_id'))

Loading…
Cancel
Save