Luke
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
5 deletions
-
disco/state.py
|
@ -285,9 +285,8 @@ class State(object): |
|
|
if event.member.guild_id not in self.guilds: |
|
|
if event.member.guild_id not in self.guilds: |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
if (self.guilds[event.member.guild_id].member_count is not UNSET and |
|
|
|
|
|
# Avoid adding duplicate events to member_count. |
|
|
# Avoid adding duplicate events to member_count. |
|
|
event.member.id not in self.guilds[event.member.guild_id].members): |
|
|
if event.member.id not in self.guilds[event.member.guild_id].members: |
|
|
self.guilds[event.member.guild_id].member_count += 1 |
|
|
self.guilds[event.member.guild_id].member_count += 1 |
|
|
|
|
|
|
|
|
self.guilds[event.member.guild_id].members[event.member.id] = event.member |
|
|
self.guilds[event.member.guild_id].members[event.member.id] = event.member |
|
@ -308,7 +307,6 @@ class State(object): |
|
|
if event.user.id not in self.guilds[event.guild_id].members: |
|
|
if event.user.id not in self.guilds[event.guild_id].members: |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
if self.guilds[event.guild_id].member_count is not UNSET: |
|
|
|
|
|
self.guilds[event.guild_id].member_count -= 1 |
|
|
self.guilds[event.guild_id].member_count -= 1 |
|
|
|
|
|
|
|
|
del self.guilds[event.guild_id].members[event.user.id] |
|
|
del self.guilds[event.guild_id].members[event.user.id] |
|
|