diff options
| author | Rapptz <[email protected]> | 2016-02-17 05:44:00 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-02-17 05:44:00 -0500 |
| commit | 3862b1abcffc26129d7be381b126d01db54a40a4 (patch) | |
| tree | 82cb71d76ea95e57825d6bd5706780b06a096148 | |
| parent | Switch to using ClientSession objects for aiohttp v0.21 (diff) | |
| download | discord.py-3862b1abcffc26129d7be381b126d01db54a40a4.tar.xz discord.py-3862b1abcffc26129d7be381b126d01db54a40a4.zip | |
Do not overwrite members that are already in cache during chunking.
| -rw-r--r-- | discord/state.py | 3 |
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 |