Skip to main content
Connect your Comis agent to Discord servers and DMs. Discord supports threads, reactions, embeds, buttons, polls, file attachments up to 25 MB, and live-streaming responses that update in real time as your agent thinks. Comis connects via the Discord Gateway (a persistent WebSocket maintained by 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

  • A Discord account
  • Permission to create a bot in the target server (Manage Server or Administrator)
Discord requires the Message Content privileged intent to be enabled in the Developer Portal. Without it, your bot will connect successfully but receive empty messages in server channels. Step 2 below shows you exactly where to enable this.

Setup

1

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.
2

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.
3

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.
4

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)
Copy the generated URL at the bottom of the page and open it in your browser. Select the server you want to add the bot to and click Authorize.
5

Configure Comis

Add the Discord channel to your Comis configuration file (~/.comis/config.yaml):
channels:
  discord:
    enabled: true
    botToken: "${DISCORD_BOT_TOKEN}"
Set the DISCORD_BOT_TOKEN environment variable in your ~/.comis/.env file:
DISCORD_BOT_TOKEN=your-token-from-step-3
Never store API keys, tokens, or passwords directly in config.yaml. Use the .env file or Secret Manager for credential management.
6

Restart and verify

Restart the Comis daemon to pick up the new configuration:
comis daemon stop && comis daemon start
Check the logs for a successful connection:
comis daemon logs
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 under channels.discord in your config.yaml:
OptionTypeDefaultWhat it does
enabledbooleanfalseTurns on the Discord adapter
botTokenstring / SecretRef(required)Bot authentication token from the Developer Portal
allowFromstring[][] (all)Restrict to specific Discord user IDs. Empty means all users can talk to the bot.
mediaProcessing.transcribeAudiobooleantrueTranscribe voice messages to text before passing to the agent
mediaProcessing.analyzeImagesbooleantrueDescribe images sent to the bot using AI vision
mediaProcessing.describeVideosbooleantrueExtract descriptions from video content
mediaProcessing.extractDocumentsbooleantrueExtract text from PDFs, DOCX, and other documents
mediaProcessing.understandLinksbooleantrueFetch 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 poll platform 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

LimitValueWhat Comis does about it
Message length2,000 charactersAutomatically splits long responses into multiple messages at paragraph boundaries
Attachment size25 MBFiles over 25 MB are rejected with a user-friendly error message
Embeds per message10Multiple embeds are batched to stay within the platform limit
Rate limits5 messages per 5 seconds per channelComis 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:
1

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).
2

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.
3

Wire it into Comis

Add to ~/.comis/.env:
DISCORD_BOT_TOKEN=MTIz.your-token-from-the-portal
Add to ~/.comis/config.yaml:
channels:
  discord:
    enabled: true
    botToken: "${DISCORD_BOT_TOKEN}"
4

Restart the daemon and verify

comis daemon stop && comis daemon start
comis daemon logs
Look for Discord adapter connected. The bot’s status in your server’s member list flips from grey to green.
5

Send the first message

In any channel where MyTeamBot has access, type @MyTeamBot hello!. A typing indicator appears (refreshed every 8 seconds), then the agent’s reply streams in with edits every 500 ms.

Troubleshooting

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.
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.
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.