# Discord (/integrations/discord)





{/* MANUAL-CONTENT-START:intro */}

Use [Discord](https://discord.com) to manage messages, threads, channels, roles, members, invites, and webhooks. Authenticate with a bot token and grant the bot access to the servers and channels the workflow needs.

## Set up your Discord bot [#setting-up-your-discord-bot]

1. Open the [Discord Developer Portal](https://discord.com/developers/applications) and create an application.
2. Open **Bot**, create the bot if needed, and copy its token.
3. Under **Privileged Gateway Intents**, enable **Message Content Intent** when the workflow needs message content.
4. Invite the bot to your servers with the permissions required by its operations.

Discord restricts `content`, embeds, attachments, and components when the Message Content intent is unavailable, with exceptions such as messages sent by the bot, direct messages, and messages that mention it. Verified apps may need approval for this intent. See [Discord's Message Content requirements](https://docs.discord.com/developers/events/gateway#message-content-intent).

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Manage Discord messages, threads, channels, roles, members, invites, and webhooks.

## Actions [#actions]

### Discord Send Message [#discord-send-message]

Send a message to a Discord channel

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to send the message to, e.g., 123456789012345678 |
  | `content` | string | No | The text content of the message |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `files` | file\[] | No | Files to attach to the message |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `files` | file\[] | Files attached to the message |
  | `data` | object | Discord message data |
  | ↳ `id` | string | Message ID |
  | ↳ `content` | string | Message content |
  | ↳ `channel_id` | string | Channel ID where message was sent |
  | ↳ `author` | object | Message author information |
  | ↳ `id` | string | Author user ID |
  | ↳ `username` | string | Author username |
  | ↳ `avatar` | string | Author avatar hash |
  | ↳ `bot` | boolean | Whether author is a bot |
  | ↳ `timestamp` | string | Message timestamp |
  | ↳ `edited_timestamp` | string | Message edited timestamp |
  | ↳ `embeds` | array | Message embeds |
  | ↳ `attachments` | array | Message attachments |
  | ↳ `mentions` | array | User mentions in message |
  | ↳ `mention_roles` | array | Role mentions in message |
  | ↳ `mention_everyone` | boolean | Whether message mentions everyone |
</ReferenceDetails>

### Discord Get Messages [#discord-get-messages]

Retrieve messages from a Discord channel

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to retrieve messages from, e.g., 123456789012345678 |
  | `limit` | number | No | Maximum number of messages to retrieve (default: 10, max: 100) |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Container for messages data |
  | ↳ `messages` | array | Array of Discord messages with full metadata |
  | ↳ `id` | string | Message ID |
  | ↳ `content` | string | Message content |
  | ↳ `channel_id` | string | Channel ID |
  | ↳ `author` | object | Message author information |
  | ↳ `id` | string | Author user ID |
  | ↳ `username` | string | Author username |
  | ↳ `avatar` | string | Author avatar hash |
  | ↳ `bot` | boolean | Whether author is a bot |
  | ↳ `timestamp` | string | Message timestamp |
  | ↳ `edited_timestamp` | string | Message edited timestamp |
  | ↳ `embeds` | array | Message embeds |
  | ↳ `attachments` | array | Message attachments |
  | ↳ `mentions` | array | User mentions in message |
  | ↳ `mention_roles` | array | Role mentions in message |
  | ↳ `mention_everyone` | boolean | Whether message mentions everyone |
  | ↳ `channel_id` | string | Channel ID |
</ReferenceDetails>

### Discord Get Server [#discord-get-server]

Retrieve information about a Discord server (guild)

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Discord server (guild) information |
  | ↳ `id` | string | Server ID |
  | ↳ `name` | string | Server name |
  | ↳ `icon` | string | Server icon hash |
  | ↳ `description` | string | Server description |
  | ↳ `owner_id` | string | Server owner user ID |
  | ↳ `roles` | array | Server roles |
  | ↳ `approximate_member_count` | number | Approximate total member count |
  | ↳ `approximate_presence_count` | number | Approximate online member count |
</ReferenceDetails>

### Discord Get User [#discord-get-user]

Retrieve information about a Discord user

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | Discord bot token for authentication |
  | `userId` | string | Yes | The Discord user ID, e.g., 123456789012345678 |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Discord user information |
  | ↳ `id` | string | User ID |
  | ↳ `username` | string | Username |
  | ↳ `discriminator` | string | User discriminator (4-digit number) |
  | ↳ `avatar` | string | User avatar hash |
  | ↳ `bot` | boolean | Whether user is a bot |
  | ↳ `system` | boolean | Whether user is a system user |
  | ↳ `email` | string | User email (if available) |
  | ↳ `verified` | boolean | Whether user email is verified |
</ReferenceDetails>

### Discord Edit Message [#discord-edit-message]

Edit an existing message in a Discord channel

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
  | `messageId` | string | Yes | The ID of the message to edit, e.g., 123456789012345678 |
  | `content` | string | No | The new text content for the message |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Updated Discord message data |
  | ↳ `id` | string | Message ID |
  | ↳ `content` | string | Updated message content |
  | ↳ `channel_id` | string | Channel ID |
  | ↳ `edited_timestamp` | string | Message edited timestamp |
</ReferenceDetails>

### Discord Delete Message [#discord-delete-message]

Delete a message from a Discord channel

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
  | `messageId` | string | Yes | The ID of the message to delete, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Bulk Delete Messages [#discord-bulk-delete-messages]

Delete 2-100 messages from a Discord channel in a single request

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to delete messages from, e.g., 123456789012345678 |
  | `messageIds` | json | Yes | Array of 2-100 message IDs to delete. Messages older than 2 weeks cannot be bulk deleted. |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Add Reaction [#discord-add-reaction]

Add a reaction emoji to a Discord message

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
  | `messageId` | string | Yes | The ID of the message to react to, e.g., 123456789012345678 |
  | `emoji` | string | Yes | The emoji to react with (unicode emoji or custom emoji in name:id format) |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Remove Reaction [#discord-remove-reaction]

Remove a reaction from a Discord message

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
  | `messageId` | string | Yes | The ID of the message with the reaction, e.g., 123456789012345678 |
  | `emoji` | string | Yes | The emoji to remove (unicode emoji or custom emoji in name:id format) |
  | `userId` | string | No | The user ID whose reaction to remove (omit to remove bot's own reaction), e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Pin Message [#discord-pin-message]

Pin a message in a Discord channel

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
  | `messageId` | string | Yes | The ID of the message to pin, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Unpin Message [#discord-unpin-message]

Unpin a message in a Discord channel

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID containing the message, e.g., 123456789012345678 |
  | `messageId` | string | Yes | The ID of the message to unpin, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Get Pinned Messages [#discord-get-pinned-messages]

Retrieve all pinned messages in a Discord channel

<ReferenceDetails>
  #### Input [#input-11]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to retrieve pinned messages from, e.g., 123456789012345678 |
  | `limit` | number | No | Maximum number of pins to return per page (1-50). Defaults to 50. |
  | `before` | string | No | Return pins created before this ISO8601 timestamp, for paging past the first 50 results |

  #### Output [#output-11]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | array | Array of pinned Discord messages |
  | ↳ `id` | string | Message ID |
  | ↳ `content` | string | Message content |
  | ↳ `channel_id` | string | Channel ID |
  | ↳ `timestamp` | string | Message timestamp |
  | ↳ `pinned_at` | string | When the message was pinned |
  | ↳ `author` | object | Message author information |
  | ↳ `id` | string | Author user ID |
  | ↳ `username` | string | Author username |
  | `hasMore` | boolean | Whether more pinned messages exist beyond this page |
</ReferenceDetails>

### Discord Create Thread [#discord-create-thread]

Create a thread in a Discord channel

<ReferenceDetails>
  #### Input [#input-12]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to create the thread in, e.g., 123456789012345678 |
  | `name` | string | Yes | The name of the thread (1-100 characters) |
  | `messageId` | string | No | The message ID to create a thread from (if creating from existing message), e.g., 123456789012345678 |
  | `autoArchiveDuration` | number | No | Duration in minutes to auto-archive the thread (60, 1440, 4320, 10080) |
  | `isPublic` | boolean | No | Whether the standalone thread is public (visible to everyone in the channel) or private. Ignored when creating a thread from an existing message, which always inherits the parent channel visibility. Defaults to public if omitted. |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-12]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Created thread data |
  | ↳ `id` | string | Thread ID |
  | ↳ `name` | string | Thread name |
  | ↳ `type` | number | Thread channel type |
  | ↳ `guild_id` | string | Server ID |
  | ↳ `parent_id` | string | Parent channel ID |
</ReferenceDetails>

### Discord Join Thread [#discord-join-thread]

Join a thread in Discord

<ReferenceDetails>
  #### Input [#input-13]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `threadId` | string | Yes | The thread ID to join, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-13]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Leave Thread [#discord-leave-thread]

Leave a thread in Discord

<ReferenceDetails>
  #### Input [#input-14]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `threadId` | string | Yes | The thread ID to leave, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-14]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Archive Thread [#discord-archive-thread]

Archive or unarchive a thread in Discord

<ReferenceDetails>
  #### Input [#input-15]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `threadId` | string | Yes | The thread ID to archive/unarchive, e.g., 123456789012345678 |
  | `archived` | boolean | Yes | Whether to archive (true) or unarchive (false) the thread |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-15]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Updated thread data |
  | ↳ `id` | string | Thread ID |
  | ↳ `archived` | boolean | Whether thread is archived |
</ReferenceDetails>

### Discord Create Channel [#discord-create-channel]

Create a new channel in a Discord server

<ReferenceDetails>
  #### Input [#input-16]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `name` | string | Yes | The name of the channel (1-100 characters) |
  | `type` | number | No | Channel type (0=text, 2=voice, 4=category, 5=announcement, 13=stage) |
  | `topic` | string | No | Channel topic (0-1024 characters) |
  | `parentId` | string | No | Parent category ID for the channel, e.g., 123456789012345678 |

  #### Output [#output-16]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Created channel data |
  | ↳ `id` | string | Channel ID |
  | ↳ `name` | string | Channel name |
  | ↳ `type` | number | Channel type |
  | ↳ `guild_id` | string | Server ID |
</ReferenceDetails>

### Discord Update Channel [#discord-update-channel]

Update a Discord channel

<ReferenceDetails>
  #### Input [#input-17]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to update, e.g., 123456789012345678 |
  | `name` | string | No | The new name for the channel |
  | `topic` | string | No | The new topic for the channel |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-17]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Updated channel data |
  | ↳ `id` | string | Channel ID |
  | ↳ `name` | string | Channel name |
  | ↳ `type` | number | Channel type |
  | ↳ `topic` | string | Channel topic |
</ReferenceDetails>

### Discord Delete Channel [#discord-delete-channel]

Delete a Discord channel

<ReferenceDetails>
  #### Input [#input-18]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to delete, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-18]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | The deleted channel, as returned by Discord |
  | ↳ `id` | string | Channel ID |
  | ↳ `name` | string | Channel name |
  | ↳ `type` | number | Channel type |
  | ↳ `guild_id` | string | Server ID |
</ReferenceDetails>

### Discord Get Channel [#discord-get-channel]

Get information about a Discord channel

<ReferenceDetails>
  #### Input [#input-19]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to retrieve, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-19]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Channel data |
  | ↳ `id` | string | Channel ID |
  | ↳ `name` | string | Channel name |
  | ↳ `type` | number | Channel type |
  | ↳ `topic` | string | Channel topic |
  | ↳ `guild_id` | string | Server ID |
</ReferenceDetails>

### Discord List Channels [#discord-list-channels]

List all channels in a Discord server

<ReferenceDetails>
  #### Input [#input-20]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-20]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | array | Array of Discord channels in the server |
  | ↳ `id` | string | Channel ID |
  | ↳ `name` | string | Channel name |
  | ↳ `type` | number | Channel type |
  | ↳ `topic` | string | Channel topic |
  | ↳ `parent_id` | string | Parent category ID |
  | ↳ `position` | number | Sort position within the channel list |
</ReferenceDetails>

### Discord Create Role [#discord-create-role]

Create a new role in a Discord server

<ReferenceDetails>
  #### Input [#input-21]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `name` | string | Yes | The name of the role |
  | `color` | number | No | RGB color value as integer (e.g., 0xFF0000 for red) |
  | `hoist` | boolean | No | Whether to display role members separately from online members |
  | `mentionable` | boolean | No | Whether the role can be mentioned |

  #### Output [#output-21]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Created role data |
  | ↳ `id` | string | Role ID |
  | ↳ `name` | string | Role name |
  | ↳ `color` | number | Role color |
  | ↳ `hoist` | boolean | Whether role is hoisted |
  | ↳ `mentionable` | boolean | Whether role is mentionable |
</ReferenceDetails>

### Discord Update Role [#discord-update-role]

Update a role in a Discord server

<ReferenceDetails>
  #### Input [#input-22]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `roleId` | string | Yes | The role ID to update, e.g., 123456789012345678 |
  | `name` | string | No | The new name for the role |
  | `color` | number | No | RGB color value as integer |
  | `hoist` | boolean | No | Whether to display role members separately |
  | `mentionable` | boolean | No | Whether the role can be mentioned |

  #### Output [#output-22]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Updated role data |
  | ↳ `id` | string | Role ID |
  | ↳ `name` | string | Role name |
  | ↳ `color` | number | Role color |
</ReferenceDetails>

### Discord Delete Role [#discord-delete-role]

Delete a role from a Discord server

<ReferenceDetails>
  #### Input [#input-23]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `roleId` | string | Yes | The role ID to delete, e.g., 123456789012345678 |

  #### Output [#output-23]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Assign Role [#discord-assign-role]

Assign a role to a member in a Discord server

<ReferenceDetails>
  #### Input [#input-24]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to assign the role to, e.g., 123456789012345678 |
  | `roleId` | string | Yes | The role ID to assign, e.g., 123456789012345678 |

  #### Output [#output-24]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Remove Role [#discord-remove-role]

Remove a role from a member in a Discord server

<ReferenceDetails>
  #### Input [#input-25]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to remove the role from, e.g., 123456789012345678 |
  | `roleId` | string | Yes | The role ID to remove, e.g., 123456789012345678 |

  #### Output [#output-25]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord List Roles [#discord-list-roles]

List all roles in a Discord server

<ReferenceDetails>
  #### Input [#input-26]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-26]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | array | Array of Discord roles in the server |
  | ↳ `id` | string | Role ID |
  | ↳ `name` | string | Role name |
  | ↳ `color` | number | Role color |
  | ↳ `hoist` | boolean | Whether role is hoisted |
  | ↳ `position` | number | Role position in the hierarchy |
  | ↳ `mentionable` | boolean | Whether role is mentionable |
</ReferenceDetails>

### Discord Kick Member [#discord-kick-member]

Kick a member from a Discord server

<ReferenceDetails>
  #### Input [#input-27]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to kick, e.g., 123456789012345678 |
  | `reason` | string | No | Reason for kicking the member |

  #### Output [#output-27]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Ban Member [#discord-ban-member]

Ban a member from a Discord server

<ReferenceDetails>
  #### Input [#input-28]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to ban, e.g., 123456789012345678 |
  | `reason` | string | No | Reason for banning the member |
  | `deleteMessageSeconds` | number | No | Seconds of message history to delete, 0-604800 (7 days) |

  #### Output [#output-28]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Unban Member [#discord-unban-member]

Unban a member from a Discord server

<ReferenceDetails>
  #### Input [#input-29]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to unban, e.g., 123456789012345678 |
  | `reason` | string | No | Reason for unbanning the member |

  #### Output [#output-29]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Get Member [#discord-get-member]

Get information about a member in a Discord server

<ReferenceDetails>
  #### Input [#input-30]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to retrieve, e.g., 123456789012345678 |

  #### Output [#output-30]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Member data |
  | ↳ `user` | object | User information |
  | ↳ `id` | string | User ID |
  | ↳ `username` | string | Username |
  | ↳ `avatar` | string | Avatar hash |
  | ↳ `nick` | string | Server nickname |
  | ↳ `roles` | array | Array of role IDs |
  | ↳ `joined_at` | string | When the member joined |
</ReferenceDetails>

### Discord Update Member [#discord-update-member]

Update a member in a Discord server (e.g., change nickname)

<ReferenceDetails>
  #### Input [#input-31]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |
  | `userId` | string | Yes | The user ID to update, e.g., 123456789012345678 |
  | `nick` | string | No | New nickname for the member (null to remove) |
  | `mute` | boolean | No | Whether to mute the member in voice channels |
  | `deaf` | boolean | No | Whether to deafen the member in voice channels |

  #### Output [#output-31]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Updated member data |
  | ↳ `nick` | string | Server nickname |
  | ↳ `mute` | boolean | Voice mute status |
  | ↳ `deaf` | boolean | Voice deaf status |
</ReferenceDetails>

### Discord Create Invite [#discord-create-invite]

Create an invite link for a Discord channel

<ReferenceDetails>
  #### Input [#input-32]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to create an invite for, e.g., 123456789012345678 |
  | `maxAge` | number | No | Duration of invite in seconds (0 = never expires, default 86400) |
  | `maxUses` | number | No | Max number of uses (0 = unlimited, default 0) |
  | `temporary` | boolean | No | Whether invite grants temporary membership |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-32]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Created invite data |
  | ↳ `code` | string | Invite code |
  | ↳ `url` | string | Full invite URL |
  | ↳ `max_age` | number | Max age in seconds |
  | ↳ `max_uses` | number | Max uses |
  | ↳ `temporary` | boolean | Whether temporary |
</ReferenceDetails>

### Discord Get Invite [#discord-get-invite]

Get information about a Discord invite

<ReferenceDetails>
  #### Input [#input-33]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `inviteCode` | string | Yes | The invite code to retrieve |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-33]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Invite data |
  | ↳ `code` | string | Invite code |
  | ↳ `guild` | object | Server information |
  | ↳ `channel` | object | Channel information |
  | ↳ `approximate_member_count` | number | Approximate member count |
  | ↳ `approximate_presence_count` | number | Approximate online count |
</ReferenceDetails>

### Discord Delete Invite [#discord-delete-invite]

Delete a Discord invite

<ReferenceDetails>
  #### Input [#input-34]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `inviteCode` | string | Yes | The invite code to delete |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-34]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>

### Discord Create Webhook [#discord-create-webhook]

Create a webhook in a Discord channel

<ReferenceDetails>
  #### Input [#input-35]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `channelId` | string | Yes | The Discord channel ID to create the webhook in, e.g., 123456789012345678 |
  | `name` | string | Yes | Name of the webhook (1-80 characters) |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-35]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Created webhook data |
  | ↳ `id` | string | Webhook ID |
  | ↳ `name` | string | Webhook name |
  | ↳ `token` | string | Webhook token |
  | ↳ `url` | string | Webhook URL |
  | ↳ `channel_id` | string | Channel ID |
</ReferenceDetails>

### Discord Execute Webhook [#discord-execute-webhook]

Execute a Discord webhook to send a message

<ReferenceDetails>
  #### Input [#input-36]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `webhookId` | string | Yes | The webhook ID, e.g., 123456789012345678 |
  | `webhookToken` | string | Yes | The webhook token |
  | `content` | string | Yes | The message content to send |
  | `username` | string | No | Override the default username of the webhook |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-36]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Message sent via webhook |
  | ↳ `id` | string | Message ID |
  | ↳ `content` | string | Message content |
  | ↳ `channel_id` | string | Channel ID |
  | ↳ `timestamp` | string | Message timestamp |
</ReferenceDetails>

### Discord Get Webhook [#discord-get-webhook]

Get information about a Discord webhook

<ReferenceDetails>
  #### Input [#input-37]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `webhookId` | string | Yes | The webhook ID to retrieve, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-37]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
  | `data` | object | Webhook data |
  | ↳ `id` | string | Webhook ID |
  | ↳ `name` | string | Webhook name |
  | ↳ `channel_id` | string | Channel ID |
  | ↳ `guild_id` | string | Server ID |
  | ↳ `token` | string | Webhook token |
</ReferenceDetails>

### Discord Delete Webhook [#discord-delete-webhook]

Delete a Discord webhook

<ReferenceDetails>
  #### Input [#input-38]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `botToken` | string | Yes | The bot token for authentication |
  | `webhookId` | string | Yes | The webhook ID to delete, e.g., 123456789012345678 |
  | `serverId` | string | Yes | The Discord server ID (guild ID), e.g., 123456789012345678 |

  #### Output [#output-38]

  | Parameter | Type | Description |
  | - | - | - |
  | `message` | string | Success or error message |
</ReferenceDetails>
