fix(bot): userbot voice via @discordjs/voice 0.19 + DAVE (selfbot voice handshake fix)

The selfbot library's native voice connection cannot complete Discord's current
DAVE/v8 voice handshake and times out (15s). Root cause: DAVE E2EE (mandated
~March 2026). The bundled @discordjs/voice 0.18.0 also lacked DAVE.

Fix: upgrade @discordjs/voice to 0.19.2 + add @snazzah/davey (the DAVE protocol
lib) and drive the selfbot client through @discordjs/voice's joinVoiceChannel /
receiver via the client's voiceAdapterCreator — i.e. reuse the normal-bot
VoiceSession with a user-account channel. Verified: the userbot now reaches a
READY voice connection (host test) and joins the channel in-container with no
timeout. This also fixes the normal-bot voice path under DAVE. Drops the
hand-rolled selfbot-native receiver (audio.ts).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-06-11 18:19:10 +09:00
parent 921a757371
commit 835459111e
4 changed files with 29 additions and 129 deletions

View File

@@ -11,7 +11,9 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@discordjs/voice": "^0.18.0",
"@discordjs/voice": "^0.19.2",
"@snazzah/davey": "^0.1.11",
"debug": "^4.3.7",
"discord.js": "^14.16.3",
"dotenv": "^16.4.5",
"libsodium-wrappers": "^0.7.15",