fix(bot): never broadcast on the conversation's account (it deafened STT)
Critical regression: in single-account userbot mode the broadcast auto-start logged in a SECOND session of the conversation account and called joinVoice, which the streaming lib always sends with self_deaf:true. Voice state is per-account, so this deafened the CONVERSATION session too and the bot silently stopped hearing the user (STT receive broke). The Go-Live cannot connect on a shared account anyway. start() now refuses early (no joinVoice, no deafen) when there is no dedicated DISCORD_STREAM_TOKEN and no normal-bot token, protecting the conversation. A dedicated stream account re-enables the broadcast. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,8 @@ test("a self-ended stream tears down the capture pipeline (no ffmpeg leak)", asy
|
||||
const { SelfbotStreamer } = await import("./selfbot.ts");
|
||||
const s = new SelfbotStreamer({
|
||||
selfbotToken: "token",
|
||||
streamToken: "stream-token", // dedicated broadcast account -> broadcast allowed
|
||||
botToken: "",
|
||||
vncDisplay: ":1",
|
||||
vncResolution: "1920x1080",
|
||||
vncFramerate: 60,
|
||||
@@ -104,6 +106,8 @@ test("a Go-Live that never connects is reported as failed, not live, and is torn
|
||||
const { SelfbotStreamer } = await import("./selfbot.ts");
|
||||
const s = new SelfbotStreamer({
|
||||
selfbotToken: "token",
|
||||
streamToken: "stream-token", // dedicated broadcast account -> broadcast allowed
|
||||
botToken: "",
|
||||
vncDisplay: ":1",
|
||||
vncResolution: "1920x1080",
|
||||
vncFramerate: 60,
|
||||
|
||||
Reference in New Issue
Block a user