Skip to main content

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

FieldRequiredDescription
bot_tokenYesDiscord 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

ParameterTypeRequiredDescription
channel_idstringYesDiscord channel ID
contentstringYesMessage text (max 2000 chars)
ttsbooleanNoText-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

ParameterTypeRequiredDescription
guild_idstringYesDiscord 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

ParameterTypeRequiredDescription
channel_idstringYesDiscord channel ID
limitnumberNoNumber of messages (1-100, default 20)
beforestringNoGet 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

ParameterTypeRequiredDescription
channel_idstringYesChannel ID to create the thread in
namestringYesThread name
messagestringYesFirst message in the thread
auto_archive_durationnumberNoAuto-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.".

Next