Skip to content

Commit 19c8bea

Browse files
malaiwahnickdlkk
authored andcommitted
docs(discord): fix Server Members Intent + SSRC-mapping drift; add /voice join slash Choice
Salvage of NousResearch#11350. Kept: - Code: add an explicit /voice join Choice in the slash UI (runner accepts both 'join' and 'channel' but only 'channel' was in autocomplete). - Docs: Server Members Intent is conditional (only needed if DISCORD_ALLOWED_USERS contains usernames); SSRC → user_id mapping uses the voice websocket SPEAKING opcode, not the Members intent. Dropped from the original PR: - HERMES_DISCORD_VOICE_PACKET_DUMP — this env var doesn't exist on main (it was in a different PR that isn't merged). - DISCORD_PROXY docs — already documented on current main. - DISCORD_ALLOW_MENTION_* docs — already on main. - "barge-in mode" rewrite — current main actually does pause the listener during TTS (VoiceReceiver.pause() at discord.py:192); there is no barge_in_guard/barge_in_rms on main. Co-authored-by: Michel Belleau <michel.belleau@malaiwah.com>
1 parent 1bd731b commit 19c8bea

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

gateway/platforms/discord.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2654,9 +2654,14 @@ async def slash_reload_skills(interaction: discord.Interaction):
26542654
await self._run_simple_slash(interaction, "/reload-skills")
26552655

26562656
@tree.command(name="voice", description="Toggle voice reply mode")
2657-
@discord.app_commands.describe(mode="Voice mode: on, off, tts, channel, leave, or status")
2657+
@discord.app_commands.describe(mode="Voice mode: join, channel, leave, on, tts, off, or status")
26582658
@discord.app_commands.choices(mode=[
2659-
discord.app_commands.Choice(name="channel — join your voice channel", value="channel"),
2659+
# `join` and `channel` both route to _handle_voice_channel_join in
2660+
# gateway/run.py — expose both in the slash UI so autocomplete
2661+
# matches what the docs advertise and what the runner accepts when
2662+
# the command is typed as plain text.
2663+
discord.app_commands.Choice(name="join — join your voice channel", value="join"),
2664+
discord.app_commands.Choice(name="channel — join your voice channel (alias)", value="channel"),
26602665
discord.app_commands.Choice(name="leave — leave voice channel", value="leave"),
26612666
discord.app_commands.Choice(name="on — voice reply to voice messages", value="on"),
26622667
discord.app_commands.Choice(name="tts — voice reply to all messages", value="tts"),

website/docs/user-guide/features/voice-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ In the [Developer Portal](https://discord.com/developers/applications) → your
281281
| Intent | Purpose |
282282
|--------|---------|
283283
| **Presence Intent** | Detect user online/offline status |
284-
| **Server Members Intent** | Map voice SSRC identifiers to Discord user IDs |
284+
| **Server Members Intent** | Resolve usernames in `DISCORD_ALLOWED_USERS` to numeric IDs (conditional) |
285285
| **Message Content Intent** | Read text message content in channels |
286286

287-
All three are required for full voice channel functionality. **Server Members Intent** is especially critical — without it, the bot cannot identify who is speaking in the voice channel.
287+
**Message Content Intent** is required. **Server Members Intent** is only needed if your `DISCORD_ALLOWED_USERS` list uses usernames — if you use numeric user IDs, you can leave it OFF. Voice-channel SSRC → user_id mapping comes from Discord's SPEAKING opcode on the voice websocket and does **not** require the Server Members Intent.
288288

289289
#### 3. Opus Codec
290290

0 commit comments

Comments
 (0)