discord.js) — no public webhook URL is required.
You don’t need to understand the technical details to use this feature. The configuration examples below are copy-paste ready.
Prerequisites
- Comis installed and running (Quickstart)
- A Discord account
- Permission to create a bot in the target server (Manage Server or Administrator)
Setup
Create a Discord application
Go to the Discord Developer Portal
and sign in with your Discord account.Click New Application in the top right, name it (for example,
MyTeamBot — this will be the default bot display name), and click
Create.In the left sidebar, click Bot to open the bot settings page.
Enable required intents
On the Bot settings page, scroll down to Privileged Gateway Intents.Enable Message Content Intent. This is critical — without it, your bot
receives empty messages in server channels and cannot respond to anything.Optionally enable Server Members Intent if your agent needs to look up
member information (names, roles, join dates).Click Save Changes at the bottom of the page.
Copy the bot token
On the same Bot page, find the Token section near the top.Click Reset Token (or Copy if the token is already visible). Discord
will show the token exactly once — copy it immediately and store it somewhere
safe. If you lose it, you will need to reset it again.This token is your bot’s password. Anyone who has it can control your bot.
Invite the bot to your server
In the left sidebar, go to OAuth2 and then URL Generator.Under Scopes, check the
bot checkbox.Under Bot Permissions, select:- Send Messages
- Read Message History
- Add Reactions
- Use Slash Commands
- Attach Files
- Create Public Threads (only if you want the agent to start native threads)
- Manage Messages (only if you want the agent to delete or moderate other users’ messages — not required for editing the bot’s own streaming responses)
Configure Comis
Add the Discord channel to your Comis configuration file (Set the
~/.comis/config.yaml):DISCORD_BOT_TOKEN environment variable in your ~/.comis/.env file:Restart and verify
Restart the Comis daemon to pick up the new configuration:Check the logs for a successful connection:Look for a line containing “Discord adapter connected” or
“channel-discord activated”. If you see this, your bot is online and ready.Go to your Discord server — the bot should appear in the member list with a
green “Online” status. Send it a message to confirm it responds.
Configuration
These options go underchannels.discord in your config.yaml:
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | Turns on the Discord adapter |
botToken | string / SecretRef | (required) | Bot authentication token from the Developer Portal |
allowFrom | string[] | [] (all) | Restrict to specific Discord user IDs. Empty means all users can talk to the bot. |
mediaProcessing.transcribeAudio | boolean | true | Transcribe voice messages to text before passing to the agent |
mediaProcessing.analyzeImages | boolean | true | Describe images sent to the bot using AI vision |
mediaProcessing.describeVideos | boolean | true | Extract descriptions from video content |
mediaProcessing.extractDocuments | boolean | true | Extract text from PDFs, DOCX, and other documents |
mediaProcessing.understandLinks | boolean | true | Fetch and summarize URLs included in messages |
What your agent can do
Once connected to Discord, your agent can:- Send, edit, and delete messages in any channel it has access to
- React to messages with Unicode and custom guild emoji
- Reply in threads (native Discord threads, max depth 1)
- Send files and images (up to 25 MB per attachment)
- Send native voice messages (audio attachments uploaded as Discord voice notes with waveform and duration metadata)
- Create interactive buttons for user choices
- Send rich embeds and cards with formatted content
- Apply message effects (spoiler wrapping)
- Stream responses with live editing (updates every 500 ms)
- Read message history for conversation context
- Participate in forum channels
- Send native polls (question + answers, with optional multiselect and a
duration in hours) via the
pollplatform action - Create, list, and reply in threads; create, edit, delete, and move channels; set bot presence; pin or unpin messages; ban, kick, or assign roles to members — all via platform actions
Discord poll vote events (live tallies) are not yet wired into Comis.
Polls send and render correctly; the agent does not receive incremental vote
notifications. The final result is visible to the agent the next time it
fetches the message.
Platform limits
| Limit | Value | What Comis does about it |
|---|---|---|
| Message length | 2,000 characters | Automatically splits long responses into multiple messages at paragraph boundaries |
| Attachment size | 25 MB | Files over 25 MB are rejected with a user-friendly error message |
| Embeds per message | 10 | Multiple embeds are batched to stay within the platform limit |
| Rate limits | 5 messages per 5 seconds per channel | Comis throttles delivery and retries with exponential backoff if rate-limited |
Complete walkthrough: from zero to first reply
A start-to-finish run for a fresh server bot named MyTeamBot:Create the application and copy the token
In the Discord Developer Portal,
click New Application and call it
MyTeamBot.
Open Bot, enable Message Content Intent under Privileged Gateway
Intents, click Save Changes, then click Reset Token and copy the
new token (Discord shows it once).Invite the bot to your server
Under OAuth2 -> URL Generator, check
bot, then check
Send Messages, Read Message History, Add Reactions, and
Attach Files. Open the generated URL, pick a server you administer,
and confirm the invite.Restart the daemon and verify
Discord adapter connected. The bot’s status in your server’s
member list flips from grey to green.Troubleshooting
Bot connects but ignores messages
Bot connects but ignores messages
What happened: The Message Content privileged intent is not enabled in the
Discord Developer Portal.How to fix it: Go to the
Discord Developer Portal, select
your application, click Bot in the sidebar, scroll to Privileged Gateway
Intents, and enable Message Content Intent. Save your changes and restart
the Comis daemon.
Bot is offline in the member list
Bot is offline in the member list
What happened: The bot token is invalid, expired, or was reset without
updating the Comis configuration.How to fix it: Go to the
Discord Developer Portal, select
your application, click Bot, and click Reset Token. Copy the new token,
update it in your
~/.comis/.env file, and restart the daemon.Messages are not sent to some channels
Messages are not sent to some channels
What happened: The bot does not have the required permissions in that
specific channel. Discord allows per-channel permission overrides that can
block the bot even if it has server-wide permissions.How to fix it: In Discord, right-click the channel, select Edit Channel,
go to Permissions, and make sure your bot’s role has Send Messages and
View Channel permissions. Also check that no permission override is
explicitly denying these permissions.
Delivery Infrastructure
How streaming, typing indicators, and retry logic work under the hood.
Multiple users & teams
Run one install for a whole team - private per person, isolated per agent.
All Channels
Compare all 9 supported platforms side by side.
Agent Configuration
Set up your agent’s personality, tools, and behavior.
Secret Management
Learn how to manage API keys and tokens securely.
