Discord
Connects to the Discord REST API (v10) for sending messages, reading channel history, creating threads, and listing servers and channels via a bot account.
Add to an agent node's tools array with _node_type: "tool-discord". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
bot_token | Yes | Discord bot token, sent as Authorization: Bot <bot_token>. Typically a stored secret. |
{
"name": "discord",
"_node_type": "tool-discord",
"bot_token": "{{ secret.DISCORD_BOT_TOKEN }}"
}
Tools
discord_send_message
Send a message to a Discord channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Discord channel ID |
content | string | Yes | Message text (max 2000 chars) |
tts | boolean | No | Text-to-speech (default false) |
Returns: A confirmation message with the new message's ID.
discord_list_channels
List all channels in a Discord server.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | Discord server (guild) ID |
Returns: A newline-separated list of - #<name> (<type>) id: <id> lines, where type is text, voice, category, or announcement, or "No channels found.".
discord_get_messages
Fetch recent messages from a Discord channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Discord channel ID |
limit | number | No | Number of messages (1-100, default 20) |
before | string | No | Get messages before this message ID |
Returns: A newline-separated list of [date] **username**: content lines, or "No messages found.".
discord_create_thread
Create a new thread in a Discord channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Channel ID to create the thread in |
name | string | Yes | Thread name |
message | string | Yes | First message in the thread |
auto_archive_duration | number | No | Auto-archive after N minutes: 60, 1440, 4320, 10080 (default 1440) |
Returns: A confirmation message with the new thread's name and ID.
discord_list_servers
List all Discord servers (guilds) the bot is a member of.
No parameters.
Returns: A newline-separated list of - **<name>** id: <id> lines, or "Bot is not in any servers.".