Discord setup
Connect your agent to Discord with your own bot. It takes a few minutes: create a bot in Discord’s Developer Portal, find your Discord user id, paste both into Cohort, then invite the bot to a server you own. Your agent then answers your messages in Discord.
You’ll need two things: a bot token (from the Developer Portal) and your numeric Discord user id (so your agent knows it’s you). Both are covered below, and the in-app wizard links here at each step.
Step 1 — Create your bot in the Developer Portal
The Discord Developer Portal is where every Discord bot is created.
- Sign in to the Developer Portal and click New Application.
- Give it a name — this becomes your bot’s name — and accept the Developer Terms.
- In the application sidebar, click Bot. Discord creates a bot user for the application.
- Under Token, click Reset Token and copy the value Discord shows you.
MTIzNDU2Nzg5MD….GaBcDe.fGhIjKlMnOpQrStUvWxYz012345Copy the whole token. Keep it secret — anyone with it can control your bot. Discord only shows it once; if you lose it (or it leaks), click Reset Token again to roll it.
Heads up: if this bot is already running somewhere else, resetting the token disconnects it from that host. Make sure no production deployment depends on the current token before you generate a new one.
Step 2 — Enable Message Content Intent (required)
Your agent reads the text of the messages you send it, which Discord gates behind a privileged intent. Without it, the bot can’t even connect — Discord rejects the connection with a PrivilegedIntentsRequired error and your agent never comes online.
- On the Bot tab, scroll to Privileged Gateway Intents.
- Turn on Message Content Intent.
- Click Save Changes.
Leave Presence Intent and Server Members Intent off — Cohort doesn’t need them for a single-user connection.
Step 3 — Find your Discord user id
Your agent answers only you, so Cohort needs your numeric Discord user id — a number like 123456789012345678, not your username. Discord hides this behind Developer Mode.
- Open Discord and go to Settings → Advanced.
- Turn on Developer Mode.
- Right-click your own name (in any chat or the member list) and choose Copy User ID.
- Paste that number into Cohort.
Step 4 — Connect in Cohort
- In Cohort, go to Settings → Channels and click Connect on Discord.
- Follow the Developer Portal walkthrough (or skip it if you already have your token).
- Paste your bot token and your Discord user id, then click Connect.
Step 5 — Invite the bot to a server
You can’t DM a bot you share no server with — Discord requires the bot and you to be in at least one server together before it can talk to you.
- After you connect, the wizard shows an invite link for your bot.
- Open the link, pick a Discord server you own, and approve the permissions.
- @mention your bot in any channel it can see (or DM it). Once your agent replies, the connection is confirmed.
That’s it — your agent is live in Discord.
Troubleshooting
The bot doesn’t reply.
- Make sure you invited the bot to a server you share with it — Discord won’t deliver your messages otherwise.
- Make sure the Discord user id you entered is yours (the account you’re messaging from). Your agent ignores messages from anyone else. Re-check it with Developer Mode → right-click your name → Copy User ID.
- If the bot is online but silent on server messages, it may need Message Content Intent enabled (see Step 2).
- Give it a few seconds — the first message can take a moment to deliver.
“Bot token is invalid.”
- Copy the entire token from the Developer Portal (three dot-separated segments). If in doubt, click Reset Token on the Bot tab to generate a fresh one, then reconnect with it.
It says the bot is already connected.
- Each bot connects to one workspace at a time. Disconnect it from Settings → Channels first, then re-connect.
I want to start over.
- Disconnect the channel in Settings → Channels, then run through the wizard again. To fully retire a bot, Reset Token in the Developer Portal so the old token stops working.