Documentation
Connections/Discord

Discord

Learn how to connect your agent to Discord.

Creating a Discord Application

First, you'll need to create a new application in the Discord Developer Portal. This is the foundation for your Discord bot.

  1. Navigate to the Discord Developer Portal
  2. Click the "New Application" button in the top right corner

Create a new application

Configuring Your Bot's Identity

Choose a memorable and appropriate name for your bot. This name will be displayed to users in Discord servers.

  1. Enter a unique name for your bot
  2. Click "Create" to proceed

Select a name

Obtaining the Application ID

The Application ID is a unique identifier for your bot that you'll need for configuration.

  1. Go to the "OAuth2" tab in the left sidebar
  2. Locate and copy the "Client ID" - this will be your DISCORD_APPLICATION_ID

Select the "OAuth2" tab

Getting Your Bot Token

The bot token is like a password that allows your agent to connect to Discord. Keep this token secure and never share it publicly.

  1. Navigate to the "Bot" tab in the left sidebar
  2. Click "Reset Token" and copy the generated token - this is your DISCORD_API_TOKEN

Select the "Bot" tab

Setting Bot Permissions

Your bot needs specific permissions to function properly in Discord servers. Configure these carefully to ensure security.

  1. Scroll down on the "Bot" tab
  2. Enable the necessary permissions as shown in the image below
  3. Make sure to save your changes

Fix permissions

Configuring Agent Secrets

Add the necessary credentials to your agent's configuration to enable Discord connectivity.

  1. Navigate to your agent's settings
  2. Add both the DISCORD_APPLICATION_ID and DISCORD_API_TOKEN
  3. Save your changes

Add secrets

Installing the Bot

The final step is to add your bot to your Discord server. Make sure you have the appropriate server permissions to do this.

  1. Click the installation link generated in your Discord application
  2. Select the server where you want to add the bot
  3. Review and approve the requested permissions

Install to Discord

Setup Complete!

Congratulations! Your agent is now successfully connected to Discord and ready to interact with users. You can test it by sending a message in your server.

Connected

On this page