Discord Integration
This guide walks you through connecting an Aigentic agent to a Discord server as a bot.
Prerequisites
Section titled “Prerequisites”- An Aigentic agent already created
- A Discord account with permission to add bots to a server
Step 1: Create a Discord Application
Section titled “Step 1: Create a Discord Application”- Go to the Discord Developer Portal.
- Click New Application.
- Enter a name for your application (e.g., “My AI Agent”).
- Click Create.
Step 2: Create the Bot User
Section titled “Step 2: Create the Bot User”- In your application settings, click Bot in the left sidebar.
- Click Add Bot, then confirm.
- Under Token, click Copy to copy the bot token.
-
Under Privileged Gateway Intents, enable:
- Message Content Intent — Required for the bot to read message text.
- Server Members Intent — Optional, enables member-related features.
-
Click Save Changes.
Step 3: Invite the Bot to Your Server
Section titled “Step 3: Invite the Bot to Your Server”- Go to OAuth2 > URL Generator in the Developer Portal.
- Under Scopes, check
botandapplications.commands. - Under Bot Permissions, check:
- Send Messages
- Read Message History
- Embed Links
- Attach Files
- Add Reactions
- Use Slash Commands
- Copy the generated URL at the bottom.
- Open the URL in your browser.
- Select the server where you want to add the bot and click Authorize.
Step 4: Configure in Aigentic
Section titled “Step 4: Configure in Aigentic”- Open Channels from the sidebar.
- Click Configure on the Discord card.
- Paste the bot token you copied in Step 2.
- Enter the Channel ID where the bot should operate (right-click the channel in Discord with Developer Mode enabled and copy the ID).
- Select the responding agent from the dropdown.
- Optionally click Test Connection to verify everything is set up correctly.
- Click Save Configuration.
The token is encrypted and stored in the credential vault.
Step 5: Test the Connection
Section titled “Step 5: Test the Connection”- Go to your Discord server.
- In a channel the bot has access to, send a message mentioning the bot:
@MyAIAgent What can you help me with?
- The bot should respond within a few seconds.
Discord Features
Section titled “Discord Features”Thread Support
Section titled “Thread Support”The bot can create threads for longer conversations, keeping channels organized. Follow-up messages within the thread maintain conversation context.
Embeds and Formatting
Section titled “Embeds and Formatting”Agent responses are automatically formatted for Discord. Markdown is converted to Discord’s supported subset. Long responses are split into multiple messages if they exceed Discord’s 2000-character limit.
Troubleshooting
Section titled “Troubleshooting”Bot is online but not responding
Section titled “Bot is online but not responding”- Verify Message Content Intent is enabled in the Developer Portal.
- Check that the bot has Read Messages and Send Messages permissions in the channel.
- Verify the trigger mode — if set to mentions only, you must @mention the bot.
Bot shows as offline
Section titled “Bot shows as offline”- Ensure the agent is active in Aigentic.
- Verify the bot token is correct (click Configure on the Discord card in the Channels page).
”Missing Permissions” errors
Section titled “”Missing Permissions” errors”- Re-invite the bot using the OAuth URL with the correct permissions.
- Check channel-specific permission overrides in Discord’s channel settings.