feat(selfbot): dedicated DISCORD_STREAM_TOKEN for the broadcast account

Confirmed root cause of "broadcast doesn't appear in Discord" in userbot mode:
the conversation and the Go-Live broadcaster were the SAME Discord account on
two sessions. Discord allows one voice presence per account, so the broadcaster's
voice connection never connects (state voiceReady:false). Proven by isolating the
broadcaster: alone it connects ("Go-Live WebRTC connected"); alongside the
conversation it times out.

The broadcaster now logs in with DISCORD_STREAM_TOKEN when set (a second burner
account dedicated to streaming), falling back to DISCORD_SELFBOT_TOKEN (correct
for normal-bot mode). When userbot mode shares one account it warns loudly with
the fix. Documents the var in .env.example.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-06-13 15:30:33 +09:00
parent 5961faed38
commit 863337c6eb
3 changed files with 34 additions and 3 deletions

View File

@@ -123,6 +123,14 @@ VNC_BITRATE_KBPS=8000
# A THROWAWAY/burner Discord user account token. NEVER your main account.
# Using a selfbot violates Discord ToS and can get the account banned.
DISCORD_SELFBOT_TOKEN=
# Dedicated burner account for the Go-Live BROADCAST, separate from the
# conversation account above. REQUIRED in userbot mode for the broadcast to
# work: Discord allows only one voice presence per account, so the conversation
# and the broadcast cannot share one account (the broadcaster's voice connection
# never connects). Leave empty in normal-bot mode (the conversation runs on the
# bot account, so the selfbot account is already broadcast-only). Both burner
# accounts must be in the server. Use a second throwaway account, never a main.
DISCORD_STREAM_TOKEN=
# Hardware (NVENC) encode for the stream. 1 = use the GPU (recommended for
# 1080p60), 0 = software x264. Requires an NVIDIA GPU + ffmpeg built with nvenc.
STREAM_HW=1