Browse Source

Fix users loaded in GuildCreate missing presence information

The presence data comes sep. from the users info here, so we need to
load it.
pull/27/head
Andrei 8 years ago
parent
commit
1f50274554
  1. 3
      disco/state.py

3
disco/state.py

@ -186,6 +186,9 @@ class State(object):
for member in six.itervalues(event.guild.members): for member in six.itervalues(event.guild.members):
self.users[member.user.id] = member.user self.users[member.user.id] = member.user
for presence in event.presences:
self.users[presence.user.id].presence = presence
for voice_state in six.itervalues(event.guild.voice_states): for voice_state in six.itervalues(event.guild.voice_states):
self.voice_states[voice_state.session_id] = voice_state self.voice_states[voice_state.session_id] = voice_state

Loading…
Cancel
Save