Discord
API actions for the Discord integration.
Discord
Send messages and moderate communities using your Discord bot. After adding your bot token, invite the bot to each server with the right permissions so actions can run.
Count members in a voice channel.
Counts how many members are currently connected to a given voice channel in a guild.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord guild (server) ID. |
channel_id | string | Yes | The Discord voice channel ID. |
Response
5Count messages in a channel (last N days).
Counts how many messages were sent in a specific channel within the last N days.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The Discord channel ID. |
days | number | Yes | How many days back to count (non-negative integer). Use 0 to count messages from today only. |
Response
42Count messages in a guild (last N days).
Counts how many messages were sent in a specific guild within the last N days.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord guild ID. |
days | number | Yes | How many days back to count (non-negative integer). Use 0 to count messages from today only. |
Response
1250Create a text channel in a Discord guild.
Creates a new text channel in the specified Discord guild with an optional topic and parent category.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord guild (server) ID where the channel will be created. |
name | string | Yes | The name of the new channel. |
topic | string | No | The topic/description of the channel. |
parent_id | string | No | The parent category ID for the channel. |
Response
{
"id": "1234567890123456789",
"name": "new-channel",
"type": 0
}Get channels in a Discord guild.
Retrieves the list of channels for the specified Discord guild (server).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord guild (server) ID (e.g., 987654321098765432). |
Response
[
{
"id": "1234567890123456789",
"name": "general",
"type": 0
},
{
"id": "1234567890123456790",
"name": "voice-chat",
"type": 2
}
]List my Discord guild IDs.
Returns a list of guild (server) IDs that the user/bot belongs to.
Response
[
"1234567890123456789",
"9876543210987654321"
]Send a message to a Discord channel.
Sends a text message to the specified Discord channel. Optionally supports TTS and embeds.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The Discord channel ID to send the message to (e.g., 123456789012345678). |
content | string | Yes | The message content (text) to send. |
tts | boolean | No | Set to true to enable text-to-speech (TTS). |
embeds | array | No | Array of Discord embed objects. Each embed can contain title, description, color, fields, and other Discord embed properties. |
Response
{
"channel_id": "9876543210987654321",
"content": "Hello, Discord!",
"id": "1234567890123456789"
}