Overview
The Discord integration lets you deploy Nadoo AI agents as Discord bots in your server. Users interact with the bot through channel messages, direct messages, slash commands, and interactive components. The integration supports rich embeds, reactions, button interactions, and file attachments.Setup
Create a Discord Application
- Go to the Discord Developer Portal and click New Application.
- Give your application a name (e.g., “Nadoo AI Agent”) and click Create.
- Note the Application ID from the General Information page.
Create a Bot
- Navigate to the Bot section in the left sidebar.
- Click Add Bot and confirm.
- Under the bot’s username, click Reset Token to generate a new token. Copy and save it securely — you will not be able to see it again.
- Under Privileged Gateway Intents, enable:
- Message Content Intent — Required for reading message text
- Server Members Intent — Optional, for user lookup features
Configure Bot Permissions
Navigate to OAuth2 > URL Generator and select the following:Scopes:
Copy the generated URL at the bottom of the page.
botapplications.commands
| Permission | Purpose |
|---|---|
| Send Messages | Reply to user messages |
| Read Message History | Access conversation context |
| Embed Links | Send rich embed responses |
| Attach Files | Share files with users |
| Use Slash Commands | Register and respond to slash commands |
| Add Reactions | React to messages |
| Manage Messages | Edit or delete bot messages (optional) |
Invite the Bot to Your Server
- Open the generated URL in your browser.
- Select the server where you want to add the bot.
- Authorize the requested permissions.
- Complete the CAPTCHA if prompted.
Configure in Nadoo AI
In the Nadoo AI platform:
- Navigate to your workspace and open Channels.
- Click Add Channel and select Discord.
- Enter the following credentials:
| Field | Value |
|---|---|
| Bot Token | The bot token from Step 2 |
| Application ID | The application ID from Step 1 |
| Guild ID | Your Discord server ID (right-click server name > Copy Server ID) |
| Workflow | Select the workflow to handle Discord messages |
- Click Save and toggle the channel to Active.
Supported Features
Channel Messages and DMs
| Feature | Description |
|---|---|
| Channel messages | The bot responds when mentioned (@bot) or when configured to listen to all messages in specific channels |
| Direct messages | Users can DM the bot for private conversations |
| Thread support | The bot can create and reply within Discord threads |
| Conversation history | Previous messages in the channel or DM are included as context |
Slash Commands
Discord slash commands provide a structured way for users to interact with the bot. Nadoo AI automatically registers slash commands when you configure them.Rich Embeds
The bot sends responses as rich embeds with custom formatting, colors, and fields.Interactive Components
| Component | Description |
|---|---|
| Buttons | Action buttons for user choices (e.g., “Yes / No”, “Show more”) |
| Select menus | Dropdown menus for selecting from a list of options |
| Reactions | The bot can add reactions to messages and respond to user reactions |
File Handling
| Feature | Description |
|---|---|
| File attachments | Users can attach files. The bot can process documents, images, and other supported formats. |
| File responses | The bot can send files back to the user (reports, exports, generated content) |
Guild Permissions
Control which channels and roles can interact with the bot using Discord’s native permission system.Channel Restrictions
Restrict the bot to specific channels by configuring channel permissions in Discord:- Go to the channel’s settings > Permissions.
- Add the bot role and set the desired permissions.
- Deny permissions in channels where the bot should not operate.
Role-Based Access
Restrict bot interactions to specific Discord roles:admin_roles can access additional commands like /config and /status.
Rate Limits and Best Practices
Discord API Rate Limits
Discord enforces rate limits per route. Nadoo AI’s delivery queue handles these automatically.| Route | Rate Limit |
|---|---|
| Send message (per channel) | 5 messages per 5 seconds |
| Edit message | 5 edits per 5 seconds |
| Global | 50 requests per second |
| Slash command registration | 200 per day per guild |
Best Practices
Use slash commands for structured input
Use slash commands for structured input
Slash commands provide autocomplete, parameter validation, and a better user experience than parsing free-form messages. Define commands for your most common agent interactions.
Use ephemeral responses for private data
Use ephemeral responses for private data
For sensitive information, configure the bot to send ephemeral messages that are only visible to the requesting user. Set
ephemeral: true in the response configuration.Use embeds for structured responses
Use embeds for structured responses
Embeds are more readable than plain text for structured data. Use fields for key-value pairs, footers for source citations, and color coding for response categories.
Set up a dedicated bot channel
Set up a dedicated bot channel
Create a dedicated channel for bot interactions (e.g., #ai-assistant) to avoid cluttering other channels. Users who want to interact with the bot can go to that channel.
Troubleshooting
| Issue | Solution |
|---|---|
| Bot is offline in Discord | Verify the bot token is correct and the channel is Active in Nadoo AI |
| ”Missing Permissions” error | Check that the bot has the required permissions in the target channel |
| Slash commands not showing | Commands can take up to 1 hour to propagate globally. Use guild-specific commands for instant registration. |
| Message Content Intent error | Enable the Message Content Intent in the Discord Developer Portal under Bot > Privileged Gateway Intents |