feat(dave): join with mic on (self_mute=false) so bot can speak and hear

Previously the selfbot joined self_mute=true (listen-only). Un-mute so both
directions are enabled at the Discord voice-state level for live testing.
This commit is contained in:
EJClaw
2026-08-15 21:01:37 +09:00
parent 3cc262ed18
commit 5327f8ec7c

View File

@@ -86,8 +86,8 @@ mainWs.on('message', (raw) => {
} else if (p.op === 0) { } else if (p.op === 0) {
if (p.t === 'READY') { if (p.t === 'READY') {
log(`main gw: READY as ${p.d.user?.username} (${p.d.user?.id})`); log(`main gw: READY as ${p.d.user?.username} (${p.d.user?.id})`);
mainWs.send(JSON.stringify({ op: 4, d: { guild_id: GUILD_ID, channel_id: CHANNEL_ID, self_mute: true, self_deaf: false } })); mainWs.send(JSON.stringify({ op: 4, d: { guild_id: GUILD_ID, channel_id: CHANNEL_ID, self_mute: false, self_deaf: false } }));
log('main gw: sent Voice State Update (join, deaf=false so we can hear)'); log('main gw: sent Voice State Update (join, mute=false + deaf=false so we can both speak and hear)');
} else if (p.t === 'VOICE_STATE_UPDATE' && p.d.user_id === SELF_ID && p.d.session_id) { } else if (p.t === 'VOICE_STATE_UPDATE' && p.d.user_id === SELF_ID && p.d.session_id) {
voiceState.session_id = p.d.session_id; log('VOICE_STATE_UPDATE session_id acquired'); maybeConnectVoice(); voiceState.session_id = p.d.session_id; log('VOICE_STATE_UPDATE session_id acquired'); maybeConnectVoice();
} else if (p.t === 'VOICE_SERVER_UPDATE') { } else if (p.t === 'VOICE_SERVER_UPDATE') {