Lodol Docs

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

ParameterTypeRequiredDescription
guild_idstringYesThe Discord guild (server) ID.
channel_idstringYesThe Discord voice channel ID.

Response

5

Count messages in a channel (last N days).

Counts how many messages were sent in a specific channel within the last N days.

Parameters

ParameterTypeRequiredDescription
channel_idstringYesThe Discord channel ID.
daysnumberYesHow many days back to count (non-negative integer). Use 0 to count messages from today only.

Response

42

Count messages in a guild (last N days).

Counts how many messages were sent in a specific guild within the last N days.

Parameters

ParameterTypeRequiredDescription
guild_idstringYesThe Discord guild ID.
daysnumberYesHow many days back to count (non-negative integer). Use 0 to count messages from today only.

Response

1250

Create 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

ParameterTypeRequiredDescription
guild_idstringYesThe Discord guild (server) ID where the channel will be created.
namestringYesThe name of the new channel.
topicstringNoThe topic/description of the channel.
parent_idstringNoThe 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

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

ParameterTypeRequiredDescription
channel_idstringYesThe Discord channel ID to send the message to (e.g., 123456789012345678).
contentstringYesThe message content (text) to send.
ttsbooleanNoSet to true to enable text-to-speech (TTS).
embedsarrayNoArray 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"
}

On this page