discord
Discord is a communication platform that supports text, voice, and video interactions within servers and communities. Discord bots extend the platform’s capabilities by automating actions, responding to messages, and integrating with external systems.
With a Discord bot, you can:
Send messages: Post automated updates or notifications into channels.
Read messages: Retrieve recent chat messages for analysis or display.
Access server info: Retrieve metadata such as server name, member count, and roles.
Access user info: Fetch specific user information by their unique Discord ID.
In Agent Forge, the Discord integration allows your agents to interact with servers programmatically, automate notifications, and connect workflows with Discord communities.
Setup Instructions
Follow these steps carefully to create a Discord bot, get your IDs, and connect everything properly.
Create a Discord Application and Bot
Go to the Discord Developer Portal.
Click “New Application” → give it a name and click Create.
In the left sidebar, click “Bot” → “Add Bot” → “Yes, do it!”
Under TOKEN, click “Reset Token” → copy the Bot Token and store it safely.
Example placeholder:
DISCORD_BOT_TOKEN=your_bot_token_hereScroll down to Privileged Gateway Intents and enable:
Message Content Intent
Server Members Intent (if you want user data)
Presence Intent (optional but useful for activity info)
Click Save Changes.
Invite the Bot to a Discord Server
In the OAuth2 → URL Generator section:
Under SCOPES, check:
botapplications.commands
Under BOT PERMISSIONS, select:
Send MessagesRead Message HistoryView ChannelsManage Messages(optional)
Copy the generated OAuth2 URL and open it in your browser.
Select a server you manage → click Authorize → complete CAPTCHA.
Your bot will now appear in the server’s member list.
3️⃣ Get Required IDs
You’ll need several Discord IDs for API access.
Enable Developer Mode (one-time)
Open Discord → click the ⚙️ Settings icon → Advanced.
Turn on Developer Mode.
Now you can right-click items to copy their unique IDs.
Get the Server ID (Guild ID)
Right-click your server icon in Discord → Copy Server ID. :
DISCORD_SERVER_ID=123456789012345678
Get the Channel ID
Right-click the channel name → Copy Channel ID. :
DISCORD_CHANNEL_ID=123*********
Get a User ID
Right-click the user’s profile picture or name → Copy User ID. :
DISCORD_USER_ID=12345********
Tools
discord_send_message
discord_send_messageSend a message to a Discord channel
Input
botToken
string
Yes
The bot token for authentication
channelId
string
Yes
The Discord channel ID to send the message to
content
string
No
The text content of the message
serverId
string
Yes
The Discord server ID (guild ID)
Output
message
string
Message content
data
any
Response data
discord_get_messages
discord_get_messagesRetrieve messages from a Discord channel
Input
botToken
string
Yes
The bot token for authentication
channelId
string
Yes
The Discord channel ID to retrieve messages from
limit
number
No
Maximum number of messages to retrieve (default: 10, max: 100)
Output
message
string
Message content
data
any
Response data
discord_get_server
discord_get_serverRetrieve information about a Discord server (guild)
Input
botToken
string
Yes
The bot token for authentication
serverId
string
Yes
The Discord server ID (guild ID)
Output
message
string
Message content
data
any
Response data
discord_get_user
discord_get_userRetrieve information about a Discord user
Input
botToken
string
Yes
Discord bot token for authentication
userId
string
Yes
The Discord user ID
Output
message
string
Message content
data
any
Response data
Notes
Category:
toolsType:
discord
Was this helpful?
