CA
Docs home

Discord

Connect Discord when you want an agent available in Discord direct messages or servers.

Prerequisites

  • An existing Cloud Agents agent.
  • Permission to create a Discord application.
  • Permission to invite the bot to the target server.

Create the Discord application

  1. Open the Discord Developer Portal.
  2. Create a new application.
  3. Open Bot and create a bot user.
  4. Reset and copy the bot token.
  5. Enable Message Content Intent under Privileged Gateway Intents.

Message Content Intent is required. Without it, Cloud Agents can connect the bot but cannot read user prompts.

Invite the bot

Open OAuth2 URL Generator:

  1. Select the bot scope.
  2. Select these bot permissions:
PermissionWhy
View ChannelsLet the bot see messages in target channels.
Send MessagesSend agent replies.
Read Message HistoryRead message context delivered by the Gateway.

Copy the generated URL, open it, and invite the bot to the server.

Connect it to Cloud Agents

  1. Open Settings -> Channels.
  2. Create a new channel and choose Discord.
  3. Select the agent that should receive messages.
  4. Enter a label and paste the bot token.
  5. Optionally restrict the channel to specific servers.
  6. Create the channel.
  7. Run the channel test.

Discord does not require you to paste an inbound URL into Discord.

SettingRecommendation
Allowed serversRestrict to known server IDs when the bot is invited to multiple servers.
Mention onlyKeep on for servers so the agent replies only when mentioned. DMs still work.
Shared sessionKeep off unless everyone in the server channel should share one conversation.
Progress modeUse preview if you want one message updated while the agent works.

Verify

Open the channel detail page and run Test. A healthy channel confirms the bot identity and Message Content Intent status.

Troubleshooting

  • Message Content Intent is disabled: enable it in the Developer Portal, then test the channel again.
  • Bot connects but ignores server messages: mention the bot or turn off mention-only mode.
  • Messages from a server are ignored: check the allowed server list.
  • Bot cannot send replies: re-invite it with View Channels, Send Messages, and Read Message History permissions.

See also