aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-02-17 05:44:00 -0500
committerRapptz <[email protected]>2016-02-17 05:44:00 -0500
commit3862b1abcffc26129d7be381b126d01db54a40a4 (patch)
tree82cb71d76ea95e57825d6bd5706780b06a096148 /discord
parentSwitch to using ClientSession objects for aiohttp v0.21 (diff)
downloaddiscord.py-3862b1abcffc26129d7be381b126d01db54a40a4.tar.xz
discord.py-3862b1abcffc26129d7be381b126d01db54a40a4.zip
Do not overwrite members that are already in cache during chunking.
Diffstat (limited to 'discord')
-rw-r--r--discord/state.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py
index f016cb2d..27f629ba 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -379,7 +379,8 @@ class ConnectionState:
members = data.get('members', [])
for member in members:
m = self._make_member(server, member)
- server._add_member(m)
+ if m.id not in server._members:
+ server._add_member(m)
# if the owner is offline, server.owner is potentially None
# therefore we should check if this chunk makes it point to a valid