From d52d9c62fc30e31e2c01bf6b63f9aedebdde216f Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 8 Aug 2022 04:27:28 +0200 Subject: Bunch of fixes and improvements, everything appears to work now --- gateway/src/opcodes/VoiceStateUpdate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gateway/src/opcodes/VoiceStateUpdate.ts') 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, -- cgit 1.5.1