summary refs log tree commit diff
path: root/gateway/src/opcodes/VoiceStateUpdate.ts
diff options
context:
space:
mode:
Diffstat (limited to 'gateway/src/opcodes/VoiceStateUpdate.ts')
-rw-r--r--gateway/src/opcodes/VoiceStateUpdate.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/gateway/src/opcodes/VoiceStateUpdate.ts b/gateway/src/opcodes/VoiceStateUpdate.ts

index 8c430d56..845a75c0 100644 --- a/gateway/src/opcodes/VoiceStateUpdate.ts +++ b/gateway/src/opcodes/VoiceStateUpdate.ts
@@ -20,6 +20,11 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) { check.call(this, VoiceStateUpdateSchema, data.d); const body = data.d as VoiceStateUpdateSchema; + if(body.guild_id == null) { + console.log(`[Gateway] VoiceStateUpdate called with guild_id == null by user ${this.user_id}!`); + return; + } + let voiceState: VoiceState; try { voiceState = await VoiceState.findOneOrFail({