May 31, 2026 · 6 min
Turn your Hermes Agent into a Discord bot
I wrote up the Telegram setup a couple of weeks ago. Since then a few people have asked for the Discord version. Here it is. The flow is shorter than the Telegram one because v0.16 of Hermes (which every meraGPT box is on now) shipped a browser-clickable admin panel for messaging. You don’t edit any files. You don’t SSH in.
Total time: about ten minutes, mostly waiting for Discord to load.
1. Create the Discord application
Go to discord.com/developers/applications. Click New Application. Give it a name (the name your server members will see), accept terms, confirm.
On the left sidebar click Bot. You’ll see a token field. Click Reset Token (Discord hides it by default), then Copy. The token looks like MTI...several-dozen-chars. Treat it like a password: anyone with this token can act as the bot.
On the same page, scroll down to Privileged Gateway Intents and enable Message Content Intent. Without this, your bot can hear pings but can’t read what users actually wrote. (Discord requires you to opt in.)
2. Open the Channels admin panel on your box
From your meraGPT dashboard, click Open your agent. The Hermes dashboard loads. Click CHANNELS in the left sidebar.
You’ll see a list with Telegram at the top, then Discord, Slack, and the long tail. Find the Discord row; click Configure.
3. Paste the token and pick channels
The modal asks for three things:
- DISCORD_BOT_TOKEN: paste what you copied in step 1.
- DISCORD_ALLOWED_CHANNELS: comma-separated channel IDs the bot should listen in. Right-click a channel in Discord and pick Copy Channel ID. (If that option doesn’t show, turn on Discord Settings → Advanced → Developer Mode.)
- DISCORD_ALLOWED_GUILDS: optional. If you want the bot to respond in every channel of a specific server, drop that server’s ID here instead of listing every channel. Right-click the server icon → Copy Server ID.
One of channels or guilds has to be set, or the bot refuses all incoming messages. That’s a safety default: a Discord bot token, on its own, is an open invitation to whoever can find it, so the gateway needs an allowlist before it’ll engage.
Click Save & enable. The Discord row flips from Disabled to Enabled and the gateway picks the change up within seconds.
4. Invite the bot to your server
Back in the Discord Developer Portal, go to OAuth2 → URL Generator.
Under Scopes, tick bot.
Under Bot Permissions, tick at least Send Messages and Read Message History. If you’re going to ask the bot to react with emoji, add Add Reactions. If you want attachments, Attach Files.
Discord generates an invite URL at the bottom. Open it in a new tab, pick the server you want, click Authorize. The bot appears in your server’s member list.
5. Talk to it
In the channel you allowlisted, @-mention the bot (“@your-bot-name hi”) or send a DM. You should get a streaming reply within a second or two. The reply looks like a normal Discord message; the agent uses your configured model and your skills and your memory.
On a successful first message, the box adds the channel to its channel_directory.json so subsequent messages route faster. You can ignore that file unless something breaks.
What to do if it doesn’t reply
Click LOGS in the dashboard sidebar. Filter to gateway. Common things:
401 Unauthorizedfrom Discord. The token you pasted is wrong or you’ve reset it since. Reset again in the Portal, paste again in the Channels modal.channel XXXX not allowed. You’re messaging in a channel that’s not in the allowlist. Add the channel ID and save again.message content intent missing. You skipped step 1’s Privileged Intent toggle. Go back to the Bot tab and turn it on.
Anything weirder is usually a Discord-side rate limit or an outage; check discordstatus.com.
One bot, every conversation
Hermes keeps a session per Discord channel (and per DM user). If you talked to the bot in #standup yesterday and #standup today, it remembers; if you DM’d it about something else, that’s a separate thread of memory. You can see all of these from the SESSIONS tab in the dashboard. The same agent answers in Telegram, Slack, the web chat, and any other channel you enable.
Worth noting before you ship to a public server
A meraGPT box is one user. If you enable your bot in a public Discord, every message in those channels gets sent through your LLM provider and billed to your key. The allowlist makes that bounded by channel, not by user. If you want per-user limits, the most pragmatic answer today is: keep the bot in private servers or restricted channels.
Related
- Turn your Hermes Agent into a Telegram bot — the same shape, different platform.
- The full messaging guide — covers Telegram, Discord, Slack, and the long tail.