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,
|