feat(discord): migrate voice join from selfbot to official bot (bot.mjs)

Replace the user-token selfbot voice path with an official Discord bot using
discord.js 14 + @discordjs/voice 0.19. The bot logs in with the stored testbot
token, joins the target voice channel, passes the DAVE/MLS E2EE handshake, and
receives per-user Opus audio via VoiceReceiver (the STT input path). ToS-safe.

Live-verified: bot joined guild "사지방" / channel "일반" and reached Ready.
Selfbot (gate.mjs/join.mjs) kept only for the deferred screenshare-video track,
which official bots cannot receive. Docs updated (README/PLAN); M1 done on bot path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-08-16 18:32:44 +09:00
parent 5327f8ec7c
commit 27e449f9f1
5 changed files with 1069 additions and 15 deletions

View File

@@ -2,9 +2,15 @@
"name": "wsai-dave-poc",
"private": true,
"type": "module",
"description": "Fail-fast gate: can a selfbot pass the Discord voice DAVE/MLS (close 4017) handshake?",
"description": "Discord voice layer for watch_sceen_ai: official bot joins target voice channel (DAVE/MLS E2EE) and receives per-user Opus audio for STT. bot.mjs = current path; gate.mjs/join.mjs = legacy selfbot (kept for deferred video track).",
"main": "bot.mjs",
"dependencies": {
"ws": "^8.18.0",
"@snazzah/davey": "^0.1.12"
"@discordjs/opus": "^0.10.0",
"@discordjs/voice": "^0.19.2",
"@snazzah/davey": "^0.1.12",
"discord.js": "^14.27.0",
"libsodium-wrappers": "^0.8.4",
"prism-media": "^1.3.5",
"ws": "^8.18.0"
}
}