diff options
| author | Rapptz <[email protected]> | 2019-11-20 01:41:23 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-11-20 01:41:23 -0500 |
| commit | 45f342ff79cb17668ce9df4f9939cf624f896764 (patch) | |
| tree | 6b15f6f0e0b4c3daeb75e8f2e6b4f0077b3ad1a5 | |
| parent | Move PartialEmoji over to a new namespace to avoid circular imports (diff) | |
| download | discord.py-45f342ff79cb17668ce9df4f9939cf624f896764.tar.xz discord.py-45f342ff79cb17668ce9df4f9939cf624f896764.zip | |
Fix regression with references being overwritten from the cache.
A proper fix for this would be to just request presence information
as well since the chunk request would probably be more up to date than
the current cache. However this delta requires a little bit more work
and will be done later.
| -rw-r--r-- | discord/state.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py index 08222aa4..ca7afcbe 100644 --- a/discord/state.py +++ b/discord/state.py @@ -842,7 +842,9 @@ class ConnectionState: log.info('Processed a chunk for %s members in guild ID %s.', len(members), guild_id) if self._cache_members: for member in members: - guild._add_member(member) + existing = guild.get_member(member.id) + if existing is None or existing.joined_at is None: + guild._add_member(member) self.process_listeners(ListenerType.chunk, guild, len(members)) names = [x.name.lower() for x in members] |