Fix voice state update issue in on_voice_state_update
Bug was caused to the shallow copy not copying over the VoiceState information embedded into the copy. This would mean that when the event is called, before and after voice state information is essentially equivalent. The solution to fix this is to also copy the VoiceState objects.
This commit is contained in:
@ -268,7 +268,7 @@ class ConnectionState:
|
||||
member = self._make_member(server, data)
|
||||
server._add_member(member)
|
||||
|
||||
old_member = copy.copy(member)
|
||||
old_member = member._copy()
|
||||
member.status = data.get('status')
|
||||
try:
|
||||
member.status = Status(member.status)
|
||||
@ -385,7 +385,7 @@ class ConnectionState:
|
||||
member = server.get_member(user_id)
|
||||
if member is not None:
|
||||
user = data['user']
|
||||
old_member = copy.copy(member)
|
||||
old_member = member._copy()
|
||||
member.name = user['username']
|
||||
member.discriminator = user['discriminator']
|
||||
member.avatar = user['avatar']
|
||||
|
Reference in New Issue
Block a user