Fix bug with member voice state update.

This commit is contained in:
Rapptz 2015-10-17 05:27:10 -04:00
parent a9fd4fc4e3
commit 2813652995

View File

@ -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):