Browse Source

Guard against the member data not being available in VOICE_STATE_UPDATE

pull/2548/head
Rapptz 5 years ago
parent
commit
cbca33e44f
  1. 5
      discord/guild.py

5
discord/guild.py

@ -221,7 +221,10 @@ class Guild(Hashable):
member = self.get_member(user_id)
if member is None:
member = Member(data=data['member'], state=self._state, guild=self)
try:
member = Member(data=data['member'], state=self._state, guild=self)
except KeyError:
member = None
return member, before, after

Loading…
Cancel
Save