Discord Gateway Setup
What this page covers
This page covers the official Hermes Discord gateway path: create a Discord application and bot, enable privileged intents, invite it with the right scopes and permissions, configure Hermes, then verify DMs and server-channel behavior.
Hermes changes quickly, so treat the official documentation as the source of truth and use the built-in CLI to inspect the local install before editing config by hand.
Fast path
hermes gateway setuphermes gateway runhermes gateway statushermes gateway restarthermes config set discord.require_mention truehermes config set discord.free_response_channels "123456789012345678"Practical checklist
- In Discord Developer Portal, enable both Server Members Intent and Message Content Intent; Message Content Intent is the most common reason a bot connects but cannot respond.
- Use
botandapplications.commandsscopes when inviting the bot. - Store
DISCORD_BOT_TOKENandDISCORD_ALLOWED_USERS/DISCORD_ALLOWED_ROLESin.envvia setup; do not commit or paste tokens. - By default, DMs respond to every message and server channels require
@mention. - Use
DISCORD_FREE_RESPONSE_CHANNELSordiscord.free_response_channelsonly for channels that should be mention-free. - Keep
group_sessions_per_user: trueunless you intentionally want a shared room transcript.
Common pitfalls
- Leaving Message Content Intent disabled.
- Allowing all users or all bot messages without a clear moderation boundary.
- Disabling mention requirements globally when only one help channel should be free-response.
- Forgetting that cron/proactive delivery needs a home channel.
Verification checklist
- Gateway logs show Discord connected without token errors.
- The bot answers a DM from an allowed user.
- In a server channel, it answers when mentioned and stays silent when not mentioned, unless the channel is configured free-response.
/statusor gateway status reports the expected platform/session.
Official reference
https://hermes-agent.nousresearch.com/docs/user-guide/messaging/discord/
