> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boxd.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord Bot

> Discordbot refers to automated programs on Discord servers, performing tasks like moderation, music playback, and user engagement to enhance community interactions

Discordbot refers to automated programs on Discord servers, performing tasks like moderation, music playback, and user engagement to enhance community interactions

`discordbot` · **165 tools** · no triggers

## Connect it

```bash theme={"theme":"github-dark"}
run auth discordbot
run auth discordbot --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections) for personal versus shared, and who may remove one.

## Use it

```bash theme={"theme":"github-dark"}
run discordbot          # common commands
run discordbot --all    # every command
```

```ts theme={"theme":"github-dark"}
import { discordbot } from "@boxd/run";
```

## Common tools

| Tool                      | What it does                                                                                                                                          |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create-message`          | Sends a message to a Discord channel. Supports text content, embeds, stickers, components, and replies.                                               |
| `add-group-dm-user`       | Adds a user to a Discord group DM channel. Requires a user OAuth2 access token with the gdm.join scope.                                               |
| `add-guild-member`        | Adds a user to a Discord guild using their OAuth2 access token (which must have guilds.join scope).                                                   |
| `add-guild-member-role`   | Assigns a role to a guild member. Requires MANAGE\_ROLES permission and the role must be lower in hierarchy than the bot's highest role.              |
| `add-my-message-reaction` | Adds an emoji reaction from the bot to a message. Requires READ\_MESSAGE\_HISTORY, and ADD\_REACTIONS if no one else has reacted with this emoji yet. |

<Accordion title="All 165 tools" icon="list">
  | Tool                                         | What it does                                                                                                                                                                 |
  | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `add-group-dm-user`                          | Adds a user to a Discord group DM channel. Requires a user OAuth2 access token with the gdm.join scope.                                                                      |
  | `add-guild-member`                           | Adds a user to a Discord guild using their OAuth2 access token (which must have guilds.join scope).                                                                          |
  | `add-guild-member-role`                      | Assigns a role to a guild member. Requires MANAGE\_ROLES permission and the role must be lower in hierarchy than the bot's highest role.                                     |
  | `add-my-message-reaction`                    | Adds an emoji reaction from the bot to a message. Requires READ\_MESSAGE\_HISTORY, and ADD\_REACTIONS if no one else has reacted with this emoji yet.                        |
  | `add-thread-member`                          | Adds a user to a specific, unarchived thread. The user must have access to the parent channel.                                                                               |
  | `ban-user-from-guild`                        | Permanently bans a user from a Discord guild, optionally deleting their recent messages.                                                                                     |
  | `bulk-ban-users-from-guild`                  | Bans up to 200 users from a Discord guild, optionally deleting their recent messages.                                                                                        |
  | `bulk-delete-messages`                       | Bulk deletes messages in a Discord channel. Requires MANAGE\_MESSAGES permission.                                                                                            |
  | `create-application-command`                 | Creates a new global Discord application command. Global commands can take up to an hour to propagate.                                                                       |
  | `create-auto-moderation-rule`                | Creates a new auto moderation rule for a Discord guild. Requires MANAGE\_GUILD permission.                                                                                   |
  | `create-channel-invite`                      | Creates a new invite link for a Discord channel. Requires CREATE\_INSTANT\_INVITE permission.                                                                                |
  | `create-dm`                                  | Creates a new direct message (DM) channel or retrieves an existing one, using recipient\_id for a 1-on-1 DM or access\_tokens for a group DM; this...                        |
  | `create-guild`                               | Creates a new Discord guild (server). The bot must be in fewer than 10 guilds to use this endpoint.                                                                          |
  | `create-guild-application-command`           | Creates a new guild-specific application command. Command names must be unique per type within the guild (max 100 total commands).                                           |
  | `create-guild-channel`                       | Creates a new Discord channel (text, voice, category, etc.) within a guild.                                                                                                  |
  | `create-guild-emoji`                         | Creates a new custom emoji in a specified Discord guild, requiring CREATE\_EXPRESSIONS permission and adherence to guild emoji limits.                                       |
  | `create-guild-from-template`                 | Creates a new Discord guild by applying channels, roles, and settings from a specified guild template code.                                                                  |
  | `create-guild-role`                          | Creates a new role in a Discord guild with customizable name, permissions, color, hoist, mentionability, and icon.                                                           |
  | `create-guild-scheduled-event`               | Creates a new scheduled event in a Discord guild. Events can be hosted in stage channels, voice channels, or external locations.                                             |
  | `create-guild-sticker`                       | Uploads a PNG, APNG, GIF, or Lottie JSON file (max 512KB) as a new custom sticker to the specified Discord guild; requires Manage Expressions permission.                    |
  | `create-guild-template`                      | Creates a template of an existing Discord guild's structure (settings, roles, channels) but not its content (messages, members).                                             |
  | `create-interaction-response`                | Sends a response to a Discord interaction (e.g., slash command, component).                                                                                                  |
  | `create-message`                             | Sends a message to a Discord channel. Supports text content, embeds, stickers, components, and replies.                                                                      |
  | `create-stage-instance`                      | Creates a new Stage instance in a Stage channel for hosting live audio events.                                                                                               |
  | `create-thread`                              | Creates a new thread in a text, announcement, forum, or media channel.                                                                                                       |
  | `create-thread-from-message`                 | Creates a new thread from a specific message in a Discord channel, requiring CREATE\_PUBLIC\_THREADS permission.                                                             |
  | `create-webhook`                             | Creates a new webhook in a specified Discord channel, requiring MANAGE\_WEBHOOKS permission.                                                                                 |
  | `crosspost-message`                          | Crossposts a message from an announcement channel to all channels following it.                                                                                              |
  | `delete-all-message-reactions`               | Removes all reactions from a message. Requires MANAGE\_MESSAGES permission.                                                                                                  |
  | `delete-all-message-reactions-by-emoji`      | Removes all reactions for a specific emoji from a message. Requires MANAGE\_MESSAGES permission.                                                                             |
  | `delete-application-command`                 | Permanently deletes a global application command. This is irreversible and the command will no longer appear in Discord clients.                                             |
  | `delete-auto-moderation-rule`                | Permanently deletes a specific auto moderation rule from a Discord guild.                                                                                                    |
  | `delete-channel`                             | Permanently deletes a Discord channel by its ID. This action is irreversible.                                                                                                |
  | `delete-channel-permission-overwrite`        | Removes channel-specific permission overwrites for a user or role, reverting them to default permissions inherited from the server or category.                              |
  | `delete-group-dm-user`                       | Removes a recipient from a Discord group DM channel. Requires OAuth2 user access tokens with the gdm.join scope.                                                             |
  | `delete-guild`                               | Permanently deletes a specified Discord guild (server). The authenticated user must be the owner of the guild.                                                               |
  | `delete-guild-application-command`           | Permanently deletes a guild-specific application command. This is irreversible.                                                                                              |
  | `delete-guild-emoji`                         | Permanently deletes a specified custom emoji from a guild, requiring Manage Expressions permissions; cannot delete default emojis and is irreversible.                       |
  | `delete-guild-integration`                   | Permanently deletes a specific integration from a Discord guild, removing any associated webhooks and kicking the bot if present.                                            |
  | `delete-guild-member`                        | Removes (kicks) a member from a Discord guild. The user must be an existing member of the specified guild.                                                                   |
  | `delete-guild-member-role`                   | Removes a specified role from a member of a Discord guild. Requires MANAGE\_ROLES permission and the role must be lower in hierarchy than the bot's highest role.            |
  | `delete-guild-role`                          | Permanently deletes a specified role from a Discord guild, revoking it from all members.                                                                                     |
  | `delete-guild-scheduled-event`               | Permanently deletes a specific scheduled event from a Discord guild.                                                                                                         |
  | `delete-guild-sticker`                       | Permanently deletes a custom sticker from a Discord guild; the specified guild and sticker must exist, and this action is irreversible.                                      |
  | `delete-guild-template`                      | Deletes an existing guild template by its unique code from a specified guild, returning the deleted template's details.                                                      |
  | `delete-message`                             | Permanently deletes a message from a Discord channel. The bot can delete its own messages or, with MANAGE\_MESSAGES permission, delete messages from other users.            |
  | `delete-my-message-reaction`                 | Removes the bot's own emoji reaction from a message. Only removes the bot's reaction, not other users' reactions.                                                            |
  | `delete-original-webhook-message`            | Permanently deletes the original (@original) message posted by a webhook or interaction response.                                                                            |
  | `delete-stage-instance`                      | Permanently deletes the Stage instance for a given stage channel, ending the live audio event.                                                                               |
  | `delete-thread-member`                       | Removes a user from a specified, unarchived thread. Requires MANAGE\_THREADS permission.                                                                                     |
  | `delete-user-message-reaction`               | Removes a specific user's emoji reaction from a message. Requires MANAGE\_MESSAGES permission.                                                                               |
  | `delete-webhook`                             | Permanently deletes a Discord webhook by its unique ID. This action is irreversible.                                                                                         |
  | `delete-webhook-by-token`                    | Permanently deletes a Discord webhook using its ID and token, without bot authentication.                                                                                    |
  | `delete-webhook-message`                     | Deletes a message previously sent by a Discord webhook.                                                                                                                      |
  | `execute-github-compatible-webhook`          | Forwards GitHub event notifications to a Discord channel via a GitHub-compatible webhook endpoint.                                                                           |
  | `execute-slack-compatible-webhook`           | Sends messages to Discord via its Slack-compatible webhook endpoint, supporting Slack attachment formatting.                                                                 |
  | `execute-webhook`                            | Executes a Discord webhook to send messages, embeds, or interactive components to a channel or thread.                                                                       |
  | `follow-channel`                             | Follows an Announcement Channel to relay its messages to a target channel via webhook.                                                                                       |
  | `get-active-guild-threads`                   | Retrieves all active (non-archived) threads in a Discord guild that the bot can access.                                                                                      |
  | `get-application`                            | Retrieves the full details of a Discord application by its application\_id.                                                                                                  |
  | `get-application-command`                    | Retrieves a specific global application command by its application ID and command ID.                                                                                        |
  | `get-application-role-connections-metadata`  | Retrieves all role connection metadata records for a Discord application.                                                                                                    |
  | `get-application-user-role-connection`       | Fetches the role connection object for the current user for a specified Discord application.                                                                                 |
  | `get-auto-moderation-rule`                   | Retrieves the complete configuration of a specific auto moderation rule within a Discord guild.                                                                              |
  | `get-bot-gateway`                            | Retrieves the WSS URL, recommended shard count, and session start limits for connecting a bot to the Discord Gateway.                                                        |
  | `get-channel`                                | Retrieves detailed metadata for a specific Discord channel by its channel\_id.                                                                                               |
  | `get-gateway`                                | Retrieves the WebSocket URL to connect to Discord's Gateway for receiving real-time events.                                                                                  |
  | `get-guild`                                  | Retrieves detailed information for a specified Discord guild (server) by its guild\_id, optionally including approximate member and presence counts if with\_counts is true. |
  | `get-guild-application-command`              | Retrieves detailed information for a specific application command within a Discord guild.                                                                                    |
  | `get-guild-application-command-permissions`  | Retrieves the permissions for a specific application command within a guild.                                                                                                 |
  | `get-guild-ban`                              | Fetches the ban details for a specific user in a Discord guild, if that user is currently banned.                                                                            |
  | `get-guild-emoji`                            | Retrieves details for a specific custom emoji within a specified Discord guild, requiring valid and accessible guild and emoji IDs.                                          |
  | `get-guild-member`                           | Retrieves detailed information for a specific member of a Discord guild, provided the bot belongs to the guild and has necessary permissions.                                |
  | `get-guild-preview`                          | Fetches a public preview of a Discord guild by its ID, if the guild has the preview feature enabled.                                                                         |
  | `get-guild-scheduled-event`                  | Retrieves a specific scheduled event from a Discord guild by its ID, optionally including the count of subscribed users.                                                     |
  | `get-guilds-onboarding`                      | Retrieves the onboarding settings for a specified Discord guild, including prompts, options, default channels, and enabled status.                                           |
  | `get-guild-sticker`                          | Retrieves a specific sticker from a Discord guild using the guild and sticker IDs; requires the sticker to exist in the guild.                                               |
  | `get-guild-template`                         | Retrieves the complete structure and details of a Discord guild template using its unique code.                                                                              |
  | `get-guild-vanity-url`                       | Retrieves the vanity URL invite code and usage count for a Discord guild.                                                                                                    |
  | `get-guild-webhooks`                         | Retrieves all webhooks for a specified Discord guild, requiring MANAGE\_WEBHOOKS permission.                                                                                 |
  | `get-guild-welcome-screen`                   | Retrieves the welcome screen configuration for a Discord guild with the Community feature enabled.                                                                           |
  | `get-guild-widget`                           | Retrieves the public JSON widget data for a Discord guild, if the widget is enabled for that guild.                                                                          |
  | `get-guild-widget-png`                       | Tool to retrieve a PNG image widget for a Discord guild. Use when you need a visual representation of the guild widget that can be displayed on external websites.           |
  | `get-guild-widget-settings`                  | Retrieves the widget settings for a specified Discord guild, indicating if the widget is enabled and its configured channel ID.                                              |
  | `get-message`                                | Retrieves a specific message from a Discord channel by channel and message ID.                                                                                               |
  | `get-my-application`                         | Retrieves detailed information about the current authenticated Discord application via /applications/@me.                                                                    |
  | `get-my-oauth2-application`                  | Retrieves detailed information about the OAuth2 application associated with the current authentication.                                                                      |
  | `get-original-webhook-message`               | Retrieves the original (@original) message from a Discord webhook or interaction response.                                                                                   |
  | `get-public-keys`                            | Retrieves Discord's OAuth2 public keys in JWK format for verifying access tokens.                                                                                            |
  | `get-stage-instance`                         | Retrieves the active Stage instance for a specified stage channel.                                                                                                           |
  | `get-sticker`                                | Retrieves a specific Discord sticker by its unique ID.                                                                                                                       |
  | `get-thread-member`                          | Retrieves a member from a specified thread using their user ID, optionally including guild member details.                                                                   |
  | `get-user`                                   | Fetches public information for a Discord user by their user ID.                                                                                                              |
  | `get-webhook`                                | Retrieves detailed information for a Discord webhook by its unique ID.                                                                                                       |
  | `get-webhook-by-token`                       | Retrieves a Discord webhook's configuration using its ID and token, without requiring bot authentication.                                                                    |
  | `get-webhook-message`                        | Retrieves a specific message previously sent by a Discord webhook.                                                                                                           |
  | `invite-resolve`                             | Resolves a Discord invite code to get its details, optionally including member counts and expiration.                                                                        |
  | `invite-revoke`                              | Revokes a Discord invite using its code, permanently preventing new joins via this link.                                                                                     |
  | `join-thread`                                | Joins the authenticated user to a thread specified by channel\_id.                                                                                                           |
  | `leave-guild`                                | Enables the bot to leave a specified Discord guild (server).                                                                                                                 |
  | `leave-thread`                               | Removes the currently authenticated user from a specified thread.                                                                                                            |
  | `list-application-commands`                  | Fetches all global application commands for the specified Discord application.                                                                                               |
  | `list-auto-moderation-rules`                 | Retrieves all auto moderation rules for a specified Discord guild.                                                                                                           |
  | `list-channel-invites`                       | Fetches all active invites for a given Discord channel. Requires MANAGE\_CHANNELS permission.                                                                                |
  | `list-channel-webhooks`                      | Retrieves all webhooks configured in a given Discord channel.                                                                                                                |
  | `list-guild-application-command-permissions` | Retrieves all guild-level permission settings for all commands of a specific application within a guild.                                                                     |
  | `list-guild-application-commands`            | Fetches all application commands registered for a specific guild.                                                                                                            |
  | `list-guild-audit-log-entries`               | Retrieves audit log entries for a specified Discord guild, requiring VIEW\_AUDIT\_LOG permission.                                                                            |
  | `list-guild-bans`                            | Fetches a list of users banned from a specified Discord guild.                                                                                                               |
  | `list-guild-channels`                        | Fetches all channels (text, voice, category, etc.) for a specified Discord guild.                                                                                            |
  | `list-guild-emojis`                          | Fetches all custom emoji objects for a specified Discord guild if the bot has access; returns only custom guild emojis, not standard Unicode or Nitro emojis.                |
  | `list-guild-integrations`                    | Lists all integration objects for a specified Discord guild.                                                                                                                 |
  | `list-guild-invites`                         | Retrieves all currently active invite codes for a specified Discord guild.                                                                                                   |
  | `list-guild-members`                         | Retrieves a list of members for a Discord guild. Requires GUILD\_MEMBERS intent.                                                                                             |
  | `list-guild-roles`                           | Fetches all roles in a Discord guild, providing details for each role including permissions, color, position, and other attributes.                                          |
  | `list-guild-scheduled-events`                | Retrieves a list of scheduled events for a specified Discord guild, optionally including subscribed user counts.                                                             |
  | `list-guild-scheduled-event-users`           | Fetches users who have expressed interest in a specific scheduled event within a Discord guild.                                                                              |
  | `list-guild-stickers`                        | Retrieves all custom sticker objects for a Discord guild; does not include standard/Nitro stickers.                                                                          |
  | `list-guild-templates`                       | Retrieves all guild templates for an existing Discord guild, specified by its ID.                                                                                            |
  | `list-guild-voice-regions`                   | Fetches a list of available voice regions for a specified Discord guild.                                                                                                     |
  | `list-message-reactions-by-emoji`            | Lists users who reacted to a message with a specific emoji. Supports pagination.                                                                                             |
  | `list-messages`                              | Retrieves messages from a Discord channel, ordered newest first.                                                                                                             |
  | `list-my-private-archived-threads`           | Retrieves private archived threads from a channel that the current user is a member of.                                                                                      |
  | `list-pinned-messages`                       | Retrieves all pinned messages from a Discord channel. Returns up to 50 pinned messages.                                                                                      |
  | `list-private-archived-threads`              | Lists private archived threads in a Discord channel, sorted by most recent archival.                                                                                         |
  | `list-public-archived-threads`               | Lists public archived threads in a Discord channel, sorted by most recent archival.                                                                                          |
  | `list-sticker-packs`                         | Fetches all available Nitro sticker packs from Discord, excluding custom or guild-specific sticker packs.                                                                    |
  | `list-thread-members`                        | Retrieves members of a specified Discord thread, with an option to include full guild member objects.                                                                        |
  | `list-voice-regions`                         | Lists all available Discord voice regions that can be used when setting a voice or stage channel's region.                                                                   |
  | `pin-message`                                | Pins a message in a Discord channel. Requires MANAGE\_MESSAGES permission.                                                                                                   |
  | `preview-prune-guild`                        | Previews the number of members that would be pruned from a Discord guild based on inactivity days and optional roles; does not remove members.                               |
  | `prune-guild`                                | Removes inactive members from a Discord guild. Requires KICK\_MEMBERS permission.                                                                                            |
  | `put-guilds-onboarding`                      | Configures or updates a Discord guild's new member onboarding flow, including prompts, options, default channels, and enabled status.                                        |
  | `search-guild-members`                       | Searches for members in a specific Discord guild by matching a query string against usernames and nicknames.                                                                 |
  | `set-channel-permission-overwrite`           | Updates or creates a permission overwrite for a role (type 0) or member (type 1) within a Discord channel using allow and deny bitwise values.                               |
  | `sync-guild-template`                        | Synchronizes a guild template with its source guild, updating it to match the source's current configuration; does not affect guilds already created from this template.     |
  | `test-auth`                                  | Tool to validate the configured Discord bot token by fetching the current authenticated bot user.                                                                            |
  | `trigger-typing-indicator`                   | Shows the bot is typing in a Discord channel. The indicator stops after 10 seconds or upon message send.                                                                     |
  | `unban-user-from-guild`                      | Revokes a ban for a user from a Discord guild, allowing them to rejoin.                                                                                                      |
  | `unpin-message`                              | Unpins a message from a Discord channel. The message is not deleted, only removed from the pinned list.                                                                      |
  | `update-application`                         | Updates a Discord application's settings using its application\_id.                                                                                                          |
  | `update-application-command`                 | Updates properties of a global application command. Omitted properties remain unchanged.                                                                                     |
  | `update-application-user-role-connection`    | Updates the current user's application role connection metadata for Discord's Linked Roles feature.                                                                          |
  | `update-auto-moderation-rule`                | Updates an existing auto moderation rule in a Discord guild.                                                                                                                 |
  | `update-channel`                             | Updates a Discord channel's settings (name, topic, permissions, etc.).                                                                                                       |
  | `update-guild`                               | Updates settings for a Discord guild (server). Requires the MANAGE\_GUILD permission.                                                                                        |
  | `update-guild-application-command`           | Updates properties of a guild-specific application command. Omitted properties remain unchanged.                                                                             |
  | `update-guild-emoji`                         | Updates a custom emoji's name and/or role restrictions in a Discord guild; cannot create or delete emojis, and role updates for managed emojis may be...                     |
  | `update-guild-member`                        | Updates a guild member's attributes including nickname, roles, voice state, timeout status, and flags.                                                                       |
  | `update-guild-role`                          | Updates a Discord guild role's attributes (name, permissions, color, etc.).                                                                                                  |
  | `update-guild-scheduled-event`               | Updates an existing scheduled event in a Discord guild. Only fields provided in the request body are changed.                                                                |
  | `update-guild-sticker`                       | Modifies a guild sticker's name, description, or tags. Requires MANAGE\_EXPRESSIONS permission.                                                                              |
  | `update-guild-template`                      | Updates a Discord guild template's name and/or description; omitted fields retain current values, and an empty string for description clears it.                             |
  | `update-guild-welcome-screen`                | Updates a guild's welcome screen configuration, including description, enabled status, and up to 5 welcome channels.                                                         |
  | `update-guild-widget-settings`               | Updates a Discord guild's widget settings, such as its enabled state or invite channel.                                                                                      |
  | `update-message`                             | Edits a message previously sent by the bot. Only provide fields you want to change; use null or empty list to clear values.                                                  |
  | `update-my-application`                      | Updates settings for the current authenticated Discord application via /applications/@me.                                                                                    |
  | `update-my-guild-member`                     | Modifies the current bot's member profile (nickname) in a Discord guild.                                                                                                     |
  | `update-my-user`                             | Updates the current bot user's Discord username and/or avatar.                                                                                                               |
  | `update-original-webhook-message`            | Updates the original (@original) message previously sent by a webhook or interaction response.                                                                               |
  | `update-self-voice-state`                    | Updates the bot's own voice state in a guild Stage channel, such as toggling suppress or requesting to speak.                                                                |
  | `update-voice-state`                         | Updates another user's voice state in a Discord stage channel.                                                                                                               |
  | `update-webhook`                             | Updates properties of an existing Discord webhook such as name, avatar, or channel.                                                                                          |
  | `update-webhook-by-token`                    | Updates a Discord webhook's name and/or avatar using its ID and token, without bot authentication.                                                                           |
  | `update-webhook-message`                     | Updates a message previously sent by a webhook, allowing modification of content, embeds, attachments, or components.                                                        |
</Accordion>

[Open Discord Bot in the console →](https://app.boxd.sh/integrations/detail/discordbot)
