VoiceStateUpdate: coalesce empty channel/guild ids to undefined

This commit is contained in:
Rory& committed 2026-10-17 09:54:15 +02:00
1 parent cb301f0371
commit 91bfce71ee
1 file changed
+4
+4
View File
@@ -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;