Browse Source

Dispatch user updates if the global cache gets stale in update events

pull/6275/head
Rapptz 4 years ago
parent
commit
442962596e
  1. 6
      discord/state.py

6
discord/state.py

@ -793,6 +793,12 @@ class ConnectionState:
else:
if self.member_cache_flags.joined:
member = Member(data=data, guild=guild, state=self)
# Force an update on the inner user if necessary
user_update = member._update_inner_user(user)
if user_update:
self.dispatch('user_update', user_update[0], user_update[1])
guild._add_member(member)
log.debug('GUILD_MEMBER_UPDATE referencing an unknown member ID: %s. Discarding.', user_id)

Loading…
Cancel
Save