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

> An instant messaging and VoIP social platform

An instant messaging and VoIP social platform.

`discord` · **28 tools** · **1 triggers**

## Connect it

```bash theme={"theme":"github-dark"}
run auth discord
run auth discord --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 discord          # common commands
run discord --all    # every command
```

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

## Common tools

| Tool                  | What it does                                                                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get-gateway`         | Tool to retrieve a valid WebSocket (wss) URL for establishing a Gateway connection to Discord.                                                    |
| `get-invite`          | DEPRECATED: Use DISCORD\_INVITE\_RESOLVE instead. Tool to retrieve information about a specific invite code.                                      |
| `get-user`            | Retrieve information about a Discord user. With OAuth Bearer token authentication, this returns the authenticated user's information (use '@me'). |
| `invite-resolve`      | Tool to resolve and retrieve information about a Discord invite code.                                                                             |
| `consume-entitlement` | DEPRECATED: This Discord endpoint requires a bot token and cannot be used by an OAuth2 user connection.                                           |

<Accordion title="All 28 tools" icon="list">
  | Tool                                        | What it does                                                                                                                                                             |
  | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | `consume-entitlement`                       | DEPRECATED: This Discord endpoint requires a bot token and cannot be used by an OAuth2 user connection.                                                                  |
  | `delete-test-entitlement`                   | DEPRECATED: This Discord endpoint requires a bot token and cannot be used by an OAuth2 user connection.                                                                  |
  | `delete-user-application-role-connection`   | Deletes the current user's application role connection for the specified application.                                                                                    |
  | `edit-application-command-permissions`      | Edits the permissions for a specific application command in a guild.                                                                                                     |
  | `get-application-command-permissions`       | Retrieves the permissions for a specific application command in a guild.                                                                                                 |
  | `get-batch-application-command-permissions` | Retrieves permissions for all commands of an application in a guild.                                                                                                     |
  | `get-current-user-application-entitlements` | Retrieves entitlements for the current user and application.                                                                                                             |
  | `get-gateway`                               | Tool to retrieve a valid WebSocket (wss) URL for establishing a Gateway connection to Discord.                                                                           |
  | `get-guild-template`                        | Tool to retrieve information about a Discord guild template using its unique template code.                                                                              |
  | `get-guild-widget`                          | Tool to retrieve the guild widget in JSON format. Use when you need to get public information about a Discord guild's widget that can be displayed on external websites. |
  | `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-invite`                                | DEPRECATED: Use DISCORD\_INVITE\_RESOLVE instead. Tool to retrieve information about a specific invite code.                                                             |
  | `get-my-guild-member`                       | Retrieves the guild member object for the currently authenticated user within a specified guild, including roles, nickname, join date, and permissions.                  |
  | `get-my-oauth2-authorization`               | Retrieves current OAuth2 authorization details for the application, including app info, scopes, token expiration, and user data (contingent on scopes like 'identify').  |
  | `get-my-user`                               | Fetches comprehensive profile information for the currently authenticated Discord user, including email if the 'email' scope is granted.                                 |
  | `get-openid-connect-userinfo`               | Retrieve OpenID Connect compliant user information for the authenticated user.                                                                                           |
  | `get-public-keys`                           | Tool to retrieve Discord OAuth2 public keys. Use when you need to verify OAuth2 tokens or access public keys for cryptographic operations.                               |
  | `get-sku-subscription`                      | Retrieves a specific subscription by ID for a given SKU. Use to check details of a single user subscription.                                                             |
  | `get-user`                                  | Retrieve information about a Discord user. With OAuth Bearer token authentication, this returns the authenticated user's information (use '@me').                        |
  | `get-user-application-role-connection`      | Retrieves the application role connection for the currently authenticated user for a specified application.                                                              |
  | `invite-resolve`                            | Tool to resolve and retrieve information about a Discord invite code.                                                                                                    |
  | `leave-guild`                               | DEPRECATED: This endpoint requires a bot token. Use DISCORDBOT\_LEAVE\_GUILD with a Discord Bot connection instead.                                                      |
  | `list-my-connections`                       | Retrieves a list of the authenticated user's connected third-party accounts on Discord.                                                                                  |
  | `list-my-guilds`                            | Lists the current user's guilds, returning partial data for each; primarily used for displaying server lists or verifying memberships.                                   |
  | `list-sku-subscriptions`                    | Lists all subscriptions for a given SKU. When using a Bot token, the user\_id query parameter is required.                                                               |
  | `list-sticker-packs`                        | Tool to retrieve all available Discord Nitro sticker packs. Use when you need to list or browse official Discord sticker packs.                                          |
  | `modify-current-user`                       | DEPRECATED: This endpoint requires a bot token. Use DISCORDBOT\_UPDATE\_MY\_USER with a Discord Bot connection instead.                                                  |
  | `update-user-application-role-connection`   | Updates the application role connection for the currently authenticated user for a specified application.                                                                |
</Accordion>

## Triggers (1)

Subscribe with `.on(...)` in a script. A trigger with required configuration takes it as the second argument.

| Trigger                     | Needs        | What fires it                                      |
| --------------------------- | ------------ | -------------------------------------------------- |
| New Discord Message Trigger | `channel_id` | Polls a specific Discord channel for new messages. |

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