---
title: Discord
description: Interact with Discord
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard 
  type="discord"
  color="#5865F2"
/>

{/* MANUAL-CONTENT-START:intro */}
[Discord](https://discord.com) is a powerful communication platform that allows you to connect with friends, communities, and teams. It offers a range of features for team collaboration, including text channels, voice channels, and video calls.

With a Discord account or bot, you can:

- **Send messages**: Send messages to a specific channel
- **Get messages**: Get messages from a specific channel
- **Get server**: Get information about a specific server
- **Get user**: Get information about a specific user

In Sim, the Discord integration enables your agents to access and leverage your organization's Discord servers. Agents can retrieve information from Discord channels, search for specific users, get server information, and send messages. This allows your workflows to integrate with your Discord communities, automate notifications, and create interactive experiences.

> **Important:** To read message content, your Discord bot needs the "Message Content Intent" enabled in the Discord Developer Portal. Without this permission, you'll still receive message metadata but the content field will appear empty.

Discord components in Sim use efficient lazy loading, only fetching data when needed to minimize API calls and prevent rate limiting. Token refreshing happens automatically in the background to maintain your connection.

### Setting Up Your Discord Bot

1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)
2. Create a new application and navigate to the "Bot" tab
3. Create a bot and copy your bot token
4. Under "Privileged Gateway Intents", enable the **Message Content Intent** to read message content
5. Invite your bot to your servers with appropriate permissions
{/* MANUAL-CONTENT-END */}


## Usage Instructions

Comprehensive Discord integration: messages, threads, channels, roles, members, invites, and webhooks.



## Tools

### `discord_send_message`

Send a message to a Discord channel

#### 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 |
| `content` | string | No | The text content of the message |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
| `files` | file[] | No | Files to attach to the message |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |
| `data` | object | Discord message data |
| ↳ `id` | string | Author user 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 |
| ↳ `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 |

### `discord_get_messages`

Retrieve messages from a Discord channel

#### Input

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

#### Output

| 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 | Author user 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 |
|   ↳ `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 |
| ↳ `id` | string | Author user 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 |
| ↳ `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 |

### `discord_get_server`

Retrieve information about a Discord server (guild)

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |

#### Output

| 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 |
| ↳ `channels` | array | Server channels |
| ↳ `member_count` | number | Number of members in server |

### `discord_get_user`

Retrieve information about a Discord user

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | Discord bot token for authentication |
| `userId` | string | Yes | The Discord user ID |

#### Output

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

### `discord_edit_message`

Edit an existing message in a Discord channel

#### Input

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

#### Output

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

### `discord_delete_message`

Delete a message from a Discord channel

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_add_reaction`

Add a reaction emoji to a Discord message

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `channelId` | string | Yes | The Discord channel ID containing the message |
| `messageId` | string | Yes | The ID of the message to react to |
| `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\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_remove_reaction`

Remove a reaction from a Discord message

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `channelId` | string | Yes | The Discord channel ID containing the message |
| `messageId` | string | Yes | The ID of the message with the reaction |
| `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\) |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_pin_message`

Pin a message in a Discord channel

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_unpin_message`

Unpin a message in a Discord channel

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_create_thread`

Create a thread in a Discord channel

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `channelId` | string | Yes | The Discord channel ID to create the thread in |
| `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\) |
| `autoArchiveDuration` | number | No | Duration in minutes to auto-archive the thread \(60, 1440, 4320, 10080\) |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |

#### Output

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

### `discord_join_thread`

Join a thread in Discord

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_leave_thread`

Leave a thread in Discord

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_archive_thread`

Archive or unarchive a thread in Discord

#### Input

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

#### Output

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

### `discord_create_channel`

Create a new channel in a Discord server

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
| `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 |

#### Output

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

### `discord_update_channel`

Update a Discord channel

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `channelId` | string | Yes | The Discord channel ID to update |
| `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\) |

#### Output

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

### `discord_delete_channel`

Delete a Discord channel

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_get_channel`

Get information about a Discord channel

#### Input

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

#### Output

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

### `discord_create_role`

Create a new role in a Discord server

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
| `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

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

### `discord_update_role`

Update a role in a Discord server

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
| `roleId` | string | Yes | The role ID to update |
| `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

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

### `discord_delete_role`

Delete a role from a Discord server

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_assign_role`

Assign a role to a member in a Discord server

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_remove_role`

Remove a role from a member in a Discord server

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_kick_member`

Kick a member from a Discord server

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_ban_member`

Ban a member from a Discord server

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
| `userId` | string | Yes | The user ID to ban |
| `reason` | string | No | Reason for banning the member |
| `deleteMessageDays` | number | No | Number of days to delete messages for \(0-7\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_unban_member`

Unban a member from a Discord server

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_get_member`

Get information about a member in a Discord server

#### Input

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

#### Output

| 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 |
| ↳ `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 |

### `discord_update_member`

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

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `serverId` | string | Yes | The Discord server ID \(guild ID\) |
| `userId` | string | Yes | The user ID to update |
| `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

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

### `discord_create_invite`

Create an invite link for a Discord channel

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `botToken` | string | Yes | The bot token for authentication |
| `channelId` | string | Yes | The Discord channel ID to create an invite for |
| `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\) |

#### Output

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

### `discord_get_invite`

Get information about a Discord invite

#### Input

| 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\) |

#### Output

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

### `discord_delete_invite`

Delete a Discord invite

#### Input

| 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\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |

### `discord_create_webhook`

Create a webhook in a Discord channel

#### Input

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

#### Output

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

### `discord_execute_webhook`

Execute a Discord webhook to send a message

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhookId` | string | Yes | The webhook ID |
| `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\) |

#### Output

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

### `discord_get_webhook`

Get information about a Discord webhook

#### Input

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

#### Output

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

### `discord_delete_webhook`

Delete a Discord webhook

#### Input

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

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Success or error message |


