# 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.

App · Messaging · 66 actions · 8 triggers. Web page: https://docs.lodol.com/docs/integrations/discord

## Triggers

Start a workflow when something happens in Discord. See [how triggers work](https://docs.lodol.com/docs/concepts/triggers.md).

### Discord New Message

Triggers when a new message is posted in a Discord channel.

**Filters**: Narrow which events start a run.

- `channel_id` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `message_id` (text)
- `channel_id` (text)
- `author_id` (text)
- `author_username` (text)
- `content` (text)
- `timestamp` (text)

### Reaction added to a message

Runs when someone reacts to a specific Discord message with a given emoji.

**Filters**: Narrow which events start a run.

- `channel_id` (required)
- `message_id` (required)
- `emoji` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `channel_id` (text)
- `message_id` (text)
- `emoji` (text)
- `user_id` (text)
- `username` (text)

### Member joined the server

Runs when someone joins a Discord server. Needs the Server Members intent enabled on your bot.

**Filters**: Narrow which events start a run.

- `guild_id` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `guild_id` (text)
- `user_id` (text)
- `username` (text)
- `display_name` (text)
- `joined_at` (text)
- `bot` (true/false)

### Member banned

Runs when someone is banned from a Discord server.

**Filters**: Narrow which events start a run.

- `guild_id` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `guild_id` (text)
- `user_id` (text)
- `username` (text)
- `reason` (text)

### Channel created

Runs when a new channel is created in a Discord server.

**Filters**: Narrow which events start a run.

- `guild_id` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `guild_id` (text)
- `channel_id` (text)
- `name` (text)
- `type` (number)

### Thread or forum post created

Runs when a new thread or forum post appears in a Discord server.

**Filters**: Narrow which events start a run.

- `guild_id` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `guild_id` (text)
- `thread_id` (text)
- `name` (text)
- `parent_id` (text)
- `type` (number)

### Event scheduled

Runs when a new event is scheduled in a Discord server.

**Filters**: Narrow which events start a run.

- `guild_id` (required)

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `guild_id` (text)
- `event_id` (text)
- `name` (text)
- `scheduled_start_time` (text)
- `location` (text)
- `channel_id` (text)

### Audit log entry added

Runs when something is recorded in a Discord server's audit log. Give an action type to watch one kind of change: 20 is a kick, 22 a ban, 25 a member's roles changing.

**Filters**: Narrow which events start a run.

- `guild_id` (required)
- `action_type`

**Event fields**: What a run starts with. Later steps read each field with an @ reference.

- `guild_id` (text)
- `entry_id` (text)
- `action_type` (number)
- `target_id` (text)
- `actor_id` (text)
- `actor_username` (text)
- `reason` (text)

## Actions

### Add someone to a thread

Add a member to a thread so they receive its messages.

**Inputs**

- Thread (`channel_id`, text, required): The thread to add them to.
- User ID (`user_id`, text, required): The Discord user ID.

**Outputs**

- `added` (true/false)
- `channel_id` (text)
- `user_id` (text)

**Example output**

```json
{
  "added": true,
  "channel_id": "4444444444444444444",
  "user_id": "111"
}
```

### Archive or reopen a thread

Archive a thread, reopen an archived one, or lock it so only moderators can post.

**Inputs**

- Thread (`channel_id`, text, required): The thread to change.
- Archived (`archived`, true/false): Archive the thread. Set false to reopen it. Default: `true`.
- Locked (`locked`, true/false): Lock the thread so only moderators can post.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `archived` (true/false)
- `id` (text)
- `name` (text)

**Example output**

```json
{
  "archived": true,
  "id": "4444444444444444444",
  "name": "Deploy postmortem"
}
```

### Ban a member

Ban a user from a server and optionally delete their recent messages. They cannot rejoin until the ban is lifted.

**Inputs**

- Server (`guild_id`, text, required): The server to ban them from.
- User ID (`user_id`, text, required): The Discord user ID.
- Delete message days (`delete_message_days`, number): Delete their messages from the last this many days (0-7). From 0 to 7. Default: `0`.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `banned` (true/false)
- `guild_id` (text)
- `user_id` (text)

**Example output**

```json
{
  "banned": true,
  "guild_id": "1234567890123456789",
  "user_id": "111"
}
```

### Bulk delete messages

Delete between 2 and 100 messages in one call. Discord cannot bulk delete messages older than 14 days and rejects the whole request if any are included.

**Inputs**

- Channel (`channel_id`, text, required): The channel to delete messages from.
- Message IDS (`message_ids`, list, required): A list of 2-100 message IDs to delete.
- Reason (`reason`, text): Why the messages are being deleted; shown in the audit log.

**Outputs**

- `channel_id` (text)
- `deleted` (number)
- `message_ids` (list)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "deleted": 3,
  "message_ids": [
    "111",
    "222",
    "333"
  ]
}
```

### Cancel a scheduled event

Cancel a scheduled event and remove it from the server.

**Inputs**

- Server (`guild_id`, text, required): The server the event is in.
- Event ID (`event_id`, text, required): The event to cancel.

**Outputs**

- `deleted` (true/false)
- `event_id` (text)
- `guild_id` (text)

**Example output**

```json
{
  "deleted": true,
  "event_id": "888",
  "guild_id": "1234567890123456789"
}
```

### Clear reactions

Remove every reaction from a message, or every reaction of one emoji if an emoji is given.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message.
- Emoji (`emoji`, text): Clear only this emoji's reactions. Blank clears all.

**Outputs**

- `cleared` (true/false)
- `emoji` (text)
- `message_id` (text)

**Example output**

```json
{
  "cleared": true,
  "emoji": null,
  "message_id": "1234567890123456789"
}
```

### Count recent messages in a Discord channel.

Counts how many messages were sent in a specific channel over the past number of days you choose.

**Inputs**

- Channel ID (`channel_id`, text, required): The Discord channel ID.
- Days (`days`, number, required): How many days back to count, as a whole number (0 or higher). Use 0 to count messages from today only.

**Outputs**: Response envelope; the payload is in the "count" field.

- `count` (number): The count of messages in the channel within the time period.
- `status` (text)

**Example output**

```json
{
  "count": 42,
  "status": "success"
}
```

### Count recent messages in a Discord server.

Counts how many messages were sent across a Discord server over the past number of days you choose.

**Inputs**

- Server ID (`guild_id`, text, required): The Discord server ID.
- Days (`days`, number, required): How many days back to count, as a whole number (0 or higher). Use 0 to count messages from today only.

**Outputs**: Response envelope; the payload is in the "count" field.

- `count` (number): The total count of messages across all channels.
- `status` (text)

**Example output**

```json
{
  "count": 1250,
  "status": "success"
}
```

### Create a channel in a Discord server.

Creates a channel in the specified Discord server. Choose text, voice, category, announcement, stage, forum or media.

**Inputs**

- Server ID (`guild_id`, text, required): The ID of the Discord server where the channel will be created.
- Name (`name`, text, required): The name of the new channel.
- Channel type (`channel_type`, text): One of text, voice, category, announcement, stage, forum or media. Defaults to text. Default: `text`.
- Topic (`topic`, text): The topic/description of the channel.
- Parent category ID (`parent_id`, text): The ID of the category to place the channel under.

**Outputs**: Response envelope; the payload is in the "channel" field.

- `channel` (object)
- `status` (text)

**Example output**

```json
{
  "channel": {
    "id": "1234567890123456789",
    "name": "new-channel",
    "type": 0
  },
  "status": "success"
}
```

### Create a forum post

Create a post in a forum or media channel. A forum post is a thread that must be created together with its first message.

**Inputs**

- Forum channel (`channel_id`, text, required): The forum or media channel to post in.
- Name (`name`, text, required): The post's title.
- Content (`content`, text, required): The opening message.
- Auto archive duration (`auto_archive_duration`, number): Minutes of inactivity before it auto-archives: 60, 1440, 4320 or 10080. Default: `1440`.

**Outputs**

- `id` (text)
- `name` (text)
- `parent_id` (text)
- `type` (number)

**Example output**

```json
{
  "id": "4444444444444444444",
  "name": "Bug: login loop",
  "parent_id": "9876543210987654321",
  "type": 11
}
```

### Create a role

Create a role. Colour is a decimal RGB value, so red (0xFF0000) is 16711680.

**Inputs**

- Server (`guild_id`, text, required): The server to create the role in.
- Name (`name`, text, required): The role's name.
- Color (`color`, number): Colour as a decimal RGB integer, e.g. 16711680 for red.
- Hoist (`hoist`, true/false): Show members with this role separately in the member list.
- Mentionable (`mentionable`, true/false): Let anyone mention this role.
- Permissions (`permissions`, text): Permission bitfield as a decimal string.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `color` (number)
- `id` (text)
- `name` (text)
- `permissions` (text)
- `position` (number)

**Example output**

```json
{
  "color": 3447003,
  "hoist": true,
  "id": "222",
  "managed": false,
  "mentionable": true,
  "name": "Moderator",
  "permissions": "8192",
  "position": 5
}
```

### Create a webhook

Create a webhook on a channel. A webhook can post under any name and avatar, unlike the bot itself. Discord rejects names containing 'clyde' or 'discord'.

**Inputs**

- Channel (`channel_id`, text, required): The channel the webhook posts to.
- Name (`name`, text, required): The webhook's default display name.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `channel_id` (text)
- `id` (text)
- `name` (text)
- `token` (text)
- `url` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "id": "777",
  "name": "Status bot",
  "token": "abc...",
  "url": "https://discord.com/api/webhooks/777/abc..."
}
```

### Create an invite

Create an invite link to a channel. A max age or max uses of 0 means the invite never expires.

**Inputs**

- Channel (`channel_id`, text, required): The channel to invite people to.
- Max age (`max_age`, number): Seconds until the invite expires. 0 never expires. From 0 to 604800. Default: `86400`.
- Max uses (`max_uses`, number): How many times it can be used. 0 is unlimited. From 0 to 100. Default: `0`.
- Temporary (`temporary`, true/false): Grant temporary membership that ends when they disconnect.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `channel_id` (text)
- `code` (text)
- `max_age` (number)
- `max_uses` (number)
- `url` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "code": "aBcD1234",
  "max_age": 86400,
  "max_uses": 0,
  "url": "https://discord.gg/aBcD1234"
}
```

### Delete a channel

Permanently delete a channel. Deleting a category does not delete the channels inside it; they simply lose their category.

**Inputs**

- Channel (`channel_id`, text, required): The channel to delete.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `deleted` (true/false)
- `id` (text)
- `name` (text)

**Example output**

```json
{
  "deleted": true,
  "id": "9876543210987654321",
  "name": "support"
}
```

### Delete a message

Permanently delete a single Discord message.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to delete.
- Reason (`reason`, text): Why the message is being deleted; shown in the server's audit log.

**Outputs**

- `channel_id` (text)
- `deleted` (true/false)
- `message_id` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "deleted": true,
  "message_id": "1234567890123456789"
}
```

### Delete a role

Delete a role, removing it from everyone who had it.

**Inputs**

- Server (`guild_id`, text, required): The server the role is in.
- Role (`role_id`, text, required): The role to delete.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `deleted` (true/false)
- `guild_id` (text)
- `role_id` (text)

**Example output**

```json
{
  "deleted": true,
  "guild_id": "1234567890123456789",
  "role_id": "222"
}
```

### Delete a webhook

Permanently delete a webhook. Anything still posting to its URL will start failing.

**Inputs**

- Webhook ID (`webhook_id`, text, required): The webhook to delete.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `deleted` (true/false)
- `webhook_id` (text)

**Example output**

```json
{
  "deleted": true,
  "webhook_id": "777"
}
```

### Delete an Auto Moderation rule

Delete an Auto Moderation rule, so it stops filtering messages.

**Inputs**

- Server (`guild_id`, text, required): The server the rule is in.
- Rule ID (`rule_id`, text, required): The rule to delete.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `deleted` (true/false)
- `guild_id` (text)
- `rule_id` (text)

**Example output**

```json
{
  "deleted": true,
  "guild_id": "1234567890123456789",
  "rule_id": "1010"
}
```

### Edit a message

Change the text of a message. Discord only allows an app to edit messages it sent itself.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to edit.
- Content (`content`, text, required): The replacement text.

**Outputs**

- `channel_id` (text)
- `content` (text)
- `edited_timestamp` (text)
- `id` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "content": "Updated: they're in #deploys.",
  "edited_timestamp": "2026-09-18T10:09:00.000000+00:00",
  "id": "1234567890123456789"
}
```

### Follow an announcement channel

Mirror an announcement channel's posts into another channel, so published updates appear there automatically.

**Inputs**

- Channel (`channel_id`, text, required): The announcement channel to follow.
- Post into (`target_channel_id`, text, required): The channel that should receive the announcements.

**Outputs**

- `followed` (true/false)
- `source_channel_id` (text)
- `target_channel_id` (text)
- `webhook_id` (text)

**Example output**

```json
{
  "followed": true,
  "source_channel_id": "9876543210987654321",
  "target_channel_id": "3333333333333333333",
  "webhook_id": "222"
}
```

### Get a channel

Retrieve a channel's settings: name, topic, category, slow mode and type.

**Inputs**

- Channel (`channel_id`, text, required): The channel to retrieve.

**Outputs**

- `id` (text)
- `name` (text)
- `nsfw` (true/false)
- `parent_id` (text)
- `rate_limit_per_user` (number)
- `topic` (text)
- `type` (number)

**Example output**

```json
{
  "id": "9876543210987654321",
  "name": "support",
  "nsfw": false,
  "parent_id": "111",
  "rate_limit_per_user": 0,
  "topic": "Ask for help here",
  "type": 0
}
```

### Get a member

Retrieve one member's profile in a server, including their roles, nickname and join date.

**Inputs**

- Server (`guild_id`, text, required): The server the member is in.
- User ID (`user_id`, text, required): The Discord user ID.

**Outputs**

- `bot` (true/false)
- `communication_disabled_until` (text)
- `display_name` (text)
- `joined_at` (text)
- `nick` (text)
- `user_id` (text)
- `username` (text)

**Example output**

```json
{
  "bot": false,
  "communication_disabled_until": null,
  "display_name": "Alex (support)",
  "global_name": "Alex",
  "joined_at": "2025-03-01T09:00:00.000000+00:00",
  "nick": "Alex (support)",
  "roles": [
    "222"
  ],
  "user_id": "111",
  "username": "alex"
}
```

### Get a message

Retrieve a single Discord message by its ID.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to retrieve.

**Outputs**

- `author_id` (text)
- `author_username` (text)
- `channel_id` (text)
- `content` (text)
- `edited_timestamp` (text)
- `id` (text)
- `pinned` (true/false)
- `timestamp` (text)

**Example output**

```json
{
  "author_id": "111",
  "author_username": "alex",
  "channel_id": "9876543210987654321",
  "content": "Has anyone seen the deploy logs?",
  "edited_timestamp": null,
  "id": "1234567890123456789",
  "pinned": false,
  "timestamp": "2026-09-18T10:04:00.000000+00:00"
}
```

### Get channels in a Discord server.

Retrieves the list of channels in the specified Discord server.

**Inputs**

- Server ID (`guild_id`, text, required): The Discord server ID (e.g., 987654321098765432).

**Outputs**: Response envelope; the payload is in the "channels" field.

- `channels` (list)
- `status` (text)

**Example output**

```json
{
  "channels": [
    {
      "id": "1234567890123456789",
      "name": "general",
      "type": 0
    },
    {
      "id": "1234567890123456790",
      "name": "voice-chat",
      "type": 2
    }
  ],
  "status": "success"
}
```

### Get server details

Retrieve a server's profile, including approximate member and online counts.

**Inputs**

- Server (`guild_id`, text, required): The server to retrieve.

**Outputs**

- `approximate_member_count` (number)
- `approximate_presence_count` (number)
- `description` (text)
- `id` (text)
- `name` (text)
- `owner_id` (text)
- `preferred_locale` (text)
- `premium_tier` (number)

**Example output**

```json
{
  "approximate_member_count": 1840,
  "approximate_presence_count": 210,
  "description": "Support and announcements",
  "id": "1234567890123456789",
  "name": "Acme Community",
  "owner_id": "111",
  "preferred_locale": "en-US",
  "premium_tier": 2
}
```

### Give a member a role

Add a role to a member. A bot can only manage roles below its own highest role, so a permission error here usually means the role sits above the bot's.

**Inputs**

- Server (`guild_id`, text, required): The server the member is in.
- User ID (`user_id`, text, required): The Discord user ID.
- Role (`role_id`, text, required): The role to give them.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `added` (true/false)
- `role_id` (text)
- `user_id` (text)

**Example output**

```json
{
  "added": true,
  "role_id": "222",
  "user_id": "111"
}
```

### Lift a ban

Remove a ban so the user can rejoin the server with a new invite.

**Inputs**

- Server (`guild_id`, text, required): The server to lift the ban in.
- User ID (`user_id`, text, required): The Discord user ID.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `guild_id` (text)
- `unbanned` (true/false)
- `user_id` (text)

**Example output**

```json
{
  "guild_id": "1234567890123456789",
  "unbanned": true,
  "user_id": "111"
}
```

### List active threads

List every thread in a server that has not been archived, including forum posts.

**Inputs**

- Server (`guild_id`, text, required): The server to list threads in.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "id": "4444444444444444444",
    "name": "Deploy postmortem",
    "parent_id": "9876543210987654321",
    "type": 11
  }
]
```

### List Auto Moderation rules

List a server's Auto Moderation rules and whether each is switched on.

**Inputs**

- Server (`guild_id`, text, required): The server to list rules for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "creator_id": "9876543210987654321",
    "enabled": true,
    "event_type": 1,
    "guild_id": "1234567890123456789",
    "id": "1010",
    "name": "Block invite links",
    "trigger_type": 1
  }
]
```

### List bans

List the users banned from a server, with the reason recorded for each.

**Inputs**

- Server (`guild_id`, text, required): The server to list bans for.
- Limit (`limit`, number): How many bans to return (1-1000). From 1 to 1000. Default: `100`.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "reason": "Repeated spam",
    "user_id": "999",
    "username": "spammer"
  }
]
```

### List channel invites

List the active invites for a channel, with how many times each has been used.

**Inputs**

- Channel (`channel_id`, text, required): The channel to list invites for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "code": "aBcD1234",
    "expires_at": null,
    "inviter_username": "alex",
    "max_uses": 0,
    "url": "https://discord.gg/aBcD1234",
    "uses": 3
  }
]
```

### List custom emoji

List a server's custom emoji. Each result includes the name:id form the reaction actions expect.

**Inputs**

- Server (`guild_id`, text, required): The server to list emoji for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "animated": true,
    "id": "999",
    "name": "partyparrot",
    "reaction_format": "partyparrot:999"
  }
]
```

### List messages in a channel

Read the most recent messages in a Discord channel, newest first.

**Inputs**

- Channel (`channel_id`, text, required): The channel to read messages from.
- Limit (`limit`, number): How many messages to return (1-100). From 1 to 100. Default: `50`.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "author": {
      "id": "111",
      "username": "alex"
    },
    "channel_id": "9876543210987654321",
    "content": "Has anyone seen the deploy logs?",
    "id": "1234567890123456789",
    "timestamp": "2026-09-18T10:04:00.000000+00:00"
  }
]
```

### List my Discord server IDs.

Returns a list of IDs for the Discord servers you or your bot belong to.

**Inputs**: None.

**Outputs**: Response envelope; the payload is in the "guild_ids" field.

- `guild_ids` (list): List of guild IDs the user is a member of.
- `status` (text)

**Example output**

```json
{
  "guild_ids": [
    "1234567890123456789",
    "9876543210987654321"
  ],
  "status": "success"
}
```

### List pinned messages

List the pinned messages in a channel, most recently pinned first.

**Inputs**

- Channel (`channel_id`, text, required): The channel to read pins from.
- Limit (`limit`, number): How many pins to return (1-50). From 1 to 50. Default: `50`.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "author_username": "alex",
    "channel_id": "9876543210987654321",
    "content": "Read this before posting.",
    "id": "1234567890123456789",
    "pinned_at": "2026-09-10T08:00:00.000000+00:00"
  }
]
```

### List roles

List a server's roles, with their colour, position and permissions.

**Inputs**

- Server (`guild_id`, text, required): The server to list roles for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "color": 3447003,
    "hoist": true,
    "id": "222",
    "managed": false,
    "mentionable": true,
    "name": "Moderator",
    "permissions": "8192",
    "position": 5
  }
]
```

### List scheduled events

List a server's scheduled events, with how many people have said they are interested.

**Inputs**

- Server (`guild_id`, text, required): The server to list events for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "channel_id": "9876543210987654322",
    "description": "Monthly catch-up",
    "entity_type": 2,
    "id": "888",
    "location": null,
    "name": "Community call",
    "scheduled_end_time": null,
    "scheduled_start_time": "2026-10-01T17:00:00+00:00",
    "status": 1,
    "user_count": 34
  }
]
```

### List server invites

List every active invite across a server, with how many times each has been used.

**Inputs**

- Server (`guild_id`, text, required): The server to list invites for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "channel_id": "9876543210987654321",
    "code": "aBcD1234",
    "expires_at": null,
    "max_uses": 0,
    "url": "https://discord.gg/aBcD1234",
    "uses": 12
  }
]
```

### List server members

List the members of a server. This needs the Server Members intent enabled on your bot in Discord's Developer Portal; without it Discord refuses the request. Search members works without any intent.

**Inputs**

- Server (`guild_id`, text, required): The server to list members of.
- Limit (`limit`, number): How many members to return (1-1000). From 1 to 1000. Default: `100`.
- After (`after`, text): Continue after this user ID, to page through a large server.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "bot": false,
    "communication_disabled_until": null,
    "display_name": "Alex (support)",
    "global_name": "Alex",
    "joined_at": "2025-03-01T09:00:00.000000+00:00",
    "nick": "Alex (support)",
    "roles": [
      "222"
    ],
    "user_id": "111",
    "username": "alex"
  }
]
```

### List the bot's servers

List the servers the connected bot belongs to, with their names. A workflow can only act in servers the bot has been invited to.

**Inputs**: None.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "icon": null,
    "id": "1234567890123456789",
    "name": "Acme Community",
    "owner": false
  }
]
```

### List webhooks

List the webhooks on a channel.

**Inputs**

- Channel (`channel_id`, text, required): The channel to list webhooks for.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "channel_id": "9876543210987654321",
    "id": "777",
    "name": "Status bot",
    "url": "https://discord.com/api/webhooks/777/abc..."
  }
]
```

### List who reacted

List the users who reacted to a message with a given emoji.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message.
- Emoji (`emoji`, text, required): The emoji to count reactions for.
- Limit (`limit`, number): How many users to return (1-100). From 1 to 100. Default: `25`.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "bot": false,
    "global_name": "Alex",
    "id": "111",
    "username": "alex"
  }
]
```

### Pin a message

Pin a message to the top of its channel.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to pin.
- Reason (`reason`, text): Why it is being pinned; shown in the audit log.

**Outputs**

- `channel_id` (text)
- `message_id` (text)
- `pinned` (true/false)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "message_id": "1234567890123456789",
  "pinned": true
}
```

### Post through a webhook

Post a message through a webhook, optionally under a custom name and avatar. This is the only way to post under an identity other than the bot's.

**Inputs**

- Webhook ID (`webhook_id`, text, required): The webhook's ID.
- Webhook token (`webhook_token`, text, required): The webhook's token, from the webhook URL.
- Content (`content`, text, required): The message text.
- Username (`username`, text): Post under this name instead of the webhook's default.
- Avatar URL (`avatar_url`, text): Post with this avatar image instead of the default.
- Thread ID (`thread_id`, text): Post into this thread rather than the channel itself.

**Outputs**

- `channel_id` (text)
- `content` (text)
- `id` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "content": "Deploy finished.",
  "id": "1234567890123456789"
}
```

### Publish an announcement

Publish a message in an announcement channel to every server that follows it.

**Inputs**

- Announcement channel (`channel_id`, text, required): The announcement channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to publish.

**Outputs**

- `channel_id` (text)
- `content` (text)
- `id` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "content": "Release 2.4 is out.",
  "id": "1234567890123456789"
}
```

### React to a message

Add an emoji reaction to a message. Use a standard emoji such as 👍, or name:id for a custom server emoji.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to react to.
- Emoji (`emoji`, text, required): The emoji to react with, e.g. 👍 or partyparrot:123456789.

**Outputs**

- `emoji` (text)
- `message_id` (text)
- `reacted` (true/false)

**Example output**

```json
{
  "emoji": "\ud83d\udc4d",
  "message_id": "1234567890123456789",
  "reacted": true
}
```

### Read the audit log

Read a server's audit log: who changed what, and why. Discord keeps entries for 45 days. Filter by action type to watch one kind of change: 20 is a kick, 22 a ban, 25 a member's roles changing.

**Inputs**

- Server (`guild_id`, text, required): The server to read the audit log for.
- Action type (`action_type`, number): Only entries of this action type. Leave blank for all.
- User ID (`user_id`, text): Only entries for actions taken by this user.
- Limit (`limit`, number): How many entries to return (1-100). From 1 to 100. Default: `50`.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "action_type": 25,
    "actor_id": "222",
    "actor_username": "morgan",
    "changes": [],
    "id": "555",
    "reason": "Promoted to moderator",
    "target_id": "111"
  }
]
```

### Remove a member

Remove someone from a server. They can rejoin with a new invite; use a ban to stop them returning.

**Inputs**

- Server (`guild_id`, text, required): The server to remove them from.
- User ID (`user_id`, text, required): The Discord user ID.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `guild_id` (text)
- `kicked` (true/false)
- `user_id` (text)

**Example output**

```json
{
  "guild_id": "1234567890123456789",
  "kicked": true,
  "user_id": "111"
}
```

### Remove a reaction

Remove a reaction from a message. Leave the user blank to remove the bot's own reaction.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message.
- Emoji (`emoji`, text, required): The emoji whose reaction should be removed.
- User ID (`user_id`, text): Whose reaction to remove. Blank removes the bot's own.

**Outputs**

- `emoji` (text)
- `message_id` (text)
- `removed` (true/false)
- `user_id` (text)

**Example output**

```json
{
  "emoji": "\ud83d\udc4d",
  "message_id": "1234567890123456789",
  "removed": true,
  "user_id": "@me"
}
```

### Remove someone from a thread

Remove a member from a thread.

**Inputs**

- Thread (`channel_id`, text, required): The thread to remove them from.
- User ID (`user_id`, text, required): The Discord user ID.

**Outputs**

- `channel_id` (text)
- `removed` (true/false)
- `user_id` (text)

**Example output**

```json
{
  "channel_id": "4444444444444444444",
  "removed": true,
  "user_id": "111"
}
```

### Reply to a message

Reply to a Discord message so it threads under the original.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to reply to.
- Content (`content`, text, required): The reply text.

**Outputs**

- `channel_id` (text)
- `content` (text)
- `id` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "content": "They're in #deploys.",
  "id": "1234567890123456790"
}
```

### Schedule an event

Schedule an event in a voice or stage channel, or at an external location. Discord requires an end time for events at a location.

**Inputs**

- Server (`guild_id`, text, required): The server to schedule the event in.
- Name (`name`, text, required): The event's name.
- Scheduled start time (`scheduled_start_time`, date and time, required): When it starts, as an ISO 8601 timestamp.
- Scheduled end time (`scheduled_end_time`, date and time): When it ends. Required for an event at a location.
- Description (`description`, text): What the event is about.
- Channel (`channel_id`, text): The voice or stage channel to hold it in.
- Location (`location`, text): An external location, if the event is not in a channel.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `channel_id` (text)
- `entity_type` (number)
- `id` (text)
- `location` (text)
- `name` (text)
- `scheduled_start_time` (text)

**Example output**

```json
{
  "channel_id": "9876543210987654322",
  "description": "Monthly catch-up",
  "entity_type": 2,
  "id": "888",
  "location": null,
  "name": "Community call",
  "scheduled_end_time": null,
  "scheduled_start_time": "2026-10-01T17:00:00+00:00",
  "status": 1,
  "user_count": 0
}
```

### Search members

Find members whose username or nickname starts with your search term. Unlike listing members this needs no privileged intent, so it is the reliable way to resolve a name to a user ID.

**Inputs**

- Server (`guild_id`, text, required): The server to search.
- Query (`query`, text, required): The start of a username or nickname.
- Limit (`limit`, number): How many matches to return (1-1000). From 1 to 1000. Default: `25`.

**Outputs**: Returns a list.

**Example output**

```json
[
  {
    "bot": false,
    "communication_disabled_until": null,
    "display_name": "Alex",
    "global_name": "Alex",
    "joined_at": "2025-03-01T09:00:00.000000+00:00",
    "nick": null,
    "roles": [
      "222"
    ],
    "user_id": "111",
    "username": "alex"
  }
]
```

### Search messages in a server

Search a Discord server's message history by text, channel, author or attachment. Requires the Message Content intent to be enabled on your bot.

**Inputs**

- Server (`guild_id`, text, required): The server to search.
- Content (`content`, text): Text to search for in message content.
- Channel (`channel_id`, text): Limit the search to one channel.
- Author ID (`author_id`, text): Limit the search to messages from one user.
- Mentions user ID (`mentions_user_id`, text): Only messages that mention this user.
- Has (`has`, text): Only messages containing a kind of content: link, embed, file, video, image, sound or sticker.
- Limit (`limit`, number): How many results to return (1-25). From 1 to 25. Default: `25`.

**Outputs**

- `messages` (list)
- `total_results` (number)

**Example output**

```json
{
  "messages": [
    {
      "author_id": "111",
      "author_username": "alex",
      "channel_id": "9876543210987654321",
      "content": "The deploy logs are in #deploys.",
      "id": "1234567890123456789",
      "timestamp": "2026-09-18T10:04:00.000000+00:00"
    }
  ],
  "total_results": 2
}
```

### Send a direct message

Open a DM with a Discord user and send them a message. Discord advises against using this to message a whole server.

**Inputs**

- User ID (`user_id`, text, required): The Discord user ID to message.
- Content (`content`, text, required): The message text.

**Outputs**

- `channel_id` (text)
- `content` (text)
- `id` (text)

**Example output**

```json
{
  "channel_id": "5555555555555555555",
  "content": "Your report is ready.",
  "id": "1234567890123456789"
}
```

### 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.

**Inputs**

- Channel ID (`channel_id`, text, required): The Discord channel ID to send the message to (e.g., 123456789012345678).
- Content (`content`, text, required): The message content (text) to send.
- Text-to-speech (`tts`, true/false): Set to true to have Discord read the message aloud (text-to-speech).
- Embeds (`embeds`, list): A list of rich embeds to include with the message. Each embed can have a title, description, color, and fields.

**Outputs**

- `channel_id` (text): The channel the message was sent to.
- `content` (text): The content of the message.
- `id` (text): The ID of the sent message.

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "content": "Hello, Discord!",
  "id": "1234567890123456789"
}
```

### Set a member's nickname

Change a member's nickname in a server. Leave the nickname blank to clear it and fall back to their username.

**Inputs**

- Server (`guild_id`, text, required): The server the member is in.
- User ID (`user_id`, text, required): The Discord user ID.
- Nickname (`nickname`, text): The new nickname. Blank clears it.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `display_name` (text)
- `nick` (text)
- `user_id` (text)
- `username` (text)

**Example output**

```json
{
  "bot": false,
  "communication_disabled_until": null,
  "display_name": "Alex (on call)",
  "global_name": "Alex",
  "joined_at": "2025-03-01T09:00:00.000000+00:00",
  "nick": "Alex (on call)",
  "roles": [
    "222"
  ],
  "user_id": "111",
  "username": "alex"
}
```

### Set channel permissions

Allow or deny permissions for a role or member on one channel. Permission values are Discord's bitfields, given as decimal strings.

**Inputs**

- Channel (`channel_id`, text, required): The channel to change permissions on.
- Overwrite ID (`overwrite_id`, text, required): The role or member ID the overwrite applies to.
- Overwrite type (`overwrite_type`, text): Either role or member. Default: `role`.
- Allow (`allow`, text): Permission bitfield to allow, as a decimal string.
- Deny (`deny`, text): Permission bitfield to deny, as a decimal string.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `channel_id` (text)
- `overwrite_id` (text)
- `updated` (true/false)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "overwrite_id": "555",
  "updated": true
}
```

### Show the bot typing

Show the typing indicator in a channel for about ten seconds, so a slow step looks like work in progress.

**Inputs**

- Channel (`channel_id`, text, required): The channel to show the indicator in.

**Outputs**

- `channel_id` (text)
- `typing` (true/false)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "typing": true
}
```

### Start a thread

Start a thread in a channel without attaching it to an existing message.

**Inputs**

- Channel (`channel_id`, text, required): The channel to create the thread in.
- Name (`name`, text, required): The thread's name.
- Private (`private`, true/false): Make it a private thread, visible only to people added to it.
- Auto archive duration (`auto_archive_duration`, number): Minutes of inactivity before it auto-archives: 60, 1440, 4320 or 10080. Default: `1440`.

**Outputs**

- `id` (text)
- `name` (text)
- `parent_id` (text)
- `type` (number)

**Example output**

```json
{
  "id": "4444444444444444444",
  "name": "Planning",
  "parent_id": "9876543210987654321",
  "type": 11
}
```

### Start a thread on a message

Start a thread hanging off an existing message, so replies stay together without cluttering the channel.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The message to start the thread from.
- Name (`name`, text, required): The thread's name.
- Auto archive duration (`auto_archive_duration`, number): Minutes of inactivity before it auto-archives: 60, 1440, 4320 or 10080. Default: `1440`.

**Outputs**

- `id` (text)
- `name` (text)
- `parent_id` (text)
- `type` (number)

**Example output**

```json
{
  "id": "4444444444444444444",
  "name": "Deploy postmortem",
  "parent_id": "9876543210987654321",
  "type": 11
}
```

### Take a role from a member

Remove a role from a member. A bot can only manage roles below its own highest role.

**Inputs**

- Server (`guild_id`, text, required): The server the member is in.
- User ID (`user_id`, text, required): The Discord user ID.
- Role (`role_id`, text, required): The role to take away.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `removed` (true/false)
- `role_id` (text)
- `user_id` (text)

**Example output**

```json
{
  "removed": true,
  "role_id": "222",
  "user_id": "111"
}
```

### Time out a member

Temporarily stop a member from sending messages or joining voice. Discord caps a timeout at 28 days, and refuses it for administrators and the server owner. Set the duration to 0 to lift an existing timeout.

**Inputs**

- Server (`guild_id`, text, required): The server the member is in.
- User ID (`user_id`, text, required): The Discord user ID.
- Duration minutes (`duration_minutes`, number, required): How long to mute them, in minutes. 0 lifts the timeout. The maximum is 40320 (28 days). From 0 to 40320.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `timed_out_until` (text)
- `user_id` (text)
- `username` (text)

**Example output**

```json
{
  "bot": false,
  "communication_disabled_until": "2026-09-18T12:00:00+00:00",
  "display_name": "Alex",
  "global_name": "Alex",
  "joined_at": "2025-03-01T09:00:00.000000+00:00",
  "nick": null,
  "roles": [
    "222"
  ],
  "timed_out_until": "2026-09-18T12:00:00+00:00",
  "user_id": "111",
  "username": "alex"
}
```

### Unpin a message

Remove a message from a channel's pins.

**Inputs**

- Channel (`channel_id`, text, required): The channel the message is in.
- Message ID (`message_id`, text, required): The ID of the message to unpin.
- Reason (`reason`, text): Why it is being unpinned; shown in the audit log.

**Outputs**

- `channel_id` (text)
- `message_id` (text)
- `unpinned` (true/false)

**Example output**

```json
{
  "channel_id": "9876543210987654321",
  "message_id": "1234567890123456789",
  "unpinned": true
}
```

### Update a channel

Rename a channel or change its topic, slow mode, category or position. Only the fields you provide are changed.

**Inputs**

- Channel (`channel_id`, text, required): The channel to update.
- Name (`name`, text): A new name for the channel.
- Topic (`topic`, text): A new topic or description.
- Nsfw (`nsfw`, true/false): Mark the channel as age-restricted.
- Rate limit per user (`rate_limit_per_user`, number): Slow mode in seconds, 0-21600. 0 turns it off. From 0 to 21600.
- Category (`parent_id`, text): Move the channel under this category.
- Position (`position`, number): Sort position within its category.

**Outputs**

- `id` (text)
- `name` (text)
- `rate_limit_per_user` (number)
- `topic` (text)
- `type` (number)

**Example output**

```json
{
  "id": "9876543210987654321",
  "name": "support-archive",
  "rate_limit_per_user": 30,
  "topic": "Closed",
  "type": 0
}
```

### Update a role

Change a role's name, colour, permissions or display settings. Only the fields you provide are changed.

**Inputs**

- Server (`guild_id`, text, required): The server the role is in.
- Role (`role_id`, text, required): The role to update.
- Name (`name`, text): A new name for the role.
- Color (`color`, number): Colour as a decimal RGB integer.
- Hoist (`hoist`, true/false): Show members with this role separately in the member list.
- Mentionable (`mentionable`, true/false): Let anyone mention this role.
- Permissions (`permissions`, text): Permission bitfield as a decimal string.
- Reason (`reason`, text): Why this change is being made; shown in the server's audit log.

**Outputs**

- `color` (number)
- `id` (text)
- `name` (text)
- `permissions` (text)
- `position` (number)

**Example output**

```json
{
  "color": 15844367,
  "hoist": true,
  "id": "222",
  "managed": false,
  "mentionable": true,
  "name": "Senior moderator",
  "permissions": "8192",
  "position": 5
}
```
