From 91bfce71eefba5e44f3d97b21490fe60c572a12e Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 17 Oct 2026 09:54:15 +0200 Subject: [PATCH] VoiceStateUpdate: coalesce empty channel/guild ids to undefined --- src/gateway/opcodes/VoiceStateUpdate.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts index 49f4be8c6..a7d42cd11 100644 --- a/src/gateway/opcodes/VoiceStateUpdate.ts +++ b/src/gateway/opcodes/VoiceStateUpdate.ts @@ -45,6 +45,10 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) { } const body = data.d as VoiceStateUpdateSchema; + // TODO: should this be null? + if (body.channel_id == "") body.channel_id = undefined; + if (body.guild_id == "") body.guild_id = undefined; + const isNew = body.channel_id === null && body.guild_id === null; let isChanged = false;