From 803ab38fad68d62493dfd8395f5160ac8176a1b5 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 12 Aug 2022 01:46:42 +0200 Subject: Move UserSettings to own entity --- src/gateway/opcodes/VoiceStateUpdate.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gateway/opcodes/VoiceStateUpdate.ts') diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts index 94cdef44..49d15425 100644 --- a/src/gateway/opcodes/VoiceStateUpdate.ts +++ b/src/gateway/opcodes/VoiceStateUpdate.ts @@ -62,7 +62,11 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) { } // 'Fix' for this one voice state error. TODO: Find out why this is sent - if (!voiceState.guild_id) return; + // It seems to be sent on client load, + // so maybe its trying to find which server you were connected to before disconnecting, if any? + if (body.guild_id == null) { + return; + } //TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user //TODO the member.user should only have these properties: avatar, discriminator, id, username -- cgit 1.5.1