Summary
During a deeper Discord audit pass I found the Discord integration docs disagree with the code in six places, and one tiny code bug: /voice join is advertised in docs but can't be picked from the slash-command autocomplete.
The six drifts
| # |
Where |
Doc says |
Code does |
| D1 |
neither website/docs/user-guide/messaging/discord.md nor environment-variables.md |
DISCORD_PROXY is not mentioned |
env var is consumed at gateway/platforms/discord.py:551 and two other call sites (image/audio/doc downloads), overriding HTTPS_PROXY / macOS scutil auto-detect |
| D2 |
nowhere |
HERMES_DISCORD_VOICE_PACKET_DUMP is not mentioned |
read at discord.py (VoiceReceiver init) with three accepted values off / errors (default) / all |
| D5 |
messaging/discord.md:119 |
Server Members Intent required |
intents.members = any(not entry.isdigit() for entry in self._allowed_user_ids) — so only needed if DISCORD_ALLOWED_USERS contains usernames. All-numeric allowlists do not request it and the bot comes online fine with the Developer-Portal toggle OFF |
| D6 |
voice-mode.md:282 |
Server Members Intent maps voice SSRC to user IDs |
SSRC→user_id mapping comes from the SPEAKING opcode (op 5) on the voice websocket (VoiceReceiver._install_speaking_hook in discord.py). Members intent plays no role here. |
| D7 |
voice-mode.md:333 |
/voice join is a slash command |
the @discord.app_commands.choices list only contains channel — users cannot pick join from autocomplete. The runner at gateway/run.py happily accepts both, so typed /voice join works, but Discord's slash-UI gate rejects it. |
| D8 |
voice-mode.md:363 |
"bot automatically pauses its audio listener while playing TTS replies" |
not pause — the bot switches to a raised-RMS-threshold barge-in mode after a guard window (VoiceReceiver.start_playback / _on_packet barge-in path). Users can interrupt mid-sentence. Tunables: voice.discord_vc.barge_in_guard, voice.discord_vc.barge_in_rms. |
Fix
PR #NNN — docs corrections for all six, plus one line change: add join as an explicit Choice(name="join — join your voice channel", value="join") on the /voice slash command so the autocomplete matches the docs and the runner's dispatch.
Test
pytest tests/gateway/ -k discord -p asyncio → 193 passed, 1 skipped, 0 failed after the change.
No behavior change for existing callers — typed /voice channel / /voice join already worked via the runner; the only visible effect is the slash autocomplete now shows join alongside channel.
Summary
During a deeper Discord audit pass I found the Discord integration docs disagree with the code in six places, and one tiny code bug:
/voice joinis advertised in docs but can't be picked from the slash-command autocomplete.The six drifts
website/docs/user-guide/messaging/discord.mdnorenvironment-variables.mdDISCORD_PROXYis not mentionedgateway/platforms/discord.py:551and two other call sites (image/audio/doc downloads), overridingHTTPS_PROXY/ macOSscutilauto-detectHERMES_DISCORD_VOICE_PACKET_DUMPis not mentioneddiscord.py(VoiceReceiver init) with three accepted valuesoff/errors(default) /allmessaging/discord.md:119intents.members = any(not entry.isdigit() for entry in self._allowed_user_ids)— so only needed ifDISCORD_ALLOWED_USERScontains usernames. All-numeric allowlists do not request it and the bot comes online fine with the Developer-Portal toggle OFFvoice-mode.md:282op 5) on the voice websocket (VoiceReceiver._install_speaking_hookindiscord.py). Members intent plays no role here.voice-mode.md:333/voice joinis a slash command@discord.app_commands.choiceslist only containschannel— users cannot pickjoinfrom autocomplete. The runner atgateway/run.pyhappily accepts both, so typed/voice joinworks, but Discord's slash-UI gate rejects it.voice-mode.md:363VoiceReceiver.start_playback/_on_packetbarge-in path). Users can interrupt mid-sentence. Tunables:voice.discord_vc.barge_in_guard,voice.discord_vc.barge_in_rms.Fix
PR #NNN — docs corrections for all six, plus one line change: add
joinas an explicitChoice(name="join — join your voice channel", value="join")on the/voiceslash command so the autocomplete matches the docs and the runner's dispatch.Test
pytest tests/gateway/ -k discord -p asyncio→ 193 passed, 1 skipped, 0 failed after the change.No behavior change for existing callers — typed
/voice channel//voice joinalready worked via the runner; the only visible effect is the slash autocomplete now showsjoinalongsidechannel.