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 server.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord server ID. |
channel_id | string | Yes | The Discord voice channel ID. |
Response
5Count recent messages in a Discord channel.
Counts how many messages were sent in a specific channel over the past number of days you choose.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The Discord channel ID. |
days | number | Yes | How many days back to count, as a whole number (0 or higher). Use 0 to count messages from today only. |
Response
42Count recent messages in a Discord server.
Counts how many messages were sent across a Discord server over the past number of days you choose.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord server ID. |
days | number | Yes | How many days back to count, as a whole number (0 or higher). Use 0 to count messages from today only. |
Response
1250Create a text channel in a Discord server.
Creates a new text channel in the specified Discord server with an optional topic and parent category.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The ID of the Discord server 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 ID of the category to place the channel under. |
Response
{
"id": "1234567890123456789",
"name": "new-channel",
"type": 0
}Get channels in a Discord server.
Retrieves the list of channels in the specified Discord server.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
guild_id | string | Yes | The Discord server ID (e.g., 987654321098765432). |
Response
[
{
"id": "1234567890123456789",
"name": "general",
"type": 0
},
{
"id": "1234567890123456790",
"name": "voice-chat",
"type": 2
}
]List my Discord server IDs.
Returns a list of IDs for the Discord servers you or your bot belong to.
Response
[
"1234567890123456789",
"9876543210987654321"
]Send a message to a Discord channel.
Sends a text message to the specified Discord channel. The message can optionally be read aloud (text-to-speech) or include rich 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 have Discord read the message aloud (text-to-speech). |
embeds | array | No | A list of rich embeds to include with the message. Each embed can have a title, description, color, and fields. |
Response
{
"channel_id": "9876543210987654321",
"content": "Hello, Discord!",
"id": "1234567890123456789"
}