From bc66babd45e383671de260ae94df0169d3661dc4 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Wed, 2 Sep 2026 02:10:22 +0700 Subject: [PATCH] debug(video): log raw GUILD_CREATE/READY/GUILD_MEMBERS_CHUNK shape Temporary diagnostic to see whether GUILD_CREATE.voice_states actually reaches the selfbot raw listener (selfbot-v13 emits everything via WebSocketShard Events.RAW). Will remove once root cause confirmed. --- .../modules/voice-recording/videoRecorder.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/services/discord-gateway/src/modules/voice-recording/videoRecorder.ts b/services/discord-gateway/src/modules/voice-recording/videoRecorder.ts index 2bb778b3..c2021982 100644 --- a/services/discord-gateway/src/modules/voice-recording/videoRecorder.ts +++ b/services/discord-gateway/src/modules/voice-recording/videoRecorder.ts @@ -101,7 +101,27 @@ export function setVideoRecorderClient(client: Client | undefined) { t?: string; d?: { voice_states?: unknown; id?: unknown }; } | null; - if (!p?.t || p.t !== "GUILD_CREATE") return; + if (!p?.t) return; + // DIAG: log every raw event type once until we see GUILD_CREATE shape. + if ( + p.t === "GUILD_CREATE" || + p.t === "READY" || + p.t === "GUILD_MEMBERS_CHUNK" + ) { + const d = p.d as Record; + logger.info( + { + rawType: p.t, + hasVoiceStates: Array.isArray(d?.voice_states), + voiceStatesCount: Array.isArray(d?.voice_states) + ? (d.voice_states as unknown[]).length + : -1, + dKeys: Object.keys(d ?? {}).slice(0, 10), + }, + "RAW diag: GUILD_CREATE/READY/GUILD_MEMBERS_CHUNK", + ); + } + if (p.t !== "GUILD_CREATE") return; const vs = p.d?.voice_states; handleGuildCreateVoiceStates(p.d as Record, vs); });