diff options
| author | Rapptz <[email protected]> | 2015-10-17 05:27:10 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-10-17 05:27:10 -0400 |
| commit | 2813652995c50f1706ae02ae7147fbef4c95b09b (patch) | |
| tree | 705083a76db2da4b41283844cb710ce0ae0cd6cf | |
| parent | Better detection for the @everyone role. (diff) | |
| download | discord.py-2813652995c50f1706ae02ae7147fbef4c95b09b.tar.xz discord.py-2813652995c50f1706ae02ae7147fbef4c95b09b.zip | |
Fix bug with member voice state update.
| -rw-r--r-- | discord/server.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/discord/server.py b/discord/server.py index 1df6fd9c..4004967a 100644 --- a/discord/server.py +++ b/discord/server.py @@ -95,9 +95,10 @@ class Member(User): if old_channel is None and self.voice_channel is not None: # we joined a channel self.voice_channel.voice_members.append(self) - elif old_channel is not None and self.voice_channel is None and self in old_channel: - # we left a channel - old_channel.voice_members.remove(self) + elif old_channel is not None and self.voice_channel is None: + if self in old_channel.voice_members: + # we left a channel + old_channel.voice_members.remove(self) class Server(object): |