summary refs log tree commit diff
path: root/gateway/src/opcodes/VoiceStateUpdate.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-08 04:27:28 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commitd52d9c62fc30e31e2c01bf6b63f9aedebdde216f (patch)
treee0f7fd130aeeecb9964e1f359eea6b4e124de7da /gateway/src/opcodes/VoiceStateUpdate.ts
parentClean dependencies (diff)
downloadserver-d52d9c62fc30e31e2c01bf6b63f9aedebdde216f.tar.xz
Bunch of fixes and improvements, everything appears to work now
Diffstat (limited to 'gateway/src/opcodes/VoiceStateUpdate.ts')
-rw-r--r--gateway/src/opcodes/VoiceStateUpdate.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/gateway/src/opcodes/VoiceStateUpdate.ts b/gateway/src/opcodes/VoiceStateUpdate.ts

index 7f7db9b0..1f7c2f1b 100644 --- a/gateway/src/opcodes/VoiceStateUpdate.ts +++ b/gateway/src/opcodes/VoiceStateUpdate.ts
@@ -47,9 +47,9 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) { //The event send by Discord's client on channel leave has both guild_id and channel_id as null if (body.guild_id === null) body.guild_id = voiceState.guild_id; - voiceState.assign(body); + voiceState = Object.assign(voiceState, body); } catch (error) { - voiceState = new VoiceState({ + voiceState = Object.assign(new VoiceState(), { ...body, user_id: this.user_id, deaf: false,