Skip to content

Discord ​

2 min read

Discord lets an agent participate in servers, channels, and direct messages through a bot. Setup combines server permissions, application intents, and channel rules in Kujira.

Create the application and bot ​

Create an application

In the Discord Developer Portal, create an application, add a bot, and save its token. Do not share it: it lets someone act as that bot.

Enable content access

On the Bot tab, enable Message Content Intent. Without it, Discord can deliver an event but omit the message content the agent must process.

Invite the bot to the server

Generate an OAuth2 link with the bot scope and grant only the required permissions. For a conversational channel, View Channel, Send Messages, Read Message History, and—when appropriate—attachment or embedded-link permissions are usually enough.

Create the channel in Kujira

In the agent's Channels, add Discord, enter the token, and authorize the specific channels or chats it should handle.
See intents and their associated events in Discord documentation.

Intents and permissions are separate controls

An intent determines which data Discord can deliver to an application; server permissions determine where the bot can read or write. Both must be configured.

Limit the agent's scope ​

Inviting a bot to a server does not give it access to every channel: visibility is determined by each channel's permissions. Use that layer with Kujira's allow list to reduce scope to the minimum required.

By default, group conversations require a mention to activate the agent. This is a good setting for shared channels: it prevents it from processing unrelated conversations and makes it clear when its intervention is requested. Create exceptions only in channels dedicated to the agent.

Support channel

Invite the bot to the channel, let it read history, and keep the mention rule enabled when people share that space.

Dedicated channel

Authorize only that channel in Kujira. You can relax the mention rule if every message should reach the agent.

Verify and diagnose ​

  1. Mention the bot in an authorized channel.
  2. Check that it can read the channel and post a response in Discord.
  3. If the event does not arrive, check the token, Message Content Intent, allow list, and mention rule.
  4. If it arrives but cannot reply, check the bot's effective permissions in that channel, including permissions denied by a category.

External conversations are handled from Agent Desk. For servers with more than one hundred communities, Discord may require additional approval for privileged intents.