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

2

Click “New Application” → give it a name and click Create.

3

In the left sidebar, click “Bot”“Add Bot”“Yes, do it!”

4

Under TOKEN, click “Reset Token” → copy the Bot Token and store it safely.

Example placeholder:

DISCORD_BOT_TOKEN=your_bot_token_here
5

Scroll 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)

6

Click Save Changes.

Invite the Bot to a Discord Server

1

In the OAuth2 → URL Generator section:

  • Under SCOPES, check:

    • bot

    • applications.commands

  • Under BOT PERMISSIONS, select:

    • Send Messages

    • Read Message History

    • View Channels

    • Manage Messages (optional)

2

Copy the generated OAuth2 URL and open it in your browser.

3

Select a server you manage → click Authorize → complete CAPTCHA.

4

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)

1

Open Discord → click the ⚙️ Settings icon → Advanced.

2

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 nameCopy Channel ID. : DISCORD_CHANNEL_ID=123*********

Get a User ID

  • Right-click the user’s profile picture or nameCopy User ID. : DISCORD_USER_ID=12345********

Tools

discord_send_message

Send a message to a Discord channel

Input

Parameter
Type
Required
Description

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

Parameter
Type
Description

message

string

Message content

data

any

Response data

discord_get_messages

Retrieve messages from a Discord channel

Input

Parameter
Type
Required
Description

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

Parameter
Type
Description

message

string

Message content

data

any

Response data

discord_get_server

Retrieve information about a Discord server (guild)

Input

Parameter
Type
Required
Description

botToken

string

Yes

The bot token for authentication

serverId

string

Yes

The Discord server ID (guild ID)

Output

Parameter
Type
Description

message

string

Message content

data

any

Response data

discord_get_user

Retrieve information about a Discord user

Input

Parameter
Type
Required
Description

botToken

string

Yes

Discord bot token for authentication

userId

string

Yes

The Discord user ID

Output

Parameter
Type
Description

message

string

Message content

data

any

Response data

Notes

  • Category: tools

  • Type: discord

Was this helpful?