From d349e43d0f4c93a6fd426fd6d8149b72fb266e36 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 16 Apr 2025 08:20:02 -0700 Subject: [PATCH 1/4] Normalize links --- docs/activities/building-an-activity.mdx | 50 +- docs/activities/design-patterns.mdx | 4 +- docs/activities/development-guides.mdx | 104 ++-- docs/activities/how-activities-work.md | 6 +- docs/activities/overview.mdx | 26 +- .../2017-07-19-breaking-change-version-6.md | 12 +- .../2017-07-24-new-feature-audit-logs.md | 2 +- ...eaking-change-presence-activity-objects.md | 2 +- .../2017-09-10-new-feature-emoji-endpoints.md | 2 +- ...17-09-20-new-feature-channel-categories.md | 2 +- ...hange-api-gateway-below-v6-discontinued.md | 2 +- .../2017-11-09-new-feature-rich-presence.md | 2 +- ...breaking-change-very-large-bot-sharding.md | 2 +- ...1-23-deprecation-accept-invite-endpoint.md | 2 +- ...30-enhancement-get-guild-emoji-endpoint.md | 2 +- ...2-05-enhancement-new-message-properties.md | 2 +- ...ix-list-of-open-dms-in-certain-payloads.md | 2 +- .../2018-11-30-enhancement-user-object.md | 2 +- .../2019-04-18-new-invite-object-fields.md | 2 +- ...cation-of-discord-rpc-rich-presence-sdk.md | 2 +- ...d-info-around-nitro-boosting-experiment.md | 2 +- .../2019-06-19-additional-team-information.md | 2 +- .../2019-08-12-more-precise-rate-limits.md | 2 +- .../2019-11-14-gamesdk-version-2.5.5.md | 2 +- .../2019-12-06-ip-discovery-updates.md | 2 +- docs/change-log/2020-02-14-gateway-intents.md | 16 +- ...0-02-26-rich-presence-spectate-approval.md | 2 +- ...ew-invite-events-and-reactions-endpoint.md | 8 +- .../2020-03-03-new-allowed-mentions-object.md | 2 +- ...properties-on-guild-members-chunk-event.md | 2 +- ...-11-legacy-mention-behavior-deprecation.md | 2 +- .../2020-09-24-api-and-gateway-v8.md | 14 +- ...20-10-27-gateway-v6-intent-restrictions.md | 2 +- docs/change-log/2020-11-13-stickers.md | 2 +- docs/change-log/2020-11-16-inline-replies.md | 6 +- ...0-12-15-slash-commands-and-interactions.md | 6 +- .../2021-02-09-slash-commands-in-dms.md | 2 +- ...-slash-command-response-types-and-flags.md | 2 +- ...1-04-05-application-command-permissions.md | 10 +- docs/change-log/2021-04-28-api-v9.md | 2 +- ...21-05-26-buttons-and-message-components.md | 6 +- .../2021-06-30-select-menu-components.md | 2 +- .../2021-08-10-user-and-message-commands.md | 2 +- ...ation-command-autocomplete-interactions.md | 2 +- ...lication-command-attachment-option-type.md | 4 +- docs/change-log/2022-02-14-api-v10.md | 16 +- .../2022-03-31-guild-bans-pagination.md | 2 +- docs/change-log/2022-04-06-forum-channels.md | 2 +- .../2022-04-27-updated-command-permissions.md | 16 +- docs/change-log/2022-06-16-auto-moderation.md | 10 +- ...updated-connection-property-field-names.md | 2 +- ...ssage-content-in-auto-moderation-events.md | 2 +- ...ted-permissions-in-interaction-payloads.md | 2 +- ...rmissions-for-interactions-and-webhooks.md | 10 +- ...commands-to-message-interaction-objects.md | 4 +- ...-min-and-max-length-for-command-options.md | 2 +- ...ng-permissions-change-to-webhook-routes.md | 10 +- ...09-session-specific-gateway-resume-urls.md | 2 +- .../2022-08-22-slash-command-mentions.md | 2 +- ...-message-content-is-a-privileged-intent.md | 2 +- .../2022-09-14-forum-channels-release.md | 4 +- ...ion-spam-and-mention-spam-trigger-types.md | 6 +- ...2-default-sort-order-for-forum-channels.md | 2 +- .../2022-10-13-new-select-menu-components.md | 6 +- .../2022-10-20-delete-ephemeral-messages.md | 6 +- ...11-04-add-auto-moderation-regex-support.md | 4 +- ...-application-command-permission-changes.md | 14 +- ...rease-max-keyword-rules-per-guild-limit.md | 6 +- ...n-connections-metadata-and-linked-roles.md | 12 +- ...fault-layout-setting-for-forum-channels.md | 2 +- ...09-thread-member-details-and-pagination.md | 6 +- .../2023-01-18-guild-audit-log-events.md | 2 +- ...increase-auto-moderation-keyword-limits.md | 4 +- .../2023-02-10-update-to-locked-threads.md | 6 +- ...on-custom-message-action-metadata-field.md | 2 +- .../2023-04-06-interaction-channel-data.md | 2 +- ...3-04-14-bot-users-added-to-all-new-apps.md | 4 +- .../2023-05-03-unique-usernames-on-discord.md | 2 +- ...5-add-join-raid-and-mention-raid-fields.md | 4 +- ...2023-08-01-new-guild-media-channel-type.md | 4 +- ...2023-08-08-activity-state-for-bot-users.md | 2 +- .../2023-08-23-team-member-roles.md | 4 +- ...lt-value-in-auto-populated-select-menus.md | 2 +- ...m-app-subscriptions-available-in-the-us.md | 20 +- ...riptions-now-available-in-the-eu-and-uk.md | 6 +- ...e-edit-interaction-response-permissions.md | 2 +- ...-new-ways-for-testing-app-subscriptions.md | 4 +- ...ssion-splits-for-expressions-and-events.md | 2 +- ...-12-19-limit-number-of-fields-in-embeds.md | 2 +- docs/change-log/2024-00-20-soundboard-api.md | 2 +- ...orced-nonces-on-create-message-endpoint.md | 2 +- .../2024-03-15-guild-prune-requiring.md | 2 +- ...veloper-preview-of-the-embedded-app-sdk.md | 6 +- ...024-03-18-user-installable-apps-preview.md | 24 +- ...02-csv-export-for-premium-app-analytics.md | 2 +- ...fy-guild-member-flags-field-permissions.md | 2 +- ...emium-apps-one-time-purchases-and-store.md | 12 +- ...-31-auto-moderation-member-profile-rule.md | 4 +- ...m-button-style-deep-linking-url-schemes.md | 12 +- ...ser-installed-apps-general-availability.md | 18 +- ...7-09-banners-in-get-current-user-guilds.md | 2 +- .../2024-07-15-message-forwarding-rollout.md | 4 +- docs/change-log/2024-07-16-member-banners.md | 2 +- .../2024-07-17-activities-proxy-csp-update.md | 2 +- .../2024-07-18-application-emoji.md | 2 +- ...pported-activity-types-for-set-activity.md | 4 +- .../2024-08-05-voice-state-endpoints.md | 2 +- .../2024-08-09-user-app-install-count.md | 2 +- .../2024-08-12-get-guild-role-endpoint.md | 2 +- .../2024-08-13-voice-encryption-modes.md | 2 +- ...nd-deprecation-of-versions-older-than-4.md | 4 +- .../2024-08-26-entry-point-commands.md | 10 +- ...6-launching-activities-via-interactions.md | 2 +- ...scription-api-and-entitlement-migration.md | 38 +- ...-editing-deferred-interaction-responses.md | 2 +- .../2024-09-17-voice-e2ee-dave-protocol.md | 4 +- ...4-09-26-activities-general-availability.md | 26 +- ...-updates-to-entitlement-migration-guide.md | 6 +- docs/change-log/2024-10-25-event-webhooks.md | 6 +- ...11-05-post-entitlement-migration-update.md | 8 +- ...remium-apps-multiple-subscription-tiers.md | 6 +- .../2024-12-17-updated-file-upload-limit.md | 2 +- ...3-17-introducing-the-discord-social-sdk.md | 8 +- ...-04-03-per-attachment-file-upload-limit.md | 2 +- .../2025-04-16-discord-social-sdk-1.1.md | 2 +- docs/developer-tools/community-resources.mdx | 6 +- docs/developer-tools/embedded-app-sdk.mdx | 216 ++++---- docs/developer-tools/game-sdk.mdx | 48 +- docs/discord-social-sdk/core-concepts.mdx | 62 +-- docs/discord-social-sdk/design-guidelines.mdx | 26 +- .../design-guidelines/branding-guidelines.mdx | 2 +- .../design-guidelines/connection-points.mdx | 4 +- .../design-guidelines/consoles.mdx | 6 +- .../design-guidelines/direct-messages.mdx | 6 +- .../design-guidelines/game-friends.mdx | 4 +- .../design-guidelines/linked-channels.mdx | 4 +- .../design-guidelines/principles.mdx | 2 +- .../provisional-accounts.mdx | 4 +- .../design-guidelines/signing-in.mdx | 6 +- .../status-rich-presence.mdx | 6 +- .../unified-friends-list.mdx | 4 +- .../discord-social-sdk/development-guides.mdx | 28 +- .../account-linking-on-consoles.mdx | 24 +- .../account-linking-with-discord.mdx | 24 +- .../creating-a-unified-friends-list.mdx | 22 +- .../development-guides/debugging-logging.mdx | 8 +- .../development-guides/joining-voice-chat.mdx | 8 +- .../development-guides/linked-channels.mdx | 20 +- .../managing-game-invites.mdx | 20 +- .../development-guides/managing-lobbies.mdx | 20 +- .../managing-relationships.mdx | 14 +- .../sending-direct-messages.mdx | 16 +- .../setting-rich-presence.mdx | 26 +- .../using-provisional-accounts.mdx | 10 +- .../using-with-discord-apis.mdx | 8 +- docs/discord-social-sdk/getting-started.mdx | 14 +- .../partials/getting-started.mdx | 2 +- .../getting-started/using-c++.mdx | 8 +- .../getting-started/using-unity.mdx | 10 +- .../getting-started/using-unreal-engine.mdx | 8 +- docs/discord-social-sdk/overview.mdx | 12 +- .../partials/callouts/limited-access.mdx | 2 +- .../partials/callouts/public-client.mdx | 2 +- docs/discovery/best-practices.md | 2 +- docs/discovery/enabling-discovery.mdx | 6 +- docs/discovery/overview.mdx | 8 +- docs/events/gateway-events.mdx | 474 +++++++++--------- docs/events/gateway.mdx | 204 ++++---- docs/events/overview.mdx | 26 +- docs/events/webhook-events.mdx | 54 +- docs/interactions/application-commands.mdx | 262 +++++----- docs/interactions/message-components.md | 44 +- docs/interactions/overview.mdx | 40 +- .../interactions/receiving-and-responding.mdx | 212 ++++---- docs/intro.mdx | 24 +- docs/monetization/enabling-monetization.mdx | 12 +- .../implementing-app-subscriptions.mdx | 54 +- .../implementing-iap-for-activities.mdx | 46 +- .../implementing-one-time-purchases.md | 30 +- docs/monetization/managing-skus.mdx | 12 +- docs/monetization/overview.mdx | 14 +- .../developer-policy.md | 10 +- .../developer-terms-of-service.md | 10 +- docs/quick-start/getting-started.mdx | 70 +-- docs/quick-start/overview-of-apps.mdx | 38 +- docs/reference.mdx | 70 +-- .../application-role-connection-metadata.md | 20 +- docs/resources/application.md | 104 ++-- docs/resources/audit-log.md | 152 +++--- docs/resources/auto-moderation.md | 78 +-- docs/resources/channel.md | 222 ++++---- docs/resources/emoji.md | 52 +- docs/resources/entitlement.md | 20 +- docs/resources/guild-scheduled-event.mdx | 92 ++-- docs/resources/guild-template.md | 34 +- docs/resources/guild.md | 392 +++++++-------- docs/resources/invite.md | 34 +- docs/resources/lobby.md | 52 +- docs/resources/message.md | 244 ++++----- docs/resources/poll.md | 32 +- docs/resources/sku.md | 6 +- docs/resources/soundboard.md | 38 +- docs/resources/stage-instance.md | 26 +- docs/resources/sticker.md | 46 +- docs/resources/subscription.md | 13 +- docs/resources/user.md | 68 +-- docs/resources/voice.md | 20 +- docs/resources/webhook.md | 110 ++-- docs/rich-presence/best-practices.md | 4 +- docs/rich-presence/overview.mdx | 38 +- .../using-with-the-discord-social-sdk.mdx | 10 +- .../using-with-the-embedded-app-sdk.mdx | 40 +- .../rich-presence/using-with-the-game-sdk.mdx | 40 +- docs/topics/certified-devices.md | 8 +- docs/topics/oauth2.md | 70 +-- docs/topics/opcodes-and-status-codes.md | 42 +- docs/topics/permissions.md | 20 +- docs/topics/rate-limits.md | 12 +- docs/topics/rpc.md | 158 +++--- docs/topics/teams.md | 10 +- docs/topics/threads.md | 90 ++-- docs/topics/voice-connections.mdx | 90 ++-- ...nfiguring-app-metadata-for-linked-roles.md | 8 +- .../developing-a-user-installable-app.mdx | 38 +- .../hosting-on-cloudflare-workers.md | 10 +- .../upgrading-to-application-commands.md | 62 +-- 226 files changed, 2923 insertions(+), 2912 deletions(-) diff --git a/docs/activities/building-an-activity.mdx b/docs/activities/building-an-activity.mdx index 4a96e25b99..e7c5a825ff 100644 --- a/docs/activities/building-an-activity.mdx +++ b/docs/activities/building-an-activity.mdx @@ -4,9 +4,9 @@ sidebar_label: Quickstart # Building Your First Activity in Discord -[Activities](#DOCS_ACTIVITIES_OVERVIEW) are web-based games and apps that can be run within Discord. Activities are embedded in iframes within the Discord client, and can be launched from the App Launcher or when responding to interactions. +[Activities](/docs/activities/overview) are web-based games and apps that can be run within Discord. Activities are embedded in iframes within the Discord client, and can be launched from the App Launcher or when responding to interactions. -If this is your first time learning about Activities, check out the [Activities Overview](#DOCS_ACTIVITIES_OVERVIEW) for more information and a collection of more advanced [sample projects](#DOCS_ACTIVITIES_OVERVIEW/sample-projects). +If this is your first time learning about Activities, check out the [Activities Overview](/docs/activities/overview) for more information and a collection of more advanced [sample projects](/docs/activities/overview#sample-projects). ## Introduction @@ -95,7 +95,7 @@ While it's not much at the moment, in the following steps we'll connect it to th By the end of Step 1, you should have: -- An understanding of what Discord [Activities](#DOCS_ACTIVITIES_OVERVIEW) are +- An understanding of what Discord [Activities](/docs/activities/overview) are - Developer Mode enabled on your Discord account - Cloned the [sample project](https://github.com/discord/getting-started-activity) to your development environment - Installed the front-end dependencies (in the `client` folder) @@ -118,7 +118,7 @@ After you create your app, you'll land on the **General Overview** page of the a ### Choose installation contexts -Apps in Discord can be installed to different **[installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context)**: servers, user accounts, or both. +Apps in Discord can be installed to different **[installation contexts](/docs/resources/application#installation-context)**: servers, user accounts, or both. The recommended *and* default behavior for apps is supporting both installation contexts, which lets the installer to choose the context during the installation flow. However, you can change the default behavior by changing the supported installation contexts in your app's settings. @@ -126,19 +126,19 @@ The recommended *and* default behavior for apps is supporting both installation As mentioned, installation contexts determine where your app can be installed. The installation context affect things like who can manage the installation, where the app's commands can appear, and the data returned in response to interactions. -- Apps installed in a **[server context](#DOCS_RESOURCES_APPLICATION/server-context)** (server-installed apps) must be authorized by a server member with the `MANAGE_GUILD` permission, and are visible to all members of the server. -- Apps installed in a **[user context](#DOCS_RESOURCES_APPLICATION/user-context)** (user-installed apps) are visible only to the authorizing user, and therefore don't require any server-specific permissions. Apps installed to a user context are visible across all of the user's servers, DMs, and GDMs—however, they're limited to using commands. +- Apps installed in a **[server context](/docs/resources/application#server-context)** (server-installed apps) must be authorized by a server member with the `MANAGE_GUILD` permission, and are visible to all members of the server. +- Apps installed in a **[user context](/docs/resources/application#user-context)** (user-installed apps) are visible only to the authorizing user, and therefore don't require any server-specific permissions. Apps installed to a user context are visible across all of the user's servers, DMs, and GDMs—however, they're limited to using commands. -Details about installation contexts is in the [Application documentation](#DOCS_RESOURCES_APPLICATION/installation-context) and the [Developing a User-Installable App tutorial](#DOCS_TUTORIALS_DEVELOPING_A_USER_INSTALLABLE_APP). +Details about installation contexts is in the [Application documentation](/docs/resources/application#installation-context) and the [Developing a User-Installable App tutorial](/docs/tutorials/develing-a-user-installable-app). Click on **Installation** in the left sidebar, then under **Installation Contexts** make sure both "User Install" and "Guild Install" are selected. This will make sure users can launch our app's Activity across Discord servers, DMs, and Group DMs. ### Add a Redirect URI -Next, we'll add a Redirect URI, which is where a user is typically redirected to after authorizing with your app when going through the standard OAuth flow. While setting up a Redirect URI is required, the Embedded App SDK automatically handles redirecting users back to your Activity when the RPC [`authorize` command](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authorize) is called. +Next, we'll add a Redirect URI, which is where a user is typically redirected to after authorizing with your app when going through the standard OAuth flow. While setting up a Redirect URI is required, the Embedded App SDK automatically handles redirecting users back to your Activity when the RPC [`authorize` command](/docs/developer-tools/embedded-app-sdk#authorize) is called. -You can learn more about the OAuth flow and redirect URIs in the [OAuth2 documentation](#DOCS_TOPICS_OAUTH2), but since we're only authorizing in an Activity, we'll just use a placeholder value (`https://127.0.0.1`) and let the Embedded App SDK handle the rest. +You can learn more about the OAuth flow and redirect URIs in the [OAuth2 documentation](/docs/topics/oauth2), but since we're only authorizing in an Activity, we'll just use a placeholder value (`https://127.0.0.1`) and let the Embedded App SDK handle the rest. Click on **OAuth2** on the sidebar in your app's settings. Under **Redirects**, enter `https://127.0.0.1` as a placeholder value then click **Save Changes**. @@ -148,7 +148,7 @@ Click on **OAuth2** on the sidebar in your app's settings. Under **Redirects**, To use information related to a user (like their username) or a server (like the server's avatar), your app must be granted specific OAuth **scopes**. -For our sample app, we'll be requesting three scopes: `identify` to access basic information about a user, `guilds` to access basic information about the servers a user is in, and `applications.commands` to install [commands](#DOCS_INTERACTIONS_OVERVIEW/commands). We'll request these later on in the guide, but a full list of scopes you can request is in the [OAuth2 documentation](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes). +For our sample app, we'll be requesting three scopes: `identify` to access basic information about a user, `guilds` to access basic information about the servers a user is in, and `applications.commands` to install [commands](/docs/interactions/overview#commands). We'll request these later on in the guide, but a full list of scopes you can request is in the [OAuth2 documentation](/docs/topics/oauth2#shared-resources-oauth2-scopes). When requesting scopes later on, you'll need to pass your app's OAuth2 identifiers. For now, we'll copy these identifiers into your project's environment file. @@ -177,12 +177,12 @@ By the end of Step 2, make sure you have: ## Step 3: Setting Up the Embedded App SDK -With our project and app set up, we're going to install and configure the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) which we'll use extensively through the rest of this guide. +With our project and app set up, we're going to install and configure the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) which we'll use extensively through the rest of this guide. -The Embedded App SDK is a first-party SDK that handles the communication between Discord and your Activity with [commands](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-commands) to interact with the Discord client (like fetching information about the channel) and [events](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events) to listen for user actions and changes in state (like when a user starts or stops speaking). +The Embedded App SDK is a first-party SDK that handles the communication between Discord and your Activity with [commands](/docs/developer-tools/embedded-app-sdk#sdk-commands) to interact with the Discord client (like fetching information about the channel) and [events](/docs/developer-tools/embedded-app-sdk#sdk-events) to listen for user actions and changes in state (like when a user starts or stops speaking). > info -> The events and commands available in the Embedded App SDK are a subset of the [RPC API](#DOCS_TOPICS_RPC) ones, so referencing the RPC documentation can be helpful to understand what's happening under the hood when developing Activities. +> The events and commands available in the Embedded App SDK are a subset of the [RPC API](/docs/topics/rpc) ones, so referencing the RPC documentation can be helpful to understand what's happening under the hood when developing Activities. ### Install the SDK @@ -200,7 +200,7 @@ Once installed, we need to import it into our client code and instantiate it to To instantiate the SDK, we will use the environment variables we set up in Step 2. -We also set up a check for the [`ready` event](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/ready) with an async/await function which allows us to output a log or perform other actions once the handshake was successful. +We also set up a check for the [`ready` event](/docs/developer-tools/embedded-app-sdk#ready) with an async/await function which allows us to output a log or perform other actions once the handshake was successful. @@ -303,7 +303,7 @@ Back in your app's settings, click on the **URL Mappings** page under **Activiti |--------|-----------------------------------------| | `/` | `funky-jogging-bunny.trycloudflare.com` | -Read details about URL Mapping [in the development guide](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/url-mapping). +Read details about URL Mapping [in the development guide](/docs/activities/development-guides#url-mapping). ### Enable Activities @@ -315,9 +315,9 @@ Find the first checkbox, labeled `Enable Activities`. Turn it on 🎉 #### Default Entry Point Command -When you enable Activities for your app, a [default Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/default-entry-point-command) called "Launch" is automatically created. This [Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands) is the primary way for users to launch your Activity in Discord. +When you enable Activities for your app, a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" is automatically created. This [Entry Point command](/docs/interactions/application-commands#entry-point-commands) is the primary way for users to launch your Activity in Discord. -By default, interactions with this command will result in Discord opening your Activity for the user and posting a message in the channel where it was launched from. However, if you prefer to handle the interactions in your app, you can update the [`handler` field](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-handlers) or create your own. Additional details are in the Entry Point command [documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands) and [development guide](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/setting-up-an-entry-point-command). +By default, interactions with this command will result in Discord opening your Activity for the user and posting a message in the channel where it was launched from. However, if you prefer to handle the interactions in your app, you can update the [`handler` field](/docs/interactions/application-commands#entry-point-handlers) or create your own. Additional details are in the Entry Point command [documentation](/docs/interactions/application-commands#entry-point-commands) and [development guide](/docs/activities/development-guides#setting-up-an-entry-point-command). ### Running your Activity in Discord @@ -331,7 +331,7 @@ Clicking on your app will launch your locally running app from inside Discord! ![Running your activity](images/activities/start-activity.png) > info -> **Customizing your Activity**
If you'd like to set images for your Activity, you can learn how to do that [here](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/setting-up-activity-metadata). +> **Customizing your Activity**
If you'd like to set images for your Activity, you can learn how to do that [here](/docs/activities/development-guides#setting-up-activity-metadata). We're looking pretty good so far, but we haven't wired up any Discord functionality yet. Let's do that next. @@ -435,7 +435,7 @@ You should output similar to the following: Server listening at http://localhost:3001 ``` -We can now run our server and client-side apps in separate terminal windows. You can see other ways to set this up in the other [sample projects](#DOCS_ACTIVITIES_OVERVIEW/sample-projects). +We can now run our server and client-side apps in separate terminal windows. You can see other ways to set this up in the other [sample projects](/docs/activities/overview#sample-projects). ### Calling external resources from your activity @@ -444,7 +444,7 @@ Before we call your backend activity server, we need to be aware of the Discord > info > For this tutorial, we are going to prefix the API call to `/api/token/` with `/.proxy`, but you can also use the SDK's `patchUrlMappings()` method to automatically prefix calls to your external resources for the proxy. -Learn more about this topic in the guides for [Constructing a Full URL](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/construct-a-full-url) and [Using External Resources](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/using-external-resources). +Learn more about this topic in the guides for [Constructing a Full URL](/docs/activities/development-guides#construct-a-full-url) and [Using External Resources](/docs/activities/development-guides#using-external-resources). ### Calling your backend server from your client @@ -608,12 +608,12 @@ By the end of Step 6, make sure you have: Since we requested the `identify` and `guilds` scopes, you can also use the authorized `access_token` we received earlier to fetch those resources via the API. In the following code block, we will: -1. Call the [`GET /users/@me/guilds`](#DOCS_RESOURCES_USER/get-current-user-guilds) endpoint with `auth.access_token` to get a list of the guilds the authorizing user is in +1. Call the [`GET /users/@me/guilds`](/docs/resources/user#get-current-user-guilds) endpoint with `auth.access_token` to get a list of the guilds the authorizing user is in 2. Iterate over each guild to find the guild we are in based on the `guildId` defined in discordSdk 3. Create a new HTML image element with the guild avatar and append it to our frontend > info -> In this example, we use a pure `fetch` request to make the API call, but you can us one of the JavaScript [community-built libraries](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES) if you prefer. +> In this example, we use a pure `fetch` request to make the API call, but you can us one of the JavaScript [community-built libraries](/docs/developer-tools/community-resources) if you prefer. @@ -670,7 +670,7 @@ If we relaunch our Activity, we will see the current server's avatar render in o At this point, you should have your Activity up and running. For Step 7, you should have: -- Updated your `client/main.js` code to fetch the guild information using the [`GET /users/@me/guilds`](#DOCS_RESOURCES_USER/get-current-user-guilds) API endpoint +- Updated your `client/main.js` code to fetch the guild information using the [`GET /users/@me/guilds`](/docs/resources/user#get-current-user-guilds) API endpoint - Added a call to the new function in the callback for `setupDiscordSdk()` @@ -680,10 +680,10 @@ At this point, you should have your Activity up and running. For Step 7, you sho Congrats on building your first Activity! 🎉 -This is an intentionally simple example to get you started with the communication between your Activity and Discord using the Embedded App SDK and APIs. From here, you can explore the [Activities documentation](#DOCS_ACTIVITIES_OVERVIEW) and other resources. +This is an intentionally simple example to get you started with the communication between your Activity and Discord using the Embedded App SDK and APIs. From here, you can explore the [Activities documentation](/docs/activities/overview) and other resources. - + Follow our Activities Development Guides for suggested development practices and considerations. diff --git a/docs/activities/design-patterns.mdx b/docs/activities/design-patterns.mdx index 2958b03418..519397e11c 100644 --- a/docs/activities/design-patterns.mdx +++ b/docs/activities/design-patterns.mdx @@ -71,8 +71,8 @@ Make your app fast, easy to join, and maximize fun to launch a crowd favorite. ### Keep load times as low as possible - This allows for easier drop-in drop-out behavior for the large portion of mobile users on Discord. -- See the below [Quality & Testing Recommendations](#DOCS_ACTIVITIES_DESIGN_PATTERNS/quality-and-testing) for key areas of minimum quality support and testing recommendations. -- See the below [Technical Considerations](#DOCS_ACTIVITIES_DESIGN_PATTERNS/technical-considerations) for recommendations on how to partition loading and work with various development tools to reduce load times. +- See the below [Quality & Testing Recommendations](/docs/activities/design-patterns#quality-and-testing) for key areas of minimum quality support and testing recommendations. +- See the below [Technical Considerations](/docs/activities/design-patterns#technical-considerations) for recommendations on how to partition loading and work with various development tools to reduce load times. - Consider different screen sizes and orientations across desktop and mobile devices and make sure UI elements scale appropriately. ### Support drop-in, drop-out behavior diff --git a/docs/activities/development-guides.mdx b/docs/activities/development-guides.mdx index c4a18d2d6c..9a378c06d6 100644 --- a/docs/activities/development-guides.mdx +++ b/docs/activities/development-guides.mdx @@ -8,131 +8,131 @@ These guides include suggested development practices, SDK commands, and user flo ## Local Development - + Get up and running with a local development application. - + How to launch your app on mobile and desktop Discord clients. - + Configure the Discord proxy to allow network requests to necessary external endpoints. - + How to use the various levels of logging while building your application. ## User Actions - + Open an external link from within your app. - + Open the Application Channel Invite dialog within Discord. - + Open a dialog to share media from your application to a channel, DM, or GDM. - + Configure a command that allows users to open your Activity from the App Launcher. - + Open a dialog to enable hardware acceleration for compute-intensive applications. ## Mobile - + Update your application settings to support iOS and Android. - + Ensure that your app's assets fall within mobile-safe areas. - + Respond to thermal state changes surfaced from iOS and Android. ## Layout - + Configure and subscribe to changes in application orientation. - + Subscribe to layout mode changes to update your application's user interface. ## Networking - + Working with our Activity Proxy - + Generate a full URL when working with network requests. - + Allow network requests to external resources from inside the Discord proxy. - + Keep things safe and secure in your Activity. ## Multiplayer Experience - + Managing instances to ensure users join the same instance as their friends. - + Use the SDK to fetch the users currently connected to an instance. - + Retrieve and render the usernames and avatars of users connected to your application. - + Validating activity sessions are via a Discord client before adding them to an instance's session. ## Growth and Referrals - + Encourage your users to share links to your activity by adding tracking and offering rewards for engagement. - + For off-platform sharing of rewards, promotions, or limited time experiences. - + An API to be able to generate ephemeral links with a customizable embed. ## Assets & Metadata - + Best practices for configuring how your application shows up in Discord. - + Best practices for configuring how your application shows up in Discord. ## Production Readiness - + Manage asset caching in your application and the Discord Activity proxy. - + Stay within rate limits to keep the fun going in your Activity. - + Network routing considerations when preparing your Activity for production use. - + Future-proof your application and support new commands as they become available in the SDK. @@ -140,9 +140,9 @@ These guides include suggested development practices, SDK commands, and user flo --- ### Run Your Application Locally -It is possible to load your application via a localhost port or other unique URL. This URL must support an HTTPS connection to load on the web/desktop Discord app (HTTPS is not required for mobile). The downside to this flow is that your application's network traffic will not pass through Discord's proxy, which means any requests made by the application will need to use a full URL instead of a ["mapped"](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/url-mapping) URL. +It is possible to load your application via a localhost port or other unique URL. This URL must support an HTTPS connection to load on the web/desktop Discord app (HTTPS is not required for mobile). The downside to this flow is that your application's network traffic will not pass through Discord's proxy, which means any requests made by the application will need to use a full URL instead of a ["mapped"](/docs/activities/development-guides#url-mapping) URL. -To run your locally hosted application, follow the instructions for [Launching your Application from the Discord Client](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/launch-your-application-from-the-discord-client) and set the Application URL Override to the address of your application's web server. +To run your locally hosted application, follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides#launch-your-application-from-the-discord-client) and set the Application URL Override to the address of your application's web server. ### Running Your Application Through A Network Tunnel @@ -150,7 +150,7 @@ Although it is possible to test your application locally, we recommend developin 1. Create a new application in the Discord Developer portal. 2. Enable Activities for your app. -3. Set up the application's [URL mapping](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/url-mapping). +3. Set up the application's [URL mapping](/docs/activities/development-guides#url-mapping). 4. Locally, spin up your web server. 5. Install and run a tunnel solution, such as [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared). You will point it to your local web server. @@ -177,7 +177,7 @@ In the Discord Developer Portal, update the Application URL mapping for `/` url > warn > If you do not own the URL that you are using to host the application (i.e. ngrok's free tier), someone else could claim that domain and host a malicious site in its place. Please be aware of these risks, and if you have to use a domain you do not own, be sure to reset your URL mapping when you are done using the tunnel. -Follow the instructions for [Launching your Application from the Discord Client](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/launch-your-application-from-the-discord-client). Application URL Override should not be enabled. +Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides#launch-your-application-from-the-discord-client). Application URL Override should not be enabled. ### Running Your Application In Production @@ -185,8 +185,8 @@ The flow for setting up your production application is very similar: 1. If not made yet, create a new application. 2. Enable Activities for your app. -3. Set up the application's [URL Mapping](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/url-mapping). The URL for your application's html should be set to the `/` route. -4. Follow the instructions for [Launching your Application from the Discord Client](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/launch-your-application-from-the-discord-client)). Application URL Override should not be enabled. +3. Set up the application's [URL Mapping](/docs/activities/development-guides#url-mapping). The URL for your application's html should be set to the `/` route. +4. Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides#launch-your-application-from-the-discord-client)). Application URL Override should not be enabled. This application now uses the same configuration it will use once it is fully published ✨. ![application-test-mode-prod](images/activities/application-test-mode-prod.gif) @@ -440,21 +440,21 @@ User Experience ### Setting Up an Entry Point Command -An [Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands) is required for users to be able to launch your Activity from the [App Launcher menu](https://support.discord.com/hc/articles/21334461140375-Using-Apps-on-Discord#h_01HRQSA6C8TRHS722P1H3HW1TV) in Discord. +An [Entry Point command](/docs/interactions/application-commands#entry-point-commands) is required for users to be able to launch your Activity from the [App Launcher menu](https://support.discord.com/hc/articles/21334461140375-Using-Apps-on-Discord#h_01HRQSA6C8TRHS722P1H3HW1TV) in Discord. -When you enable Activities in your [app's settings](http://discord.com/developers/applications), a [default Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/default-entry-point-command) is automatically created for your app. The default Entry Point command will use the `DISCORD_LAUNCH_ACTIVITY` (`2`) [handler type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-entry-point-command-handler-types), which means that Discord automatically launches your Activity for the user and posts a follow-up message into the channel where it was launched from. +When you enable Activities in your [app's settings](http://discord.com/developers/applications), a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) is automatically created for your app. The default Entry Point command will use the `DISCORD_LAUNCH_ACTIVITY` (`2`) [handler type](/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types), which means that Discord automatically launches your Activity for the user and posts a follow-up message into the channel where it was launched from. -If you want to handle sending messages yourself, you can update the handler to be `APP_HANDLER` (`1`). Details about Entry Point command handlers is in the [Entry Point command documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-handlers). +If you want to handle sending messages yourself, you can update the handler to be `APP_HANDLER` (`1`). Details about Entry Point command handlers is in the [Entry Point command documentation](/docs/interactions/application-commands#entry-point-handlers). #### Customizing the Default Entry Point Command -Entry Point commands can be customized in the same way as other [commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS). Since Entry Point commands can only be [global](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/making-a-global-command), you'll use the HTTP endpoints for global commands: -- **Edit your existing Entry Point command's name or details** using the [Edit Global Application Command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-global-application-command) endpoint. If you don't know the ID for your app's Entry Point command, use the [Get Global Application Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/get-global-application-commands) endpoint to retrieve it. -- **Make a different (option-less) command your Entry Point command** by updating its [command `type`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) to `PRIMARY_ENTRY_POINT` (type `4`). Your app can only have one Entry Point command, so if your app already has one, you must first [delete](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/delete-global-application-command) it or [update](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-global-application-command) its [command `type`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types). +Entry Point commands can be customized in the same way as other [commands](/docs/interactions/application-commands). Since Entry Point commands can only be [global](/docs/interactions/application-commands#making-a-global-command), you'll use the HTTP endpoints for global commands: +- **Edit your existing Entry Point command's name or details** using the [Edit Global Application Command](/docs/interactions/application-commands#edit-global-application-command) endpoint. If you don't know the ID for your app's Entry Point command, use the [Get Global Application Commands](/docs/interactions/application-commands#get-global-application-commands) endpoint to retrieve it. +- **Make a different (option-less) command your Entry Point command** by updating its [command `type`](/docs/interactions/application-commands#application-command-object-application-command-types) to `PRIMARY_ENTRY_POINT` (type `4`). Your app can only have one Entry Point command, so if your app already has one, you must first [delete](/docs/interactions/application-commands#delete-global-application-command) it or [update](/docs/interactions/application-commands#edit-global-application-command) its [command `type`](/docs/interactions/application-commands#application-command-object-application-command-types). #### Creating an Entry Point Command -To create a new Entry Point command, you can call the [Create Global Application Command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-global-application-command) endpoint and set the [command `type`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) to `PRIMARY_ENTRY_POINT` (type `4`). +To create a new Entry Point command, you can call the [Create Global Application Command](/docs/interactions/application-commands#create-global-application-command) endpoint and set the [command `type`](/docs/interactions/application-commands#application-command-object-application-command-types) to `PRIMARY_ENTRY_POINT` (type `4`). Your command payload may look something like this: @@ -473,10 +473,10 @@ Your command payload may look something like this: ``` In addition to the `type` and `handler` values, the command payload includes `integration_types` and `contexts` which let you configure when and where your command can be used: -- `integration_types` defines the [installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context) where your command is available (to a server, to a user's account, or both). If you don't set `integration_types` when creating a command, it will default to your app's [currently-supported installation contexts](#DOCS_RESOURCES_APPLICATION/setting-supported-installation-contexts). -- `contexts` defines the [interaction contexts](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where a command can be run in Discord (in a server, in a DM with your app, and/or in DMs and Group DMs with other users). +- `integration_types` defines the [installation contexts](/docs/resources/application#installation-context) where your command is available (to a server, to a user's account, or both). If you don't set `integration_types` when creating a command, it will default to your app's [currently-supported installation contexts](/docs/resources/application#setting-supported-installation-contexts). +- `contexts` defines the [interaction contexts](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where a command can be run in Discord (in a server, in a DM with your app, and/or in DMs and Group DMs with other users). -Details about both of these fields are in the [command contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts) documentation. +Details about both of these fields are in the [command contexts](/docs/interactions/application-commands#contexts) documentation. --- @@ -679,7 +679,7 @@ While we currently only support websockets, we're working with our upstream prov WebRTC is not supported. -Other guides are available in this [Networking](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/networking) section for using external network resources and constructing a full url versus relative urls. +Other guides are available in this [Networking](/docs/activities/development-guides#networking) section for using external network resources and constructing a full url versus relative urls. --- @@ -712,7 +712,7 @@ In other words, given an application client id of `12345678` ### Using External Resources -Activities in Discord are "sandboxed" via a Discord proxy. This is done to hide the users' IP addresses as well as block URLs from known malicious endpoints. To achieve this, the Discord Developer Portal has a section for [configuring URL Mappings](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/url-mapping) for your application. +Activities in Discord are "sandboxed" via a Discord proxy. This is done to hide the users' IP addresses as well as block URLs from known malicious endpoints. To achieve this, the Discord Developer Portal has a section for [configuring URL Mappings](/docs/activities/development-guides#url-mapping) for your application. One edge-case of URL mappings is that third-party NPM modules or other resources may reference external (non-sandboxed) urls. @@ -916,7 +916,7 @@ This guide covers implementing a referral link which will feature a reward syste When implementing sharing, you'll need to: 1. Generate a unique ID for tracking the promotion -2. Call the [`shareLink`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelink) command +2. Call the [`shareLink`](/docs/developer-tools/embedded-app-sdk#sharelink) command 3. Track the share attempt ```javascript @@ -990,7 +990,7 @@ async function handleReferral() { ### Creating and Managing Custom Incentivized Links -This guide covers creating a customizable [Incentivized Link](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/prompting-users-to-share-incentivized-links) through the dev portal, and then retrieving the link to be able to share it off-platform. Incentivized Links are used to customize how the embed appears to users. +This guide covers creating a customizable [Incentivized Link](/docs/activities/development-guides#prompting-users-to-share-incentivized-links) through the dev portal, and then retrieving the link to be able to share it off-platform. Incentivized Links are used to customize how the embed appears to users. #### Creating a Link @@ -1035,7 +1035,7 @@ Users will see an embed with your information displayed. Clicking "Play" opens t ### Generating a Custom Link Within Your Activity -This guide covers creating a customizable [Incentivized Link](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/prompting-users-to-share-incentivized-links) within your activity, and using the `shareLink` API to share the link. +This guide covers creating a customizable [Incentivized Link](/docs/activities/development-guides#prompting-users-to-share-incentivized-links) within your activity, and using the `shareLink` API to share the link. * Allows you to customize the way the link is presented to users via the embed * Can be generated on-demand within your activity diff --git a/docs/activities/how-activities-work.md b/docs/activities/how-activities-work.md index 38fdf4cb35..5a3aab985b 100644 --- a/docs/activities/how-activities-work.md +++ b/docs/activities/how-activities-work.md @@ -2,11 +2,11 @@ Activities are web applications that run in an iframe within Discord on desktop, mobile and web. In order to achieve this, we use the [`postMessage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) protocol to enable secure communication between your application and Discord. -The [Embedded App SDK](https://github.com/discord/embedded-app-sdk) simplifies this process by managing the `postMessage` protocol on your behalf. For details on available commands and their usage, consult the [SDK Reference](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK). Our [Sample Projects](#DOCS_ACTIVITIES_OVERVIEW/sample-projects) provide practical examples of how to implement these features. +The [Embedded App SDK](https://github.com/discord/embedded-app-sdk) simplifies this process by managing the `postMessage` protocol on your behalf. For details on available commands and their usage, consult the [SDK Reference](/docs/developer-tools/embedded-app-sdk). Our [Sample Projects](/docs/activities/overview#sample-projects) provide practical examples of how to implement these features. ## Designed for Single-Page Apps (SPAs) -This SDK is intended for use by a single-page application. We recognize developers may be using frameworks or approaches that are not an exact fit for single-page applications. We recommend nesting those frameworks inside your Activity's top-level single-page application and passing messages as you see fit. Please refer to the [Nested Messages App](#DOCS_ACTIVITIES_OVERVIEW/sample-projects) sample project for guidance on this approach. +This SDK is intended for use by a single-page application. We recognize developers may be using frameworks or approaches that are not an exact fit for single-page applications. We recommend nesting those frameworks inside your Activity's top-level single-page application and passing messages as you see fit. Please refer to the [Nested Messages App](/docs/activities/overview#sample-projects) sample project for guidance on this approach. ## Activity Lifecycle @@ -20,7 +20,7 @@ This SDK is intended for use by a single-page application. We recognize develope ## Sample Code and Activity Lifecycle Diagram > info -> Below is a minimal example of setting up the SDK. Please see our [Sample Projects](#DOCS_ACTIVITIES_OVERVIEW/sample-projects) for more complete sample applications. +> Below is a minimal example of setting up the SDK. Please see our [Sample Projects](/docs/activities/overview#sample-projects) for more complete sample applications. ```javascript import {DiscordSDK} from '@discord/embedded-app-sdk'; diff --git a/docs/activities/overview.mdx b/docs/activities/overview.mdx index 51311d50d7..5ebce3096e 100644 --- a/docs/activities/overview.mdx +++ b/docs/activities/overview.mdx @@ -8,16 +8,16 @@ sidebar_label: Overview **Activities** are multiplayer games and social experiences that can be launched in Discord. Activities can integrate with Discord features like user identity, voice and chat, profile data like Rich Presence, and native monetization. -Under the hood, Activities are single page web apps hosted in an iframe and use the [Embedded App SDK](#DOCS_ACTIVITIES_OVERVIEW/embedded-app-sdk) to communicate with Discord clients. This page focuses on how Activities are launched and built, but you can explore real-world Activities by reading some of our [developer case studies](https://discord.com/build#case-studies), or by trying a few out in Discord. You can also jump right into building using some of the resources below. +Under the hood, Activities are single page web apps hosted in an iframe and use the [Embedded App SDK](/docs/activities/overview#embedded-app-sdk) to communicate with Discord clients. This page focuses on how Activities are launched and built, but you can explore real-world Activities by reading some of our [developer case studies](https://discord.com/build#case-studies), or by trying a few out in Discord. You can also jump right into building using some of the resources below. - + Follow the guide to build your first Activity using the Embedded App SDK. - + Explore common development patterns and practices to make building Activities simpler. - + Learn more about the lifecycle of Activities and how they run in Discord clients. @@ -34,27 +34,27 @@ Each of these are covered in more detail in the below sections. ### Entry Point Command -Activities are primarily opened when users invoke your app's [Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands) in the App Launcher. +Activities are primarily opened when users invoke your app's [Entry Point command](/docs/interactions/application-commands#entry-point-commands) in the App Launcher. -When you enable Activities for your app, a [default Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/default-entry-point-command) called "Launch" is created for you. By default, Discord automatically handles opening your Activity when your Entry Point command is run by a user. +When you enable Activities for your app, a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" is created for you. By default, Discord automatically handles opening your Activity when your Entry Point command is run by a user. -Read more about setting up Entry Point commands in the [development guide](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/setting-up-an-entry-point-command). +Read more about setting up Entry Point commands in the [development guide](/docs/activities/development-guides#setting-up-an-entry-point-command). ### Interaction Response -Activities can be launched in response to [command](#DOCS_INTERACTIONS_OVERVIEW/commands), [message component](#DOCS_INTERACTIONS_OVERVIEW/message-components), and [modal submission](#DOCS_INTERACTIONS_OVERVIEW/modals) interactions. To open an Activity, set the callback type to `LAUNCH_ACTIVITY` (type `12`) when [responding to the interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/responding-to-an-interaction). +Activities can be launched in response to [command](/docs/interactions/overview#commands), [message component](/docs/interactions/overview#message-components), and [modal submission](/docs/interactions/overview#modals) interactions. To open an Activity, set the callback type to `LAUNCH_ACTIVITY` (type `12`) when [responding to the interaction](/docs/interactions/receiving-and-responding#responding-to-an-interaction). --- ## Developing Activities -Whether you're developing a multiplayer game, a new social experience, or another creative idea, your Activity will be built as a web app that is run in an iframe in Discord on desktop, mobile, and web. You can get started by following the guide on [Building an Activity using the Embedded App SDK](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) or exploring the [sample projects](#DOCS_ACTIVITIES_OVERVIEW/sample-projects) +Whether you're developing a multiplayer game, a new social experience, or another creative idea, your Activity will be built as a web app that is run in an iframe in Discord on desktop, mobile, and web. You can get started by following the guide on [Building an Activity using the Embedded App SDK](/docs/activities/building-an-activity) or exploring the [sample projects](/docs/activities/overview#sample-projects) -The sections below provide an overview of the Embedded App SDK, but technical details about how Activities are run in Discord is covered in [How Activities Work](#DOCS_ACTIVITIES_HOW_ACTIVITIES_WORK). +The sections below provide an overview of the Embedded App SDK, but technical details about how Activities are run in Discord is covered in [How Activities Work](/docs/activities/how-activities-work). ### Embedded App SDK -The [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) handles all of the communication between Discord and your app, making it easier to do common tasks like managing connected users, supporting mobile clients, and debugging your Activity. +The [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) handles all of the communication between Discord and your app, making it easier to do common tasks like managing connected users, supporting mobile clients, and debugging your Activity. The Embedded App SDK offers different events and commands to handle the communication between Discord and your Activity, which are covered more below. @@ -62,13 +62,13 @@ The Embedded App SDK offers different events and commands to handle the communic The SDK has a set of commands you can call to interact with a Discord client, given you have the appropriate scopes. This is helpful when you want to do authorize and authenticate users, fetch information about your Activity, or update information for your Activity or an authenticated user. -Read the [Embedded App SDK documentation](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-commands) for a full list of commands, and details about each command. +Read the [Embedded App SDK documentation](/docs/developer-tools/embedded-app-sdk#sdk-commands) for a full list of commands, and details about each command. #### Events The SDK also has events you can subscribe (or unsubscribe) to for things happening in a connected client that are relevant to your Activity, given you have the appropriate scopes. This is helpful when you want to do things like handle initial connection and thrown errors, listen to updates about a connected user, and listen to events related to your Activity instance. -Read the [Embedded App SDK documentation](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events) for a full list of events, and details for each event. +Read the [Embedded App SDK documentation](/docs/developer-tools/embedded-app-sdk#sdk-events) for a full list of events, and details for each event. --- diff --git a/docs/change-log/2017-07-19-breaking-change-version-6.md b/docs/change-log/2017-07-19-breaking-change-version-6.md index a22dd1f12f..1e135982fe 100644 --- a/docs/change-log/2017-07-19-breaking-change-version-6.md +++ b/docs/change-log/2017-07-19-breaking-change-version-6.md @@ -4,11 +4,11 @@ date: "2017-07-19" breaking: true --- -* [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) Object +* [Channel](/docs/resources/channel#channel-object) Object * `is_private` removed - * [`type`](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) is now an integer - * `recipient` is now `recipients`, an array of [user](#DOCS_RESOURCES_USER/user-object) objects -* [Message](#DOCS_RESOURCES_MESSAGE/message-object) Object - * [`type`](#DOCS_RESOURCES_MESSAGE/message-object-message-types) added to support system messages -* [Status Update](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence-gateway-presence-update-structure) Object + * [`type`](/docs/resources/channel#channel-object-channel-types) is now an integer + * `recipient` is now `recipients`, an array of [user](/docs/resources/user#user-object) objects +* [Message](/docs/resources/message#message-object) Object + * [`type`](/docs/resources/message#message-object-message-types) added to support system messages +* [Status Update](/docs/events/gateway-events#update-presence-gateway-presence-update-structure) Object * `idle_since` renamed to `since` diff --git a/docs/change-log/2017-07-24-new-feature-audit-logs.md b/docs/change-log/2017-07-24-new-feature-audit-logs.md index 463c3e6bfb..20adb712b5 100644 --- a/docs/change-log/2017-07-24-new-feature-audit-logs.md +++ b/docs/change-log/2017-07-24-new-feature-audit-logs.md @@ -3,4 +3,4 @@ title: "New Feature: Audit Logs" date: "2017-07-24" --- -Audit logs are here! Well, they've been here all along, but now we've got [documentation](#DOCS_RESOURCES_AUDIT_LOG/) about them. Check it out, but remember: with great power comes great responsibility. +Audit logs are here! Well, they've been here all along, but now we've got [documentation](/docs/resources/audit-log#) about them. Check it out, but remember: with great power comes great responsibility. diff --git a/docs/change-log/2017-08-16-breaking-change-presence-activity-objects.md b/docs/change-log/2017-08-16-breaking-change-presence-activity-objects.md index 989225fab1..fdf03d5474 100644 --- a/docs/change-log/2017-08-16-breaking-change-presence-activity-objects.md +++ b/docs/change-log/2017-08-16-breaking-change-presence-activity-objects.md @@ -4,4 +4,4 @@ date: "2017-08-16" breaking: true --- -The `type` field in the [activity object](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object) for [Gateway Status Update](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence) and [Presence Update](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) payloads is no longer optional when the activity object is not null. +The `type` field in the [activity object](/docs/events/gateway-events#activity-object) for [Gateway Status Update](/docs/events/gateway-events#update-presence) and [Presence Update](/docs/events/gateway-events#presence-update) payloads is no longer optional when the activity object is not null. diff --git a/docs/change-log/2017-09-10-new-feature-emoji-endpoints.md b/docs/change-log/2017-09-10-new-feature-emoji-endpoints.md index 3abdbe973a..1e294bab06 100644 --- a/docs/change-log/2017-09-10-new-feature-emoji-endpoints.md +++ b/docs/change-log/2017-09-10-new-feature-emoji-endpoints.md @@ -3,4 +3,4 @@ title: "New Feature: Emoji Endpoints" date: "2017-09-10" --- -[Emoji endpoints](#DOCS_RESOURCES_EMOJI/emoji-resource) have been added to the API. Bots can now manage guild emojis to their robo-hearts' content! +[Emoji endpoints](/docs/resources/emoji#emoji-resource) have been added to the API. Bots can now manage guild emojis to their robo-hearts' content! diff --git a/docs/change-log/2017-09-20-new-feature-channel-categories.md b/docs/change-log/2017-09-20-new-feature-channel-categories.md index c267926ced..96120567f6 100644 --- a/docs/change-log/2017-09-20-new-feature-channel-categories.md +++ b/docs/change-log/2017-09-20-new-feature-channel-categories.md @@ -3,4 +3,4 @@ title: "New Feature: Channel Categories" date: "2017-09-20" --- -Changes have been made throughout the documentation to reflect the addition of channel categories to Discord. These includes an additional field—`parent_id`—to the base [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object and a new [channel category example](#DOCS_RESOURCES_CHANNEL/channel-object-example-channel-category). +Changes have been made throughout the documentation to reflect the addition of channel categories to Discord. These includes an additional field—`parent_id`—to the base [channel](/docs/resources/channel#channel-object) object and a new [channel category example](/docs/resources/channel#channel-object-example-channel-category). diff --git a/docs/change-log/2017-10-16-breaking-change-api-gateway-below-v6-discontinued.md b/docs/change-log/2017-10-16-breaking-change-api-gateway-below-v6-discontinued.md index b5c4ad5856..88c49181fc 100644 --- a/docs/change-log/2017-10-16-breaking-change-api-gateway-below-v6-discontinued.md +++ b/docs/change-log/2017-10-16-breaking-change-api-gateway-below-v6-discontinued.md @@ -4,4 +4,4 @@ date: "2017-10-16" breaking: true --- -[API](#DOCS_REFERENCE/api-versioning) and Gateway versions below v6 are now discontinued after being previously deprecated. Version 6 is now the default API and Gateway version. Attempting to use a version below 6 will result in an error. +[API](/docs/reference#api-versioning) and Gateway versions below v6 are now discontinued after being previously deprecated. Version 6 is now the default API and Gateway version. Attempting to use a version below 6 will result in an error. diff --git a/docs/change-log/2017-11-09-new-feature-rich-presence.md b/docs/change-log/2017-11-09-new-feature-rich-presence.md index a31a990e25..de47121b02 100644 --- a/docs/change-log/2017-11-09-new-feature-rich-presence.md +++ b/docs/change-log/2017-11-09-new-feature-rich-presence.md @@ -9,4 +9,4 @@ Rich Presence is now live and available for all developers! Rich Presence allows * Allowing users to post invitations to join their party or spectate their game in chat * Displaying "Spectate" and "Ask to Join" buttons on users' profiles -For more information, check out our [Rich Presence site](https://discord.com/rich-presence). To get started on development, [read the docs](#DOCS_RICH_PRESENCE_OVERVIEW)! +For more information, check out our [Rich Presence site](https://discord.com/rich-presence). To get started on development, [read the docs](/docs/rich-presence/overview)! diff --git a/docs/change-log/2018-01-03-semi-breaking-change-very-large-bot-sharding.md b/docs/change-log/2018-01-03-semi-breaking-change-very-large-bot-sharding.md index d242ab6514..08d3cbfbbc 100644 --- a/docs/change-log/2018-01-03-semi-breaking-change-very-large-bot-sharding.md +++ b/docs/change-log/2018-01-03-semi-breaking-change-very-large-bot-sharding.md @@ -4,4 +4,4 @@ date: "2018-01-03" breaking: true --- -Additional sharding requirements and information for bots in over 100,000 guilds has been added. This requires a small change in numbers of shards for affected bots. See the [documentation](#DOCS_EVENTS_GATEWAY/sharding-for-large-bots) for more information. +Additional sharding requirements and information for bots in over 100,000 guilds has been added. This requires a small change in numbers of shards for affected bots. See the [documentation](/docs/events/gateway#sharding-for-large-bots) for more information. diff --git a/docs/change-log/2018-01-23-deprecation-accept-invite-endpoint.md b/docs/change-log/2018-01-23-deprecation-accept-invite-endpoint.md index d628173173..bbe90eb48f 100644 --- a/docs/change-log/2018-01-23-deprecation-accept-invite-endpoint.md +++ b/docs/change-log/2018-01-23-deprecation-accept-invite-endpoint.md @@ -3,4 +3,4 @@ title: "Deprecation: Accept Invite Endpoint" date: "2018-01-23" --- -The [Accept Invite](#DOCS_RESOURCES_INVITE/) endpoint is deprecated starting today, and will be discontinued on March 23, 2018. The [Add Guild Member](#DOCS_RESOURCES_GUILD/add-guild-member) endpoint should be used in its place. +The [Accept Invite](/docs/resources/invite#) endpoint is deprecated starting today, and will be discontinued on March 23, 2018. The [Add Guild Member](/docs/resources/guild#add-guild-member) endpoint should be used in its place. diff --git a/docs/change-log/2018-01-30-enhancement-get-guild-emoji-endpoint.md b/docs/change-log/2018-01-30-enhancement-get-guild-emoji-endpoint.md index 295bcd1c03..83b5ae9178 100644 --- a/docs/change-log/2018-01-30-enhancement-get-guild-emoji-endpoint.md +++ b/docs/change-log/2018-01-30-enhancement-get-guild-emoji-endpoint.md @@ -3,4 +3,4 @@ title: "Enhancement: Get Guild Emoji Endpoint" date: "2018-01-30" --- -The [Get Guild Emoji](#DOCS_RESOURCES_EMOJI/get-guild-emoji) response now also includes a user object if the emoji was added by a user. +The [Get Guild Emoji](/docs/resources/emoji#get-guild-emoji) response now also includes a user object if the emoji was added by a user. diff --git a/docs/change-log/2018-02-05-enhancement-new-message-properties.md b/docs/change-log/2018-02-05-enhancement-new-message-properties.md index aa4557dfe2..07b2deed88 100644 --- a/docs/change-log/2018-02-05-enhancement-new-message-properties.md +++ b/docs/change-log/2018-02-05-enhancement-new-message-properties.md @@ -3,4 +3,4 @@ title: "Enhancement: New Message Properties" date: "2018-02-05" --- -Additional `activity` and `application` fields—as well as corresponding object documentation—have been added to the [Message](#DOCS_RESOURCES_MESSAGE/message-object) object in support of our newly-released [Spotify integration](https://support.discord.com/hc/en-us/articles/360000167212-Discord-Spotify-Connection) and previous Rich Presence enhancements. +Additional `activity` and `application` fields—as well as corresponding object documentation—have been added to the [Message](/docs/resources/message#message-object) object in support of our newly-released [Spotify integration](https://support.discord.com/hc/en-us/articles/360000167212-Discord-Spotify-Connection) and previous Rich Presence enhancements. diff --git a/docs/change-log/2018-06-19-documentation-fix-list-of-open-dms-in-certain-payloads.md b/docs/change-log/2018-06-19-documentation-fix-list-of-open-dms-in-certain-payloads.md index 07ed853836..19ab1c4af5 100644 --- a/docs/change-log/2018-06-19-documentation-fix-list-of-open-dms-in-certain-payloads.md +++ b/docs/change-log/2018-06-19-documentation-fix-list-of-open-dms-in-certain-payloads.md @@ -3,4 +3,4 @@ title: "Documentation Fix: List of Open DMS in Certain Payloads" date: "2018-06-19" --- -The documentation has been updated to correctly note that the `private_channels` field in the [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) should be an empty array, as well as the response from `/users/@me/channels` for a bot user. This change has been in effect for a long time, but the documentation was not updated. +The documentation has been updated to correctly note that the `private_channels` field in the [Ready](/docs/events/gateway-events#ready) should be an empty array, as well as the response from `/users/@me/channels` for a bot user. This change has been in effect for a long time, but the documentation was not updated. diff --git a/docs/change-log/2018-11-30-enhancement-user-object.md b/docs/change-log/2018-11-30-enhancement-user-object.md index 1f79103c12..2f9f23d630 100644 --- a/docs/change-log/2018-11-30-enhancement-user-object.md +++ b/docs/change-log/2018-11-30-enhancement-user-object.md @@ -3,4 +3,4 @@ title: "Enhancement: User Object" date: "2018-11-30" --- -The [User object](#DOCS_RESOURCES_USER/user-object) now includes two new additional fields, `premium_type` and `flags`. These can be used to know the Nitro status of a user, or determine which HypeSquad house a user is in. +The [User object](/docs/resources/user#user-object) now includes two new additional fields, `premium_type` and `flags`. These can be used to know the Nitro status of a user, or determine which HypeSquad house a user is in. diff --git a/docs/change-log/2019-04-18-new-invite-object-fields.md b/docs/change-log/2019-04-18-new-invite-object-fields.md index 94f8a1259f..587f723be6 100644 --- a/docs/change-log/2019-04-18-new-invite-object-fields.md +++ b/docs/change-log/2019-04-18-new-invite-object-fields.md @@ -3,4 +3,4 @@ title: "New Invite Object Fields" date: "2019-04-18" --- -The [Invite Object](#DOCS_RESOURCES_INVITE/invite-object) now includes two additional fields, `target_user` and `target_user_type`. +The [Invite Object](/docs/resources/invite#invite-object) now includes two additional fields, `target_user` and `target_user_type`. diff --git a/docs/change-log/2019-04-29-deprecation-of-discord-rpc-rich-presence-sdk.md b/docs/change-log/2019-04-29-deprecation-of-discord-rpc-rich-presence-sdk.md index e4facf8f6f..4292f6a135 100644 --- a/docs/change-log/2019-04-29-deprecation-of-discord-rpc-rich-presence-sdk.md +++ b/docs/change-log/2019-04-29-deprecation-of-discord-rpc-rich-presence-sdk.md @@ -3,4 +3,4 @@ title: "Deprecation of Discord-RPC Rich Presence SDK" date: "2019-04-29" --- -The [Discord-RPC](https://github.com/discord/discord-rpc) implementation of Rich Presence has been deprecated in favor of Discord's new GameSDK. If you're interested in using Rich Presence, please read our [SDK Starter Guide](#DOCS_DEVELOPER_TOOLS_GAME_SDK/getting-started) and check out the relevant functions in the [Activity Manager](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activities). +The [Discord-RPC](https://github.com/discord/discord-rpc) implementation of Rich Presence has been deprecated in favor of Discord's new GameSDK. If you're interested in using Rich Presence, please read our [SDK Starter Guide](/docs/developer-tools/game-sdk#getting-started) and check out the relevant functions in the [Activity Manager](/docs/developer-tools/game-sdk#activities). diff --git a/docs/change-log/2019-05-29-added-info-around-nitro-boosting-experiment.md b/docs/change-log/2019-05-29-added-info-around-nitro-boosting-experiment.md index 7d1ed4a548..07fe17274a 100644 --- a/docs/change-log/2019-05-29-added-info-around-nitro-boosting-experiment.md +++ b/docs/change-log/2019-05-29-added-info-around-nitro-boosting-experiment.md @@ -3,4 +3,4 @@ title: "Added Info Around Nitro Boosting Experiment" date: "2019-05-29" --- -Additional information has been documented to support [Server Nitro Boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting). This includes the addition of a few [message types](#DOCS_RESOURCES_MESSAGE/message-object-message-types), as well as some [new fields on guilds](#DOCS_RESOURCES_GUILD/guild-object-premium-tier). Please note that this feature is currently under experimentation, and these fields may be subject to change. +Additional information has been documented to support [Server Nitro Boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting). This includes the addition of a few [message types](/docs/resources/message#message-object-message-types), as well as some [new fields on guilds](/docs/resources/guild#guild-object-premium-tier). Please note that this feature is currently under experimentation, and these fields may be subject to change. diff --git a/docs/change-log/2019-06-19-additional-team-information.md b/docs/change-log/2019-06-19-additional-team-information.md index a4f11422f4..63b1bf429b 100644 --- a/docs/change-log/2019-06-19-additional-team-information.md +++ b/docs/change-log/2019-06-19-additional-team-information.md @@ -3,4 +3,4 @@ title: "Additional Team Information" date: "2019-06-19" --- -Additional information around Teams has been added to both the API and the documentation. The [Teams](#DOCS_TOPICS_TEAMS/teams) page now includes information about the team and team member objects. Additionally, the [Get Current Application Information](#DOCS_TOPICS_OAUTH2/get-current-bot-application-information) endpoint now returns a `team` object if that application belongs to a team. That documentation has also been updated to includes fields that were missing for applications that are games sold on Discord. +Additional information around Teams has been added to both the API and the documentation. The [Teams](/docs/topics/teams#teams) page now includes information about the team and team member objects. Additionally, the [Get Current Application Information](/docs/topics/oauth2#get-current-bot-application-information) endpoint now returns a `team` object if that application belongs to a team. That documentation has also been updated to includes fields that were missing for applications that are games sold on Discord. diff --git a/docs/change-log/2019-08-12-more-precise-rate-limits.md b/docs/change-log/2019-08-12-more-precise-rate-limits.md index 2eb667a13d..84e96dd6f2 100644 --- a/docs/change-log/2019-08-12-more-precise-rate-limits.md +++ b/docs/change-log/2019-08-12-more-precise-rate-limits.md @@ -3,4 +3,4 @@ title: "More Precise Rate Limits" date: "2019-08-12" --- -You can now get more precise rate limit reset times, via a new request header. Check out the [rate limits](#DOCS_TOPICS_RATE_LIMITS/) documentation for more information. +You can now get more precise rate limit reset times, via a new request header. Check out the [rate limits](/docs/topics/rate-limits#) documentation for more information. diff --git a/docs/change-log/2019-11-14-gamesdk-version-2.5.5.md b/docs/change-log/2019-11-14-gamesdk-version-2.5.5.md index 02a6159746..829c4b9945 100644 --- a/docs/change-log/2019-11-14-gamesdk-version-2.5.5.md +++ b/docs/change-log/2019-11-14-gamesdk-version-2.5.5.md @@ -5,4 +5,4 @@ date: "2019-11-14" We've shipped some updates to the GameSDK, including support for Linux as well as the IL2CPP backend system for Unity. These changes also fixed a bug in the [`SetUserAchievement()`](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#setuserachievement) method. -Get the latest at the top of the [Getting Started](#DOCS_DEVELOPER_TOOLS_GAME_SDK/step-1-get-the-sdk) documentation. If you're looking for help interacting with the GameSDK or want to report a bug, join us on the [official Discord](https://discord.gg/discord-developers). +Get the latest at the top of the [Getting Started](/docs/developer-tools/game-sdk#step-1-get-the-sdk) documentation. If you're looking for help interacting with the GameSDK or want to report a bug, join us on the [official Discord](https://discord.gg/discord-developers). diff --git a/docs/change-log/2019-12-06-ip-discovery-updates.md b/docs/change-log/2019-12-06-ip-discovery-updates.md index f40c4390ce..c21b2d80ac 100644 --- a/docs/change-log/2019-12-06-ip-discovery-updates.md +++ b/docs/change-log/2019-12-06-ip-discovery-updates.md @@ -3,4 +3,4 @@ title: "IP Discovery Updates" date: "2019-12-06" --- -Updated our [IP discovery message](#DOCS_TOPICS_VOICE_CONNECTIONS/ip-discovery). The old message is deprecated and will be removed in the future. +Updated our [IP discovery message](/docs/topics/voice-connections#ip-discovery). The old message is deprecated and will be removed in the future. diff --git a/docs/change-log/2020-02-14-gateway-intents.md b/docs/change-log/2020-02-14-gateway-intents.md index 0e28b058e8..d8c9cd9198 100644 --- a/docs/change-log/2020-02-14-gateway-intents.md +++ b/docs/change-log/2020-02-14-gateway-intents.md @@ -3,14 +3,14 @@ title: "Gateway Intents" date: "2020-02-14" --- -We've added documentation around a brand new feature: [Gateway Intents!](#DOCS_EVENTS_GATEWAY/gateway-intents) Gateway Intents are a great way to specify which events you want to receive from our gateway. Go on, save yourself some bandwidth and CPU usage. +We've added documentation around a brand new feature: [Gateway Intents!](/docs/events/gateway#gateway-intents) Gateway Intents are a great way to specify which events you want to receive from our gateway. Go on, save yourself some bandwidth and CPU usage. Using Intents will change the behavior of some existing events and commands, so please refer to: -* [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) -* [Request Guild Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) -* [Guild Member Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-add) -* [Guild Member Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-remove) -* [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) -* [Presence Update](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) -* [List Guild Members](#DOCS_RESOURCES_GUILD/list-guild-members) +* [Guild Create](/docs/events/gateway-events#guild-create) +* [Request Guild Members](/docs/events/gateway-events#request-guild-members) +* [Guild Member Add](/docs/events/gateway-events#guild-member-add) +* [Guild Member Remove](/docs/events/gateway-events#guild-member-remove) +* [Guild Member Update](/docs/events/gateway-events#guild-member-update) +* [Presence Update](/docs/events/gateway-events#presence-update) +* [List Guild Members](/docs/resources/guild#list-guild-members) diff --git a/docs/change-log/2020-02-26-rich-presence-spectate-approval.md b/docs/change-log/2020-02-26-rich-presence-spectate-approval.md index 148f76fc69..b995e534cc 100644 --- a/docs/change-log/2020-02-26-rich-presence-spectate-approval.md +++ b/docs/change-log/2020-02-26-rich-presence-spectate-approval.md @@ -3,4 +3,4 @@ title: "Rich Presence Spectate Approval" date: "2020-02-26" --- -The [Spectate](#DOCS_DEVELOPER_TOOLS_GAME_SDK/onactivityspectate) functionality of Rich Presence no longer requires whitelisting or approval. +The [Spectate](/docs/developer-tools/game-sdk#onactivityspectate) functionality of Rich Presence no longer requires whitelisting or approval. diff --git a/docs/change-log/2020-03-02-new-invite-events-and-reactions-endpoint.md b/docs/change-log/2020-03-02-new-invite-events-and-reactions-endpoint.md index 509772e0a6..25f94ad2bb 100644 --- a/docs/change-log/2020-03-02-new-invite-events-and-reactions-endpoint.md +++ b/docs/change-log/2020-03-02-new-invite-events-and-reactions-endpoint.md @@ -5,7 +5,7 @@ date: "2020-03-02" We've added a new endpoint for deleting all reactions of a specific emoji from a message, as well as some new invite and reaction gateway events. Read more: -* [Delete All Reactions for Emoji](#DOCS_RESOURCES_MESSAGE/delete-all-reactions-for-emoji) -* [Invite Create](#DOCS_EVENTS_GATEWAY_EVENTS/invite-create) -* [Invite Delete](#DOCS_EVENTS_GATEWAY_EVENTS/invite-delete) -* [Message Reaction Remove Emoji](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove-emoji) +* [Delete All Reactions for Emoji](/docs/resources/message#delete-all-reactions-for-emoji) +* [Invite Create](/docs/events/gateway-events#invite-create) +* [Invite Delete](/docs/events/gateway-events#invite-delete) +* [Message Reaction Remove Emoji](/docs/events/gateway-events#message-reaction-remove-emoji) diff --git a/docs/change-log/2020-03-03-new-allowed-mentions-object.md b/docs/change-log/2020-03-03-new-allowed-mentions-object.md index 7e918a2743..5b08e4828f 100644 --- a/docs/change-log/2020-03-03-new-allowed-mentions-object.md +++ b/docs/change-log/2020-03-03-new-allowed-mentions-object.md @@ -5,4 +5,4 @@ date: "2020-03-03" We've added a way to specify mentions in a more granular form. This change also begins the start of a 60 day deprecation cycle on legacy mention behavior. Read more: -* [Allowed mentions object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) +* [Allowed mentions object](/docs/resources/message#allowed-mentions-object) diff --git a/docs/change-log/2020-04-24-new-properties-on-guild-members-chunk-event.md b/docs/change-log/2020-04-24-new-properties-on-guild-members-chunk-event.md index 52c9cb506e..b925c0abf3 100644 --- a/docs/change-log/2020-04-24-new-properties-on-guild-members-chunk-event.md +++ b/docs/change-log/2020-04-24-new-properties-on-guild-members-chunk-event.md @@ -3,4 +3,4 @@ title: "New Properties on Guild Members Chunk Event" date: "2020-04-24" --- -The [Guild Members Chunk](#DOCS_EVENTS_GATEWAY_EVENTS/guild-members-chunk) gateway event now contains two properties: `chunk_index` and `chunk_count`. These values can be used to keep track of how many events you have left to receive in response to a [Request Guild Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) command. +The [Guild Members Chunk](/docs/events/gateway-events#guild-members-chunk) gateway event now contains two properties: `chunk_index` and `chunk_count`. These values can be used to keep track of how many events you have left to receive in response to a [Request Guild Members](/docs/events/gateway-events#request-guild-members) command. diff --git a/docs/change-log/2020-05-11-legacy-mention-behavior-deprecation.md b/docs/change-log/2020-05-11-legacy-mention-behavior-deprecation.md index 2152c7fa4f..87e1d33da8 100644 --- a/docs/change-log/2020-05-11-legacy-mention-behavior-deprecation.md +++ b/docs/change-log/2020-05-11-legacy-mention-behavior-deprecation.md @@ -3,4 +3,4 @@ title: "Legacy Mention Behavior Deprecation" date: "2020-05-11" --- -The legacy mention behavior for bots is now removed, and granular control of mentions should use the [Allowed Mentions](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) API moving forwards. +The legacy mention behavior for bots is now removed, and granular control of mentions should use the [Allowed Mentions](/docs/resources/message#allowed-mentions-object) API moving forwards. diff --git a/docs/change-log/2020-09-24-api-and-gateway-v8.md b/docs/change-log/2020-09-24-api-and-gateway-v8.md index ff5788f33c..682f18400f 100644 --- a/docs/change-log/2020-09-24-api-and-gateway-v8.md +++ b/docs/change-log/2020-09-24-api-and-gateway-v8.md @@ -8,20 +8,20 @@ We've introduced API and Gateway v8! Changes are noted throughout the documentat The changes are: * API and Gateway v8 are now available. v6 is still the default for the time being. -* [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents) are now required -* Removed `guild_subscriptions` in identify in favor of [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents). +* [Gateway Intents](/docs/events/gateway#gateway-intents) are now required +* Removed `guild_subscriptions` in identify in favor of [Gateway Intents](/docs/events/gateway#gateway-intents). * All permissions have been converted to strings-serialized numbers. As such, `permissions_new`, `allow_new`, and `deny_new` have been removed * The `game` field has been removed. If you need a direct replacement, you can instead reference the first element of `activities` * Channel Permission Overwrite `type`s are now numbers (0 and 1) instead of strings ("role" and "member"). However due to a current technical constraint, they are string-serialized numbers in audit log `options`. * `embed_enabled` and `embed_channel_id` have been removed. Use `widget_enabled` and `widget_channel_id` instead. -* Form body errors have been improved to include more helpful messaging on validation. [See more here](#DOCS_REFERENCE/error-messages) +* Form body errors have been improved to include more helpful messaging on validation. [See more here](/docs/reference#error-messages) * The `Retry-After` header value and `retry_after` body value is now based in seconds instead of milliseconds (e.g. `123` means 123 seconds) * The `X-RateLimit-Precision` header is no longer respected. `X-RateLimit-Reset` and `X-RateLimit-Reset-After` are always returned at millisecond precision (e.g. `123.456` instead of `124`) -* Bots no longer receive [Channel Create Gateway Event](#DOCS_EVENTS_GATEWAY_EVENTS/channel-create) for DMs +* Bots no longer receive [Channel Create Gateway Event](/docs/events/gateway-events#channel-create) for DMs * `delete-message-days` is no longer available. Use `delete_message_days`. -* Removed `roles`, `premium_since`, and `nick` from [Presence Update Gateway Event](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) -* Removed some [integration object](#DOCS_RESOURCES_GUILD/integration-object) fields for Discord application integrations -* Removed `include_applications` from [Get Guild Integrations](#DOCS_RESOURCES_GUILD/get-guild-integrations). Application integrations are always included. +* Removed `roles`, `premium_since`, and `nick` from [Presence Update Gateway Event](/docs/events/gateway-events#presence-update) +* Removed some [integration object](/docs/resources/guild#integration-object) fields for Discord application integrations +* Removed `include_applications` from [Get Guild Integrations](/docs/resources/guild#get-guild-integrations). Application integrations are always included. * The following deprecated routes have been removed for better naming conventions: Removed in favor of `/guilds//widget`: diff --git a/docs/change-log/2020-10-27-gateway-v6-intent-restrictions.md b/docs/change-log/2020-10-27-gateway-v6-intent-restrictions.md index 10b194cd73..ce0ccc1d4a 100644 --- a/docs/change-log/2020-10-27-gateway-v6-intent-restrictions.md +++ b/docs/change-log/2020-10-27-gateway-v6-intent-restrictions.md @@ -3,7 +3,7 @@ title: "Gateway v6 Intent Restrictions" date: "2020-10-27" --- -The v6 gateway now applies the restrictions for gateway intents. This means the new chunking limitations are now in effect, regardless of intents being used. See [Request Guild Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) for further details. +The v6 gateway now applies the restrictions for gateway intents. This means the new chunking limitations are now in effect, regardless of intents being used. See [Request Guild Members](/docs/events/gateway-events#request-guild-members) for further details. Additionally, if privileged intents are not enabled in the application dashboard the bot will not receive the events for those intents. All other intents are always enabled by default unless specified otherwise by the identify payload. We have made a support article to explain some of the changes and resulting issues with more details: [Gateway Update FAQ](https://dis.gd/gwupdate) diff --git a/docs/change-log/2020-11-13-stickers.md b/docs/change-log/2020-11-13-stickers.md index 2fbcfab26b..77ea376a79 100644 --- a/docs/change-log/2020-11-13-stickers.md +++ b/docs/change-log/2020-11-13-stickers.md @@ -3,4 +3,4 @@ title: "Stickers" date: "2020-11-13" --- -Stickers are now documented as part of the [message](#DOCS_RESOURCES_MESSAGE/message-object) object. +Stickers are now documented as part of the [message](/docs/resources/message#message-object) object. diff --git a/docs/change-log/2020-11-16-inline-replies.md b/docs/change-log/2020-11-16-inline-replies.md index 86f6cd2017..f8bc843872 100644 --- a/docs/change-log/2020-11-16-inline-replies.md +++ b/docs/change-log/2020-11-16-inline-replies.md @@ -7,6 +7,6 @@ Inline Replies have been added to our documentation. They behave differently in * Inline replies are type `19` in v8, but remain type `0` in v6 * You can now add a `message_reference` on message create to create a reply -* A new field `referenced_message` has been added to the [Message Object](#DOCS_RESOURCES_MESSAGE/message-object) -* A new field `replied_user` has been added to the [Allowed Mentions Object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) -* [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) gateway event is guaranteed to have a `referenced_message` if the message created is a reply. Otherwise, that field is not guaranteed. +* A new field `referenced_message` has been added to the [Message Object](/docs/resources/message#message-object) +* A new field `replied_user` has been added to the [Allowed Mentions Object](/docs/resources/message#allowed-mentions-object) +* [Message Create](/docs/events/gateway-events#message-create) gateway event is guaranteed to have a `referenced_message` if the message created is a reply. Otherwise, that field is not guaranteed. diff --git a/docs/change-log/2020-12-15-slash-commands-and-interactions.md b/docs/change-log/2020-12-15-slash-commands-and-interactions.md index 9f1b318d09..3c0dd62836 100644 --- a/docs/change-log/2020-12-15-slash-commands-and-interactions.md +++ b/docs/change-log/2020-12-15-slash-commands-and-interactions.md @@ -3,10 +3,10 @@ title: "Slash Commands and Interactions" date: "2020-12-15" --- -Slash Commands are here! There's a *lot* to cover, so go check out specific documentation under [Slash Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/). +Slash Commands are here! There's a *lot* to cover, so go check out specific documentation under [Slash Commands](/docs/interactions/application-commands#). Slash Commands include some new features for webhooks as well: -* Webhooks can now update previously-sent messages from the same webhook using [Edit Webhook Message](#DOCS_RESOURCES_WEBHOOK/edit-webhook-message) and [Delete Webhook Message](#DOCS_RESOURCES_WEBHOOK/delete-webhook-message) +* Webhooks can now update previously-sent messages from the same webhook using [Edit Webhook Message](/docs/resources/webhook#edit-webhook-message) and [Delete Webhook Message](/docs/resources/webhook#delete-webhook-message) -This PR also documents the `application` field on the `READY` gateway event, which is a partial [application object](#DOCS_RESOURCES_APPLICATION/application-object) containing `id` and `flags`. +This PR also documents the `application` field on the `READY` gateway event, which is a partial [application object](/docs/resources/application#application-object) containing `id` and `flags`. diff --git a/docs/change-log/2021-02-09-slash-commands-in-dms.md b/docs/change-log/2021-02-09-slash-commands-in-dms.md index 32dac8e8da..6a0b840dac 100644 --- a/docs/change-log/2021-02-09-slash-commands-in-dms.md +++ b/docs/change-log/2021-02-09-slash-commands-in-dms.md @@ -3,4 +3,4 @@ title: "Slash Commands in DMs" date: "2021-02-09" --- -Slash Commands are now supported in DMs with bots. Due to this change, some of the fields on the [Interaction object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) have been made optional. Newly optional fields don't reflect any behavior changes in Slash Commands within guilds; they are to support commands in the context of a DM only. +Slash Commands are now supported in DMs with bots. Due to this change, some of the fields on the [Interaction object](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) have been made optional. Newly optional fields don't reflect any behavior changes in Slash Commands within guilds; they are to support commands in the context of a DM only. diff --git a/docs/change-log/2021-03-05-changes-to-slash-command-response-types-and-flags.md b/docs/change-log/2021-03-05-changes-to-slash-command-response-types-and-flags.md index d436c9bdac..baebbddf8f 100644 --- a/docs/change-log/2021-03-05-changes-to-slash-command-response-types-and-flags.md +++ b/docs/change-log/2021-03-05-changes-to-slash-command-response-types-and-flags.md @@ -11,4 +11,4 @@ Changes to interaction response types have been made to support better designs f These deprecated types will be removed and break on **April 9, 2021**. -Additionally, `flags` has been documented on [InteractionApplicationCommandCallbackData](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-data-structure). Setting `flags` to `64` will make the interaction response ephemeral. +Additionally, `flags` has been documented on [InteractionApplicationCommandCallbackData](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure). Setting `flags` to `64` will make the interaction response ephemeral. diff --git a/docs/change-log/2021-04-05-application-command-permissions.md b/docs/change-log/2021-04-05-application-command-permissions.md index 5af52268c4..70bf603a04 100644 --- a/docs/change-log/2021-04-05-application-command-permissions.md +++ b/docs/change-log/2021-04-05-application-command-permissions.md @@ -3,14 +3,14 @@ title: "Application Command Permissions" date: "2021-04-05" --- -Need to keep some of your commands safe from prying eyes, or only available to the right people? Commands now support [command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions)! +Need to keep some of your commands safe from prying eyes, or only available to the right people? Commands now support [command permissions](/docs/interactions/application-commands#permissions)! You can enable or disable a command (guild or global) for a specific user or role in a guild. For now, users will still be able to see the commands, but won't be able to use them. New routes have been added to support this functionality: -* [`GET Guild Application Command Permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/get-guild-application-command-permissions) -* [`GET Application Command Permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/get-application-command-permissions) -* [`PUT Application Command Permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/batch-edit-application-command-permissions) +* [`GET Guild Application Command Permissions`](/docs/interactions/application-commands#get-guild-application-command-permissions) +* [`GET Application Command Permissions`](/docs/interactions/application-commands#get-application-command-permissions) +* [`PUT Application Command Permissions`](/docs/interactions/application-commands#batch-edit-application-command-permissions) -A `default_permission` field has also been added to the [ApplicationCommand](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) model. This field allows you to disable commands for everyone in a guild by default, if you prefer to make some of your commands an opt-in experience. +A `default_permission` field has also been added to the [ApplicationCommand](/docs/interactions/application-commands#application-command-object-application-command-structure) model. This field allows you to disable commands for everyone in a guild by default, if you prefer to make some of your commands an opt-in experience. diff --git a/docs/change-log/2021-04-28-api-v9.md b/docs/change-log/2021-04-28-api-v9.md index 163abd476c..de2d875350 100644 --- a/docs/change-log/2021-04-28-api-v9.md +++ b/docs/change-log/2021-04-28-api-v9.md @@ -5,7 +5,7 @@ date: "2021-04-28" API v9 is now available. -API v9 includes support for [threads](#DOCS_TOPICS_THREADS), an upcoming feature. Older API versions will not receive any Gateway Events for threads, so it is important to update soon! We've prepared a [migration guide](#DOCS_TOPICS_THREADS) to help make the upgrade process very straightforward. +API v9 includes support for [threads](/docs/topics/threads), an upcoming feature. Older API versions will not receive any Gateway Events for threads, so it is important to update soon! We've prepared a [migration guide](/docs/topics/threads) to help make the upgrade process very straightforward. This documentation is being published early so bots can have at least two months to upgrade before threads launch. diff --git a/docs/change-log/2021-05-26-buttons-and-message-components.md b/docs/change-log/2021-05-26-buttons-and-message-components.md index 33f04adb25..108ad7ec88 100644 --- a/docs/change-log/2021-05-26-buttons-and-message-components.md +++ b/docs/change-log/2021-05-26-buttons-and-message-components.md @@ -5,9 +5,9 @@ date: "2021-05-26" Message components are now available with our first two components: a layout-based `ActionRow` and...buttons! -You can now include buttons on messages sent by your app, whether they're bot messages or responses to interactions. [Learn more about message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/). +You can now include buttons on messages sent by your app, whether they're bot messages or responses to interactions. [Learn more about message components](/docs/interactions/message-components#). The addition of message components means new fields and response types: -* An optional `components` field has been added to the [message object](#DOCS_RESOURCES_MESSAGE/message-object) -* New response types `6` and `7` have been added for [interaction responses](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type), valid only for component-based interactions +* An optional `components` field has been added to the [message object](/docs/resources/message#message-object) +* New response types `6` and `7` have been added for [interaction responses](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type), valid only for component-based interactions diff --git a/docs/change-log/2021-06-30-select-menu-components.md b/docs/change-log/2021-06-30-select-menu-components.md index 13fdeec5ce..f5f035cacc 100644 --- a/docs/change-log/2021-06-30-select-menu-components.md +++ b/docs/change-log/2021-06-30-select-menu-components.md @@ -5,4 +5,4 @@ date: "2021-06-30" Select Menus are now part of the components API! They're the greatest thing since the invention of buttons yesterday. Select menus allow you to offer users a choice of one or many options in a friendly UI-based way. -Select menus can be used like other [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/). Learn all the specifics in the [documentation](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus). +Select menus can be used like other [message components](/docs/interactions/message-components#). Learn all the specifics in the [documentation](/docs/interactions/message-components#select-menus). diff --git a/docs/change-log/2021-08-10-user-and-message-commands.md b/docs/change-log/2021-08-10-user-and-message-commands.md index 9b2f418664..3810d54d01 100644 --- a/docs/change-log/2021-08-10-user-and-message-commands.md +++ b/docs/change-log/2021-08-10-user-and-message-commands.md @@ -3,6 +3,6 @@ title: "User and Message Commands" date: "2021-08-10" --- -[User commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) and [message commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) are now live! These commands appear on context menus for users and messages, with more to come in the future. +[User commands](/docs/interactions/application-commands#user-commands) and [message commands](/docs/interactions/application-commands#message-commands) are now live! These commands appear on context menus for users and messages, with more to come in the future. Context menu commands are a type of application command. The "Slash Commands" documentation page has been renamed to "Application Commands" and split out by type to show this. diff --git a/docs/change-log/2021-10-27-application-command-autocomplete-interactions.md b/docs/change-log/2021-10-27-application-command-autocomplete-interactions.md index ac7308be46..6266d52dff 100644 --- a/docs/change-log/2021-10-27-application-command-autocomplete-interactions.md +++ b/docs/change-log/2021-10-27-application-command-autocomplete-interactions.md @@ -3,4 +3,4 @@ title: "Application Command Autocomplete Interactions" date: "2021-10-27" --- -Autocomplete interactions are now available, allowing application commands to provide server completed options. Check out [the autocomplete interaction docs](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/autocomplete) for more information. +Autocomplete interactions are now available, allowing application commands to provide server completed options. Check out [the autocomplete interaction docs](/docs/interactions/application-commands#autocomplete) for more information. diff --git a/docs/change-log/2022-02-08-interaction-modals-and-application-command-attachment-option-type.md b/docs/change-log/2022-02-08-interaction-modals-and-application-command-attachment-option-type.md index 7c2c4ee76d..53742cfbc0 100644 --- a/docs/change-log/2022-02-08-interaction-modals-and-application-command-attachment-option-type.md +++ b/docs/change-log/2022-02-08-interaction-modals-and-application-command-attachment-option-type.md @@ -3,6 +3,6 @@ title: "Interaction Modals and Application Command Attachment Option Type" date: "2022-02-08" --- -Interaction modals are now available, allowing applications to prompt users for further detailed input. Check out [the modal docs](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-modal) for more information. +Interaction modals are now available, allowing applications to prompt users for further detailed input. Check out [the modal docs](/docs/interactions/receiving-and-responding#interaction-response-object-modal) for more information. -Application Commands can now add an attachment option type. See [the option type table](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type) for more information. +Application Commands can now add an attachment option type. See [the option type table](/docs/interactions/application-commands#application-command-object-application-command-option-type) for more information. diff --git a/docs/change-log/2022-02-14-api-v10.md b/docs/change-log/2022-02-14-api-v10.md index e38ae915b7..cb647a2452 100644 --- a/docs/change-log/2022-02-14-api-v10.md +++ b/docs/change-log/2022-02-14-api-v10.md @@ -4,17 +4,17 @@ date: "2022-02-14" --- * API v8 is now deprecated. -* `GET /channels/{channel.id}/threads/active` is decommissioned in favor of [`GET /guilds/{guild.id}/threads/active`](#DOCS_RESOURCES_GUILD/list-active-guild-threads). -* Starting in v10, you must specify the message content intent (`1 << 15`) to receive content-related fields in message dispatches. Read more in the [Gateway Intents documentation](#DOCS_EVENTS_GATEWAY/gateway-intents). -* To specify a reason for an administrative action in audit logs, apps must now pass the `X-Audit-Log-Reason` header rather than the `reason` parameter for all endpoints. Read more in the [Audit Logs documentation](#DOCS_RESOURCES_AUDIT_LOG). -* Message routes (like [`POST /channels/{channel.id}/messages`](#DOCS_RESOURCES_MESSAGE/create-message)) now use the `embeds` field (an array of embed objects) instead of `embed`. -* The `summary` field for [applications](#DOCS_RESOURCES_APPLICATION) now returns an empty string for all API versions. -* The `name` and `description` fields for [Achievements](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#achievement-struct) are now strings, and localization info is now passed in new `name_localizations` and `description_localizations` dictionaries. This change standardizes localization to match [Application Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/localization). Read details in the [Achievements documentation](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#achievement-struct). -* Existing attachments must be specified when [`PATCH`ing messages with new attachments](#DOCS_REFERENCE/editing-message-attachments). Any attachments not specified will be removed and replaced with the specified list +* `GET /channels/{channel.id}/threads/active` is decommissioned in favor of [`GET /guilds/{guild.id}/threads/active`](/docs/resources/guild#list-active-guild-threads). +* Starting in v10, you must specify the message content intent (`1 << 15`) to receive content-related fields in message dispatches. Read more in the [Gateway Intents documentation](/docs/events/gateway#gateway-intents). +* To specify a reason for an administrative action in audit logs, apps must now pass the `X-Audit-Log-Reason` header rather than the `reason` parameter for all endpoints. Read more in the [Audit Logs documentation](/docs/resources/audit-log). +* Message routes (like [`POST /channels/{channel.id}/messages`](/docs/resources/message#create-message)) now use the `embeds` field (an array of embed objects) instead of `embed`. +* The `summary` field for [applications](/docs/resources/application) now returns an empty string for all API versions. +* The `name` and `description` fields for [Achievements](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#achievement-struct) are now strings, and localization info is now passed in new `name_localizations` and `description_localizations` dictionaries. This change standardizes localization to match [Application Commands](/docs/interactions/application-commands#localization). Read details in the [Achievements documentation](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#achievement-struct). +* Existing attachments must be specified when [`PATCH`ing messages with new attachments](/docs/reference#editing-message-attachments). Any attachments not specified will be removed and replaced with the specified list * Requests to v10 and higher will no longer be supported on `discordapp.com` (this does **not** affect `cdn.discordapp.com`) #### Upcoming changes * API v6 and v7 will be decommissioned **in early 2023** -* `MESSAGE_CONTENT` is becoming a privileged intent for verified bots in 75+ servers **on August 31, 2022**. Read details in [the FAQ](https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ) or follow [the guide](#DOCS_TUTORIALS_UPGRADING_TO_APPLICATION_COMMANDS) on updating your app. +* `MESSAGE_CONTENT` is becoming a privileged intent for verified bots in 75+ servers **on August 31, 2022**. Read details in [the FAQ](https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ) or follow [the guide](/docs/tutorials/upgrading-to-application-commands) on updating your app. * The `summary` field for applications will be removed in the next API version (v11) diff --git a/docs/change-log/2022-03-31-guild-bans-pagination.md b/docs/change-log/2022-03-31-guild-bans-pagination.md index b7b9780e37..a1146427f7 100644 --- a/docs/change-log/2022-03-31-guild-bans-pagination.md +++ b/docs/change-log/2022-03-31-guild-bans-pagination.md @@ -3,4 +3,4 @@ title: "Guild Bans Pagination" date: "2022-03-31" --- -The `GET /guilds/{guild.id}/bans` endpoint has been migrated to require pagination to improve reliability and stability. Check out the [endpoint docs](#DOCS_RESOURCES_GUILD/get-guild-bans) for more information. +The `GET /guilds/{guild.id}/bans` endpoint has been migrated to require pagination to improve reliability and stability. Check out the [endpoint docs](/docs/resources/guild#get-guild-bans) for more information. diff --git a/docs/change-log/2022-04-06-forum-channels.md b/docs/change-log/2022-04-06-forum-channels.md index 0f662ec424..a26809c6fa 100644 --- a/docs/change-log/2022-04-06-forum-channels.md +++ b/docs/change-log/2022-04-06-forum-channels.md @@ -3,4 +3,4 @@ title: "Forum Channels" date: "2022-04-06" --- -Added new channel type, `GUILD_FORUM` (15). A `GUILD_FORUM` channel is an unreleased feature that is very similar (from an API perspective) to a `GUILD_TEXT` channel, except only threads can be created in that channel; messages cannot be sent directly in that channel. Check out the [forums topic](#DOCS_TOPICS_THREADS/forums) for more information. +Added new channel type, `GUILD_FORUM` (15). A `GUILD_FORUM` channel is an unreleased feature that is very similar (from an API perspective) to a `GUILD_TEXT` channel, except only threads can be created in that channel; messages cannot be sent directly in that channel. Check out the [forums topic](/docs/topics/threads#forums) for more information. diff --git a/docs/change-log/2022-04-27-updated-command-permissions.md b/docs/change-log/2022-04-27-updated-command-permissions.md index b15c3cc24b..0e14717a47 100644 --- a/docs/change-log/2022-04-27-updated-command-permissions.md +++ b/docs/change-log/2022-04-27-updated-command-permissions.md @@ -4,19 +4,19 @@ date: "2022-04-27" breaking: true --- -Application command permissions have been updated to add more granular control and access to commands in Discord. You can read the major changes below, and [the updated documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) for details. +Application command permissions have been updated to add more granular control and access to commands in Discord. You can read the major changes below, and [the updated documentation](/docs/interactions/application-commands#permissions) for details. #### Breaking changes -* Bearer tokens are now required to edit command permissions. Bearer tokens are tokens tied to an authenticating user's permissions, and can be [retrieved using OAuth](#DOCS_TOPICS_OAUTH2). The user must have permission to manage the guild and roles. -* [`applications.commands.permissions.update`](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) scope was added as a requirement to edit command permissions. -* Disabled the batch editing endpoint ([`PUT /applications/{application.id}/guilds/{guild.id}/commands/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/batch-edit-application-command-permissions)). +* Bearer tokens are now required to edit command permissions. Bearer tokens are tokens tied to an authenticating user's permissions, and can be [retrieved using OAuth](/docs/topics/oauth2). The user must have permission to manage the guild and roles. +* [`applications.commands.permissions.update`](/docs/topics/oauth2#shared-resources-oauth2-scopes) scope was added as a requirement to edit command permissions. +* Disabled the batch editing endpoint ([`PUT /applications/{application.id}/guilds/{guild.id}/commands/permissions`](/docs/interactions/application-commands#batch-edit-application-command-permissions)). #### Other changes -* Created a [`CHANNEL` command permission type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permission-type) +* Created a [`CHANNEL` command permission type](/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type) * Increase permission limit from `10` to `100` -* [constant (`guild_id - 1`)](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-constants) to represent all channels in command permissions -* Added `default_member_permissions` field, which is a bitwise OR-ed set of [permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags), expressed as a string. This replaces the `default_permission` field, which will soon be deprecated. +* [constant (`guild_id - 1`)](/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants) to represent all channels in command permissions +* Added `default_member_permissions` field, which is a bitwise OR-ed set of [permissions](/docs/topics/permissions#permissions-bitwise-permission-flags), expressed as a string. This replaces the `default_permission` field, which will soon be deprecated. * Added `dm_permission`, which is a boolean flag used to indicate whether a command is available in DMs (only for global application commands). If no value is passed, the global command will be visible in DMs. -* Added `APPLICATION_COMMAND_PERMISSIONS_UPDATE` [gateway](#DOCS_EVENTS_GATEWAY_EVENTS/application-command-permissions-update) event and `APPLICATION_COMMAND_PERMISSION_UPDATE` [audit log](#DOCS_RESOURCES_AUDIT_LOG) event. +* Added `APPLICATION_COMMAND_PERMISSIONS_UPDATE` [gateway](/docs/events/gateway-events#application-command-permissions-update) event and `APPLICATION_COMMAND_PERMISSION_UPDATE` [audit log](/docs/resources/audit-log) event. diff --git a/docs/change-log/2022-06-16-auto-moderation.md b/docs/change-log/2022-06-16-auto-moderation.md index df959abb32..67370d6d36 100644 --- a/docs/change-log/2022-06-16-auto-moderation.md +++ b/docs/change-log/2022-06-16-auto-moderation.md @@ -3,9 +3,9 @@ title: "Auto Moderation" date: "2022-06-16" --- -Add new [Auto Moderation feature](#DOCS_RESOURCES_AUTO_MODERATION) which enables guilds to moderate message content based on keywords, harmful links, and unwanted spam. This change includes: +Add new [Auto Moderation feature](/docs/resorces/auto-moderation) which enables guilds to moderate message content based on keywords, harmful links, and unwanted spam. This change includes: -* New endpoints for [creating](#DOCS_RESOURCES_AUTO_MODERATION/create-auto-moderation-rule), [updating](#DOCS_RESOURCES_AUTO_MODERATION/modify-auto-moderation-rule), and [deleting](#DOCS_RESOURCES_AUTO_MODERATION/delete-auto-moderation-rule) Auto Moderation rules -* New gateway events emitted when Auto Moderation rules are [created](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-create) (`AUTO_MODERATION_RULE_CREATE`), [updated](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-update) (`AUTO_MODERATION_RULE_UPDATE `), and [deleted](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-delete) (`AUTO_MODERATION_RULE_DELETE `). Requires the `AUTO_MODERATION_CONFIGURATION` (`1 << 20`) intent -* New gateway event emitted when an [action is executed](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-action-execution) (`AUTO_MODERATION_ACTION_EXECUTION`). Requires the `AUTO_MODERATION_EXECUTION` (`1 << 21`) intent -* New [audit log entries](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-audit-log-events) when rules are created (`AUTO_MODERATION_RULE_CREATE`), updated (`AUTO_MODERATION_RULE_UPDATE`), or deleted (`AUTO_MODERATION_RULE_DELETE`), or when Auto Moderation performs an action (`AUTO_MODERATION_BLOCK_MESSAGE`) +* New endpoints for [creating](/docs/resources/auto-moderation#create-auto-moderation-rule), [updating](/docs/resources/auto-moderation#modify-auto-moderation-rule), and [deleting](/docs/resources/auto-moderation#delete-auto-moderation-rule) Auto Moderation rules +* New gateway events emitted when Auto Moderation rules are [created](/docs/events/gateway-events#auto-moderation-rule-create) (`AUTO_MODERATION_RULE_CREATE`), [updated](/docs/events/gateway-events#auto-moderation-rule-update) (`AUTO_MODERATION_RULE_UPDATE `), and [deleted](/docs/events/gateway-events#auto-moderation-rule-delete) (`AUTO_MODERATION_RULE_DELETE `). Requires the `AUTO_MODERATION_CONFIGURATION` (`1 << 20`) intent +* New gateway event emitted when an [action is executed](/docs/events/gateway-events#auto-moderation-action-execution) (`AUTO_MODERATION_ACTION_EXECUTION`). Requires the `AUTO_MODERATION_EXECUTION` (`1 << 21`) intent +* New [audit log entries](/docs/resources/audit-log#audit-log-entry-object-audit-log-events) when rules are created (`AUTO_MODERATION_RULE_CREATE`), updated (`AUTO_MODERATION_RULE_UPDATE`), or deleted (`AUTO_MODERATION_RULE_DELETE`), or when Auto Moderation performs an action (`AUTO_MODERATION_BLOCK_MESSAGE`) diff --git a/docs/change-log/2022-06-17-updated-connection-property-field-names.md b/docs/change-log/2022-06-17-updated-connection-property-field-names.md index eaa45ad7cf..351f326920 100644 --- a/docs/change-log/2022-06-17-updated-connection-property-field-names.md +++ b/docs/change-log/2022-06-17-updated-connection-property-field-names.md @@ -3,6 +3,6 @@ title: "Updated Connection Property Field Names" date: "2022-06-17" --- -The `$` prefix in [identify connection properties](#DOCS_EVENTS_GATEWAY_EVENTS/identify-identify-connection-properties) are deprecated. The new field names are `os`, `browser`, and `device`. When passed, the `$`-prefixed names will resolve to the new ones. +The `$` prefix in [identify connection properties](/docs/events/gateway-events#identify-identify-connection-properties) are deprecated. The new field names are `os`, `browser`, and `device`. When passed, the `$`-prefixed names will resolve to the new ones. In API v11, support for the previous field names (`$os`, `$browser`, and `$device`) will be removed. diff --git a/docs/change-log/2022-06-21-message-content-in-auto-moderation-events.md b/docs/change-log/2022-06-21-message-content-in-auto-moderation-events.md index f7bb8f1099..25fa593f02 100644 --- a/docs/change-log/2022-06-21-message-content-in-auto-moderation-events.md +++ b/docs/change-log/2022-06-21-message-content-in-auto-moderation-events.md @@ -4,4 +4,4 @@ date: "2022-06-21" breaking: true --- -In API v10, the `MESSAGE_CONTENT` (`1 << 15`) intent is now required to receive non-empty values for the `content` and `matched_content` fields in [`AUTO_MODERATION_ACTION_EXECUTION`](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-action-execution) gateway events. This matches the intended behavior for message content across the API. +In API v10, the `MESSAGE_CONTENT` (`1 << 15`) intent is now required to receive non-empty values for the `content` and `matched_content` fields in [`AUTO_MODERATION_ACTION_EXECUTION`](/docs/events/gateway-events#auto-moderation-action-execution) gateway events. This matches the intended behavior for message content across the API. diff --git a/docs/change-log/2022-06-29-calculated-permissions-in-interaction-payloads.md b/docs/change-log/2022-06-29-calculated-permissions-in-interaction-payloads.md index 6850844139..4725d09906 100644 --- a/docs/change-log/2022-06-29-calculated-permissions-in-interaction-payloads.md +++ b/docs/change-log/2022-06-29-calculated-permissions-in-interaction-payloads.md @@ -3,6 +3,6 @@ title: "Calculated Permissions in Interaction Payloads" date: "2022-06-29" --- -Interaction payloads now contain an `app_permissions` field whose value is the computed [permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) for a bot or app in the context of a specific interaction (including any channel overwrites). Similar to other permission fields, the value of `app_permissions` is a bitwise OR-ed set of permissions expressed as a string. Read details in the [interactions documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object). +Interaction payloads now contain an `app_permissions` field whose value is the computed [permissions](/docs/topics/permissions#permissions-bitwise-permission-flags) for a bot or app in the context of a specific interaction (including any channel overwrites). Similar to other permission fields, the value of `app_permissions` is a bitwise OR-ed set of permissions expressed as a string. Read details in the [interactions documentation](/docs/interactions/receiving-and-responding#interaction-object). For apps without a bot user (or without the `bot` scope), the value of `app_permissions` will be the same as the permissions for `@everyone`, but limited to the permissions that can be used in interaction responses (currently `ATTACH_FILES`, `EMBED_LINKS`, `MENTION_EVERYONE`, and `USE_EXTERNAL_EMOJIS`). diff --git a/docs/change-log/2022-06-29-changes-to-bot-permissions-for-interactions-and-webhooks.md b/docs/change-log/2022-06-29-changes-to-bot-permissions-for-interactions-and-webhooks.md index 34b5cc34ad..b4560f5c49 100644 --- a/docs/change-log/2022-06-29-changes-to-bot-permissions-for-interactions-and-webhooks.md +++ b/docs/change-log/2022-06-29-changes-to-bot-permissions-for-interactions-and-webhooks.md @@ -9,12 +9,12 @@ breaking: true > warn > `MENTION_EVERYONE`, `SEND_TTS_MESSAGES` and `USE_EXTERNAL_EMOJIS` are the only permissions that will be affected by this change. In a previous version of this changelog, it was indicated that `ATTACH_FILES` and `EMBED_LINKS` would be affected but this is no longer the case. -Starting **August 3, 2022**, the way some of a bot's `MENTION_EVERYONE`, `SEND_TTS_MESSAGES` and `USE_EXTERNAL_EMOJIS` [permissions](#DOCS_TOPICS_PERMISSIONS/permissions) are calculated is changing in two cases: +Starting **August 3, 2022**, the way some of a bot's `MENTION_EVERYONE`, `SEND_TTS_MESSAGES` and `USE_EXTERNAL_EMOJIS` [permissions](/docs/topics/permissions#permissions) are calculated is changing in two cases: -* When **responding to an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING)** (like application commands or message components) -* When **executing a [webhook](#DOCS_RESOURCES_WEBHOOK) that the bot created** +* When **responding to an [interaction](/docs/interactions/receiving-and-responding)** (like application commands or message components) +* When **executing a [webhook](/docs/resources/webhook) that the bot created** -Going forward, in the above cases, a bot’s `MENTION_EVERYONE`, `SEND_TTS_MESSAGES` and `USE_EXTERNAL_EMOJIS` permissions will be calculated based on the permissions its granted, *including* any [overwrites](#DOCS_TOPICS_PERMISSIONS/permission-overwrites). Previously, a bot’s permissions in these cases relied only on those granted to `@everyone`. +Going forward, in the above cases, a bot’s `MENTION_EVERYONE`, `SEND_TTS_MESSAGES` and `USE_EXTERNAL_EMOJIS` permissions will be calculated based on the permissions its granted, *including* any [overwrites](/docs/topics/permissions#permission-overwrites). Previously, a bot’s permissions in these cases relied only on those granted to `@everyone`. This change *only* applies to bots. The permissions for an app without a bot user (or without the `bot` scope) will still depend on `@everyone`. @@ -22,4 +22,4 @@ This change *only* applies to bots. The permissions for an app without a bot use If your bot wants to use the `MENTION_EVERYONE`, `SEND_TTS_MESSAGES` or `USE_EXTERNAL_EMOJIS` permissions when responding to interactions or executing a webhook, **ensure that the bot was installed (or explicitly granted) with them**. -Note that even if your bot is installed with certain permissions, they can be changed using overwrites. For interactions, you can use the [`app_permissions` field](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) to determine your app or bot's contextual permissions before replying. +Note that even if your bot is installed with certain permissions, they can be changed using overwrites. For interactions, you can use the [`app_permissions` field](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) to determine your app or bot's contextual permissions before replying. diff --git a/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md b/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md index adb05425b7..256c2b8f65 100644 --- a/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md +++ b/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md @@ -4,11 +4,11 @@ date: "2022-07-01" breaking: true --- -While this is a breaking change, most apps only rely on interaction responses (`INTERACTION_CREATE`), *not* message interaction objects (`MESSAGE_CREATE`). [Interaction responses](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/message-interaction-object/interaction-object-interaction-data) are unaffected by this change. +While this is a breaking change, most apps only rely on interaction responses (`INTERACTION_CREATE`), *not* message interaction objects (`MESSAGE_CREATE`). [Interaction responses](/docs/interactions/receiving-and-responding#message-interaction-object/interaction-object-interaction-data) are unaffected by this change. #### Upcoming Changes -Starting **July 18, 2022**, the `name` field for [message interaction objects](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/message-interaction-object) will now include subcommands and subcommand groups in the value (along with the existing top-level command). In the future, we recommend not relying on this message interaction field. +Starting **July 18, 2022**, the `name` field for [message interaction objects](/docs/interactions/receiving-and-responding#message-interaction-object) will now include subcommands and subcommand groups in the value (along with the existing top-level command). In the future, we recommend not relying on this message interaction field. The format of the value will be the different command levels (if they exist), separated by spaces: ` ` diff --git a/docs/change-log/2022-07-01-min-and-max-length-for-command-options.md b/docs/change-log/2022-07-01-min-and-max-length-for-command-options.md index b95308ade6..0f98617868 100644 --- a/docs/change-log/2022-07-01-min-and-max-length-for-command-options.md +++ b/docs/change-log/2022-07-01-min-and-max-length-for-command-options.md @@ -3,6 +3,6 @@ title: "Min and Max Length for Command Options" date: "2022-07-01" --- -Application [command options](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) of type `STRING` now includes optional `min_length` and `max_length` fields to control the length of text a user can input. +Application [command options](/docs/interactions/application-commands#application-command-object-application-command-option-structure) of type `STRING` now includes optional `min_length` and `max_length` fields to control the length of text a user can input. The value of `min_length` must be greater or equal to `0`, and the value of `max_length` must be greater or equal to `1`. diff --git a/docs/change-log/2022-07-13-upcoming-permissions-change-to-webhook-routes.md b/docs/change-log/2022-07-13-upcoming-permissions-change-to-webhook-routes.md index 25cbffeee1..5c4d943417 100644 --- a/docs/change-log/2022-07-13-upcoming-permissions-change-to-webhook-routes.md +++ b/docs/change-log/2022-07-13-upcoming-permissions-change-to-webhook-routes.md @@ -5,8 +5,8 @@ date: "2022-07-13" On August 8th, 2022 we will begin requiring the `VIEW_CHANNEL (1 << 10)` permission for webhook routes which require `MANAGE_WEBHOOKS (1 << 29)`, to align with our documented behavior. We don't expect that many applications will be affected by this, but in case you are, please ensure you have updated permissions needed for accessing the following routes: -* [`GET /webhooks/{webhook.id}`](#DOCS_RESOURCES_WEBHOOK/get-webhook) -* [`DELETE /webhooks/{webhook.id}`](#DOCS_RESOURCES_WEBHOOK/delete-webhook) -* [`PATCH /webhooks/{webhook.id}`](#DOCS_RESOURCES_WEBHOOK/modify-webhook) -* [`GET /channels/{channel.id}/webhooks`](#DOCS_RESOURCES_WEBHOOK/get-channel-webhooks) -* [`POST /channels/{channel.id}/webhooks`](#DOCS_RESOURCES_WEBHOOK/create-webhook) +* [`GET /webhooks/{webhook.id}`](/docs/resources/webhook#get-webhook) +* [`DELETE /webhooks/{webhook.id}`](/docs/resources/webhook#delete-webhook) +* [`PATCH /webhooks/{webhook.id}`](/docs/resources/webhook#modify-webhook) +* [`GET /channels/{channel.id}/webhooks`](/docs/resources/webhook#get-channel-webhooks) +* [`POST /channels/{channel.id}/webhooks`](/docs/resources/webhook#create-webhook) diff --git a/docs/change-log/2022-08-09-session-specific-gateway-resume-urls.md b/docs/change-log/2022-08-09-session-specific-gateway-resume-urls.md index 6a33cf3afd..a136309b08 100644 --- a/docs/change-log/2022-08-09-session-specific-gateway-resume-urls.md +++ b/docs/change-log/2022-08-09-session-specific-gateway-resume-urls.md @@ -6,6 +6,6 @@ date: "2022-08-09" > warn > Starting on **September 12, 2022**, apps that aren’t using the new `resume_gateway_url` field to resume gateway sessions will be disconnected significantly faster than normal. -A new `resume_gateway_url` field has been added to the [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) gateway event to support session-specific gateway connections. The value of `resume_gateway_url` is a session-specific URL that should be used when resuming the gateway session after a disconnect. Previously, `wss://gateway.discord.gg` was used to connect *and* resume sessions, but should now only be used during the connection. +A new `resume_gateway_url` field has been added to the [Ready](/docs/events/gateway-events#ready) gateway event to support session-specific gateway connections. The value of `resume_gateway_url` is a session-specific URL that should be used when resuming the gateway session after a disconnect. Previously, `wss://gateway.discord.gg` was used to connect *and* resume sessions, but should now only be used during the connection. At the moment, the value of `resume_gateway_url` will always be `wss://gateway.discord.gg` to give developers more time to adopt the new field. In the near future, the value will change to the session-specific URLs. diff --git a/docs/change-log/2022-08-22-slash-command-mentions.md b/docs/change-log/2022-08-22-slash-command-mentions.md index e1ce280e13..5f7c452374 100644 --- a/docs/change-log/2022-08-22-slash-command-mentions.md +++ b/docs/change-log/2022-08-22-slash-command-mentions.md @@ -3,6 +3,6 @@ title: "Slash Command Mentions" date: "2022-08-22" --- -This week, [Slash Command mentions](#DOCS_REFERENCE/message-formatting) are rolling out across all Discord clients (for Android, mentions are limited to the [React Native client](https://discord.com/blog/android-react-native-framework-update)). Clicking a Slash Command mention will auto-populate the command in the user's message input. +This week, [Slash Command mentions](/docs/reference#message-formatting) are rolling out across all Discord clients (for Android, mentions are limited to the [React Native client](https://discord.com/blog/android-react-native-framework-update)). Clicking a Slash Command mention will auto-populate the command in the user's message input. Slash Command mentions use the following format: ``. You can also use `` and `` for subcommands and subcommand groups. diff --git a/docs/change-log/2022-09-01-message-content-is-a-privileged-intent.md b/docs/change-log/2022-09-01-message-content-is-a-privileged-intent.md index 2c5d2f225b..871f445f18 100644 --- a/docs/change-log/2022-09-01-message-content-is-a-privileged-intent.md +++ b/docs/change-log/2022-09-01-message-content-is-a-privileged-intent.md @@ -4,7 +4,7 @@ date: "2022-09-01" breaking: true --- -As of today, [message content](#DOCS_EVENTS_GATEWAY/message-content-intent) is a privileged intent for all verified apps *and* apps eligible for verification. More details about why it's becoming a privileged intent and how to apply for it is in the [Help Center FAQ](https://support-dev.discord.com/hc/articles/4404772028055-Message-Content-Privileged-Intent-FAQ). +As of today, [message content](/docs/events/gateway#message-content-intent) is a privileged intent for all verified apps *and* apps eligible for verification. More details about why it's becoming a privileged intent and how to apply for it is in the [Help Center FAQ](https://support-dev.discord.com/hc/articles/4404772028055-Message-Content-Privileged-Intent-FAQ). Any app that does not have the message content intent configured in its app's settings within the Developer Portal will receive empty values in fields that expose message content across Discord's APIs (including the `content`, `embeds`, `attachments`, and `components` fields). These restrictions do not apply for messages that a bot or app sends, in DMs that it receives, or in messages in which it is mentioned. diff --git a/docs/change-log/2022-09-14-forum-channels-release.md b/docs/change-log/2022-09-14-forum-channels-release.md index 49d95258fb..c94ee3f568 100644 --- a/docs/change-log/2022-09-14-forum-channels-release.md +++ b/docs/change-log/2022-09-14-forum-channels-release.md @@ -3,6 +3,6 @@ title: "Forum Channels Release" date: "2022-09-14" --- -Forum channels ([`GUILD_FORUM` or `15`](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types)) have been released to all community servers. `GUILD_FORUM` channels are a new channel type that only supports threads, which display differently than in text (`GUILD_TEXT`) channels. +Forum channels ([`GUILD_FORUM` or `15`](/docs/resources/channel#channel-object-channel-types)) have been released to all community servers. `GUILD_FORUM` channels are a new channel type that only supports threads, which display differently than in text (`GUILD_TEXT`) channels. -Check out the [forums topic](#DOCS_TOPICS_THREADS/forums) for more information on the relevant APIs and technical details, and the [Forums FAQ](https://support.discord.com/hc/en-us/articles/6208479917079-Forum-Channels-FAQ#h_01G69FJQWTWN88HFEHK7Z6X79N) for more about the feature. +Check out the [forums topic](/docs/topics/threads#forums) for more information on the relevant APIs and technical details, and the [Forums FAQ](https://support.discord.com/hc/en-us/articles/6208479917079-Forum-Channels-FAQ#h_01G69FJQWTWN88HFEHK7Z6X79N) for more about the feature. diff --git a/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md b/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md index 6941800dcb..c3b5039d69 100644 --- a/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md +++ b/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md @@ -3,9 +3,9 @@ title: "Auto Moderation Spam and Mention Spam Trigger Types" date: "2022-09-21" --- -Two new [trigger types](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) were added to Auto Moderation: +Two new [trigger types](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) were added to Auto Moderation: -* `MENTION_SPAM` blocks messages that mention more than a set number of unique server members or roles. Apps can define the number (up to 50) using the `mention_total_limit` field in the [trigger metadata object](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) when creating or updating an Auto Moderation rule. +* `MENTION_SPAM` blocks messages that mention more than a set number of unique server members or roles. Apps can define the number (up to 50) using the `mention_total_limit` field in the [trigger metadata object](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) when creating or updating an Auto Moderation rule. * `SPAM` blocks links and messages that are identified as spam. -More information can be found in the [Auto Moderation documentation](#DOCS_RESOURCES_AUTO_MODERATION). +More information can be found in the [Auto Moderation documentation](/docs/resorces/auto-moderation). diff --git a/docs/change-log/2022-09-22-default-sort-order-for-forum-channels.md b/docs/change-log/2022-09-22-default-sort-order-for-forum-channels.md index 8c67f0a593..26186c61c4 100644 --- a/docs/change-log/2022-09-22-default-sort-order-for-forum-channels.md +++ b/docs/change-log/2022-09-22-default-sort-order-for-forum-channels.md @@ -3,6 +3,6 @@ title: "Default Sort Order for Forum Channels" date: "2022-09-22" --- -`default_sort_order` is an optional field in the [channel object](#DOCS_RESOURCES_CHANNEL) that indicates how the threads in a [forum channel](#DOCS_TOPICS_THREADS/forums) will be sorted for users by default. Setting `default_sort_order` requires the `MANAGE_CHANNELS` permission. +`default_sort_order` is an optional field in the [channel object](/docs/resources/channel) that indicates how the threads in a [forum channel](/docs/topics/threads#forums) will be sorted for users by default. Setting `default_sort_order` requires the `MANAGE_CHANNELS` permission. If `default_sort_order` hasn't been set, its value will be `null`. diff --git a/docs/change-log/2022-10-13-new-select-menu-components.md b/docs/change-log/2022-10-13-new-select-menu-components.md index e6cb7bb1fb..663d95d49e 100644 --- a/docs/change-log/2022-10-13-new-select-menu-components.md +++ b/docs/change-log/2022-10-13-new-select-menu-components.md @@ -3,13 +3,13 @@ title: "New Select Menu Components" date: "2022-10-13" --- -Four new select menu [component types](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) have been added to make it easier to populate selects with common resources in Discord: +Four new select menu [component types](/docs/interactions/message-components#component-object-component-types) have been added to make it easier to populate selects with common resources in Discord: * User select (type `5`) * Role select (type `6`) * Mentionable (user *and* role) select (type `7`) * Channel select (type `8`) -The new select menu components are defined similarly to the existing string select menu—with the exception of not including the `options` field and, within channel select menus, having the option to include a `channel_types` field. The [select menu interaction](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-menu-interaction) apps receive also contain a [`resolved` field](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-menu-resolved-object) for the new components. +The new select menu components are defined similarly to the existing string select menu—with the exception of not including the `options` field and, within channel select menus, having the option to include a `channel_types` field. The [select menu interaction](/docs/interactions/message-components#select-menu-object-select-menu-interaction) apps receive also contain a [`resolved` field](/docs/interactions/message-components#select-menu-object-select-menu-resolved-object) for the new components. -More details can be found in the updated [select menu documentation](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus). +More details can be found in the updated [select menu documentation](/docs/interactions/message-components#select-menus). diff --git a/docs/change-log/2022-10-20-delete-ephemeral-messages.md b/docs/change-log/2022-10-20-delete-ephemeral-messages.md index 18d703b752..5c57fe9185 100644 --- a/docs/change-log/2022-10-20-delete-ephemeral-messages.md +++ b/docs/change-log/2022-10-20-delete-ephemeral-messages.md @@ -5,7 +5,7 @@ date: "2022-10-20" Ephemeral interaction responses and follow-ups can now be deleted with a valid interaction token using the following endpoints: -* [`DELETE /webhooks///messages/@original`](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/delete-original-interaction-response) -* [`DELETE /webhooks///messages/`](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/delete-followup-message) +* [`DELETE /webhooks///messages/@original`](/docs/interactions/receiving-and-responding#delete-original-interaction-response) +* [`DELETE /webhooks///messages/`](/docs/interactions/receiving-and-responding#delete-followup-message) -As a reminder, interaction tokens stay valid for up to 15 minutes after the interaction occurs. Details can be found in the [interaction documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING). +As a reminder, interaction tokens stay valid for up to 15 minutes after the interaction occurs. Details can be found in the [interaction documentation](/docs/interactions/receiving-and-responding). diff --git a/docs/change-log/2022-11-04-add-auto-moderation-regex-support.md b/docs/change-log/2022-11-04-add-auto-moderation-regex-support.md index f24939860f..006cfd8f10 100644 --- a/docs/change-log/2022-11-04-add-auto-moderation-regex-support.md +++ b/docs/change-log/2022-11-04-add-auto-moderation-regex-support.md @@ -3,6 +3,6 @@ title: "Add Auto Moderation Regex Support" date: "2022-11-04" --- -Auto Moderation rules with [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) `KEYWORD` now support -a `regex_patterns` field in its [trigger\_metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types). +Auto Moderation rules with [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) `KEYWORD` now support +a `regex_patterns` field in its [trigger\_metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types). Regex patterns are a powerful way to describe many keywords all at once using one expression. Only Rust flavored regex is supported, which can be tested in online editors such as [Rustexp](https://rustexp.lpil.uk/). diff --git a/docs/change-log/2022-11-17-upcoming-application-command-permission-changes.md b/docs/change-log/2022-11-17-upcoming-application-command-permission-changes.md index 6ce7bc4856..44ac68053a 100644 --- a/docs/change-log/2022-11-17-upcoming-application-command-permission-changes.md +++ b/docs/change-log/2022-11-17-upcoming-application-command-permission-changes.md @@ -4,14 +4,14 @@ date: "2022-11-17" breaking: true --- -Based on feedback, we’re updating permissions for [application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) to simplify permission management and to make command permissions more closely resemble other permissions systems in Discord. +Based on feedback, we’re updating permissions for [application commands](/docs/interactions/application-commands) to simplify permission management and to make command permissions more closely resemble other permissions systems in Discord. Server admins can begin to opt-in to the command permission changes outlined here on a per-server basis **starting on December 16, 2022**. However, changes will not be applied to all servers **until late January or early February**. > info -> Current permissions behavior is documented in [the application commands documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) and in [the changelog for the previous permissions update](#DOCS_CHANGE_LOG/updated-command-permissions) +> Current permissions behavior is documented in [the application commands documentation](/docs/interactions/application-commands#permissions) and in [the changelog for the previous permissions update](/docs/change-log#updated-command-permissions) -These changes are focused on how configured permissions are used by Discord clients, so most apps will be unaffected. However, if your app uses the [Update Permissions endpoint](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-application-command-permissions) (`PUT /applications//guilds//commands//permissions`), you may need to make updates and should read these changes carefully. +These changes are focused on how configured permissions are used by Discord clients, so most apps will be unaffected. However, if your app uses the [Update Permissions endpoint](/docs/interactions/application-commands#edit-application-command-permissions) (`PUT /applications//guilds//commands//permissions`), you may need to make updates and should read these changes carefully. #### Types of command permission configurations @@ -22,7 +22,7 @@ Discord’s clients determine whether a user can see or invoke a command based o * **Command-level permissions** are set up by an admin for a specific *command* in their server. These permissions affect only a specific command. * **App-level permissions** are set up by an admin for a specific *app* in their server. These permissions affect all commands for an app. -* **`default_member_permissions`** are set up by an app when creating or updating a command. `default_member_permissions` apply to that command in *all* servers (unless an override exists). More information about `default_member_permissions` is [in the documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-using-default-permissions). +* **`default_member_permissions`** are set up by an app when creating or updating a command. `default_member_permissions` apply to that command in *all* servers (unless an override exists). More information about `default_member_permissions` is [in the documentation](/docs/interactions/application-commands#application-command-permissions-object-using-default-permissions). The concepts of these permission configurations are not changing. But then of course, the question becomes… @@ -74,14 +74,14 @@ Below is a simplified flowchart that illustrates how permissions will be applied #### 2. `APPLICATION_COMMAND_PERMISSIONS_V2` Guild Feature -We added a new [`APPLICATION_COMMAND_PERMISSIONS_V2` feature flag](#DOCS_RESOURCES_GUILD/guild-object-guild-features) which indicates whether that server is using **the current permissions logic**. +We added a new [`APPLICATION_COMMAND_PERMISSIONS_V2` feature flag](/docs/resources/guild#guild-object-guild-features) which indicates whether that server is using **the current permissions logic**. * If the flag *is* present, that server is using the old command permissions behavior. * If the flag *is not* present, that server has migrated from the old command permissions behavior to the new behavior. ### Am I affected? -Your app will only be affected if it uses the [`PUT /applications//guilds//commands//permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-application-command-permissions) endpoint. This is a pretty restricted endpoint used to manage and update application command permissions on behalf of admins, meaning that it requires the `applications.commands.permissions.update` scope. +Your app will only be affected if it uses the [`PUT /applications//guilds//commands//permissions`](/docs/interactions/application-commands#edit-application-command-permissions) endpoint. This is a pretty restricted endpoint used to manage and update application command permissions on behalf of admins, meaning that it requires the `applications.commands.permissions.update` scope. **If your app doesn’t use this endpoint, there’s nothing you need to prepare for these changes.** @@ -103,7 +103,7 @@ else: ``` > info -> If you don’t have access to guild features already through Gateway events, you can fetch that information using the [`GET /guilds/` endpoint](#DOCS_RESOURCES_GUILD/get-guild). +> If you don’t have access to guild features already through Gateway events, you can fetch that information using the [`GET /guilds/` endpoint](/docs/resources/guild#get-guild). **2. Modify the behavior based on your use case** diff --git a/docs/change-log/2022-11-22-add-auto-moderation-allow-list-for-keyword-rules-and-increase-max-keyword-rules-per-guild-limit.md b/docs/change-log/2022-11-22-add-auto-moderation-allow-list-for-keyword-rules-and-increase-max-keyword-rules-per-guild-limit.md index d0937cb993..0d85293a43 100644 --- a/docs/change-log/2022-11-22-add-auto-moderation-allow-list-for-keyword-rules-and-increase-max-keyword-rules-per-guild-limit.md +++ b/docs/change-log/2022-11-22-add-auto-moderation-allow-list-for-keyword-rules-and-increase-max-keyword-rules-per-guild-limit.md @@ -3,6 +3,6 @@ title: "Add Auto Moderation Allow List for Keyword Rules and Increase Max Keywor date: "2022-11-22" --- -* Auto Moderation rules with [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) `KEYWORD` now support an `allow_list` field in its [trigger\_metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata). Any message content that matches an `allow_list` keyword will be ignored by the Auto Moderation `KEYWORD` rule. Each `allow_list` keyword can be a multi-word phrase and can contain [wildcard symbols](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-matching-strategies). -* Increase maximum number of rules with `KEYWORD` [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) per guild from 3 to 5 -* Increase maximum length for each regex pattern in the `regex_patterns` [trigger\_metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) field from 75 to 260. +* Auto Moderation rules with [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) `KEYWORD` now support an `allow_list` field in its [trigger\_metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata). Any message content that matches an `allow_list` keyword will be ignored by the Auto Moderation `KEYWORD` rule. Each `allow_list` keyword can be a multi-word phrase and can contain [wildcard symbols](/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies). +* Increase maximum number of rules with `KEYWORD` [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) per guild from 3 to 5 +* Increase maximum length for each regex pattern in the `regex_patterns` [trigger\_metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) field from 75 to 260. diff --git a/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md b/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md index cef28e9973..75f55c8a82 100644 --- a/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md +++ b/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md @@ -5,11 +5,11 @@ date: "2022-12-12" Introducing [linked roles](https://discord.com/blog/connected-accounts-functionality-boost-linked-roles) as well as the ability for all developers to set up their own linked roles with an application. This includes: -* New [`role_connections_verification_url`](#DOCS_RESOURCES_APPLICATION/application-object) that can be set in the developer portal in order for the application to render as potential verification option for linked roles. -* [Application metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) to specify more detailed linked role requirements. -* New endpoints to [retrieve](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/get-application-role-connection-metadata-records) (`GET /applications//role-connections/metadata`) and [update](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/update-application-role-connection-metadata-records) (`PUT /applications//role-connections/metadata`) application connection metadata. -* New [`role_connections.write`](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) OAuth2 scope required to authenticate the below requests. -* Endpoints to [retrieve](#DOCS_RESOURCES_USER/get-current-user-application-role-connection) (`GET /users/@me/applications/{application.id}/role-connection`) and [update](#DOCS_RESOURCES_USER/update-current-user-application-role-connection) (`PUT /users/@me/applications/{application.id}/role-connection`) a user's role connections, both of which return an [application role connection](#DOCS_RESOURCES_USER/application-role-connection-object) object. +* New [`role_connections_verification_url`](/docs/resources/application#application-object) that can be set in the developer portal in order for the application to render as potential verification option for linked roles. +* [Application metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) to specify more detailed linked role requirements. +* New endpoints to [retrieve](/docs/resources/application_ROLE_CONNECTION_METADATA/get-application-role-connection-metadata-records) (`GET /applications//role-connections/metadata`) and [update](/docs/resources/application_ROLE_CONNECTION_METADATA/update-application-role-connection-metadata-records) (`PUT /applications//role-connections/metadata`) application connection metadata. +* New [`role_connections.write`](/docs/topics/oauth2#shared-resources-oauth2-scopes) OAuth2 scope required to authenticate the below requests. +* Endpoints to [retrieve](/docs/resources/user#get-current-user-application-role-connection) (`GET /users/@me/applications/{application.id}/role-connection`) and [update](/docs/resources/user#update-current-user-application-role-connection) (`PUT /users/@me/applications/{application.id}/role-connection`) a user's role connections, both of which return an [application role connection](/docs/resources/user#application-role-connection-object) object. > info -> For a quick rundown on how to get started using linked roles, refer to the [tutorial](#DOCS_TUTORIALS_CONFIGURING_APP_METADATA_FOR_LINKED_ROLES). +> For a quick rundown on how to get started using linked roles, refer to the [tutorial](/docs/tutorials/configuring-app-metadata-for-linked-roles). diff --git a/docs/change-log/2022-12-13-add-default-layout-setting-for-forum-channels.md b/docs/change-log/2022-12-13-add-default-layout-setting-for-forum-channels.md index 4b50f53cf0..496a459d23 100644 --- a/docs/change-log/2022-12-13-add-default-layout-setting-for-forum-channels.md +++ b/docs/change-log/2022-12-13-add-default-layout-setting-for-forum-channels.md @@ -3,6 +3,6 @@ title: "Add Default Layout setting for Forum channels" date: "2022-12-13" --- -`default_forum_layout` is an optional field in the [channel object](#DOCS_RESOURCES_CHANNEL) that indicates the default layout for posts in a [forum channel](#DOCS_TOPICS_THREADS/forums). A value of 1 (`LIST_VIEW`) indicates that posts will be displayed as a chronological list, and 2 (`GALLERY_VIEW`) indicates they will be displayed as a collection of tiles. If `default_forum_layout` hasn't been set, the value will be `0`. +`default_forum_layout` is an optional field in the [channel object](/docs/resources/channel) that indicates the default layout for posts in a [forum channel](/docs/topics/threads#forums). A value of 1 (`LIST_VIEW`) indicates that posts will be displayed as a chronological list, and 2 (`GALLERY_VIEW`) indicates they will be displayed as a collection of tiles. If `default_forum_layout` hasn't been set, the value will be `0`. Setting `default_forum_layout` requires the `MANAGE_CHANNELS` permission. diff --git a/docs/change-log/2023-01-09-thread-member-details-and-pagination.md b/docs/change-log/2023-01-09-thread-member-details-and-pagination.md index 6818ef9dd1..d0f89fea58 100644 --- a/docs/change-log/2023-01-09-thread-member-details-and-pagination.md +++ b/docs/change-log/2023-01-09-thread-member-details-and-pagination.md @@ -4,10 +4,10 @@ date: "2023-01-09" breaking: true --- -A new `member` field was added to the [thread member object](#DOCS_RESOURCES_CHANNEL/thread-member-object). `member` is a [guild member object](#DOCS_RESOURCES_GUILD/guild-member-object) that will be included within returned thread member objects when the new `with_member` field is set to `true` in the [List Thread Members](#DOCS_RESOURCES_CHANNEL/list-thread-members) (`GET /channels//thread-members`) and [Get Thread Member](#DOCS_RESOURCES_CHANNEL/get-thread-member) (`GET /channels//thread-members/`) endpoints. +A new `member` field was added to the [thread member object](/docs/resources/channel#thread-member-object). `member` is a [guild member object](/docs/resources/guild#guild-member-object) that will be included within returned thread member objects when the new `with_member` field is set to `true` in the [List Thread Members](/docs/resources/channel#list-thread-members) (`GET /channels//thread-members`) and [Get Thread Member](/docs/resources/channel#get-thread-member) (`GET /channels//thread-members/`) endpoints. -Setting `with_member` to `true` will also enable pagination for the [List Thread Members](#DOCS_RESOURCES_CHANNEL/list-thread-members) endpoint. When the results are paginated, you can use the new `after` and `limit` fields to fetch additional thread members and limit the number of thread members returned. By default, `limit` is 100. +Setting `with_member` to `true` will also enable pagination for the [List Thread Members](/docs/resources/channel#list-thread-members) endpoint. When the results are paginated, you can use the new `after` and `limit` fields to fetch additional thread members and limit the number of thread members returned. By default, `limit` is 100. #### Upcoming Changes -Starting in API v11, [List Thread Members](#DOCS_RESOURCES_CHANNEL/list-thread-members) (`GET /channels//thread-members`) will *always* return paginated results, regardless of whether `with_member` is passed or not. +Starting in API v11, [List Thread Members](/docs/resources/channel#list-thread-members) (`GET /channels//thread-members`) will *always* return paginated results, regardless of whether `with_member` is passed or not. diff --git a/docs/change-log/2023-01-18-guild-audit-log-events.md b/docs/change-log/2023-01-18-guild-audit-log-events.md index dfb606cb55..0bbb3ac208 100644 --- a/docs/change-log/2023-01-18-guild-audit-log-events.md +++ b/docs/change-log/2023-01-18-guild-audit-log-events.md @@ -3,4 +3,4 @@ title: "Guild Audit Log Events" date: "2023-01-18" --- -At long last, a new [`GUILD_AUDIT_LOG_ENTRY_CREATE`](#DOCS_EVENTS_GATEWAY_EVENTS/guild-audit-log-entry-create) event has been added to the gateway, allowing your application to react to moderation actions in guilds. The `VIEW_AUDIT_LOG` permission is required in order to receive these events, and the [`GUILD_MODERATION` intent](#DOCS_EVENTS_GATEWAY/gateway-intents) needs to be set when connecting to the gateway. +At long last, a new [`GUILD_AUDIT_LOG_ENTRY_CREATE`](/docs/events/gateway-events#guild-audit-log-entry-create) event has been added to the gateway, allowing your application to react to moderation actions in guilds. The `VIEW_AUDIT_LOG` permission is required in order to receive these events, and the [`GUILD_MODERATION` intent](/docs/events/gateway#gateway-intents) needs to be set when connecting to the gateway. diff --git a/docs/change-log/2023-02-08-increase-auto-moderation-keyword-limits.md b/docs/change-log/2023-02-08-increase-auto-moderation-keyword-limits.md index 749747fcbc..8a6e6d61bc 100644 --- a/docs/change-log/2023-02-08-increase-auto-moderation-keyword-limits.md +++ b/docs/change-log/2023-02-08-increase-auto-moderation-keyword-limits.md @@ -3,5 +3,5 @@ title: "Increase Auto Moderation Keyword Limits" date: "2023-02-08" --- -* Increase maximum number of rules with `KEYWORD` [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) per guild from 5 to 6 -* Increase maximum length for each keyword in the `keyword_filter` and `allow_list` [trigger\_metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) fields from 30 to 60. +* Increase maximum number of rules with `KEYWORD` [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) per guild from 5 to 6 +* Increase maximum length for each keyword in the `keyword_filter` and `allow_list` [trigger\_metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) fields from 30 to 60. diff --git a/docs/change-log/2023-02-10-update-to-locked-threads.md b/docs/change-log/2023-02-10-update-to-locked-threads.md index 419e493cd8..930be22417 100644 --- a/docs/change-log/2023-02-10-update-to-locked-threads.md +++ b/docs/change-log/2023-02-10-update-to-locked-threads.md @@ -5,11 +5,11 @@ date: "2023-02-10" ### Upcoming Changes -Currently, threads in Discord (including forum posts) can either be archived or both locked and archived. Starting on **March 6, 2023**, threads will be able to be locked *without* being archived, which will slightly change the meaning of the [`locked` field](#DOCS_RESOURCES_CHANNEL/thread-metadata-object-thread-metadata-structure). +Currently, threads in Discord (including forum posts) can either be archived or both locked and archived. Starting on **March 6, 2023**, threads will be able to be locked *without* being archived, which will slightly change the meaning of the [`locked` field](/docs/resources/channel#thread-metadata-object-thread-metadata-structure). -`locked` currently indicates that a thread cannot be reopened by a user without the [`MANAGE_THREADS` (`1 << 34`) permission](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags), but it doesn't restrict user activity within active (meaning non-archived) threads. After this change, users (including bot users) without the `MANAGE_THREADS` permission will be more restricted in locked threads. Users won't be able to create or update messages in locked threads, or update properties like its title or tags. Additionally, some user activity like deleting messages and adding or removing reactions will *only* be allowed in locked threads if that thread is also active (or un-archived). +`locked` currently indicates that a thread cannot be reopened by a user without the [`MANAGE_THREADS` (`1 << 34`) permission](/docs/topics/permissions#permissions-bitwise-permission-flags), but it doesn't restrict user activity within active (meaning non-archived) threads. After this change, users (including bot users) without the `MANAGE_THREADS` permission will be more restricted in locked threads. Users won't be able to create or update messages in locked threads, or update properties like its title or tags. Additionally, some user activity like deleting messages and adding or removing reactions will *only* be allowed in locked threads if that thread is also active (or un-archived). -If a user or bot user has the `MANAGE_THREADS` permission, they will still be able to make changes to the thread and messages. The upcoming change does not affect the meaning of the [`archived` field](#DOCS_RESOURCES_CHANNEL/thread-metadata-object-thread-metadata-structure) or the behavior of a thread that is both locked and archived. +If a user or bot user has the `MANAGE_THREADS` permission, they will still be able to make changes to the thread and messages. The upcoming change does not affect the meaning of the [`archived` field](/docs/resources/channel#thread-metadata-object-thread-metadata-structure) or the behavior of a thread that is both locked and archived. ### How do I prepare for this change? diff --git a/docs/change-log/2023-02-24-add-auto-moderation-custom-message-action-metadata-field.md b/docs/change-log/2023-02-24-add-auto-moderation-custom-message-action-metadata-field.md index 858399310f..4aaf655a63 100644 --- a/docs/change-log/2023-02-24-add-auto-moderation-custom-message-action-metadata-field.md +++ b/docs/change-log/2023-02-24-add-auto-moderation-custom-message-action-metadata-field.md @@ -3,4 +3,4 @@ title: "Add Auto Moderation custom_message Action Metadata Field" date: "2023-02-24" --- -Add new `custom_message` [action metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-metadata) for the `BLOCK_MESSAGE` [action type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-types)). You can now specify a custom string for every Auto Moderation rule that will be shown to members whenever the rule blocks their message. This can be used as an additional explanation for why a message was blocked and as a chance to help members understand your server's rules and guidelines. +Add new `custom_message` [action metadata](/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata) for the `BLOCK_MESSAGE` [action type](/docs/resources/auto-moderation#auto-moderation-action-object-action-types)). You can now specify a custom string for every Auto Moderation rule that will be shown to members whenever the rule blocks their message. This can be used as an additional explanation for why a message was blocked and as a chance to help members understand your server's rules and guidelines. diff --git a/docs/change-log/2023-04-06-interaction-channel-data.md b/docs/change-log/2023-04-06-interaction-channel-data.md index 3d9621cbb7..05d0ec8c58 100644 --- a/docs/change-log/2023-04-06-interaction-channel-data.md +++ b/docs/change-log/2023-04-06-interaction-channel-data.md @@ -3,4 +3,4 @@ title: "Interaction Channel Data" date: "2023-04-06" --- -Interactions now contain a `channel` field which is a partial channel object and guaranteed to contain `id` and `type`. We recommend that you begin using this channel field to identify the source channel of the interaction, and may deprecate the existing `channel_id` field in the future. See the [interaction documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) for more details. +Interactions now contain a `channel` field which is a partial channel object and guaranteed to contain `id` and `type`. We recommend that you begin using this channel field to identify the source channel of the interaction, and may deprecate the existing `channel_id` field in the future. See the [interaction documentation](/docs/interactions/receiving-and-responding#interaction-object) for more details. diff --git a/docs/change-log/2023-04-14-bot-users-added-to-all-new-apps.md b/docs/change-log/2023-04-14-bot-users-added-to-all-new-apps.md index 854218ad2e..6f3eecd7f0 100644 --- a/docs/change-log/2023-04-14-bot-users-added-to-all-new-apps.md +++ b/docs/change-log/2023-04-14-bot-users-added-to-all-new-apps.md @@ -3,6 +3,6 @@ title: "Bot users added to all new apps" date: "2023-04-14" --- -Starting today, [bot users](#DOCS_TOPICS_OAUTH2/bot-vs-user-accounts) will be added to all newly-created apps. Settings and configuration options for bot users remain the same, and can still be accessed on the **Bot** page within your [app's settings](https://discord.com/developers/applications). +Starting today, [bot users](/docs/topics/oauth2#bot-vs-user-accounts) will be added to all newly-created apps. Settings and configuration options for bot users remain the same, and can still be accessed on the **Bot** page within your [app's settings](https://discord.com/developers/applications). -If your app doesn't need or want a bot user associated with it, you can refrain from adding the [`bot` scope](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) when installing your app. +If your app doesn't need or want a bot user associated with it, you can refrain from adding the [`bot` scope](/docs/topics/oauth2#shared-resources-oauth2-scopes) when installing your app. diff --git a/docs/change-log/2023-05-03-unique-usernames-on-discord.md b/docs/change-log/2023-05-03-unique-usernames-on-discord.md index 88f80b83c4..2ed79e2567 100644 --- a/docs/change-log/2023-05-03-unique-usernames-on-discord.md +++ b/docs/change-log/2023-05-03-unique-usernames-on-discord.md @@ -12,7 +12,7 @@ This changelog focuses only on the technical changes to be aware of to update yo ### Identifying migrated users -The new username system will rollout to users over time rather than all at once. The value of a single zero (`"0"`) in the [`discriminator` field](#DOCS_RESOURCES_USER/user-object-user-structure) on a user will indicate that the user has been migrated to the new username system. Note that the discriminator for migrated users will *not* be 4-digits like a standard discriminator (it is `"0"`, not `"0000"`). The value of the `username` field will become the migrated user's unique username. +The new username system will rollout to users over time rather than all at once. The value of a single zero (`"0"`) in the [`discriminator` field](/docs/resources/user#user-object-user-structure) on a user will indicate that the user has been migrated to the new username system. Note that the discriminator for migrated users will *not* be 4-digits like a standard discriminator (it is `"0"`, not `"0000"`). The value of the `username` field will become the migrated user's unique username. After migration of all users is complete, the `discriminator` field may be removed. diff --git a/docs/change-log/2023-05-05-add-join-raid-and-mention-raid-fields.md b/docs/change-log/2023-05-05-add-join-raid-and-mention-raid-fields.md index ca1972cc17..d510c0a11f 100644 --- a/docs/change-log/2023-05-05-add-join-raid-and-mention-raid-fields.md +++ b/docs/change-log/2023-05-05-add-join-raid-and-mention-raid-fields.md @@ -3,5 +3,5 @@ title: "Add Join Raid and Mention Raid fields" date: "2023-05-05" --- -* Add Auto Moderation `mention_raid_protection_enabled` [trigger\_metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) field for the `MENTION_SPAM` [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types). If this field and its parent `MENTION_SPAM` rule are enabled, Auto Moderation provides baseline detection against sudden spikes in mention activity that are normally indicative of mention raids. -* Add `safety_alerts_channel_id` [guild](#DOCS_RESOURCES_GUILD/guild-object) field and [`RAID_ALERTS_DISABLED` guild feature flag](#DOCS_RESOURCES_GUILD/guild-object-guild-features) which are associated with join raid protection +* Add Auto Moderation `mention_raid_protection_enabled` [trigger\_metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) field for the `MENTION_SPAM` [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types). If this field and its parent `MENTION_SPAM` rule are enabled, Auto Moderation provides baseline detection against sudden spikes in mention activity that are normally indicative of mention raids. +* Add `safety_alerts_channel_id` [guild](/docs/resources/guild#guild-object) field and [`RAID_ALERTS_DISABLED` guild feature flag](/docs/resources/guild#guild-object-guild-features) which are associated with join raid protection diff --git a/docs/change-log/2023-08-01-new-guild-media-channel-type.md b/docs/change-log/2023-08-01-new-guild-media-channel-type.md index f39c1ee667..09fc576d35 100644 --- a/docs/change-log/2023-08-01-new-guild-media-channel-type.md +++ b/docs/change-log/2023-08-01-new-guild-media-channel-type.md @@ -3,6 +3,6 @@ title: "New GUILD_MEDIA channel type" date: "2023-08-01" --- -* Add the [`GUILD_MEDIA` (16) channel type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types). `GUILD_MEDIA` channels only support threads, similar to `GUILD_FORUM` channels. +* Add the [`GUILD_MEDIA` (16) channel type](/docs/resources/channel#channel-object-channel-types). `GUILD_MEDIA` channels only support threads, similar to `GUILD_FORUM` channels. -Read the [media channel topic](#DOCS_TOPICS_THREADS/media-channels) for more information on the relevant APIs and technical details, or the [media channel Help Center Article](https://creator-support.discord.com/hc/en-us/articles/14346342766743) for more about the feature. +Read the [media channel topic](/docs/topics/threads#media-channels) for more information on the relevant APIs and technical details, or the [media channel Help Center Article](https://creator-support.discord.com/hc/en-us/articles/14346342766743) for more about the feature. diff --git a/docs/change-log/2023-08-08-activity-state-for-bot-users.md b/docs/change-log/2023-08-08-activity-state-for-bot-users.md index e47dcaf148..433b994c4b 100644 --- a/docs/change-log/2023-08-08-activity-state-for-bot-users.md +++ b/docs/change-log/2023-08-08-activity-state-for-bot-users.md @@ -3,4 +3,4 @@ title: "Activity State for Bot Users" date: "2023-08-08" --- -The `state` field in [activity objects](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object) can now be set when [updating presence](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence) for a bot user. The value of `state` will appear as a custom status for the bot user when an [activity's `type`](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-types) is set to `4`, or as additional data under an activity's name for other activity types. +The `state` field in [activity objects](/docs/events/gateway-events#activity-object) can now be set when [updating presence](/docs/events/gateway-events#update-presence) for a bot user. The value of `state` will appear as a custom status for the bot user when an [activity's `type`](/docs/events/gateway-events#activity-object-activity-types) is set to `4`, or as additional data under an activity's name for other activity types. diff --git a/docs/change-log/2023-08-23-team-member-roles.md b/docs/change-log/2023-08-23-team-member-roles.md index bc16d6ae4b..5b25ace460 100644 --- a/docs/change-log/2023-08-23-team-member-roles.md +++ b/docs/change-log/2023-08-23-team-member-roles.md @@ -3,6 +3,6 @@ title: "Team Member Roles" date: "2023-08-23" --- -You can now select roles other than admin when inviting users or configuring members of a team. There are four [role types](#DOCS_TOPICS_TEAMS/team-member-roles-team-member-role-types) that a team member can be assigned: owner, admin, developer, or read-only. The team member object now has an additional [`role` field](#DOCS_TOPICS_TEAMS/data-models-team-member-object), which is a string representing the member's current role. +You can now select roles other than admin when inviting users or configuring members of a team. There are four [role types](/docs/topics/teams#team-member-roles-team-member-role-types) that a team member can be assigned: owner, admin, developer, or read-only. The team member object now has an additional [`role` field](/docs/topics/teams#data-models-team-member-object), which is a string representing the member's current role. -Details about team member roles are in the updated [Teams documentation](#DOCS_TOPICS_TEAMS/team-member-roles). +Details about team member roles are in the updated [Teams documentation](/docs/topics/teams#team-member-roles). diff --git a/docs/change-log/2023-09-22-default-value-in-auto-populated-select-menus.md b/docs/change-log/2023-09-22-default-value-in-auto-populated-select-menus.md index 15454f0f5a..96ad53cf1a 100644 --- a/docs/change-log/2023-09-22-default-value-in-auto-populated-select-menus.md +++ b/docs/change-log/2023-09-22-default-value-in-auto-populated-select-menus.md @@ -3,4 +3,4 @@ title: "Default Value in Auto-populated Select Menus" date: "2023-09-22" --- -A new `default_values` field was added for user (`5`), role (`6`), mentionable (`7`), and channel (`8`) [select menu components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus). `default_values` is a list of [default value objects](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-default-value-structure), which each include an `id` (the snowflake value for the resource), as well as a corresponding `type` (either `"user"`, `"role"`, or `"channel"`). +A new `default_values` field was added for user (`5`), role (`6`), mentionable (`7`), and channel (`8`) [select menu components](/docs/interactions/message-components#select-menus). `default_values` is a list of [default value objects](/docs/interactions/message-components#select-menu-object-select-default-value-structure), which each include an `id` (the snowflake value for the resource), as well as a corresponding `type` (either `"user"`, `"role"`, or `"channel"`). diff --git a/docs/change-log/2023-09-26-premium-app-subscriptions-available-in-the-us.md b/docs/change-log/2023-09-26-premium-app-subscriptions-available-in-the-us.md index d6d6c1983d..fa0aaaddfc 100644 --- a/docs/change-log/2023-09-26-premium-app-subscriptions-available-in-the-us.md +++ b/docs/change-log/2023-09-26-premium-app-subscriptions-available-in-the-us.md @@ -5,18 +5,18 @@ topics: - "Premium Apps" --- -Starting today, eligible US-based developers can monetize their verified apps with App Subscriptions. [App Subscriptions](#DOCS_MONETIZATION_OVERVIEW) let you to charge your users for premium functionality with a recurring, monthly subscription. +Starting today, eligible US-based developers can monetize their verified apps with App Subscriptions. [App Subscriptions](/docs/monetization/overview) let you to charge your users for premium functionality with a recurring, monthly subscription. * Manage subscription SKUs in the Developer Portal * View monetization analytics in the Developer Portal * Team owners can setup and manage payouts in Developer Portal -* New endpoints for working with [SKUs](#DOCS_RESOURCES_SKU) and [Entitlements](#DOCS_RESOURCES_ENTITLEMENT): - * [List SKUs](#DOCS_RESOURCES_SKU/list-skus) `GET /applications//skus` - * [List Entitlements](#DOCS_RESOURCES_ENTITLEMENT/list-entitlements) `GET /applications//entitlements` - * [Create Test Entitlement](#DOCS_RESOURCES_ENTITLEMENT/create-test-entitlement) `POST /applications//entitlements` - * [Delete Test Entitlement](#DOCS_RESOURCES_ENTITLEMENT/delete-test-entitlement) `DELETE /applications//entitlements/` -* [Gateway Events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements) for working with entitlements: `ENTITLEMENT_CREATE`, `ENTITLEMENT_UPDATE`, `ENTITLEMENT_DELETE` -* New [`PREMIUM_REQUIRED (10)` interaction response type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type) is available to prompt users to upgrade -* New `entitlements` field, which is an array of [entitlement](#DOCS_RESOURCES_ENTITLEMENT/) objects, available in interaction data payloads when [receiving and responding to interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) +* New endpoints for working with [SKUs](/docs/resources/sku) and [Entitlements](/docs/resources/entitlement): + * [List SKUs](/docs/resources/sku#list-skus) `GET /applications//skus` + * [List Entitlements](/docs/resources/entitlement#list-entitlements) `GET /applications//entitlements` + * [Create Test Entitlement](/docs/resources/entitlement#create-test-entitlement) `POST /applications//entitlements` + * [Delete Test Entitlement](/docs/resources/entitlement#delete-test-entitlement) `DELETE /applications//entitlements/` +* [Gateway Events](/docs/events/gateway-events#entitlements) for working with entitlements: `ENTITLEMENT_CREATE`, `ENTITLEMENT_UPDATE`, `ENTITLEMENT_DELETE` +* New [`PREMIUM_REQUIRED (10)` interaction response type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) is available to prompt users to upgrade +* New `entitlements` field, which is an array of [entitlement](/docs/resources/entitlement#) objects, available in interaction data payloads when [receiving and responding to interactions](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) -To learn more about eligibility details and how to enable monetization for your app, check out the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW). +To learn more about eligibility details and how to enable monetization for your app, check out the [Monetization Overview](/docs/monetization/overview). diff --git a/docs/change-log/2023-10-19-premium-app-subscriptions-now-available-in-the-eu-and-uk.md b/docs/change-log/2023-10-19-premium-app-subscriptions-now-available-in-the-eu-and-uk.md index e0bed77fba..291bc67671 100644 --- a/docs/change-log/2023-10-19-premium-app-subscriptions-now-available-in-the-eu-and-uk.md +++ b/docs/change-log/2023-10-19-premium-app-subscriptions-now-available-in-the-eu-and-uk.md @@ -5,9 +5,9 @@ topics: - "Premium Apps" --- -Starting today, eligible developers based in EU and UK can now monetize their verified apps with App Subscriptions. [App Subscriptions](#DOCS_MONETIZATION_OVERVIEW) let you to charge your users for premium functionality with a recurring, monthly subscription. +Starting today, eligible developers based in EU and UK can now monetize their verified apps with App Subscriptions. [App Subscriptions](/docs/monetization/overview) let you to charge your users for premium functionality with a recurring, monthly subscription. > info -> New features for Premium App Subscriptions are documented in the [App Subscriptions overview](#DOCS_MONETIZATION_OVERVIEW) and in [the changelog for the previous App Subscriptions release](#DOCS_CHANGE_LOG/premium-app-subscriptions-available-in-the-us). +> New features for Premium App Subscriptions are documented in the [App Subscriptions overview](/docs/monetization/overview) and in [the changelog for the previous App Subscriptions release](/docs/change-log#premium-app-subscriptions-available-in-the-us). -To learn more about eligibility details and how to enable monetization for your app, check out the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW). +To learn more about eligibility details and how to enable monetization for your app, check out the [Monetization Overview](/docs/monetization/overview). diff --git a/docs/change-log/2023-11-01-fix-message-edit-interaction-response-permissions.md b/docs/change-log/2023-11-01-fix-message-edit-interaction-response-permissions.md index 722223f9fa..ed2e1eaadd 100644 --- a/docs/change-log/2023-11-01-fix-message-edit-interaction-response-permissions.md +++ b/docs/change-log/2023-11-01-fix-message-edit-interaction-response-permissions.md @@ -3,6 +3,6 @@ title: "Fix Message Edit Interaction Response Permissions" date: "2023-11-01" --- -Behavior for message edit interaction response actions like [updating interaction responses](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/edit-original-interaction-response) and [sending follow-up messages](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/followup-messages) have been updated to follow a bot user's permissions. +Behavior for message edit interaction response actions like [updating interaction responses](/docs/interactions/receiving-and-responding#edit-original-interaction-response) and [sending follow-up messages](/docs/interactions/receiving-and-responding#followup-messages) have been updated to follow a bot user's permissions. Previously, some message edit interaction response actions would use the default permissions rather than a bot user's permissions. diff --git a/docs/change-log/2023-11-29-premium-app-subscriptions-new-ways-for-testing-app-subscriptions.md b/docs/change-log/2023-11-29-premium-app-subscriptions-new-ways-for-testing-app-subscriptions.md index 6df18642f4..00eff1b453 100644 --- a/docs/change-log/2023-11-29-premium-app-subscriptions-new-ways-for-testing-app-subscriptions.md +++ b/docs/change-log/2023-11-29-premium-app-subscriptions-new-ways-for-testing-app-subscriptions.md @@ -8,6 +8,6 @@ topics: Following feedback on Premium App Subscriptions, we've made it easier for developers to test their app subscriptions. The goal is to provide you with flexibility during testing and prevent you from having to use live payment methods. * Team members will automatically receive a 100% discount on a subscription for your app, allowing you to test the end-to-end payment flow -* Developers can create and delete [test entitlements](#DOCS_RESOURCES_ENTITLEMENT/create-test-entitlement) to toggle access to an application's premium features +* Developers can create and delete [test entitlements](/docs/resources/entitlement#create-test-entitlement) to toggle access to an application's premium features -Read more about [Testing your App Subscriptions Implementation](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/testing-your-app-subscription-implementation) for details. +Read more about [Testing your App Subscriptions Implementation](/docs/monetization/implementing-app-subscriptions#testing-your-app-subscription-implementation) for details. diff --git a/docs/change-log/2023-12-15-clarification-on-permission-splits-for-expressions-and-events.md b/docs/change-log/2023-12-15-clarification-on-permission-splits-for-expressions-and-events.md index 13012c4e46..79bc40e0b6 100644 --- a/docs/change-log/2023-12-15-clarification-on-permission-splits-for-expressions-and-events.md +++ b/docs/change-log/2023-12-15-clarification-on-permission-splits-for-expressions-and-events.md @@ -6,7 +6,7 @@ date: "2023-12-15" > info > The existing behavior for `MANAGE_GUILD_EXPRESSIONS` and `MANAGE_EVENTS` will **not be changing**. These permissions will continue to allow your bot users to create, update and delete expressions/events. No action will be needed if you plan to continue using these permissions. -To support added controls for expressions and events, new [permissions](#DOCS_TOPICS_PERMISSIONS/permissions) were added for users and roles in July 2023: +To support added controls for expressions and events, new [permissions](/docs/topics/permissions#permissions) were added for users and roles in July 2023: * `CREATE_GUILD_EXPRESSIONS`: `1 << 43` * `CREATE_EVENTS`: `1 << 44` diff --git a/docs/change-log/2023-12-19-limit-number-of-fields-in-embeds.md b/docs/change-log/2023-12-19-limit-number-of-fields-in-embeds.md index c0cb497206..4755aa684a 100644 --- a/docs/change-log/2023-12-19-limit-number-of-fields-in-embeds.md +++ b/docs/change-log/2023-12-19-limit-number-of-fields-in-embeds.md @@ -3,6 +3,6 @@ title: "Limit Number of Fields in Embeds" date: "2023-12-19" --- -[Embed objects](#DOCS_RESOURCES_MESSAGE/embed-object) are now limited more explicitly to 25 [embed fields](#DOCS_RESOURCES_MESSAGE/embed-object-embed-field-structure). If you pass more than 25 fields within the an embed's `fields` property, an error will be returned. +[Embed objects](/docs/resources/message#embed-object) are now limited more explicitly to 25 [embed fields](/docs/resources/message#embed-object-embed-field-structure). If you pass more than 25 fields within the an embed's `fields` property, an error will be returned. Previously, only the first 25 embed fields would be displayed within the embed but no error was returned. diff --git a/docs/change-log/2024-00-20-soundboard-api.md b/docs/change-log/2024-00-20-soundboard-api.md index d71436b845..570b60a16a 100644 --- a/docs/change-log/2024-00-20-soundboard-api.md +++ b/docs/change-log/2024-00-20-soundboard-api.md @@ -3,4 +3,4 @@ title: "Soundboard API" date: "2024-09-20" --- -[Soundboard](#DOCS_RESOURCES_SOUNDBOARD) is now available in the API! Apps can now [get](#DOCS_RESOURCES_SOUNDBOARD/list-default-soundboard-sounds) soundboard sounds, [modify](#DOCS_RESOURCES_SOUNDBOARD/modify-guild-soundboard-sound) them, [send](#DOCS_RESOURCES_SOUNDBOARD/send-soundboard-sound) them in voice channels, and listen to other users playing them! +[Soundboard](/docs/resources/soundboard) is now available in the API! Apps can now [get](/docs/resources/soundboard#list-default-soundboard-sounds) soundboard sounds, [modify](/docs/resources/soundboard#modify-guild-soundboard-sound) them, [send](/docs/resources/soundboard#send-soundboard-sound) them in voice channels, and listen to other users playing them! diff --git a/docs/change-log/2024-02-12-enforced-nonces-on-create-message-endpoint.md b/docs/change-log/2024-02-12-enforced-nonces-on-create-message-endpoint.md index f470cd6d4e..ec6047161c 100644 --- a/docs/change-log/2024-02-12-enforced-nonces-on-create-message-endpoint.md +++ b/docs/change-log/2024-02-12-enforced-nonces-on-create-message-endpoint.md @@ -3,4 +3,4 @@ title: "Enforced Nonces on Create Message Endpoint" date: "2024-02-12" --- -The [Create message](#DOCS_RESOURCES_MESSAGE/create-message) endpoint now supports an `enforce_nonce` parameter. When set to true, the message will be deduped for the same sender within a few minutes. If a message was created with the same nonce, no new message will be created and the previous message will be returned instead. This behavior will become the default for this endpoint in a future API version. +The [Create message](/docs/resources/message#create-message) endpoint now supports an `enforce_nonce` parameter. When set to true, the message will be deduped for the same sender within a few minutes. If a message was created with the same nonce, no new message will be created and the previous message will be returned instead. This behavior will become the default for this endpoint in a future API version. diff --git a/docs/change-log/2024-03-15-guild-prune-requiring.md b/docs/change-log/2024-03-15-guild-prune-requiring.md index abea38f074..662f2611a6 100644 --- a/docs/change-log/2024-03-15-guild-prune-requiring.md +++ b/docs/change-log/2024-03-15-guild-prune-requiring.md @@ -4,5 +4,5 @@ date: "2024-03-15" breaking: true --- -The [Get Guild Prune Count](#DOCS_RESOURCES_GUILD/get-guild-prune-count) and [Begin Guild Prune](#DOCS_RESOURCES_GUILD/begin-guild-prune) +The [Get Guild Prune Count](/docs/resources/guild#get-guild-prune-count) and [Begin Guild Prune](/docs/resources/guild#begin-guild-prune) endpoints now require the `MANAGE_GUILD` permission alongside the existing `KICK_MEMBERS` requirement `₍^ >ヮ<^₎ .ᐟ.ᐟ`. diff --git a/docs/change-log/2024-03-18-discord-activities-developer-preview-of-the-embedded-app-sdk.md b/docs/change-log/2024-03-18-discord-activities-developer-preview-of-the-embedded-app-sdk.md index 5cbabc2278..0895b7fa8a 100644 --- a/docs/change-log/2024-03-18-discord-activities-developer-preview-of-the-embedded-app-sdk.md +++ b/docs/change-log/2024-03-18-discord-activities-developer-preview-of-the-embedded-app-sdk.md @@ -10,8 +10,8 @@ Discord Developers can now build Activities! Activities are interactive, multiplayer experiences that run in an iframe in Discord. In order to make the communication between your experience and Discord, we've introduced the Embedded App SDK to assist in communicating between your app and the Discord client. -* New [Discord Activities](#DOCS_ACTIVITIES_OVERVIEW) developer docs with a tutorial, code samples, development guides, and design principles. +* New [Discord Activities](/docs/activities/overview) developer docs with a tutorial, code samples, development guides, and design principles. * The Embedded App SDK is now available via [npm](https://npmjs.com/package/@discord/embedded-app-sdk) and [GitHub](http://github.com/discord/embedded-app-sdk). -* The [Embedded App SDK Reference](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) is now available. +* The [Embedded App SDK Reference](/docs/developer-tools/embedded-app-sdk) is now available. -To learn more about how to get started building your own Activity, check out the [Activities Overview](#DOCS_ACTIVITIES_OVERVIEW). +To learn more about how to get started building your own Activity, check out the [Activities Overview](/docs/activities/overview). diff --git a/docs/change-log/2024-03-18-user-installable-apps-preview.md b/docs/change-log/2024-03-18-user-installable-apps-preview.md index de59d9c7a9..7809adf6f0 100644 --- a/docs/change-log/2024-03-18-user-installable-apps-preview.md +++ b/docs/change-log/2024-03-18-user-installable-apps-preview.md @@ -7,7 +7,7 @@ topics: Apps can now be installed to users—making them easier to install, discover, and access across Discord. User-installed apps can be used across all of a user's servers, within their (G)DMs, and in DMs with the app's bot user. -When creating or updating your app, you can choose which installation types your app supports on the **Installation** page in your [app's settings](https://discord.com/developers/applications). To quickly get started, you can follow the new [Developing a User-Installable App tutorial](#DOCS_TUTORIALS_DEVELOPING_A_USER_INSTALLABLE_APP) or read details about the new changes below. +When creating or updating your app, you can choose which installation types your app supports on the **Installation** page in your [app's settings](https://discord.com/developers/applications). To quickly get started, you can follow the new [Developing a User-Installable App tutorial](/docs/tutorials/develing-a-user-installable-app) or read details about the new changes below. This change introduces new concepts and fields across the API that apps will now encounter— @@ -15,24 +15,24 @@ This change introduces new concepts and fields across the API that apps will now **Concepts:** -* [Installation context](#DOCS_RESOURCES_APPLICATION/installation-context) defines how an app was installed: to a user, a guild (server), or both. Currently, apps will default to only support the guild installation context, but the default may change in the future. +* [Installation context](/docs/resources/application#installation-context) defines how an app was installed: to a user, a guild (server), or both. Currently, apps will default to only support the guild installation context, but the default may change in the future. * Commands can also support one or both installation contexts, with the default being the same as the app's supported installation context(s) at the time of command creation. -* [Interaction context](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) defines where a command can be used in Discord—within guilds, DM with your app's bot user, and/or within group DMs and DMs other than with your app's bot user. +* [Interaction context](/docs/interactions/application-commands#interaction-contexts) defines where a command can be used in Discord—within guilds, DM with your app's bot user, and/or within group DMs and DMs other than with your app's bot user. * The installation flow for apps have been updated so users can select whether they want to install an app to their account or to a server. **API Fields:** -* New `integration_types_config` field for [Applications](#DOCS_RESOURCES_APPLICATION/application-object) include the default scopes and permissions for app's supported installation contexts -* New `integration_types` and `contexts` fields for [Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) are the supported [installation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/installation-context) and [interaction](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) contexts (respectively) for the command. Read [command contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts) documentation for details. -* New `context` field for [Interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) indicates the [interaction context](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) where an interaction was triggered from. -* New `authorizing_integration_owners` field for [Interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) includes a mapping of installation contexts that the interaction was authorized for, to related snowflakes for that context. Read [Authorizing Integration Owners Object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) for details. -* `app_permissions` is now always serialized for interactions to indicate what [permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) your app has access to in the context its' responding. For (G)DMs with other users, it will include the `ATTACH_FILES | EMBED_LINKS | MENTION_EVERYONE`, and for DMs with the app's bot user it will also contain `USE_EXTERNAL_EMOJIS` for the bot’s DM -* New `interaction_metadata` on [Messages](#DOCS_RESOURCES_MESSAGE/message-object) that are created as part of an interaction response (either a response or follow-up). See [Message Interaction Metadata Object](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object) for details. -* `dm_permission` field for [Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) is deprecated. Apps should use `contexts` instead. -* `interaction` field for [Messages](#DOCS_RESOURCES_MESSAGE/message-object) is deprecated. Apps should use `interaction_metadata` instead. +* New `integration_types_config` field for [Applications](/docs/resources/application#application-object) include the default scopes and permissions for app's supported installation contexts +* New `integration_types` and `contexts` fields for [Commands](/docs/interactions/application-commands#application-command-object-application-command-structure) are the supported [installation](/docs/interactions/application-commands#installation-context) and [interaction](/docs/interactions/application-commands#interaction-contexts) contexts (respectively) for the command. Read [command contexts](/docs/interactions/application-commands#contexts) documentation for details. +* New `context` field for [Interactions](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) indicates the [interaction context](/docs/interactions/application-commands#interaction-contexts) where an interaction was triggered from. +* New `authorizing_integration_owners` field for [Interactions](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) includes a mapping of installation contexts that the interaction was authorized for, to related snowflakes for that context. Read [Authorizing Integration Owners Object](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) for details. +* `app_permissions` is now always serialized for interactions to indicate what [permissions](/docs/topics/permissions#permissions-bitwise-permission-flags) your app has access to in the context its' responding. For (G)DMs with other users, it will include the `ATTACH_FILES | EMBED_LINKS | MENTION_EVERYONE`, and for DMs with the app's bot user it will also contain `USE_EXTERNAL_EMOJIS` for the bot’s DM +* New `interaction_metadata` on [Messages](/docs/resources/message#message-object) that are created as part of an interaction response (either a response or follow-up). See [Message Interaction Metadata Object](/docs/resources/message#message-interaction-metadata-object) for details. +* `dm_permission` field for [Commands](/docs/interactions/application-commands#application-command-object-application-command-structure) is deprecated. Apps should use `contexts` instead. +* `interaction` field for [Messages](/docs/resources/message#message-object) is deprecated. Apps should use `interaction_metadata` instead. ###### Limitations and Known Issues * During the preview, interaction responses for the user installation context will be forced to be ephemeral in servers with over 25 members. Forced ephemerality is enforced at the client-level, so your app does not need to manually pay attention to server size, and will not receive errors via the API. -* All [follow-up messages](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/followup-messages) are currently forced to be ephemeral in DMs +* All [follow-up messages](/docs/interactions/receiving-and-responding#followup-messages) are currently forced to be ephemeral in DMs * Follow-up messages have a bug where they will not correctly respect user permissions diff --git a/docs/change-log/2024-04-02-csv-export-for-premium-app-analytics.md b/docs/change-log/2024-04-02-csv-export-for-premium-app-analytics.md index 8017e31bbe..822894bfbf 100644 --- a/docs/change-log/2024-04-02-csv-export-for-premium-app-analytics.md +++ b/docs/change-log/2024-04-02-csv-export-for-premium-app-analytics.md @@ -3,6 +3,6 @@ title: "CSV Export for Premium App Analytics" date: "2024-04-02" --- -For apps with [Monetization](#DOCS_MONETIZATION_OVERVIEW) enabled, we have released the ability to export your SKU analytics to CSV. These exports allow you to use your preferred data tools to report on your premium offerings. +For apps with [Monetization](/docs/monetization/overview) enabled, we have released the ability to export your SKU analytics to CSV. These exports allow you to use your preferred data tools to report on your premium offerings. You can find the export at the bottom of the `Monetization → Analytics` tab of your app to export data points such as `sales_count`, `sales_amount`, `sales_currencies`, `cancellation_count`, `refund_amount`, and `refund_count`, aggregated by each of your offerings for the selected month. diff --git a/docs/change-log/2024-04-23-modify-guild-member-flags-field-permissions.md b/docs/change-log/2024-04-23-modify-guild-member-flags-field-permissions.md index 3a93201044..71adb19bf8 100644 --- a/docs/change-log/2024-04-23-modify-guild-member-flags-field-permissions.md +++ b/docs/change-log/2024-04-23-modify-guild-member-flags-field-permissions.md @@ -3,4 +3,4 @@ title: "Modify Guild Member flags field permissions" date: "2024-04-23" --- -Update permissions necessary to modify the `flags` field when calling the [Modify Guild Member](#DOCS_RESOURCES_GUILD/modify-guild-member) endpoint. +Update permissions necessary to modify the `flags` field when calling the [Modify Guild Member](/docs/resources/guild#modify-guild-member) endpoint. diff --git a/docs/change-log/2024-04-24-premium-apps-one-time-purchases-and-store.md b/docs/change-log/2024-04-24-premium-apps-one-time-purchases-and-store.md index 1169dcb856..6ce8562e40 100644 --- a/docs/change-log/2024-04-24-premium-apps-one-time-purchases-and-store.md +++ b/docs/change-log/2024-04-24-premium-apps-one-time-purchases-and-store.md @@ -10,19 +10,19 @@ Two new features are now available for Premium Apps: One-Time Purchases and Stor * **Durable Items**: A one-time purchase that is permanent and is not subject to either renewal or consumption, such as lifetime access to an app's premium features. * **Consumable Items**: A one-time, non-renewable purchase that provides access, such as a temporary power-up or boost in a game. -Learn more about [Implementing One-Time Purchases](#DOCS_MONETIZATION_IMPLEMENTING_ONE_TIME_PURCHASES). +Learn more about [Implementing One-Time Purchases](/docs/monetization/implementing-one-time-purchases). **A Store for Your Premium App** We have also introduced a Store for your Premium App to showcase your app subscriptions and one-time purchase items. You can now create a unique Store page within the developer portal and add your published subscription SKUs or one-time purchase SKUs to your store view, allowing your users to buy these items from your App Directory or Bot User Profile. -To explore these features, eligibility details, and how to enable monetization for your app, check out the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW). +To explore these features, eligibility details, and how to enable monetization for your app, check out the [Monetization Overview](/docs/monetization/overview). **API Documentation Updates** The following were added to our public Monetization documentation with this update: -* New [SKU Object Types](#DOCS_RESOURCES_SKU/sku-object-sku-types) -* New [Entitlement Object Types](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object-entitlement-types) -* [Consume an Entitlement](#DOCS_RESOURCES_ENTITLEMENT/consume-an-entitlement) API endpoint -* `consumed` field on the [Entitlement](#DOCS_RESOURCES_ENTITLEMENT) resource +* New [SKU Object Types](/docs/resources/sku#sku-object-sku-types) +* New [Entitlement Object Types](/docs/resources/entitlement#entitlement-object-entitlement-types) +* [Consume an Entitlement](/docs/resources/entitlement#consume-an-entitlement) API endpoint +* `consumed` field on the [Entitlement](/docs/resources/entitlement) resource diff --git a/docs/change-log/2024-05-31-auto-moderation-member-profile-rule.md b/docs/change-log/2024-05-31-auto-moderation-member-profile-rule.md index f52a1385e3..59313f9694 100644 --- a/docs/change-log/2024-05-31-auto-moderation-member-profile-rule.md +++ b/docs/change-log/2024-05-31-auto-moderation-member-profile-rule.md @@ -3,5 +3,5 @@ title: "Auto Moderation Member Profile Rule" date: "2024-05-31" --- -* Add Auto Moderation `MEMBER_PROFILE` rule [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types). This rule type will check if a member's profile contains disallowed keywords. -* Add Auto Moderation `BLOCK_MEMBER_INTERACTION` [action type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-types) currently available for the `MEMBER_PROFILE` rule [trigger\_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types). This action will "quarantine" the member to some extent and prevent them from performing most interactions within a specific server. +* Add Auto Moderation `MEMBER_PROFILE` rule [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types). This rule type will check if a member's profile contains disallowed keywords. +* Add Auto Moderation `BLOCK_MEMBER_INTERACTION` [action type](/docs/resources/auto-moderation#auto-moderation-action-object-action-types) currently available for the `MEMBER_PROFILE` rule [trigger\_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types). This action will "quarantine" the member to some extent and prevent them from performing most interactions within a specific server. diff --git a/docs/change-log/2024-06-17-premium-apps-new-premium-button-style-deep-linking-url-schemes.md b/docs/change-log/2024-06-17-premium-apps-new-premium-button-style-deep-linking-url-schemes.md index 92015d1e85..d56b8f4c94 100644 --- a/docs/change-log/2024-06-17-premium-apps-new-premium-button-style-deep-linking-url-schemes.md +++ b/docs/change-log/2024-06-17-premium-apps-new-premium-button-style-deep-linking-url-schemes.md @@ -5,20 +5,20 @@ date: "2024-06-17" **New Premium Button Style** -Introduces a new `premium` [button style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles) to be used with a `sku_id` which points to an active [SKU](#DOCS_RESOURCES_SKU/sku-object). This allows developers to customize their premium experience by returning specific subscription or one-time purchase products. +Introduces a new `premium` [button style](/docs/interactions/message-components#button-object-button-styles) to be used with a `sku_id` which points to an active [SKU](/docs/resources/sku#sku-object). This allows developers to customize their premium experience by returning specific subscription or one-time purchase products. -Learn more about using [button components with interactions](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/buttons). +Learn more about using [button components with interactions](/docs/interactions/message-components#buttons). > warn > This change deprecates Interaction Response Type 10 -The `PREMIUM_REQUIRED (10)` interaction response type is now deprecated in favor of using custom premium buttons. This will continue to function but may be eventually unsupported. It is recommended to migrate your bots to use the more flexible [premium button component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles). +The `PREMIUM_REQUIRED (10)` interaction response type is now deprecated in favor of using custom premium buttons. This will continue to function but may be eventually unsupported. It is recommended to migrate your bots to use the more flexible [premium button component](/docs/interactions/message-components#button-object-button-styles). -Learn more about [gating features with premium interactions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/prompting-users-to-subscribe). +Learn more about [gating features with premium interactions](/docs/monetization/implementing-app-subscriptions#prompting-users-to-subscribe). **Deep Linking URL Schemes for SKUs and Store** Introduces two new url schemes for linking directly to the Application Directory. When these links are used in chat, they are rendered as rich embeds that users can interact with to launch an app's store or open a SKU detail modal. -* New [Store URL Scheme](#DOCS_MONETIZATION_MANAGING_SKUS/linking-to-your-store): `https://discord.com/application-directory/:appID/store` -* New [SKU URL Scheme](#DOCS_MONETIZATION_MANAGING_SKUS/linking-to-a-specific-sku): `https://discord.com/application-directory/:appID/store/:skuID` +* New [Store URL Scheme](/docs/monetization/managing-skus#linking-to-your-store): `https://discord.com/application-directory/:appID/store` +* New [SKU URL Scheme](/docs/monetization/managing-skus#linking-to-a-specific-sku): `https://discord.com/application-directory/:appID/store/:skuID` diff --git a/docs/change-log/2024-06-27-user-installed-apps-general-availability.md b/docs/change-log/2024-06-27-user-installed-apps-general-availability.md index 59b1a9fb75..86923c9485 100644 --- a/docs/change-log/2024-06-27-user-installed-apps-general-availability.md +++ b/docs/change-log/2024-06-27-user-installed-apps-general-availability.md @@ -4,27 +4,27 @@ date: "2024-06-27" breaking: true --- -Back in March, we announced [the beta for user-installed apps](#DOCS_CHANGE_LOG/userinstallable-apps-preview). After listening and making updates based on feedback from developers and modmins, we're excited to announce that user-installed apps are now considered generally available and can be used in all servers (regardless of size). +Back in March, we announced [the beta for user-installed apps](/docs/change-log#userinstallable-apps-preview). After listening and making updates based on feedback from developers and modmins, we're excited to announce that user-installed apps are now considered generally available and can be used in all servers (regardless of size). With this update, there are a few API and behavioral updates for user-installed apps. ###### API Updates -* `user_id` has been removed from the `interaction_metadata` field on messages. Instead, you can use the `id` field in the nested `user` object. See the [Message Interaction Metadata Object](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object) for details. -* User-installed apps are now limited to creating a maximum of 5 [follow-ups](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/followup-messages) when responding to interactions. This only affects the [Create Followup Message endpoint](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/create-followup-message), and apps installed to the server are unaffected. -* On [Interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure), the value of `authorizing_integration_owners` is now correctly serialized as a string. Previously, the `"0"` value was incorrectly serialized as a number. -* `app_permissions` on [Interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) now correctly represents the permissions for user-installed apps. Previously, the value was incorrect for user-installed apps. -* Updating a message can result in a `400` response if the content of the message was blocked by AutoMod, which may be particularly important for [deferred messages](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/responding-to-an-interaction). +* `user_id` has been removed from the `interaction_metadata` field on messages. Instead, you can use the `id` field in the nested `user` object. See the [Message Interaction Metadata Object](/docs/resources/message#message-interaction-metadata-object) for details. +* User-installed apps are now limited to creating a maximum of 5 [follow-ups](/docs/interactions/receiving-and-responding#followup-messages) when responding to interactions. This only affects the [Create Followup Message endpoint](/docs/interactions/receiving-and-responding#create-followup-message), and apps installed to the server are unaffected. +* On [Interactions](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure), the value of `authorizing_integration_owners` is now correctly serialized as a string. Previously, the `"0"` value was incorrectly serialized as a number. +* `app_permissions` on [Interactions](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) now correctly represents the permissions for user-installed apps. Previously, the value was incorrect for user-installed apps. +* Updating a message can result in a `400` response if the content of the message was blocked by AutoMod, which may be particularly important for [deferred messages](/docs/interactions/receiving-and-responding#responding-to-an-interaction). * Interaction responses are no longer forced to be ephemeral for servers with over 25 members. ###### New `Use External Apps` Permission -A new [`USE_EXTERNAL_APPS` (`1 << 50`) permission](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) was added, and is enabled for servers by default. The new permission lets modmins control whether user-installed apps can post public replies in a server. If `Use External Apps` is disabled and your app is *not* installed to the server, your app’s responses will be ephemeral for the end user. +A new [`USE_EXTERNAL_APPS` (`1 << 50`) permission](/docs/topics/permissions#permissions-bitwise-permission-flags) was added, and is enabled for servers by default. The new permission lets modmins control whether user-installed apps can post public replies in a server. If `Use External Apps` is disabled and your app is *not* installed to the server, your app’s responses will be ephemeral for the end user. Read more in the [Moderating Apps on Discord Help Center article](https://support.discord.com/hc/en-us/articles/23957313048343-Moderating-Apps-on-Discord#h_01HZQQQEADYVN2CM4AX4EZGKHM). ###### Updated Defaults for New Apps -* Newly-created apps now default to having both "User Install" *and* "Guild Install" [installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context) enabled. This can be updated in the **Installation** tab in an [app's settings](https://discord.com/developers/applications). -* Newly-created apps now default to using the "Discord Provided Link" [install link](#DOCS_RESOURCES_APPLICATION/install-links). This can be updated in the **Installation** tab in an [app's settings](https://discord.com/developers/applications). +* Newly-created apps now default to having both "User Install" *and* "Guild Install" [installation contexts](/docs/resources/application#installation-context) enabled. This can be updated in the **Installation** tab in an [app's settings](https://discord.com/developers/applications). +* Newly-created apps now default to using the "Discord Provided Link" [install link](/docs/resources/application#install-links). This can be updated in the **Installation** tab in an [app's settings](https://discord.com/developers/applications). * If Discord Provided Link is selected as the install link type, `application.commands` scope is added to both installation contexts. diff --git a/docs/change-log/2024-07-09-banners-in-get-current-user-guilds.md b/docs/change-log/2024-07-09-banners-in-get-current-user-guilds.md index 7dae4674b7..01bd2d7777 100644 --- a/docs/change-log/2024-07-09-banners-in-get-current-user-guilds.md +++ b/docs/change-log/2024-07-09-banners-in-get-current-user-guilds.md @@ -3,4 +3,4 @@ title: "Banners in Get Current User Guilds" date: "2024-07-09" --- -[`GET /users/@me/guilds`](#DOCS_RESOURCES_USER/get-current-user-guilds) now includes each guild's `banner` field! This enables apps using OAuth2 with the `guilds` scope to display guild banners. +[`GET /users/@me/guilds`](/docs/resources/user#get-current-user-guilds) now includes each guild's `banner` field! This enables apps using OAuth2 with the `guilds` scope to display guild banners. diff --git a/docs/change-log/2024-07-15-message-forwarding-rollout.md b/docs/change-log/2024-07-15-message-forwarding-rollout.md index 50316aec36..effebd5e77 100644 --- a/docs/change-log/2024-07-15-message-forwarding-rollout.md +++ b/docs/change-log/2024-07-15-message-forwarding-rollout.md @@ -3,7 +3,7 @@ title: "Message Forwarding rollout" date: "2024-07-15" --- -We are slowly rolling out the message forwarding feature to users. This feature allows callers to create a message using `message_reference.type = FORWARD` and have the API generate a `message_snapshot` for the sent message. The feature has [some limitations](#DOCS_RESOURCES_MESSAGE/message-reference-types) and the snapshot is a minimal version of a standard `MessageObject`, but does capture the core parts of a message. +We are slowly rolling out the message forwarding feature to users. This feature allows callers to create a message using `message_reference.type = FORWARD` and have the API generate a `message_snapshot` for the sent message. The feature has [some limitations](/docs/resources/message#message-reference-types) and the snapshot is a minimal version of a standard `MessageObject`, but does capture the core parts of a message. The resulting message will look something like: @@ -37,5 +37,5 @@ We have applied stricter rate limits for this feature based on the following: This was [previously announced](https://discord.com/channels/613425648685547541/697138785317814292/1233463756160503859) but note that the final API has a few changes since the API was first previewed: -* [`message snapshot`](#DOCS_RESOURCES_MESSAGE/message-snapshot-object) objects don't include a `guild` field anymore since the `message_reference` already provides that information +* [`message snapshot`](/docs/resources/message#message-snapshot-object) objects don't include a `guild` field anymore since the `message_reference` already provides that information * forwarded messages have a distinctive `message_reference` type of `FORWARD` now diff --git a/docs/change-log/2024-07-16-member-banners.md b/docs/change-log/2024-07-16-member-banners.md index 6877385d6b..96796b6029 100644 --- a/docs/change-log/2024-07-16-member-banners.md +++ b/docs/change-log/2024-07-16-member-banners.md @@ -4,4 +4,4 @@ date: "2024-07-16" breaking: false --- -Apps can now access guild member profile banners via the API and Gateway! The [guild member object](#DOCS_RESOURCES_GUILD/guild-member-object) now includes a `banner` field which can be used to create the [guild member banner URL](#DOCS_REFERENCE/image-formatting). \ No newline at end of file +Apps can now access guild member profile banners via the API and Gateway! The [guild member object](/docs/resources/guild#guild-member-object) now includes a `banner` field which can be used to create the [guild member banner URL](/docs/reference#image-formatting). \ No newline at end of file diff --git a/docs/change-log/2024-07-17-activities-proxy-csp-update.md b/docs/change-log/2024-07-17-activities-proxy-csp-update.md index 0d03d3b793..55604e2390 100644 --- a/docs/change-log/2024-07-17-activities-proxy-csp-update.md +++ b/docs/change-log/2024-07-17-activities-proxy-csp-update.md @@ -15,6 +15,6 @@ our CSP will be updated as follows: * Only allowed paths on `cdn.discordapp.com` and `media.discordapp.net` will be permitted such as `/attachments/`, `/icons/`, and `/avatars/`. * nested child iframes must also mount paths prepended by `/.proxy/` -As of [embedded-app-sdk v1.4.0](https://github.com/discord/embedded-app-sdk/releases/tag/v1.4.0) we have updated `patchUrlMappings` to automatically route requests through `/.proxy/`, so updating your SDK version calling `patchUrlMappings` is a good first step. If you are unfamiliar with `patchUrlMappings`, please consult the [documentation](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/using-external-resources). +As of [embedded-app-sdk v1.4.0](https://github.com/discord/embedded-app-sdk/releases/tag/v1.4.0) we have updated `patchUrlMappings` to automatically route requests through `/.proxy/`, so updating your SDK version calling `patchUrlMappings` is a good first step. If you are unfamiliar with `patchUrlMappings`, please consult the [documentation](/docs/activities/development-guides#using-external-resources). All Application IDs created after `07/17/2024 12:00:00` UTC (applicationID greater than `1263102905548800000`) will also automatically have the new CSP applied. Testing your production code on a new application created after this date is a suggested way for developers to test compliance with this new CSP. diff --git a/docs/change-log/2024-07-18-application-emoji.md b/docs/change-log/2024-07-18-application-emoji.md index 704bed1f84..936e991605 100644 --- a/docs/change-log/2024-07-18-application-emoji.md +++ b/docs/change-log/2024-07-18-application-emoji.md @@ -7,4 +7,4 @@ You can now upload emojis for your application in your [app's settings](https:// * Up to 2000 emojis per app * Support for user-installable apps -* Can be [managed via the API](#DOCS_RESOURCES_EMOJI/create-application-emoji) with a bot token +* Can be [managed via the API](/docs/resources/emoji#create-application-emoji) with a bot token diff --git a/docs/change-log/2024-07-25-supported-activity-types-for-set-activity.md b/docs/change-log/2024-07-25-supported-activity-types-for-set-activity.md index 58413a6b93..0cf982df94 100644 --- a/docs/change-log/2024-07-25-supported-activity-types-for-set-activity.md +++ b/docs/change-log/2024-07-25-supported-activity-types-for-set-activity.md @@ -3,7 +3,7 @@ title: "Supported Activity Types for SET_ACTIVITY" date: "2024-07-25" --- -The [`SET_ACTIVITY` RPC command](#DOCS_TOPICS_RPC/setactivity) has been updated to support 3 additional [activity types](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-types): Listening (`2`), Watching (`3`), and Competing (`5`). Previously, it only accepted Playing (`0`). +The [`SET_ACTIVITY` RPC command](/docs/topics/rpc#setactivity) has been updated to support 3 additional [activity types](/docs/events/gateway-events#activity-object-activity-types): Listening (`2`), Watching (`3`), and Competing (`5`). Previously, it only accepted Playing (`0`). > warn -> The [Game SDK](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activities) has not been updated to support setting [`ActivityType`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitytype-enum), and is still limited to read-only (to handle events that you receive from Discord). +> The [Game SDK](/docs/developer-tools/game-sdk#activities) has not been updated to support setting [`ActivityType`](/docs/developer-tools/game-sdk#activitytype-enum), and is still limited to read-only (to handle events that you receive from Discord). diff --git a/docs/change-log/2024-08-05-voice-state-endpoints.md b/docs/change-log/2024-08-05-voice-state-endpoints.md index c3e05bee3e..3b4b23172d 100644 --- a/docs/change-log/2024-08-05-voice-state-endpoints.md +++ b/docs/change-log/2024-08-05-voice-state-endpoints.md @@ -6,4 +6,4 @@ topics: - "HTTP API" --- -Voice states can now be accessed over the HTTP API! Apps can use the new [Get Current User Voice State](#DOCS_RESOURCES_VOICE/get-current-user-voice-state) and [Get User Voice State](#DOCS_RESOURCES_VOICE/get-user-voice-state) endpoints to fetch a user's voice state without a Gateway connection. +Voice states can now be accessed over the HTTP API! Apps can use the new [Get Current User Voice State](/docs/resources/voice#get-current-user-voice-state) and [Get User Voice State](/docs/resources/voice#get-user-voice-state) endpoints to fetch a user's voice state without a Gateway connection. diff --git a/docs/change-log/2024-08-09-user-app-install-count.md b/docs/change-log/2024-08-09-user-app-install-count.md index bcfdacaad9..9d1a917aaf 100644 --- a/docs/change-log/2024-08-09-user-app-install-count.md +++ b/docs/change-log/2024-08-09-user-app-install-count.md @@ -5,4 +5,4 @@ topics: - "User Apps" --- -We've added an approximate user install count to the [Application object](#DOCS_RESOURCES_APPLICATION/application-object) for user-installable apps. You can also view an app's install counts in the developer portal. +We've added an approximate user install count to the [Application object](/docs/resources/application#application-object) for user-installable apps. You can also view an app's install counts in the developer portal. diff --git a/docs/change-log/2024-08-12-get-guild-role-endpoint.md b/docs/change-log/2024-08-12-get-guild-role-endpoint.md index ff16560610..3258729758 100644 --- a/docs/change-log/2024-08-12-get-guild-role-endpoint.md +++ b/docs/change-log/2024-08-12-get-guild-role-endpoint.md @@ -5,4 +5,4 @@ topics: - "HTTP API" --- -Need to get just one role, not the whole role list? Use the new [Get Guild Role](#DOCS_RESOURCES_GUILD/get-guild-role) endpoint to fetch a single role by ID. +Need to get just one role, not the whole role list? Use the new [Get Guild Role](/docs/resources/guild#get-guild-role) endpoint to fetch a single role by ID. diff --git a/docs/change-log/2024-08-13-voice-encryption-modes.md b/docs/change-log/2024-08-13-voice-encryption-modes.md index 279b120ad1..d4472c154d 100644 --- a/docs/change-log/2024-08-13-voice-encryption-modes.md +++ b/docs/change-log/2024-08-13-voice-encryption-modes.md @@ -5,7 +5,7 @@ topics: - "Voice" --- -Added documentation for voice [encryption modes](#DOCS_TOPICS_VOICE_CONNECTIONS/transport-encryption-modes) `aead_aes256_gcm_rtpsize` and `aead_xchacha20_poly1305_rtpsize` while announcing the deprecation of all `xsalsa20_poly1305*` variants and `aead_aes256_gcm`. Deprecated encryption modes will be discontinued as of November 18th, 2024. +Added documentation for voice [encryption modes](/docs/topics/voice-connections#transport-encryption-modes) `aead_aes256_gcm_rtpsize` and `aead_xchacha20_poly1305_rtpsize` while announcing the deprecation of all `xsalsa20_poly1305*` variants and `aead_aes256_gcm`. Deprecated encryption modes will be discontinued as of November 18th, 2024. > danger > Deprecated encryption modes will be discontinued as of November 18th, 2024. diff --git a/docs/change-log/2024-08-13-voice-gateway-version-8-and-deprecation-of-versions-older-than-4.md b/docs/change-log/2024-08-13-voice-gateway-version-8-and-deprecation-of-versions-older-than-4.md index 94a5b86fea..1409c7d0c2 100644 --- a/docs/change-log/2024-08-13-voice-gateway-version-8-and-deprecation-of-versions-older-than-4.md +++ b/docs/change-log/2024-08-13-voice-gateway-version-8-and-deprecation-of-versions-older-than-4.md @@ -8,8 +8,8 @@ topics: We are officially deprecating some very old voice gateway versions (> 7 years ago). -* The voice gateway now supports a resume which re-sends lost messages. Use voice gateway version 8 and refer to [Buffered Resume](#DOCS_TOPICS_VOICE_CONNECTIONS/buffered-resume). +* The voice gateway now supports a resume which re-sends lost messages. Use voice gateway version 8 and refer to [Buffered Resume](/docs/topics/voice-connections#buffered-resume). * We have removed the default option for voice gateway version. Once this is deprecated, you must pass a voice gateway version. > danger -> You will be required to pass a voice gateway version and deprecated voice gateway versions will be discontinued as of November 18th, 2024. See [Voice Gateway Versioning](#DOCS_TOPICS_VOICE_CONNECTIONS/voice-gateway-versioning) for futher details. +> You will be required to pass a voice gateway version and deprecated voice gateway versions will be discontinued as of November 18th, 2024. See [Voice Gateway Versioning](/docs/topics/voice-connections#voice-gateway-versioning) for futher details. diff --git a/docs/change-log/2024-08-26-entry-point-commands.md b/docs/change-log/2024-08-26-entry-point-commands.md index 68506731c1..99bf9f853a 100644 --- a/docs/change-log/2024-08-26-entry-point-commands.md +++ b/docs/change-log/2024-08-26-entry-point-commands.md @@ -6,14 +6,14 @@ topics: - "Interactions" --- -Apps with [Activities](#DOCS_ACTIVITIES_OVERVIEW) enabled can now create [Entry Point commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands) using the `PRIMARY_ENTRY_POINT` (type `4`) [command type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types). Apps are limited to one globally-scoped Entry Point command, which appears in the App Launcher. +Apps with [Activities](/docs/activities/overview) enabled can now create [Entry Point commands](/docs/interactions/application-commands#entry-point-commands) using the `PRIMARY_ENTRY_POINT` (type `4`) [command type](/docs/interactions/application-commands#application-command-object-application-command-types). Apps are limited to one globally-scoped Entry Point command, which appears in the App Launcher. -When creating or updating an Entry Point command, an [Entry Point handler](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-entry-point-command-handler-types) can be defined using the [`handler` field](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure). The `handler` field determines whether your app wants to manually handle responding to the interaction: +When creating or updating an Entry Point command, an [Entry Point handler](/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types) can be defined using the [`handler` field](/docs/interactions/application-commands#application-command-object-application-command-structure). The `handler` field determines whether your app wants to manually handle responding to the interaction: - If the value is `DISCORD_LAUNCH_ACTIVITY` (`2`), Discord will automatically handle the interaction and send a follow-up message to the channel where the Entry Point command was invoked from. -- If the value is `APP_HANDLER` (`1`), your app will receive an interaction token and will be responsible for responding to the interaction. In this case, you can launch your Activity using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type). +- If the value is `APP_HANDLER` (`1`), your app will receive an interaction token and will be responsible for responding to the interaction. In this case, you can launch your Activity using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type). -More details about Entry Point commands can be found in the [Application Commands documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands) and in the [Activity development guide](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/setting-up-an-entry-point-command). +More details about Entry Point commands can be found in the [Application Commands documentation](/docs/interactions/application-commands#entry-point-commands) and in the [Activity development guide](/docs/activities/development-guides#setting-up-an-entry-point-command). ### Default Entry Point Commands -Starting today, when you enable Activities in your [app's settings](http://discord.com/developers/applications), a [default Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/default-entry-point-command) called "Launch" will automatically be created for your app. This can be customized or deleted like other commands if you want to update the name or handler type. \ No newline at end of file +Starting today, when you enable Activities in your [app's settings](http://discord.com/developers/applications), a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) called "Launch" will automatically be created for your app. This can be customized or deleted like other commands if you want to update the name or handler type. \ No newline at end of file diff --git a/docs/change-log/2024-08-26-launching-activities-via-interactions.md b/docs/change-log/2024-08-26-launching-activities-via-interactions.md index 0adaced731..674281d66d 100644 --- a/docs/change-log/2024-08-26-launching-activities-via-interactions.md +++ b/docs/change-log/2024-08-26-launching-activities-via-interactions.md @@ -6,4 +6,4 @@ topics: - "Interactions" --- -[Activities](#DOCS_ACTIVITIES_OVERVIEW) can now be launched as a response to interactions using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type). `LAUNCH_ACTIVITY` can be used in response to `APPLICATION_COMMAND`, `MESSAGE_COMPONENT`, and `MODAL_SUBMIT` [interaction types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type). +[Activities](/docs/activities/overview) can now be launched as a response to interactions using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type). `LAUNCH_ACTIVITY` can be used in response to `APPLICATION_COMMAND`, `MESSAGE_COMPONENT`, and `MODAL_SUBMIT` [interaction types](/docs/interactions/receiving-and-responding#interaction-object-interaction-type). diff --git a/docs/change-log/2024-08-28-subscription-api-and-entitlement-migration.md b/docs/change-log/2024-08-28-subscription-api-and-entitlement-migration.md index b4dca89127..dc6939619e 100644 --- a/docs/change-log/2024-08-28-subscription-api-and-entitlement-migration.md +++ b/docs/change-log/2024-08-28-subscription-api-and-entitlement-migration.md @@ -7,44 +7,50 @@ breaking: true --- > info -> Updates to this Change Log entry was published on **October 7, 2024** to reflect up-to-date information. See the [new Change Log entry](#DOCS_CHANGE_LOG/updates-to-entitlement-migration-guide) for details on updates. +> Updates to this Change Log entry was published on **October 7, 2024** to reflect up-to-date information. See the [new Change Log entry](/docs/change-log#updates-to-entitlement-migration-guide) for details on updates. -We are migrating our entitlement system to a new behavior where entitlements will not end until explicitly canceled, representing a breaking change for subscription management. We are introducing a [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) and [Subscription Events](#DOCS_EVENTS_GATEWAY_EVENTS/subscriptions) to allow handling subscription-related events. +We are migrating our entitlement system to a new behavior where entitlements will not end until explicitly canceled, representing a breaking change for subscription management. We are introducing a [Subscription API](/docs/resources/subscription) and [Subscription Events](/docs/events/gateway-events#subscriptions) to allow handling subscription-related events. > warn > This change will be rolled out to all existing applications that have entitlements for user and guild subscription SKUs, starting on October 1, 2024. #### Entitlement Migration Details + - `ENTITLEMENT_CREATE` events will now be triggered with a null `ends_at` value for all ongoing subscriptions, indicating an indefinite entitlement. - `ENTITLEMENT_UPDATE` events will occur only when a subscription ends, with the `ends_at` value indicating the end date. - Discord-managed Subscription entitlements will have an `type` value of `PURCHASE` (type `1`) instead of `APPLICATION_SUBSCRIPTION` (type `8`). ### Migration Plan & Guide: + As of **October 1, 2024**, all existing entitlements that grant access to user-subscription and guild-subscription SKUs will automatically transfer to the new system on their renewal date. This means we will have a month-long migration window to allow all of your entitlements to migrate to the new system upon renewal. Developers are advised to update their systems to handle the new `ENTITLEMENT_CREATE` and `ENTITLEMENT_UPDATE` events according to the following migration guide before the rollout date to avoid service disruptions. ### Introducing a New Subscription API -With the new entitlement behavior, entitlements for subscription SKUs will no longer emit events at the start of a new subscription billing period. Instead, subscription lifecycle management can be handled through the new [Subscription API](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/using-the-subscription-api). -Developers should refer to the [Subscription resource](#DOCS_RESOURCES_SUBSCRIPTION) for information on calling the Subscription API and responding to Subscription events. For in-depth implementation details, see our [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/using-the-subscription-api) guide. You can start using this API now. + +With the new entitlement behavior, entitlements for subscription SKUs will no longer emit events at the start of a new subscription billing period. Instead, subscription lifecycle management can be handled through the new [Subscription API](/docs/monetization/implementing-app-subscriptions#using-the-subscription-api). +Developers should refer to the [Subscription resource](/docs/resources/subscription) for information on calling the Subscription API and responding to Subscription events. For in-depth implementation details, see our [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions#using-the-subscription-api) guide. You can start using this API now. ### Monetization Documentation Updates -As part of these changes, we've updated the documentation for Premium Apps. -- Created a new [Enabling Monetization](#DOCS_MONETIZATION_ENABLING_MONETIZATION) page to cover setting up your team, managing payouts, and enabling monetization for your apps -- Created a new [Managing SKUs](#DOCS_MONETIZATION_MANAGING_SKUS/creating-a-sku) page to document how to create, update, publish, and promote your SKUs -- Moved and added [Entitlement](#DOCS_RESOURCES_ENTITLEMENT), [SKU](#DOCS_RESOURCES_SKU) and [Subscription](#DOCS_RESOURCES_SUBSCRIPTION) resources to the **Resources** section -- Updated guides for [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS) and [Implementing One-Time Purchases](#DOCS_MONETIZATION_IMPLEMENTING_ONE_TIME_PURCHASES) + +As part of these changes, we've updated the documentation for Premium Apps. + +- Created a new [Enabling Monetization](/docs/monetization/enabling-monetization) page to cover setting up your team, managing payouts, and enabling monetization for your apps +- Created a new [Managing SKUs](/docs/monetization/managing-skus#creating-a-sku) page to document how to create, update, publish, and promote your SKUs +- Moved and added [Entitlement](/docs/resources/entitlement), [SKU](/docs/resources/sku) and [Subscription](/docs/resources/subscription) resources to the **Resources** section +- Updated guides for [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions) and [Implementing One-Time Purchases](/docs/monetization/implementing-one-time-purchases) ### Subscription Entitlement Migration Guide Starting on **October 1, 2024**, we will be migrating our existing entitlement system to a new behavior where **entitlements do not expire until explicitly canceled**. This migration guide outlines the changes and impacts of this migration on developers and guides how to manage these changes effectively. > warn -> With this update, entitlements for subscription SKUs will no longer emit events when a new subscription billing period begins. If you need to know when a subscription has been renewed, use the new [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) and related [Subscription Gateway Events](#DOCS_EVENTS_GATEWAY_EVENTS/subscriptions). +> With this update, entitlements for subscription SKUs will no longer emit events when a new subscription billing period begins. If you need to know when a subscription has been renewed, use the new [Subscription API](/docs/resources/subscription) and related [Subscription Gateway Events](/docs/events/gateway-events#subscriptions). ### Current System Currently, entitlements for Subscription SKUs purchased through Discord have: + - An `ends_at` date that corresponds to the subscription interval. This date is updated at each billing cycle. - A entitlement `type` value of `APPLICATION_SUBSCRIPTION` (type `8`). - An `ENTITLEMENT_UPDATE` event is triggered at the start of each new subscription period. @@ -52,9 +58,10 @@ Currently, entitlements for Subscription SKUs purchased through Discord have: ### New System Post-migration, entitlements for Subscription SKUs purchased through Discord will: -- No longer have an end date (`ends_at` will be `null`) until the user decides to cancel the subscription. -- Now have an entitlement `type` value of `PURCHASE` (type `1`). -- No `ENTITLEMENT_UPDATE` events will be triggered until the subscription is canceled. + +- No longer have an end date (`ends_at` will be `null`) until the user decides to cancel the subscription. +- Now have an entitlement `type` value of `PURCHASE` (type `1`). +- No `ENTITLEMENT_UPDATE` events will be triggered until the subscription is canceled. ### Migration Timeline @@ -78,17 +85,18 @@ Post-migration, entitlements for Subscription SKUs purchased through Discord wil - No new entitlement events will be generated for these cases. ### Developer Actions + - **Pre-Migration:** - Review and understand the new entitlement event structure. - Adjust your system to handle `ends_at` being null, which now indicates an indefinite entitlement. - Adjust your system not to expect type `APPLICATION_SUBSCRIPTION` (type `8`) for Discord-managed subscription entitlements. - **Post-Migration:** - Monitor for `ENTITLEMENT_CREATE`, `ENTITLEMENT_UPDATE`, `SUBSCRIPTION_CREATE`, and `SUBSCRIPTION_UPDATE` events. - - Update any references to an entitlement `ends_at` timestamps, which now indicate the ending of an entitlement. If you need to know when a subscription's period ends, use the [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) and related [Subscription Gateway Events](#DOCS_EVENTS_GATEWAY_EVENTS/subscriptions). + - Update any references to an entitlement `ends_at` timestamps, which now indicate the ending of an entitlement. If you need to know when a subscription's period ends, use the [Subscription API](/docs/resources/subscription) and related [Subscription Gateway Events](/docs/events/gateway-events#subscriptions). - The Entitlement Migration begins on October 1, 2024 - You have an existing user subscription that has an existing `ends_at` timestamp for October 10, 2024. - If the subscription renews successfully, you will receive an `ENTITLEMENT_CREATE` event on October 10, 2024, with an `ends_at` value of null - ~~If you receive an `ENTITLEMENT_UPDATE` event with an `ends_at` timestamp, the entitlement for this subscription is expected to end at the timestamp value unless you receive subsequent `ENTITLEMENT_UPDATE` events between the cancellation and the `ends_at` value.~~ - \ No newline at end of file + diff --git a/docs/change-log/2024-09-04-add-polls-when-editing-deferred-interaction-responses.md b/docs/change-log/2024-09-04-add-polls-when-editing-deferred-interaction-responses.md index fd182e7886..6b4bb2efce 100644 --- a/docs/change-log/2024-09-04-add-polls-when-editing-deferred-interaction-responses.md +++ b/docs/change-log/2024-09-04-add-polls-when-editing-deferred-interaction-responses.md @@ -5,4 +5,4 @@ topics: - "Interactions" --- -You can now create a poll while editing a deferred interaction response with the [Edit Original Interaction Response](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/edit-original-interaction-response) endpoint. Poll away! +You can now create a poll while editing a deferred interaction response with the [Edit Original Interaction Response](/docs/interactions/receiving-and-responding#edit-original-interaction-response) endpoint. Poll away! diff --git a/docs/change-log/2024-09-17-voice-e2ee-dave-protocol.md b/docs/change-log/2024-09-17-voice-e2ee-dave-protocol.md index ebf6ec07f1..a1b08e9069 100644 --- a/docs/change-log/2024-09-17-voice-e2ee-dave-protocol.md +++ b/docs/change-log/2024-09-17-voice-e2ee-dave-protocol.md @@ -5,13 +5,13 @@ topics: - "Voice" --- -Introduced [high-level documentation](#DOCS_TOPICS_VOICE_CONNECTIONS) for Discord's Audio and Video End-to-End Encryption (DAVE) protocol, and the [new voice gateway opcodes](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) required to support it +Introduced [high-level documentation](/docs/topics/voice-connections) for Discord's Audio and Video End-to-End Encryption (DAVE) protocol, and the [new voice gateway opcodes](/docs/topics/opcodes-and-status-codes#voice) required to support it ### **Developer Impact** Starting September 2024, Discord is migrating voice and video in DMs, Group DMs, voice channels, and Go Live streams to use end-to-end encryption (E2EE). -**Who this affects:** Any libraries or apps that support [Voice Connections](#DOCS_TOPICS_VOICE_CONNECTIONS). +**Who this affects:** Any libraries or apps that support [Voice Connections](/docs/topics/voice-connections). You are not immediately required to support the E2EE protocol, as calls will automatically upgrade/downgrade to/from E2EE depending on the support of clients in the call. diff --git a/docs/change-log/2024-09-26-activities-general-availability.md b/docs/change-log/2024-09-26-activities-general-availability.md index 49783a8c9f..b74444e6ad 100644 --- a/docs/change-log/2024-09-26-activities-general-availability.md +++ b/docs/change-log/2024-09-26-activities-general-availability.md @@ -7,26 +7,26 @@ topics: - "Premium Apps" --- -Following up on [the rollout of the App Launcher](https://discord.com/blog/discover-more-ways-to-play-with-apps-now-anywhere-on-discord), we’re excited to announce that [Activities](#DOCS_ACTIVITIES_OVERVIEW) are now generally available for developers. In addition to API stability, this means that apps with Activities can now be [verified](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified), [discoverable](#DOCS_DISCOVERY_ENABLING_DISCOVERY) in the App Directory, and [implement monetization](#DOCS_MONETIZATION_OVERVIEW). +Following up on [the rollout of the App Launcher](https://discord.com/blog/discover-more-ways-to-play-with-apps-now-anywhere-on-discord), we’re excited to announce that [Activities](/docs/activities/overview) are now generally available for developers. In addition to API stability, this means that apps with Activities can now be [verified](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified), [discoverable](/docs/discovery/enabling-discovery) in the App Directory, and [implement monetization](/docs/monetization/overview). ### Recent API Updates Since the developer preview was announced, there have been a few important API updates: -- Activities can now enable and implement monetization features, and [`getEntitlements`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements),[`getSkus`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getskus), and [`startPurchase`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchase) are generally available in the Embedded App SDK. -- New [Get Application Activity Instance](#DOCS_RESOURCES_APPLICATION/get-application-activity-instance) endpoint to make [managing Activity instances](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/activity-instance-management) easier. -- Apps with Activities can create an [Entry Point command (type `4`)](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-commands), which are the primary entry point for Activities in the App Launcher. When new apps enable Activities, a [default Entry Point command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/default-entry-point-command) will be created for the app. Read the [original change log](#DOCS_CHANGE_LOG/entry-point-commands) and the [Entry Point command guide](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/setting-up-an-entry-point-command) for details. -- Activities can now be launched in response to interactions using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type) for `APPLICATION_COMMAND`, `MESSAGE_COMPONENT`, and `MODAL_SUBMIT` [interaction types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type). -- Apps can now be installed to users (in addition to servers). After [setting up your installation contexts](#DOCS_RESOURCES_APPLICATION/setting-supported-installation-contexts), make sure to request the `application.commands` scope when authorizing with users to make sure your Activity is available for them across their Discord servers, DMs, and Group DMs. -- In August, there were updates to the Content Security Policy (CSP) for Activities that limits how you can make requests to external resources when building Activities. Read [the change log](#DOCS_CHANGE_LOG/activities-proxy-csp-update) and the guide on [using external resources](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/using-external-resources) for details. +- Activities can now enable and implement monetization features, and [`getEntitlements`](/docs/developer-tools/embedded-app-sdk#getentitlements),[`getSkus`](/docs/developer-tools/embedded-app-sdk#getskus), and [`startPurchase`](/docs/developer-tools/embedded-app-sdk#startpurchase) are generally available in the Embedded App SDK. +- New [Get Application Activity Instance](/docs/resources/application#get-application-activity-instance) endpoint to make [managing Activity instances](/docs/activities/development-guides#activity-instance-management) easier. +- Apps with Activities can create an [Entry Point command (type `4`)](/docs/interactions/application-commands#entry-point-commands), which are the primary entry point for Activities in the App Launcher. When new apps enable Activities, a [default Entry Point command](/docs/interactions/application-commands#default-entry-point-command) will be created for the app. Read the [original change log](/docs/change-log#entry-point-commands) and the [Entry Point command guide](/docs/activities/development-guides#setting-up-an-entry-point-command) for details. +- Activities can now be launched in response to interactions using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) for `APPLICATION_COMMAND`, `MESSAGE_COMPONENT`, and `MODAL_SUBMIT` [interaction types](/docs/interactions/receiving-and-responding#interaction-object-interaction-type). +- Apps can now be installed to users (in addition to servers). After [setting up your installation contexts](/docs/resources/application#setting-supported-installation-contexts), make sure to request the `application.commands` scope when authorizing with users to make sure your Activity is available for them across their Discord servers, DMs, and Group DMs. +- In August, there were updates to the Content Security Policy (CSP) for Activities that limits how you can make requests to external resources when building Activities. Read [the change log](/docs/change-log#activities-proxy-csp-update) and the guide on [using external resources](/docs/activities/development-guides#using-external-resources) for details. ### Documentation Updates We’ve also added and improved the documentation for Activities and the Embedded App SDK to make it easier to build: -- New reference documentation for [Monetization](#DOCS_MONETIZATION_OVERVIEW) SDK commands: [`getEntitlements`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements),[`getSkus`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getskus), and [`startPurchase`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchase) -- Updated [Embedded App SDK Reference](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) documentation that adds signatures and arguments -- Updated development guides for [Activity Instance Management](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/activity-instance-management) and [Activity Proxy Considerations](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/activity-proxy-considerations) when using external resources -- New guide on implementing [In-App Purchases (IAP) for Activities](#DOCS_MONETIZATION_IMPLEMENTING_IAP_FOR_ACTIVITIES) -- New guides for [Verification and Discovery Surfaces](#DOCS_DISCOVERY_OVERVIEW) -- New guide on [Using Rich Presence with the Embedded App SDK](#DOCS_RICH_PRESENCE_USING_WITH_THE_EMBEDDED_APP_SDK) \ No newline at end of file +- New reference documentation for [Monetization](/docs/monetization/overview) SDK commands: [`getEntitlements`](/docs/developer-tools/embedded-app-sdk#getentitlements),[`getSkus`](/docs/developer-tools/embedded-app-sdk#getskus), and [`startPurchase`](/docs/developer-tools/embedded-app-sdk#startpurchase) +- Updated [Embedded App SDK Reference](/docs/developer-tools/embedded-app-sdk) documentation that adds signatures and arguments +- Updated development guides for [Activity Instance Management](/docs/activities/development-guides#activity-instance-management) and [Activity Proxy Considerations](/docs/activities/development-guides#activity-proxy-considerations) when using external resources +- New guide on implementing [In-App Purchases (IAP) for Activities](/docs/monetization/implementing-iap-for-activities) +- New guides for [Verification and Discovery Surfaces](/docs/discovery/overview) +- New guide on [Using Rich Presence with the Embedded App SDK](/docs/rich-presence/using-with-the-embedded-app-sdk) \ No newline at end of file diff --git a/docs/change-log/2024-10-04-updates-to-entitlement-migration-guide.md b/docs/change-log/2024-10-04-updates-to-entitlement-migration-guide.md index eb6f592b83..cac73ebaa1 100644 --- a/docs/change-log/2024-10-04-updates-to-entitlement-migration-guide.md +++ b/docs/change-log/2024-10-04-updates-to-entitlement-migration-guide.md @@ -12,9 +12,9 @@ We updated our previous entitlement migration guide to provide more up-to-date i - The migration will run through November 1, 2024 to ensure that any entitlements that are set to renew in October will be properly migrated to the new entitlement system upon renewal. - `ENTITLEMENT_UPDATE` events will only occur when a subscription ends. - The value of the `ends_at` in `ENTITLEMENT_UPDATE` events indicate the timestamp for **when the entitlement is no longer valid**. -- The `ends_at` value on the [entitlement object](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) is set when the subscription ends. -- To receive the value of when a subscription was canceled, you should listen for the `SUBSCRIPTION_UPDATE` events or use the [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION). +- The `ends_at` value on the [entitlement object](/docs/resources/entitlement#entitlement-object) is set when the subscription ends. +- To receive the value of when a subscription was canceled, you should listen for the `SUBSCRIPTION_UPDATE` events or use the [Subscription API](/docs/resources/subscription). -View the [updated migration guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api). +View the [updated migration guide](/docs/change-log#premium-apps-entitlement-migration-and-new-subscription-api). To see a full diff of the changes, refer to this pull request: [Entitlement Migration Guide Updates](https://github.com/discord/discord-api-docs/pull/7201). \ No newline at end of file diff --git a/docs/change-log/2024-10-25-event-webhooks.md b/docs/change-log/2024-10-25-event-webhooks.md index e46078b507..d4c001b351 100644 --- a/docs/change-log/2024-10-25-event-webhooks.md +++ b/docs/change-log/2024-10-25-event-webhooks.md @@ -7,10 +7,10 @@ topics: --- -You can now subscribe to a limited number of HTTP-based outgoing [webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) after [configuring a webhook events URL](#DOCS_EVENTS_WEBHOOK_EVENTS/configuring-a-webhook-events-url). Currently, 3 events are available: `APPLICATION_AUTHORIZED`, `ENTITLEMENT_CREATE`, and `QUEST_USER_ENROLLMENT`. Read the [webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS) documentation for details on subscribing and using webhook events. +You can now subscribe to a limited number of HTTP-based outgoing [webhook events](/docs/events/webhook-events#event-types) after [configuring a webhook events URL](/docs/events/webhook-events#configuring-a-webhook-events-url). Currently, 3 events are available: `APPLICATION_AUTHORIZED`, `ENTITLEMENT_CREATE`, and `QUEST_USER_ENROLLMENT`. Read the [webhook events](/docs/events/webhook-events) documentation for details on subscribing and using webhook events. > info -> When developing [user-installable apps](#DOCS_RESOURCES_APPLICATION/user-context), [Application Authorized](#DOCS_EVENTS_WEBHOOK_EVENTS/application-authorized) (which is not available via [the Gateway](#DOCS_EVENTS_GATEWAY)) is useful to receive events when your app was installed to a user or server. +> When developing [user-installable apps](/docs/resources/application#user-context), [Application Authorized](/docs/events/webhook-events#application-authorized) (which is not available via [the Gateway](/docs/events/gateway)) is useful to receive events when your app was installed to a user or server. > warn -> `ENTITLEMENT_CREATE` is the only monetization-related event available using webhook events, so you should still use the Gateway for [entitlement-related events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements). Other monetization-related events will be supported via webhook events soon. \ No newline at end of file +> `ENTITLEMENT_CREATE` is the only monetization-related event available using webhook events, so you should still use the Gateway for [entitlement-related events](/docs/events/gateway-events#entitlements). Other monetization-related events will be supported via webhook events soon. \ No newline at end of file diff --git a/docs/change-log/2024-11-05-post-entitlement-migration-update.md b/docs/change-log/2024-11-05-post-entitlement-migration-update.md index e0d6211bf2..228512e5c5 100644 --- a/docs/change-log/2024-11-05-post-entitlement-migration-update.md +++ b/docs/change-log/2024-11-05-post-entitlement-migration-update.md @@ -5,13 +5,13 @@ topics: - "Premium Apps" --- -The [entitlement migration](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) which began on **October 1, 2024**, has been successfully completed as of **November 1, 2024**. +The [entitlement migration](/docs/change-log#premium-apps-entitlement-migration-and-new-subscription-api) which began on **October 1, 2024**, has been successfully completed as of **November 1, 2024**. ### What's Changed - The documentation has been updated to reflect the new entitlement system as the standard behavior. - `ENTITLEMENT_UPDATE` event for subscription-related entitlements now only occur when the subscription ends. -- The `ends_at` value on the [entitlement object](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) is now set when the subscription ends. -- To determine when a subscription was canceled, listen for `SUBSCRIPTION_UPDATE` events or use the [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) to retrieve the subscription's `status` and `canceled_at` timestamp. +- The `ends_at` value on the [entitlement object](/docs/resources/entitlement#entitlement-object) is now set when the subscription ends. +- To determine when a subscription was canceled, listen for `SUBSCRIPTION_UPDATE` events or use the [Subscription API](/docs/resources/subscription) to retrieve the subscription's `status` and `canceled_at` timestamp. -For more details about the migration process, please refer to the [migration guide](#DOCS_CHANGE_LOG/updates-to-entitlement-migration-guide). \ No newline at end of file +For more details about the migration process, please refer to the [migration guide](/docs/change-log#updates-to-entitlement-migration-guide). \ No newline at end of file diff --git a/docs/change-log/2024-12-12-premium-apps-multiple-subscription-tiers.md b/docs/change-log/2024-12-12-premium-apps-multiple-subscription-tiers.md index 652392e15c..8973656e44 100644 --- a/docs/change-log/2024-12-12-premium-apps-multiple-subscription-tiers.md +++ b/docs/change-log/2024-12-12-premium-apps-multiple-subscription-tiers.md @@ -20,11 +20,11 @@ Developers with monetization enabled can now create and publish multiple subscri - These settings are available under `User Settings → Subscriptions → App Subscriptions`. #### Subscription Object -- New field `renewal_sku_ids` added to the [subscription object](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object) response for `SUBSCRIPTION_UPDATE` events and API endpoints. +- New field `renewal_sku_ids` added to the [subscription object](/docs/resources/subscription#subscription-object) response for `SUBSCRIPTION_UPDATE` events and API endpoints. - `renewal_sku_ids` is a list of snowflakes that indicate the SKU(s) that the user will be subscribed to at renewal. #### Updated Guide: Managing SKUs -- The [Managing SKUs](#DOCS_MONETIZATION_MANAGING_SKUS/creating-a-sku) guide has been updated to include information about creating and managing multiple subscription SKUs. +- The [Managing SKUs](/docs/monetization/managing-skus#creating-a-sku) guide has been updated to include information about creating and managing multiple subscription SKUs. #### Updated Guide: Implementing App Subscriptions -- The [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/supporting-upgrades-and-downgrades) guide has been updated to include information about supporting upgrades and downgrades between multiple subscription SKUs. \ No newline at end of file +- The [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions#supporting-upgrades-and-downgrades) guide has been updated to include information about supporting upgrades and downgrades between multiple subscription SKUs. \ No newline at end of file diff --git a/docs/change-log/2024-12-17-updated-file-upload-limit.md b/docs/change-log/2024-12-17-updated-file-upload-limit.md index 6cad546e4b..25c7e15133 100644 --- a/docs/change-log/2024-12-17-updated-file-upload-limit.md +++ b/docs/change-log/2024-12-17-updated-file-upload-limit.md @@ -14,4 +14,4 @@ While this limit is already active for users and bot users, it hasn't yet been a - This change will take effect on January 16, 2025. - The 10 MiB limit will apply to both webhooks and interaction responses. -For more information, check out [our documentation on file uploads](#DOCS_REFERENCE/uploading-files). \ No newline at end of file +For more information, check out [our documentation on file uploads](/docs/reference#uploading-files). \ No newline at end of file diff --git a/docs/change-log/2025-03-17-introducing-the-discord-social-sdk.md b/docs/change-log/2025-03-17-introducing-the-discord-social-sdk.md index c47b81c84e..4da78fc441 100644 --- a/docs/change-log/2025-03-17-introducing-the-discord-social-sdk.md +++ b/docs/change-log/2025-03-17-introducing-the-discord-social-sdk.md @@ -26,10 +26,10 @@ Developers can request expanded access to these available features via the close New resources are available in the Developer Portal to help you get started with the Discord Social SDK: -- [Getting Started Guides](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) for C++, Unity and Unreal Engine. -- [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) for building your game's social features. -- [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) for designing your game's social features. +- [Getting Started Guides](/docs/discord-social-sdk/getting-started) for C++, Unity and Unreal Engine. +- [Development Guides](/docs/discord-social-sdk/development-guides) for building your game's social features. +- [Design Guidelines](/docs/discord-social-sdk/design-guidelines) for designing your game's social features. - [SDK Reference](http://discord.com/developers/docs/social-sdk/index.html) is now available. - The Discord Social SDK binaries are available for download in the Developer Portal after enabling the Discord Social SDK for your application. -To learn more about building with the Discord Social SDK, check out the [Discord Social SDK Overview](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW). +To learn more about building with the Discord Social SDK, check out the [Discord Social SDK Overview](/docs/discord-social-sdk/overview). diff --git a/docs/change-log/2025-04-03-per-attachment-file-upload-limit.md b/docs/change-log/2025-04-03-per-attachment-file-upload-limit.md index e0ccd2a81f..724d69f327 100644 --- a/docs/change-log/2025-04-03-per-attachment-file-upload-limit.md +++ b/docs/change-log/2025-04-03-per-attachment-file-upload-limit.md @@ -15,4 +15,4 @@ Starting today, file upload limits for apps are checked per-attachment rather th The interaction payload will also include a new `attachment_size_limit` key that specifies the maximum allowed attachment size. This limit may be higher than the default attachment size limit, depending on the guild's boost status or the invoking user's Nitro status. -For more information, check out [our documentation on file uploads](#DOCS_REFERENCE/uploading-files). \ No newline at end of file +For more information, check out [our documentation on file uploads](/docs/reference#uploading-files). \ No newline at end of file diff --git a/docs/change-log/2025-04-16-discord-social-sdk-1.1.md b/docs/change-log/2025-04-16-discord-social-sdk-1.1.md index c4761e60b8..43951558d3 100644 --- a/docs/change-log/2025-04-16-discord-social-sdk-1.1.md +++ b/docs/change-log/2025-04-16-discord-social-sdk-1.1.md @@ -41,7 +41,7 @@ The Discord Social SDK binaries are available for download in the Developer Port for your application. To learn more about building with the Discord Social SDK, check out -the [Discord Social SDK Overview](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW). +the [Discord Social SDK Overview](/docs/discord-social-sdk/overview). [`Call::GetPTTReleaseDelay`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Call.html#ab8dc6b1527728fecb17f266d5b3e9e6e diff --git a/docs/developer-tools/community-resources.mdx b/docs/developer-tools/community-resources.mdx index 163f2fde38..2160307f24 100644 --- a/docs/developer-tools/community-resources.mdx +++ b/docs/developer-tools/community-resources.mdx @@ -37,7 +37,7 @@ Discord does not maintain official SDKs. The following table is an inexhaustive ## Interactions -[Interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) are the great, new way of making a Discord bot. The following open-source libraries provide help for the security and authentication checks that are mandatory if you are receiving Interactions via outgoing webhook. They also include some types for the Interactions data models. +[Interactions](/docs/interactions/receiving-and-responding#) are the great, new way of making a Discord bot. The following open-source libraries provide help for the security and authentication checks that are mandatory if you are receiving Interactions via outgoing webhook. They also include some types for the Interactions data models. - C# - [Discord.Net.Rest](https://github.com/discord-net/Discord.Net) @@ -72,14 +72,14 @@ The public preview of the [Discord HTTP API specification](https://github.com/di ## Permission Calculators -[Permissions](#DOCS_TOPICS_PERMISSIONS/permissions) in Discord are tricky. Luckily, we've got really smart people who love us and have made some great permissions calculators. If you're making a bot for others, and you're not sure how to properly calculate permissions or generate your [authorization URL](#DOCS_TOPICS_OAUTH2/bot-authorization-flow), these are great tools: +[Permissions](/docs/topics/permissions#permissions) in Discord are tricky. Luckily, we've got really smart people who love us and have made some great permissions calculators. If you're making a bot for others, and you're not sure how to properly calculate permissions or generate your [authorization URL](/docs/topics/oauth2#bot-authorization-flow), these are great tools: - [FiniteReality's Permissions Calculator](https://finitereality.github.io/permissions-calculator/?v=0) - [abalabahaha's Permissions Calculator](https://discordapi.com/permissions.html#0) ## Intent Calculators -[Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents) are pretty confusing at first. If you're not sure what to send in your [Identify payload](#DOCS_EVENTS_GATEWAY_EVENTS/identify), then these tools may be of help: +[Gateway Intents](/docs/events/gateway#gateway-intents) are pretty confusing at first. If you're not sure what to send in your [Identify payload](/docs/events/gateway-events#identify), then these tools may be of help: - [ziad87's Intent Calculator](https://ziad87.net/intents/) - [Larko's Intent Calculator](https://discord-intents-calculator.vercel.app/) diff --git a/docs/developer-tools/embedded-app-sdk.mdx b/docs/developer-tools/embedded-app-sdk.mdx index 82a80338f7..85192b8c41 100644 --- a/docs/developer-tools/embedded-app-sdk.mdx +++ b/docs/developer-tools/embedded-app-sdk.mdx @@ -6,7 +6,7 @@ sidebar_label: Embedded App SDK The Embedded App SDK handles making RPC calls between your application and Discord. It is designed to assist developers in developing interactive Activities like games. -To learn more about building Activities, check out our [Building an Activity](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) tutorial or explore our [Sample Projects](#DOCS_ACTIVITIES_OVERVIEW/sample-projects). +To learn more about building Activities, check out our [Building an Activity](/docs/activities/building-an-activity) tutorial or explore our [Sample Projects](/docs/activities/overview#sample-projects). --- @@ -34,10 +34,10 @@ const discordSdk = new DiscordSDK(DISCORD_CLIENT_ID); | Name | Description | |-------------------------------------------------------------------|-------------------------------------------------------------------------| -| [ready](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/ready) | Resolves when your app has successfully connected to the Discord client | -| [subscribe](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/subscribe) | Subscribe to an Embedded App SDK Event | -| [unsubscribe](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/unsubscribe) | Unsubscribe to an Embedded App SDK Event | -| [close](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/close) | Close an Embedded App | +| [ready](/docs/developer-tools/embedded-app-sdk#ready) | Resolves when your app has successfully connected to the Discord client | +| [subscribe](/docs/developer-tools/embedded-app-sdk#subscribe) | Subscribe to an Embedded App SDK Event | +| [unsubscribe](/docs/developer-tools/embedded-app-sdk#unsubscribe) | Unsubscribe to an Embedded App SDK Event | +| [close](/docs/developer-tools/embedded-app-sdk#close) | Close an Embedded App | ### ready() @@ -71,7 +71,7 @@ async function setup() { ### subscribe() -Used to subscribe to a specific event from the list of [SDK Events](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events). +Used to subscribe to a specific event from the list of [SDK Events](/docs/developer-tools/embedded-app-sdk#sdk-events). #### Supported Platforms | Web | iOS | Android | @@ -85,7 +85,7 @@ Depends on the event. Refer to the Required Scopes for the specific event you ar #### Signature -subscribe\(event: [Event](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events), listener: (data: EventPayloadData\) => void, ...subscribeArgs: Partial\\>): Promise\<[EventEmitter](https://nodejs.org/docs/latest/api/events.html)\> +subscribe\(event: [Event](/docs/developer-tools/embedded-app-sdk#sdk-events), listener: (data: EventPayloadData\) => void, ...subscribeArgs: Partial\\>): Promise\<[EventEmitter](https://nodejs.org/docs/latest/api/events.html)\> #### Usage @@ -98,7 +98,7 @@ await discordSdk.subscribe("SDK_EVENT_NAME", eventHandler, args); ### unsubscribe() -Used to unsubscribe to [SDK Events](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events) that your app has already subscribed to. +Used to unsubscribe to [SDK Events](/docs/developer-tools/embedded-app-sdk#sdk-events) that your app has already subscribed to. #### Supported Platforms | Web | iOS | Android | @@ -111,10 +111,10 @@ No scopes required #### Signature -_The `EventPayloadData` will vary based on the event you are unsubscribing from. See the specific [event](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events) for details._ +_The `EventPayloadData` will vary based on the event you are unsubscribing from. See the specific [event](/docs/developer-tools/embedded-app-sdk#sdk-events) for details._ -unsubscribe\(event: [Event](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events), listener: (data: EventPayloadData\) => void, ...subscribeArgs: Partial\\>): Promise\<[EventEmitter](https://nodejs.org/docs/latest/api/events.html)\> +unsubscribe\(event: [Event](/docs/developer-tools/embedded-app-sdk#sdk-events), listener: (data: EventPayloadData\) => void, ...subscribeArgs: Partial\\>): Promise\<[EventEmitter](https://nodejs.org/docs/latest/api/events.html)\> #### Usage @@ -141,7 +141,7 @@ No scopes required #### Signature -close(code: [RPCCloseCodes](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/rpcclosecodes), message: string): void +close(code: [RPCCloseCodes](/docs/developer-tools/embedded-app-sdk#rpcclosecodes), message: string): void #### SDK Usage @@ -158,26 +158,26 @@ Developers can use these commands to interact with the Discord client. The follo | Name | Description | |-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| -| [authenticate](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authenticate) | Authenticate an existing client with your app | -| [authorize](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authorize) | Authorize a new client with your app | -| [captureLog](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/capturelog) | Forward logs to your own logger | -| [encourageHardwareAcceleration](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/encouragehardwareacceleration) | Presents a modal dialog to allow enabling of hardware acceleration | -| [getChannel](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getchannel) | Returns information about the channel, per the channel_id | -| [getChannelPermissions](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getchannelpermissions) | Returns permissions for the current user in the currently connected channel | -| [getEntitlements](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements) | Returns a list of entitlements for the current user | -| [getInstanceConnectedParticipants](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getinstanceconnectedparticipants) | Returns all participants connected to the instance | -| [getPlatformBehaviors](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getplatformbehaviors) | Returns information about supported platform behaviors | -| [getSkus](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getskus) | Returns a list of your app's SKUs | -| [initiateImageUpload](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/initiateimageupload) | Presents the file upload flow in the Discord client | -| [openExternalLink](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/openexternallink) | Allows for opening an external link from within the Discord client | -| [openInviteDialog](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/openinvitedialog) | Presents a modal dialog with Channel Invite UI without requiring additional OAuth scopes | -| [openShareMomentDialog](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/opensharemomentdialog) | Presents a modal dialog to share media to a channel or DM | -| [setActivity](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setactivity) | Modifies how your activity's rich presence is displayed in the Discord client | -| [setConfig](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setconfig) | Set whether or not the PIP (picture-in-picture) is interactive | -| [setOrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setorientationlockstate) | Set options for orientation and picture-in-picture (PIP) modes | -| [shareLink](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelink) | Presents a modal for the user to share a link to your activity with custom query params | -| [startPurchase](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchase) | Launches the purchase flow for a specific SKU, per the sku_id | -| [userSettingsGetLocale](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/usersettingsgetlocale) | Returns the current user's locale | +| [authenticate](/docs/developer-tools/embedded-app-sdk#authenticate) | Authenticate an existing client with your app | +| [authorize](/docs/developer-tools/embedded-app-sdk#authorize) | Authorize a new client with your app | +| [captureLog](/docs/developer-tools/embedded-app-sdk#capturelog) | Forward logs to your own logger | +| [encourageHardwareAcceleration](/docs/developer-tools/embedded-app-sdk#encouragehardwareacceleration) | Presents a modal dialog to allow enabling of hardware acceleration | +| [getChannel](/docs/developer-tools/embedded-app-sdk#getchannel) | Returns information about the channel, per the channel_id | +| [getChannelPermissions](/docs/developer-tools/embedded-app-sdk#getchannelpermissions) | Returns permissions for the current user in the currently connected channel | +| [getEntitlements](/docs/developer-tools/embedded-app-sdk#getentitlements) | Returns a list of entitlements for the current user | +| [getInstanceConnectedParticipants](/docs/developer-tools/embedded-app-sdk#getinstanceconnectedparticipants) | Returns all participants connected to the instance | +| [getPlatformBehaviors](/docs/developer-tools/embedded-app-sdk#getplatformbehaviors) | Returns information about supported platform behaviors | +| [getSkus](/docs/developer-tools/embedded-app-sdk#getskus) | Returns a list of your app's SKUs | +| [initiateImageUpload](/docs/developer-tools/embedded-app-sdk#initiateimageupload) | Presents the file upload flow in the Discord client | +| [openExternalLink](/docs/developer-tools/embedded-app-sdk#openexternallink) | Allows for opening an external link from within the Discord client | +| [openInviteDialog](/docs/developer-tools/embedded-app-sdk#openinvitedialog) | Presents a modal dialog with Channel Invite UI without requiring additional OAuth scopes | +| [openShareMomentDialog](/docs/developer-tools/embedded-app-sdk#opensharemomentdialog) | Presents a modal dialog to share media to a channel or DM | +| [setActivity](/docs/developer-tools/embedded-app-sdk#setactivity) | Modifies how your activity's rich presence is displayed in the Discord client | +| [setConfig](/docs/developer-tools/embedded-app-sdk#setconfig) | Set whether or not the PIP (picture-in-picture) is interactive | +| [setOrientationLockState](/docs/developer-tools/embedded-app-sdk#setorientationlockstate) | Set options for orientation and picture-in-picture (PIP) modes | +| [shareLink](/docs/developer-tools/embedded-app-sdk#sharelink) | Presents a modal for the user to share a link to your activity with custom query params | +| [startPurchase](/docs/developer-tools/embedded-app-sdk#startpurchase) | Launches the purchase flow for a specific SKU, per the sku_id | +| [userSettingsGetLocale](/docs/developer-tools/embedded-app-sdk#usersettingsgetlocale) | Returns the current user's locale | ### authenticate() @@ -195,7 +195,7 @@ No scopes required #### Signature -authenticate(args: [AuthenticateRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authenticaterequest)): Promise\<[AuthenticateResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authenticateresponse)\> +authenticate(args: [AuthenticateRequest](/docs/developer-tools/embedded-app-sdk#authenticaterequest)): Promise\<[AuthenticateResponse](/docs/developer-tools/embedded-app-sdk#authenticateresponse)\> #### Usage @@ -224,7 +224,7 @@ No scopes required #### Signature -authorize(args: [AuthorizeRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authorizerequest)): Promise\<[AuthorizeResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authorizeresponse)\> +authorize(args: [AuthorizeRequest](/docs/developer-tools/embedded-app-sdk#authorizerequest)): Promise\<[AuthorizeResponse](/docs/developer-tools/embedded-app-sdk#authorizeresponse)\> #### Usage @@ -277,7 +277,7 @@ No scopes required #### Signature -captureLog(args: [CaptureLogRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/capturelogrequest)): Promise\ +captureLog(args: [CaptureLogRequest](/docs/developer-tools/embedded-app-sdk#capturelogrequest)): Promise\ #### Usage @@ -307,7 +307,7 @@ No scopes required #### Signature -encourageHardwareAcceleration(): Promise\<[EncourageHardwareAccelerationResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/encouragehardwareaccelerationresponse)\> +encourageHardwareAcceleration(): Promise\<[EncourageHardwareAccelerationResponse](/docs/developer-tools/embedded-app-sdk#encouragehardwareaccelerationresponse)\> #### Usage @@ -335,7 +335,7 @@ Returns information about the channel for a provided channel ID. #### Signature -getChannel(args: [GetChannelRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getchannelrequest)): Promise\<[GetChannelResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getchannelresponse)\> +getChannel(args: [GetChannelRequest](/docs/developer-tools/embedded-app-sdk#getchannelrequest)): Promise\<[GetChannelResponse](/docs/developer-tools/embedded-app-sdk#getchannelresponse)\> #### Usage @@ -363,7 +363,7 @@ Returns permissions for the current user in the currently connected channel. #### Signature -getChannelPermissions(): Promise\<[GetChannelPermissionsResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getchannelpermissionsresponse)\> +getChannelPermissions(): Promise\<[GetChannelPermissionsResponse](/docs/developer-tools/embedded-app-sdk#getchannelpermissionsresponse)\> #### Usage @@ -390,7 +390,7 @@ No scopes required #### Signature -getEntitlements(): Promise\<[GetEntitlementsResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlementsresponse)\> +getEntitlements(): Promise\<[GetEntitlementsResponse](/docs/developer-tools/embedded-app-sdk#getentitlementsresponse)\> #### Usage @@ -417,7 +417,7 @@ No scopes required #### Signature -getInstanceConnectedParticipants(): Promise\<[GetInstanceConnectedParticipantsResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getinstanceconnectedparticipantsresponse)\> +getInstanceConnectedParticipants(): Promise\<[GetInstanceConnectedParticipantsResponse](/docs/developer-tools/embedded-app-sdk#getinstanceconnectedparticipantsresponse)\> #### Usage @@ -444,7 +444,7 @@ No scopes required #### Signature -getPlatformBehaviors(): Promise\<[GetPlatformBehaviorsResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getplatformbehaviorsresponse)\> +getPlatformBehaviors(): Promise\<[GetPlatformBehaviorsResponse](/docs/developer-tools/embedded-app-sdk#getplatformbehaviorsresponse)\> #### Usage @@ -471,7 +471,7 @@ No scopes required #### Signature -getSkus(): Promise\<[GetSkusResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getskusresponse)\> +getSkus(): Promise\<[GetSkusResponse](/docs/developer-tools/embedded-app-sdk#getskusresponse)\> #### Usage @@ -498,7 +498,7 @@ No scopes required #### Signature -initiateImageUpload(): Promise\<[InitiateImageUploadResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/initiateimageuploadresponse)\> +initiateImageUpload(): Promise\<[InitiateImageUploadResponse](/docs/developer-tools/embedded-app-sdk#initiateimageuploadresponse)\> #### Usage @@ -525,7 +525,7 @@ No scopes required #### Signature -openExternalLink(args: [OpenExternalLinkRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/openexternallinkrequest)): Promise\<[OpenExternalLinkResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/openexternallinkresponse)\> +openExternalLink(args: [OpenExternalLinkRequest](/docs/developer-tools/embedded-app-sdk#openexternallinkrequest)): Promise\<[OpenExternalLinkResponse](/docs/developer-tools/embedded-app-sdk#openexternallinkresponse)\> #### Usage @@ -581,7 +581,7 @@ No scopes required #### Signature -openInviteDialog(args: [OpenInviteDialogRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/openinvitedialogrequest)) Promise\ +openInviteDialog(args: [OpenInviteDialogRequest](/docs/developer-tools/embedded-app-sdk#openinvitedialogrequest)) Promise\ #### Usage @@ -596,9 +596,9 @@ await discordSdk.commands.openShareMomentDialog({ ### setActivity() -Modifies how your Activity's Rich Presence data is displayed in the Discord client. The inner `activity` field is a partial [Activity object](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-structure). +Modifies how your Activity's Rich Presence data is displayed in the Discord client. The inner `activity` field is a partial [Activity object](/docs/events/gateway-events#activity-object-activity-structure). -Read the guide on [Using Rich Presence with the Embedded App SDK](#DOCS_RICH_PRESENCE_USING_WITH_THE_EMBEDDED_APP_SDK) for more usage details. +Read the guide on [Using Rich Presence with the Embedded App SDK](/docs/rich-presence/using-with-the-embedded-app-sdk) for more usage details. #### Supported Platforms @@ -613,7 +613,7 @@ Read the guide on [Using Rich Presence with the Embedded App SDK](#DOCS_RICH_PRE #### Signature -setActivity(args: [SetActivityRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setactivityrequest)): Promise\<[Activity](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/activity)\> +setActivity(args: [SetActivityRequest](/docs/developer-tools/embedded-app-sdk#setactivityrequest)): Promise\<[Activity](/docs/developer-tools/embedded-app-sdk#activity)\> #### Usage @@ -646,7 +646,7 @@ No scopes required #### Signature -setConfig(args: [SetConfigRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setconfigrequest)): Promise\<[SetConfigResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setconfigresponse)\> +setConfig(args: [SetConfigRequest](/docs/developer-tools/embedded-app-sdk#setconfigrequest)): Promise\<[SetConfigResponse](/docs/developer-tools/embedded-app-sdk#setconfigresponse)\> #### Usage @@ -675,7 +675,7 @@ No scopes required #### Signature -setOrientationLockState(args: [SetOrientationLockStateRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setorientationlockstaterequest)): Promise\ +setOrientationLockState(args: [SetOrientationLockStateRequest](/docs/developer-tools/embedded-app-sdk#setorientationlockstaterequest)): Promise\ #### Usage @@ -709,7 +709,7 @@ No scopes required #### Signature -shareLink(args: [ShareLinkRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelinkrequest)): Promise\<[ShareLinkResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sharelinkresponse)\>\ +shareLink(args: [ShareLinkRequest](/docs/developer-tools/embedded-app-sdk#sharelinkrequest)): Promise\<[ShareLinkResponse](/docs/developer-tools/embedded-app-sdk#sharelinkresponse)\>\ #### Usage @@ -740,7 +740,7 @@ No scopes required #### Signature -startPurchase(args: [StartPurchaseRequest](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchaserequest)): Promise\<[StartPurchaseResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchaseresponse)\> +startPurchase(args: [StartPurchaseRequest](/docs/developer-tools/embedded-app-sdk#startpurchaserequest)): Promise\<[StartPurchaseResponse](/docs/developer-tools/embedded-app-sdk#startpurchaseresponse)\> #### Usage @@ -767,7 +767,7 @@ Returns the current user's locale. #### Signature -userSettingsGetLocale(): Promise\<[UserSettingsGetLocaleResponse](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/usersettingsgetlocaleresponse)\> +userSettingsGetLocale(): Promise\<[UserSettingsGetLocaleResponse](/docs/developer-tools/embedded-app-sdk#usersettingsgetlocaleresponse)\> #### Usage @@ -784,18 +784,18 @@ Developers may use the following events alongside the `subscribe()` SDK method t | Name | Description | |--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| -| [READY](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/ready) | non-subscription event sent immediately after connecting, contains server information | -| [ERROR](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/error) | non-subscription event sent when there is an error, including command responses | -| [VOICE_STATE_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/voicestateupdate) | sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) | -| [SPEAKING_START](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/speakingstart) | sent when a user in a subscribed voice channel speaks | -| [SPEAKING_STOP](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/speakingstop) | sent when a user in a subscribed voice channel stops speaking | -| [ACTIVITY_LAYOUT_MODE_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/activitylayoutmodeupdate) | Received when a user changes the layout mode in the Discord client | -| [ORIENTATION_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationupdate) | Received when screen orientation changes | -| [CURRENT_USER_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/currentuserupdate) | Received when the current user object changes | -| [CURRENT_GUILD_MEMBER_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/currentguildmemberupdate) | Received when the current guild member object changes | -| [THERMAL_STATE_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/thermalstateupdate) | Received when Android or iOS thermal states are surfaced to the Discord app | -| [ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/activityinstanceparticipantsupdate) | Received when the number of instance participants changes | -| [ENTITLEMENT_CREATE](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/entitlementcreate) | Received when an entitlement is created for a SKU | +| [READY](/docs/developer-tools/embedded-app-sdk#ready) | non-subscription event sent immediately after connecting, contains server information | +| [ERROR](/docs/developer-tools/embedded-app-sdk#error) | non-subscription event sent when there is an error, including command responses | +| [VOICE_STATE_UPDATE](/docs/developer-tools/embedded-app-sdk#voicestateupdate) | sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) | +| [SPEAKING_START](/docs/developer-tools/embedded-app-sdk#speakingstart) | sent when a user in a subscribed voice channel speaks | +| [SPEAKING_STOP](/docs/developer-tools/embedded-app-sdk#speakingstop) | sent when a user in a subscribed voice channel stops speaking | +| [ACTIVITY_LAYOUT_MODE_UPDATE](/docs/developer-tools/embedded-app-sdk#activitylayoutmodeupdate) | Received when a user changes the layout mode in the Discord client | +| [ORIENTATION_UPDATE](/docs/developer-tools/embedded-app-sdk#orientationupdate) | Received when screen orientation changes | +| [CURRENT_USER_UPDATE](/docs/developer-tools/embedded-app-sdk#currentuserupdate) | Received when the current user object changes | +| [CURRENT_GUILD_MEMBER_UPDATE](/docs/developer-tools/embedded-app-sdk#currentguildmemberupdate) | Received when the current guild member object changes | +| [THERMAL_STATE_UPDATE](/docs/developer-tools/embedded-app-sdk#thermalstateupdate) | Received when Android or iOS thermal states are surfaced to the Discord app | +| [ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE](/docs/developer-tools/embedded-app-sdk#activityinstanceparticipantsupdate) | Received when the number of instance participants changes | +| [ENTITLEMENT_CREATE](/docs/developer-tools/embedded-app-sdk#entitlementcreate) | Received when an entitlement is created for a SKU | ### READY @@ -1069,14 +1069,14 @@ No scopes required | type | number | | url? | string \| null | | created_at? | number \| null | -| timestamps? | [Timestamp](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/timestamp) \| null | +| timestamps? | [Timestamp](/docs/developer-tools/embedded-app-sdk#timestamp) \| null | | application_id? | string \| null | | details? | string \| null | | state? | string \| null | -| emoji? | [Emoji](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/emoji) \| null | -| party? | [Party](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/party) \| null | -| assets? | [Assets](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/assets) \| null | -| secrets? | [Secrets](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/secrets) \| null | +| emoji? | [Emoji](/docs/developer-tools/embedded-app-sdk#emoji) \| null | +| party? | [Party](/docs/developer-tools/embedded-app-sdk#party) \| null | +| assets? | [Assets](/docs/developer-tools/embedded-app-sdk#assets) \| null | +| secrets? | [Secrets](/docs/developer-tools/embedded-app-sdk#secrets) \| null | | instance? | boolean \| null | | flags? | number \| null | @@ -1122,17 +1122,17 @@ No scopes required | Property | Type | |--------------|-------------------------------------------------------------------| | access_token | string | -| user | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user) | +| user | [User](/docs/developer-tools/embedded-app-sdk#user) | | scopes | string[] | | expires | string | -| application | [Application](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/application) | +| application | [Application](/docs/developer-tools/embedded-app-sdk#application) | #### AuthorizeRequest | Property | Type | |------------------------|---------------------------------------------------------------------| | client_id | string | -| scope | [OAuthScopes](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/oauthscopes)[] | +| scope | [OAuthScopes](/docs/developer-tools/embedded-app-sdk#oauthscopes)[] | | response_type? | 'code' | | code_challenge? | string | | state? | string | @@ -1156,7 +1156,7 @@ No scopes required | Property | Type | |----------|---------------------------------------------------------------------| -| level | [ConsoleLevel](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/consolelevel) | +| level | [ConsoleLevel](/docs/developer-tools/embedded-app-sdk#consolelevel) | | message | string | #### ChannelMention @@ -1178,13 +1178,13 @@ No scopes required | url? | string \| null | | timestamp? | string \| null | | color? | number \| null | -| footer? | [EmbedFooter](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/embedfooter) \| null | +| footer? | [EmbedFooter](/docs/developer-tools/embedded-app-sdk#embedfooter) \| null | | image? | Image \| null | | thumbnail? | Image \| null | | video? | Video \| null | -| provider? | [EmbedProvider](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/embedprovider) \| null | -| author? | [EmbedAuthor](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/embedauthor) \| null | -| fields? | [EmbedField](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/embedfield)[] \| null | +| provider? | [EmbedProvider](/docs/developer-tools/embedded-app-sdk#embedprovider) \| null | +| author? | [EmbedAuthor](/docs/developer-tools/embedded-app-sdk#embedauthor) \| null | +| fields? | [EmbedField](/docs/developer-tools/embedded-app-sdk#embedfield)[] \| null | #### EmbedAuthor @@ -1225,7 +1225,7 @@ No scopes required | id | string | | name? | string \| null | | roles? | string[] \| null | -| user? | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user) \| null | +| user? | [User](/docs/developer-tools/embedded-app-sdk#user) \| null | | require_colons? | boolean \| null | | managed? | boolean \| null | | animated? | boolean \| null | @@ -1273,27 +1273,27 @@ No scopes required | Property | Type | |--------------|---------------------------------------------------------------------------------| | id | string | -| type | [ChannelTypesObject](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/channeltypesobject) | +| type | [ChannelTypesObject](/docs/developer-tools/embedded-app-sdk#channeltypesobject) | | guild_id? | string \| null | | name? | string \| null | | topic? | string \| null | | bitrate? | number \| null | | user_limit? | number \| null | | position? | number \| null | -| voice_states | [UserVoiceState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/uservoicestate)[] | -| messages | [Message](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/message)[] | +| voice_states | [UserVoiceState](/docs/developer-tools/embedded-app-sdk#uservoicestate)[] | +| messages | [Message](/docs/developer-tools/embedded-app-sdk#message)[] | #### GetEntitlementsResponse | Property | Type | |--------------|---------------------------------------------------------------------| -| entitlements | [Entitlement](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/entitlement)[] | +| entitlements | [Entitlement](/docs/developer-tools/embedded-app-sdk#entitlement)[] | #### GetInstanceConnectedParticipantsResponse | Property | Type | |--------------|-------------------------------------------------------| -| participants | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user)[] | +| participants | [User](/docs/developer-tools/embedded-app-sdk#user)[] | #### GetPlatformBehaviorsResponse @@ -1305,13 +1305,13 @@ No scopes required | Property | Type | |----------|-----------------------------------------------------| -| skus | [Sku](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sku)[] | +| skus | [Sku](/docs/developer-tools/embedded-app-sdk#sku)[] | #### GuildMember | Property | Type | |-----------|-----------------------------------------------------| -| user | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user) | +| user | [User](/docs/developer-tools/embedded-app-sdk#user) | | nick? | string \| null | | roles | string[] | | joined_at | string | @@ -1326,7 +1326,7 @@ No scopes required | nick? | string \| null | | guild_id | string | | avatar? | string \| null | -| avatar_decoration_data? | [AvatarDecorationData](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/avatardecorationdata) \| null | +| avatar_decoration_data? | [AvatarDecorationData](/docs/developer-tools/embedded-app-sdk#avatardecorationdata) \| null | | color_string? | string \| null | #### Image @@ -1351,29 +1351,29 @@ No scopes required | id | string | | channel_id | string | | guild_id? | string \| null | -| author? | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user) \| null | -| member? | [GuildMember](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/guildmember) \| null | +| author? | [User](/docs/developer-tools/embedded-app-sdk#user) \| null | +| member? | [GuildMember](/docs/developer-tools/embedded-app-sdk#guildmember) \| null | | content | string | | timestamp | string | | edited_timestamp? | string \| null | | tts | boolean | | mention_everyone | boolean | -| mentions | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user)[] | +| mentions | [User](/docs/developer-tools/embedded-app-sdk#user)[] | | mention_roles | string[] | -| mention_channels | [ChannelMention](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/channelmention)[] | -| attachments | [Attachment](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/attachment)[] | -| embeds | [Embed](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/embed)[] | -| reactions? | [Reaction](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/reaction)[] \| null | +| mention_channels | [ChannelMention](/docs/developer-tools/embedded-app-sdk#channelmention)[] | +| attachments | [Attachment](/docs/developer-tools/embedded-app-sdk#attachment)[] | +| embeds | [Embed](/docs/developer-tools/embedded-app-sdk#embed)[] | +| reactions? | [Reaction](/docs/developer-tools/embedded-app-sdk#reaction)[] \| null | | nonce? | string | number \| null | | pinned | boolean | | webhook_id? | string \| null | | type | number | -| activity? | [MessageActivity](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/messageactivity) \| null | -| application? | [MessageApplication](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/messageapplication) \| null | -| message_reference? | [MessageReference](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/messagereference) \| null | +| activity? | [MessageActivity](/docs/developer-tools/embedded-app-sdk#messageactivity) \| null | +| application? | [MessageApplication](/docs/developer-tools/embedded-app-sdk#messageapplication) \| null | +| message_reference? | [MessageReference](/docs/developer-tools/embedded-app-sdk#messagereference) \| null | | flags? | number | | stickers? | Sticker[] \| null | -| referenced_message? | [Message](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/message) \| null | +| referenced_message? | [Message](/docs/developer-tools/embedded-app-sdk#message) \| null | #### MessageActivity @@ -1434,7 +1434,7 @@ No scopes required |----------|-------------------------------------------------------| | count | number | | me | boolean | -| emoji | [Emoji](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/emoji) | +| emoji | [Emoji](/docs/developer-tools/embedded-app-sdk#emoji) | #### Secrets @@ -1447,7 +1447,7 @@ No scopes required | Property | Type | |----------|-------------------------------------------------------------| -| activity | [Activity](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/activity) | +| activity | [Activity](/docs/developer-tools/embedded-app-sdk#activity) | #### SetConfigRequest @@ -1465,9 +1465,9 @@ No scopes required | Property | Type | |-------------------------------|-----------------------------------------------------------------------------------------------| -| lock_state | [OrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationlockstatetypeobject) | -| picture_in_picture_lock_state | [OrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationlockstatetypeobject) | -| grid_lock_state | [OrientationLockState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/orientationlockstatetypeobject) | +| lock_state | [OrientationLockState](/docs/developer-tools/embedded-app-sdk#orientationlockstatetypeobject) | +| picture_in_picture_lock_state | [OrientationLockState](/docs/developer-tools/embedded-app-sdk#orientationlockstatetypeobject) | +| grid_lock_state | [OrientationLockState](/docs/developer-tools/embedded-app-sdk#orientationlockstatetypeobject) | #### ShareLinkRequest @@ -1488,8 +1488,8 @@ No scopes required |----------------|-----------------------------------------------------------------------| | id | string | | name | string | -| type | [SkuTypeObject](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/skutypeobject) | -| price | [SkuPrice](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/skuprice) | +| type | [SkuTypeObject](/docs/developer-tools/embedded-app-sdk#skutypeobject) | +| price | [SkuPrice](/docs/developer-tools/embedded-app-sdk#skuprice) | | application_id | string | | flags | number | | release_date | string \| null | @@ -1511,7 +1511,7 @@ No scopes required | Value | |-----------------------------------------------------------------------------| -| [Entitlement](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/entitlement)[] \| null | +| [Entitlement](/docs/developer-tools/embedded-app-sdk#entitlement)[] \| null | #### Timestamp @@ -1529,7 +1529,7 @@ No scopes required | discriminator | string | | global_name? | string \| null | | avatar? | string \| null | -| avatar_decoration_data | [AvatarDecorationData](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/avatardecorationdata) \| null | +| avatar_decoration_data | [AvatarDecorationData](/docs/developer-tools/embedded-app-sdk#avatardecorationdata) \| null | | bot | boolean | | flags? | number \| null | | premium_type? | number \| null | @@ -1546,8 +1546,8 @@ No scopes required |-------------|-----------------------------------------------------------------| | mute | boolean | | nick | string | -| user | [User](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/user) | -| voice_state | [VoiceState](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/voicestate) | +| user | [User](/docs/developer-tools/embedded-app-sdk#user) | +| voice_state | [VoiceState](/docs/developer-tools/embedded-app-sdk#voicestate) | | volume | number | #### Video diff --git a/docs/developer-tools/game-sdk.mdx b/docs/developer-tools/game-sdk.mdx index 57fc01cb0f..a618380ce1 100644 --- a/docs/developer-tools/game-sdk.mdx +++ b/docs/developer-tools/game-sdk.mdx @@ -3,7 +3,7 @@ # Game SDK > warn -> **The Game SDK has been archived.**
We recommend using the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) for new projects.
Existing projects using the Game SDK will continue to work, but we encourage you to migrate to the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) for new features and updates. +> **The Game SDK has been archived.**
We recommend using the [Discord Social SDK](/docs/discord-social-sdk/overview) for new projects.
Existing projects using the Game SDK will continue to work, but we encourage you to migrate to the [Discord Social SDK](/docs/discord-social-sdk/overview) for new features and updates. Welcome to the documentation for the Discord Game SDK! We're glad you made it. The Game SDK helps you develop your 3rd party game or app, and integrate it with Discord. @@ -11,7 +11,7 @@ Welcome to the documentation for the Discord Game SDK! We're glad you made it. T ## Getting Started -This section will walk you through the first few steps you need to take to get up-and-running with the Game SDK. After you download the SDK and configure your app, you can find more details in the [Using the SDK section](#DOCS_DEVELOPER_TOOLS_GAME_SDK/using-the-sdk). +This section will walk you through the first few steps you need to take to get up-and-running with the Game SDK. After you download the SDK and configure your app, you can find more details in the [Using the SDK section](/docs/developer-tools/game-sdk#using-the-sdk). ### Step 1: Get the SDK @@ -26,7 +26,7 @@ These files are comprised of two parts: a "stub", and fallback modules. What tha ### Step 2: Create your App -Next, we need to set up the application for your game. An [app](#DOCS_RESOURCES_APPLICATION) is the base "entity" in Discord for your game. +Next, we need to set up the application for your game. An [app](/docs/resources/application) is the base "entity" in Discord for your game. Head over to our [developer site](https://discord.com/developers/) and create an account/log in if you haven't yet. The first thing we're going to do is create a Team. Teams are groups of developers working together on applications; you should create a team for your organization at [https://discord.com/developers/teams](https://discord.com/developers/teams). You can invite other users to join your team and work on applications together with you. @@ -253,9 +253,9 @@ Each manager class contains its own functions and events used to interact with D | Name | Description | |----------------------------------------------------------------|------------------------------------------------------------| -| [`ActivityManager`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activities) | for Rich Presence and game invites | -| [`OverlayManager`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/overlay) | for interacting with Discord's built-in overlay | -| [`UserManager`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/users) | for fetching user data for a given id and the current user | +| [`ActivityManager`](/docs/developer-tools/game-sdk#activities) | for Rich Presence and game invites | +| [`OverlayManager`](/docs/developer-tools/game-sdk#overlay) | for interacting with Discord's built-in overlay | +| [`UserManager`](/docs/developer-tools/game-sdk#users) | for fetching user data for a given id and the current user | ### Using Functions in the SDK @@ -297,7 +297,7 @@ Discord passes a number of environment variables down to the SDK. These are acce | name | method | description | |------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------| -| DISCORD_INSTANCE_ID | [Local Testing](#DOCS_DEVELOPER_TOOLS_GAME_SDK/testing-locally) | the locally running instance of Discord to connect to; allows you to choose between multiple running clients | +| DISCORD_INSTANCE_ID | [Local Testing](/docs/developer-tools/game-sdk#testing-locally) | the locally running instance of Discord to connect to; allows you to choose between multiple running clients | | DISCORD_ACCESS_TOKEN | [ApplicationManager.GetOAuth2Token()](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Applications.md#getoauth2token) | the connected user's bearer token | | DISCORD_CURRENT_LOCALE | [ApplicationManager.GetCurrentLocale()](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Applications.md#getcurrentlocale) | the language that Discord is in for the connected user | | DISCORD_CURRENT_BRANCH | [ApplicationManager.GetCurrentBranch()](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Applications.md#getcurrentbranch) | the branch of the running application that the user has launched | @@ -566,11 +566,11 @@ var overlayManager = discord.GetOverlayManager(); ## Activities > info -> Looking to build a game inside of Discord? Check out the (other) [Activities](#DOCS_ACTIVITIES_OVERVIEW) and the [Embedded SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) documentation. +> Looking to build a game inside of Discord? Check out the (other) [Activities](/docs/activities/overview) and the [Embedded SDK](/docs/developer-tools/embedded-app-sdk) documentation. Looking to integrate Rich Presence into your game? No need to manage multiple SDKs—this one does all that awesome stuff, too! Delight your players with the ability to post game invites in chat and party up directly from Discord. Surface interesting live game data in their profile for their friends, encouraging them to group up and play together. -For more detailed information and documentation around the Rich Presence feature set and integration tips, check out our [Rich Presence Documentation](#DOCS_RICH_PRESENCE_OVERVIEW). +For more detailed information and documentation around the Rich Presence feature set and integration tips, check out our [Rich Presence Documentation](/docs/rich-presence/overview). ### Data Models @@ -592,10 +592,10 @@ For more detailed information and documentation around the Rich Presence feature | Name | string | name of the application - this is a read-only field | | State | string | the player's current party status | | Details | string | what the player is currently doing | -| Timestamps | [ActivityTimestamps](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitytimestamps-struct) | helps create elapsed/remaining timestamps on a player's profile | -| Assets | [ActivityAssets](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activityassets-struct) | assets to display on the player's profile | -| Party | [ActivityParty](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activityparty-struct) | information about the player's party | -| Secrets | [ActivitySecrets](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitysecrets-struct) | secret passwords for joining and spectating the player's game | +| Timestamps | [ActivityTimestamps](/docs/developer-tools/game-sdk#activitytimestamps-struct) | helps create elapsed/remaining timestamps on a player's profile | +| Assets | [ActivityAssets](/docs/developer-tools/game-sdk#activityassets-struct) | assets to display on the player's profile | +| Party | [ActivityParty](/docs/developer-tools/game-sdk#activityparty-struct) | information about the player's party | +| Secrets | [ActivitySecrets](/docs/developer-tools/game-sdk#activitysecrets-struct) | secret passwords for joining and spectating the player's game | | Instance | bool | whether this activity is an instanced context, like a match | #### ActivityTimestamps Struct @@ -609,9 +609,9 @@ For more detailed information and documentation around the Rich Presence feature | name | type | description | |------------|--------|----------------------------------------------------------------------------------------------| -| LargeImage | string | see [Activity Asset Image](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) | +| LargeImage | string | see [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | | LargeText | string | hover text for the large image | -| SmallImage | string | see [Activity Asset Image](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) | +| SmallImage | string | see [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | | SmallText | string | hover text for the small image | #### ActivityParty Struct @@ -647,7 +647,7 @@ For more detailed information and documentation around the Rich Presence feature | Custom | 4 | | Competing | 5 | -For more details about the activity types, [see Gateway documentation](#DOCS_EVENTS_GATEWAY_EVENTS//activity-object-activity-types). +For more details about the activity types, [see Gateway documentation](/docs/events/gateway-events#/activity-object-activity-types). `ActivityType` is strictly for the purpose of handling events that you receive from Discord; though the SDK will not reject a payload with an `ActivityType` sent, it will be discarded and will not change anything in the client. @@ -858,7 +858,7 @@ activityManager.OnActivityJoinRequest += user => #### SendInvite -Sends a game invite to a given user. If you do not have a valid activity with all the required fields, this call will error. See [Activity Action Field Requirements](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activity-action-field-requirements) for the fields required to have join and spectate invites function properly. +Sends a game invite to a given user. If you do not have a valid activity with all the required fields, this call will error. See [Activity Action Field Requirements](/docs/developer-tools/game-sdk#activity-action-field-requirements) for the fields required to have join and spectate invites function properly. Returns a `Discord.Result` via callback. @@ -1216,7 +1216,7 @@ overlayManager.SetLocked(true, (res) => #### OpenActivityInvite -Opens the overlay modal for sending game invitations to users, channels, and servers. If you do not have a valid activity with all the required fields, this call will error. See [Activity Action Field Requirements](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activity-action-field-requirements) for the fields required to have join and spectate invites function properly. +Opens the overlay modal for sending game invitations to users, channels, and servers. If you do not have a valid activity with all the required fields, this call will error. See [Activity Action Field Requirements](/docs/developer-tools/game-sdk#activity-action-field-requirements) for the fields required to have join and spectate invites function properly. Returns a `Discord.Result` via callback. @@ -1245,7 +1245,7 @@ overlayManager.OpenActivityInvite(Discord.ActivityActionType.Join, (result) => Opens the overlay modal for joining a Discord guild, given its invite code. An invite code for a server may look something like `fortnite` for a verified server—the full invite being `discord.gg/fortnite`—or something like `rjEeUJq` for a non-verified server, the full invite being `discord.gg/rjEeUJq`. -Returns a `Discord.Result` via callback. Note that a successful `Discord.Result` response does not necessarily mean that the user has joined the guild. If you want more granular control over and knowledge about users joining your guild, you may want to look into implementing the [`guilds.join` OAuth2 scope in an authorization code grant](#DOCS_TOPICS_OAUTH2/authorization-code-grant) in conjunction with the [Add Guild Members](#DOCS_RESOURCES_GUILD/add-guild-member) endpoint. +Returns a `Discord.Result` via callback. Note that a successful `Discord.Result` response does not necessarily mean that the user has joined the guild. If you want more granular control over and knowledge about users joining your guild, you may want to look into implementing the [`guilds.join` OAuth2 scope in an authorization code grant](/docs/topics/oauth2#authorization-code-grant) in conjunction with the [Add Guild Members](/docs/resources/guild#add-guild-member) endpoint. ###### Parameters @@ -1377,9 +1377,9 @@ This manager helps retrieve basic user information for any user on Discord. #### GetCurrentUser > info -> Before calling this function, you'll need to wait for the [OnCurrentUserUpdate](#DOCS_DEVELOPER_TOOLS_GAME_SDK/oncurrentuserupdate) callback to fire after instantiating the User manager. +> Before calling this function, you'll need to wait for the [OnCurrentUserUpdate](/docs/developer-tools/game-sdk#oncurrentuserupdate) callback to fire after instantiating the User manager. -Fetch information about the currently connected user account. If you're interested in getting more detailed information about a user—for example, their email—check out our [GetCurrentUser](#DOCS_RESOURCES_USER/get-current-user) API endpoint. You'll want to call this with an authorization header of `Bearer `, where `` is the token retrieved from a standard [OAuth2 Authorization Code Grant](#DOCS_TOPICS_OAUTH2/authorization-code-grant) flow. +Fetch information about the currently connected user account. If you're interested in getting more detailed information about a user—for example, their email—check out our [GetCurrentUser](/docs/resources/user#get-current-user) API endpoint. You'll want to call this with an authorization header of `Bearer `, where `` is the token retrieved from a standard [OAuth2 Authorization Code Grant](/docs/topics/oauth2#authorization-code-grant) flow. Returns a `Discord.User`. @@ -1422,7 +1422,7 @@ userManager.GetUser(userId, (Discord.Result result, ref Discord.User user) => #### GetCurrentUserPremiumType -Get the [PremiumType](#DOCS_DEVELOPER_TOOLS_GAME_SDK/premiumtype-enum) for the currently connected user. +Get the [PremiumType](/docs/developer-tools/game-sdk#premiumtype-enum) for the currently connected user. Returns `Discord.PremiumType`. @@ -1453,7 +1453,7 @@ switch (premiumType) #### CurrentUserHasFlag -See whether or not the current user has a certain [UserFlag](#DOCS_DEVELOPER_TOOLS_GAME_SDK/userflag-enum) on their account. +See whether or not the current user has a certain [UserFlag](/docs/developer-tools/game-sdk#userflag-enum) on their account. Returns `bool`. @@ -1461,7 +1461,7 @@ Returns `bool`. | name | type | description | |------|----------------------------------------------------------|-----------------------------------------| -| flag | [UserFlag](#DOCS_DEVELOPER_TOOLS_GAME_SDK/userflag-enum) | the flag to check on the user's account | +| flag | [UserFlag](/docs/developer-tools/game-sdk#userflag-enum) | the flag to check on the user's account | ###### Example diff --git a/docs/discord-social-sdk/core-concepts.mdx b/docs/discord-social-sdk/core-concepts.mdx index 5b48a9f42c..9add0ea981 100644 --- a/docs/discord-social-sdk/core-concepts.mdx +++ b/docs/discord-social-sdk/core-concepts.mdx @@ -3,7 +3,7 @@ sidebar_label: Core Concepts --- import ConsoleAccess from './partials/callouts/console-access.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > {sidebar_label} # Core Concepts: Discord Social SDK @@ -25,15 +25,15 @@ To implement the Discord Social SDK, developers for all platforms will generally - Link an existing Discord account via OAuth ([`Client::Authorize`]). - Create and manage provisional accounts for users who don't have or want a Discord account ([`Client::GetProvisionalToken`]). 4. Implement social features - - Implement [unified friends list](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_CREATING_A_UNIFIED_FRIENDS_LIST) and [relationships](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_RELATIONSHIPS). - - Use [rich presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) for game activity updates. - - Set up [lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES) for multiplayer interaction and [game invites](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_GAME_INVITES). - - Manage [direct message](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SENDING_DIRECT_MESSAGES), [linked channels](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_CREATING_A_UNIFIED_FRIENDS_LIST), and [voice communication](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_JOINING_VOICE_CHAT). + - Implement [unified friends list](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) and [relationships](/docs/discord-social-sdk/development-guides/managing-relationships). + - Use [rich presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) for game activity updates. + - Set up [lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) for multiplayer interaction and [game invites](/docs/discord-social-sdk/development-guides/managing-game-invites). + - Manage [direct message](/docs/discord-social-sdk/development-guides/sending-direct-messages), [linked channels](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list), and [voice communication](/docs/discord-social-sdk/development-guides_JOINING_VOICE_CHAT). 5. Handle events & API calls: - Listen for changes in friend lists, presence updates, and chat messages. - Use Discord's APIs to update statuses, send messages, and manage connections. -This guide is a conceptual overview. If you're ready to start building, [follow our step-by-step guide](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) to set up the SDK in your game engine. +This guide is a conceptual overview. If you're ready to start building, [follow our step-by-step guide](/docs/discord-social-sdk/getting-started) to set up the SDK in your game engine. --- @@ -45,7 +45,7 @@ The following features are only fully unlocked when joining the closed beta: - **Voice chat integration** delivers excellent audio quality and lets you create individual user voice streams. - **Linked Channels** provide persistent group chats that allow conversations to flow seamlessly before, during, and after gameplay—both in-game and out. -While these limited access features are available in the Discord Social SDK, their usage is capped with a rate limit. Please read our [documentation on rate limits](#DOCS_TOPICS_RATE_LIMITS) to learn more. +While these limited access features are available in the Discord Social SDK, their usage is capped with a rate limit. Please read our [documentation on rate limits](/docs/topics/rate-limits) to learn more. > preview > To apply for full access to closed beta features or to reach out to Discord directly to discuss your game, please fill out [this form](https://discord.com/developers/social-sdk-closed-beta-access-request-form). @@ -55,7 +55,7 @@ While these limited access features are available in the Discord Social SDK, th ## SDK Platform Compatibility > info -> You can find instructions on how to download the SDK for each platform in the [Getting Started](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) guide. +> You can find instructions on how to download the SDK for each platform in the [Getting Started](/docs/discord-social-sdk/getting-started) guide. The Discord Social SDK is available for the following platforms: @@ -96,13 +96,13 @@ Account linking allows a game to authenticate users with their Discord credentia | Development Guides | |----------------------------------------------------------------------------------------------------------| -| [Account Linking with Discord](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD) | -| [Account Linking on Consoles](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES) | +| [Account Linking with Discord](/docs/discord-social-sdk/development-guides/account-linking-with-discord) | +| [Account Linking on Consoles](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES) | | Design Guidelines | |----------------------------------------------------------------------------------| -| [Signing in with Discord](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_SIGNING_IN) | -| [Consoles](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_CONSOLES) | +| [Signing in with Discord](/docs/discord-social-sdk/design-guidelines_SIGNING_IN) | +| [Consoles](/docs/discord-social-sdk/design-guidelines_CONSOLES) | ### Provisional Accounts @@ -110,11 +110,11 @@ Provisional accounts let players use social features in your game without linkin | Development Guides | |------------------------------------------------------------------------------------------------------| -| [Using Provisional Accounts](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_USING_PROVISIONAL_ACCOUNTS) | +| [Using Provisional Accounts](/docs/discord-social-sdk/development-guides/using-provisional-accounts) | | Design Guidelines | |-----------------------------------------------------------------------------------------| -| [Provisional Accounts](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_PROVISIONAL_ACCOUNTS) | +| [Provisional Accounts](/docs/discord-social-sdk/design-guidelines/provisional-accounts) | ### Friend System & Relationships @@ -125,12 +125,12 @@ The SDK models friendships and relationships in two ways: | Development Guides | |----------------------------------------------------------------------------------------------------------------| -| [Creating a Unified Friends List](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_CREATING_A_UNIFIED_FRIENDS_LIST) | +| [Creating a Unified Friends List](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) | | Design Guidelines | |-----------------------------------------------------------------------------------------| -| [Unified Friends List](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_PROVISIONAL_ACCOUNTS) | -| [Game Friends](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_GAME_FRIENDS) | +| [Unified Friends List](/docs/discord-social-sdk/design-guidelines/provisional-accounts) | +| [Game Friends](/docs/discord-social-sdk/design-guidelines_GAME_FRIENDS) | ### Messaging & Communication @@ -141,12 +141,12 @@ Users can communicate via direct messages (DMs) and voice calls: | Development Guides | |------------------------------------------------------------------------------------------------| -| [Sending Direct Messages](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SENDING_DIRECT_MESSAGES) | -| [Joining Voice Chat](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_JOINING_VOICE_CHAT) | +| [Sending Direct Messages](/docs/discord-social-sdk/development-guides/sending-direct-messages) | +| [Joining Voice Chat](/docs/discord-social-sdk/development-guides_JOINING_VOICE_CHAT) | | Design Guidelines | |-------------------------------------------------------------------------------| -| [Direct Messages](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_DIRECT_MESSAGES) | +| [Direct Messages](/docs/discord-social-sdk/design-guidelines_DIRECT_MESSAGES) | ### Presence & Rich Presence @@ -158,11 +158,11 @@ Presence refers to a user's online status, while Rich Presence provides game-spe | Development Guides | |--------------------------------------------------------------------------------------------| -| [Setting Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) | +| [Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) | | Design Guidelines | |-------------------------------------------------------------------------------------------| -| [Status & Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_STATUS_RICH_PRESENCE) | +| [Status & Rich Presence](/docs/discord-social-sdk/design-guidelines_STATUS_RICH_PRESENCE) | ### Lobbies & In-Game Chat @@ -173,7 +173,7 @@ A lobby is a virtual space where players can interact through voice and text cha | Development Guides | |---------------------------------------------------------------------------------| -| [Manging Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES) | +| [Manging Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) | ### Linked Channels @@ -181,11 +181,11 @@ Games can link in-game chat with Discord's server-based text channels in their U | Development Guides | |--------------------------------------------------------------------------------| -| [Linked channels](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_LINKED_CHANNELS) | +| [Linked channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) | | Design Guidelines | |-------------------------------------------------------------------------------| -| [Linked channels](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_LINKED_CHANNELS) | +| [Linked channels](/docs/discord-social-sdk/design-guidelines_LINKED_CHANNELS) | --- @@ -213,7 +213,7 @@ Some SDK features are currently available but have limited access. Those feature - `sdk.social_layer` > preview -> For more information about these features, please see [Core Concepts: Limited Access Features](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS/limited-access-features). +> For more information about these features, please see [Core Concepts: Limited Access Features](/docs/discord-social-sdk/core-concepts#limited-access-features). The Social SDK provides two helper methods that you can use when setting up your OAuth2 flow: @@ -224,7 +224,7 @@ If your game requires additional scopes, you can add them to the default scopes You should only add scopes that are necessary for your game to function. Requesting unnecessary scopes can lead to user distrust and may result in users not linking their Discord account. -See [available OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) available with the Discord API. +See [available OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) available with the Discord API. ### OAuth2 Client Types @@ -240,7 +240,7 @@ Some Social SDK methods require your Discord application to be a **Public Client ### Design Guidelines -Check out the [Discord Social SDK Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) for more best practices and common integration scenarios. +Check out the [Discord Social SDK Design Guidelines](/docs/discord-social-sdk/design-guidelines) for more best practices and common integration scenarios. --- @@ -250,13 +250,13 @@ Check out the [Discord Social SDK Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DE Check out the full [Discord Social SDK Reference](https://discord.com/developers/docs/social-sdk/index.html) for reference details. -For development guides on implementing specific features, refer to the [Discord Social SDK Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES). +For development guides on implementing specific features, refer to the [Discord Social SDK Development Guides](/docs/discord-social-sdk/development-guides). ### Discord HTTP API -When working with the Discord HTTP API directly from your game backend, developers can use the [Discord API Reference](#DOCS_REFERENCE) to see available endpoints and methods. +When working with the Discord HTTP API directly from your game backend, developers can use the [Discord API Reference](/docs/reference) to see available endpoints and methods. -Learn more about [Using the Discord HTTP API](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_USING_WITH_DISCORD_APIS) with the Discord Social SDK. +Learn more about [Using the Discord HTTP API](/docs/discord-social-sdk/development-guides/using-with-discord-apis) with the Discord Social SDK. --- diff --git a/docs/discord-social-sdk/design-guidelines.mdx b/docs/discord-social-sdk/design-guidelines.mdx index f6fe231d7f..6ac92d03e8 100644 --- a/docs/discord-social-sdk/design-guidelines.mdx +++ b/docs/discord-social-sdk/design-guidelines.mdx @@ -15,46 +15,46 @@ subpages: - design-guidelines/linked-channels.mdx --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > Design Guidelines +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > Design Guidelines # Discord Social SDK Design Guidelines These design guidelines provide best practices and guidelines for designing social features in your game. Following these patterns can create a seamless and engaging user experience that leverages SDK social features to enhance your game. -If you are looking for a place to get started, we recommend you start with [Principles](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_PRINCIPLES) or the [Getting Started](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) guide. +If you are looking for a place to get started, we recommend you start with [Principles](/docs/discord-social-sdk/design-guidelines_PRINCIPLES) or the [Getting Started](/docs/discord-social-sdk/getting-started) guide. - + Fundamental best practices for integrating Discord's social layer into your game. These principles ensure a seamless and engaging user experience. - + Strategies for implementing user authentication and account linking, allowing players to connect their Discord accounts with your game. - + Key integration points where your game can interact with Discord's services, enhancing the overall player experience through seamless connectivity. - + Guidelines for using Discord's brand assets within your game, ensuring consistent and respectful representation of the Discord brand. - + Techniques for designing a unified friends list - allowing players to see and interact with their Discord friends directly within your game. - + Best practices for enabling direct messaging between players, facilitating private communication, and enhancing social interactions. - + Designing around provisional accounts for users who prefer not to link their Discord accounts, allowing them to enjoy social features still. - + Leveraging Discord's presence and rich presence features to display detailed player status and game activity for in-game social interactions. - + Integrating Discord's social features on console platforms, ensuring a consistent experience across different devices. - + Techniques for managing and displaying in-game friends, allowing players to connect and play with their Discord friends easily. - + Guidelines for linking Discord channels to your game, enabling players to connect and communicate across different platforms. diff --git a/docs/discord-social-sdk/design-guidelines/branding-guidelines.mdx b/docs/discord-social-sdk/design-guidelines/branding-guidelines.mdx index a311479807..aea0d66f99 100644 --- a/docs/discord-social-sdk/design-guidelines/branding-guidelines.mdx +++ b/docs/discord-social-sdk/design-guidelines/branding-guidelines.mdx @@ -2,7 +2,7 @@ sidebar_label: Branding Guidelines --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Branding Guidelines +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Branding Guidelines # Branding Guidelines diff --git a/docs/discord-social-sdk/design-guidelines/connection-points.mdx b/docs/discord-social-sdk/design-guidelines/connection-points.mdx index 55dacfb67d..8d04639e2e 100644 --- a/docs/discord-social-sdk/design-guidelines/connection-points.mdx +++ b/docs/discord-social-sdk/design-guidelines/connection-points.mdx @@ -2,7 +2,7 @@ sidebar_label: Connection Points --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Connection Points +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Connection Points # Connection Points @@ -14,7 +14,7 @@ If the game has account management, then this connection point is **required**, Discord's sign-in button is presented as the **primary option** to log-in for the player amongst the list of **external identity-providers** due to providing deeper user-benefits than a standard OAuth login. -Please use the [**Blurple Button**](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_BRANDING_GUIDELINES/buttons) button styling for the sign-in connection point. +Please use the [**Blurple Button**](/docs/discord-social-sdk/design-guidelines_BRANDING_GUIDELINES/buttons) button styling for the sign-in connection point. ![Signing In](images/social-sdk/design-guidelines/ConnectionPoints-03.png) diff --git a/docs/discord-social-sdk/design-guidelines/consoles.mdx b/docs/discord-social-sdk/design-guidelines/consoles.mdx index 45c5f657ed..460f8b9791 100644 --- a/docs/discord-social-sdk/design-guidelines/consoles.mdx +++ b/docs/discord-social-sdk/design-guidelines/consoles.mdx @@ -4,7 +4,7 @@ sidebar_label: Consoles import ConsoleAccess from '../partials/callouts/console-access.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > {sidebar_label} # {sidebar_label} @@ -40,7 +40,7 @@ Game chat will be available for games who support the feature on consoles. Howev ## Friends list on console -Please leverage the same [friends list guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_UNIFIED_FRIENDS_LIST) previously documented in the playbook. There are no notable differences in the friends list on console in comparison to other devices. However, consoles do not support hover interactions so there needs to be console-friendly way for players to access secondary information (such as alternate identities) about friends in the list. +Please leverage the same [friends list guidelines](/docs/discord-social-sdk/design-guidelines_UNIFIED_FRIENDS_LIST) previously documented in the playbook. There are no notable differences in the friends list on console in comparison to other devices. However, consoles do not support hover interactions so there needs to be console-friendly way for players to access secondary information (such as alternate identities) about friends in the list. ![chat on console](images/social-sdk/design-guidelines/Consoles-06.jpg) @@ -48,7 +48,7 @@ Please leverage the same [friends list guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESI ## Resources -- [Development Guide: Account Linking on Consoles](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES) +- [Development Guide: Account Linking on Consoles](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/direct-messages.mdx b/docs/discord-social-sdk/design-guidelines/direct-messages.mdx index b7714df46f..33aa4a73f2 100644 --- a/docs/discord-social-sdk/design-guidelines/direct-messages.mdx +++ b/docs/discord-social-sdk/design-guidelines/direct-messages.mdx @@ -2,14 +2,14 @@ sidebar_label: Direct Messages --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Direct Messages +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Direct Messages # Direct Messages ## Badge when online elsewhere -The badging logic in direct-messages is consistent with the logic detailed in the [Unified Friends List](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_UNIFIED_FRIENDS_LIST) section. +The badging logic in direct-messages is consistent with the logic detailed in the [Unified Friends List](/docs/discord-social-sdk/design-guidelines_UNIFIED_FRIENDS_LIST) section. If the user is **online elsewhere** and is not in the game client, their usernames will include a **Discord badge**. Once they're online in the game-client, they will not retain the Discord badge. @@ -32,7 +32,7 @@ When content isn't clickable, don't show the icon. ## Resources -- [Development Guide: Direct Messages](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SENDING_DIRECT_MESSAGES) +- [Development Guide: Direct Messages](/docs/discord-social-sdk/development-guides/sending-direct-messages) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/game-friends.mdx b/docs/discord-social-sdk/design-guidelines/game-friends.mdx index 91743b31de..3b2b4c4523 100644 --- a/docs/discord-social-sdk/design-guidelines/game-friends.mdx +++ b/docs/discord-social-sdk/design-guidelines/game-friends.mdx @@ -2,7 +2,7 @@ sidebar_label: Game Friends --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > {sidebar_label} # {sidebar_label} @@ -79,7 +79,7 @@ This mock showcases how the corresponding DM looks within Discord's UI. ## Resources -- [Development Guide: Managing Relationships](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_RELATIONSHIPS) +- [Development Guide: Managing Relationships](/docs/discord-social-sdk/development-guides/managing-relationships) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/linked-channels.mdx b/docs/discord-social-sdk/design-guidelines/linked-channels.mdx index 2a64c3e799..d47f66fa5c 100644 --- a/docs/discord-social-sdk/design-guidelines/linked-channels.mdx +++ b/docs/discord-social-sdk/design-guidelines/linked-channels.mdx @@ -2,7 +2,7 @@ sidebar_label: Linked Channels --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > {sidebar_label} # {sidebar_label} @@ -78,7 +78,7 @@ When "Remove channel-link" is interacted with, show the player a **confirmation* ## Resources -- [Development Guide: Linked Channels](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_LINKED_CHANNELS) +- [Development Guide: Linked Channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) - [Design Assets: Linked Channel Icon](https://github.com/discord/discord-api-docs/blob/main/resources/discord-social-sdk) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/principles.mdx b/docs/discord-social-sdk/design-guidelines/principles.mdx index c9dc315d4c..1926e3f73a 100644 --- a/docs/discord-social-sdk/design-guidelines/principles.mdx +++ b/docs/discord-social-sdk/design-guidelines/principles.mdx @@ -2,7 +2,7 @@ sidebar_label: Principles --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Principles +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Principles # Principles diff --git a/docs/discord-social-sdk/design-guidelines/provisional-accounts.mdx b/docs/discord-social-sdk/design-guidelines/provisional-accounts.mdx index df9798947f..ef8280522a 100644 --- a/docs/discord-social-sdk/design-guidelines/provisional-accounts.mdx +++ b/docs/discord-social-sdk/design-guidelines/provisional-accounts.mdx @@ -2,7 +2,7 @@ sidebar_label: Provisional Accounts --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Provisional Accounts +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Provisional Accounts # Provisional Accounts @@ -42,7 +42,7 @@ Because provisional accounts have limited capabilities, for example, you cannot ## Resources -- [Development Guide: Using Provisional Accounts](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_USING_PROVISIONAL_ACCOUNTS) +- [Development Guide: Using Provisional Accounts](/docs/discord-social-sdk/development-guides/using-provisional-accounts) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/signing-in.mdx b/docs/discord-social-sdk/design-guidelines/signing-in.mdx index 583a87ba70..9b13f25264 100644 --- a/docs/discord-social-sdk/design-guidelines/signing-in.mdx +++ b/docs/discord-social-sdk/design-guidelines/signing-in.mdx @@ -2,7 +2,7 @@ sidebar_label: Signing In --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Signing In +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Signing In # Signing In @@ -11,7 +11,7 @@ sidebar_label: Signing In ## Overall flow -Sign-in or log-in flows all begin with the interaction of a [**Discord-styled button**](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_BRANDING_GUIDELINES/buttons). +Sign-in or log-in flows all begin with the interaction of a [**Discord-styled button**](/docs/discord-social-sdk/design-guidelines_BRANDING_GUIDELINES/buttons). The Discord Social SDK will support the user-journeys for those who already **have a Discord account** and those who **do not**. We will similarly support those who have Discord installed as well as those who do not (via browser). @@ -75,7 +75,7 @@ Please include these key points sequentially in the game's writing-style: ## Resources -- [Development Guide: Account Linking with Discord](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD) +- [Development Guide: Account Linking with Discord](/docs/discord-social-sdk/development-guides/account-linking-with-discord) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/status-rich-presence.mdx b/docs/discord-social-sdk/design-guidelines/status-rich-presence.mdx index 5a26001186..2e8419a3d0 100644 --- a/docs/discord-social-sdk/design-guidelines/status-rich-presence.mdx +++ b/docs/discord-social-sdk/design-guidelines/status-rich-presence.mdx @@ -2,7 +2,7 @@ sidebar_label: Status & Rich Presence --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > Status & Rich Presence +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > Status & Rich Presence # Status & Rich Presence @@ -44,7 +44,7 @@ Avatars are not required. The game developer should set rich presence — this will show in both the Discord and game client. -Please refer to [**Setting Rich Presence**](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) for more information on Rich Presence, such as other types of traits that can be included. +Please refer to [**Setting Rich Presence**](/docs/discord-social-sdk/development-guides/setting-rich-presence) for more information on Rich Presence, such as other types of traits that can be included. ![Rich Presence](images/social-sdk/design-guidelines/StatusPresence-06.png) @@ -52,7 +52,7 @@ Please refer to [**Setting Rich Presence**](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT ## Resources -- [Development Guide: Setting Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) +- [Development Guide: Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/unified-friends-list.mdx b/docs/discord-social-sdk/design-guidelines/unified-friends-list.mdx index b0a92da67c..cae326ccc5 100644 --- a/docs/discord-social-sdk/design-guidelines/unified-friends-list.mdx +++ b/docs/discord-social-sdk/design-guidelines/unified-friends-list.mdx @@ -2,7 +2,7 @@ sidebar_label: Unified Friends List --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Design Guidelines](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Design Guidelines](/docs/discord-social-sdk/design-guidelines) > {sidebar_label} # {sidebar_label} @@ -81,7 +81,7 @@ Avoid friend-lists organized by company. This hierarchy dilutes the value-prop o ## Resources -- [Development Guide: Creating a Unified Friends List](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_CREATING_A_UNIFIED_FRIENDS_LIST) +- [Development Guide: Creating a Unified Friends List](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) ## Change Log diff --git a/docs/discord-social-sdk/development-guides.mdx b/docs/discord-social-sdk/development-guides.mdx index ab0fb9dbac..bb4e2b2124 100644 --- a/docs/discord-social-sdk/development-guides.mdx +++ b/docs/discord-social-sdk/development-guides.mdx @@ -17,36 +17,36 @@ subpages: - development-guides/using-with-discord-apis.mdx --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > Development Guides +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > Development Guides # Discord Social SDK Development Guides These guides include suggested development practices, and user flows for you to consider while integrating the Discord Social SDK into your game. These will help provide your users with a consistent and clear experience while interacting with your game. -If you are new to the Discord Social SDK, we recommend you start with the [Getting Started](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) guide. +If you are new to the Discord Social SDK, we recommend you start with the [Getting Started](/docs/discord-social-sdk/getting-started) guide. ## Authentication & Account Linking - + Learn how to authenticate users with their Discord accounts using OAuth2. - + Implement Discord authentication flows for console platforms. - + Give your users a seamless account experience with provisional accounts. ## Game Relationships, Presence & Game Invites - + Combine Discord and game-specific friends in one view. - + Display detailed game status in Discord profiles. - + Implement cross-platform game invites. @@ -54,16 +54,16 @@ If you are new to the Discord Social SDK, we recommend you start with the [Getti ## Text & Voice Chat - + Enable private messaging between players. - + Bring players together in a shared lobby with invites, text chat, and voice comms. - + Connect game lobbies to Discord text channels. - + Add in-game voice communication. @@ -72,10 +72,10 @@ If you are new to the Discord Social SDK, we recommend you start with the [Getti ## Developer Best Practices - + Use logging and debugging tools to troubleshoot issues. - + Make requests to Discord's HTTP APIs from your game. \ No newline at end of file diff --git a/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx b/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx index 82d43eec0d..7b33524b79 100644 --- a/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx +++ b/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx @@ -5,7 +5,7 @@ import ConsoleAccess from '../partials/callouts/console-access.mdx'; import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -24,7 +24,7 @@ By following this guide, you will learn how to: Before you begin, make sure you have: -- Read the [Core Concepts](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS) guide to understand: +- Read the [Core Concepts](/docs/discord-social-sdk/core-concepts) guide to understand: - OAuth2 authentication flow - Discord application setup - SDK initialization @@ -35,7 +35,7 @@ Before you begin, make sure you have: -If you haven't completed these prerequisites, we recommend following the [Getting Started](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) guide. +If you haven't completed these prerequisites, we recommend following the [Getting Started](/docs/discord-social-sdk/getting-started) guide. --- @@ -92,11 +92,11 @@ If you plan to handle console authorization manually, you can follow these steps We'll be following the same OAuth2 device authorization flow as the automatic method, but you'll need to manually handle the polling and token exchange. -1. [Request a device code from Discord](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES/step-1-request-a-device-code-from-discord) -2. [Display the user verification information](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES/step-2-display-authorize-screen-with-qr-code-and-user-code) or open the authorization screen (optional) -3. [Poll for the user's authorization](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES/step-3-poll-for-users-authorization) -4. [Exchange the device code for an access token](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES/step-4-exchange-device-code-for-access-token) -5. [Handle the token response](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_ON_CONSOLES/step-5-handle-token-response) and close authorization screen (optional) +1. [Request a device code from Discord](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-1-request-a-device-code-from-discord) +2. [Display the user verification information](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-2-display-authorize-screen-with-qr-code-and-user-code) or open the authorization screen (optional) +3. [Poll for the user's authorization](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-3-poll-for-users-authorization) +4. [Exchange the device code for an access token](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-4-exchange-device-code-for-access-token) +5. [Handle the token response](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-5-handle-token-response) and close authorization screen (optional) ### Step 1: Request a Device Code from Discord @@ -277,7 +277,7 @@ client->UpdateToken(discordpp::AuthorizationTokenType::Bearer, accessToken, [cli You'll want to store the access and refresh tokens for the player to use in future sessions. -Please note that `access_token` values do expire. You'll need to make use of the `refresh_token` to refresh the player's token, which is covered under [Refreshing Access Tokens](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD/refreshing-access-tokens). +Please note that `access_token` values do expire. You'll need to make use of the `refresh_token` to refresh the player's token, which is covered under [Refreshing Access Tokens](/docs/discord-social-sdk/development-guides/account-linking-with-discord#refreshing-access-tokens). --- @@ -286,13 +286,13 @@ Please note that `access_token` values do expire. You'll need to make use of the Now that you've successfully implemented account linking with Discord on a console, you can integrate more social features into your game. - + Combine Discord and game friends into a single list for easy management. - + Display game status and information to Discord friends. - + Follow our design guidelines when integrating Discord features into a console game. diff --git a/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx b/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx index 7c983cb818..7814f22112 100644 --- a/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx +++ b/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx @@ -4,7 +4,7 @@ sidebar_label: Account Linking with Discord import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -12,13 +12,13 @@ import SupportCallout from '../partials/callouts/support.mdx'; This guide explains how to authenticate users with their existing Discord accounts via OAuth2, enabling seamless login and access to Discord features. ### Flexible Account Options -If a player does not have a Discord account, you can use the SDK to [create a provisional account](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_USING_PROVISIONAL_ACCOUNTS) instead so that they can still access your game's features. +If a player does not have a Discord account, you can use the SDK to [create a provisional account](/docs/discord-social-sdk/development-guides/using-provisional-accounts) instead so that they can still access your game's features. ### Prerequisites Before you begin, make sure you have: -- Read the [Core Concepts](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS) guide to understand: +- Read the [Core Concepts](/docs/discord-social-sdk/core-concepts) guide to understand: - OAuth2 authentication flow - Discord application setup - SDK initialization @@ -27,7 +27,7 @@ Before you begin, make sure you have: - Discord Social SDK downloaded and configured - Basic SDK integration working (initialization and connection) -If you haven't completed these prerequisites, we recommend first following the [Getting Started](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) guide. +If you haven't completed these prerequisites, we recommend first following the [Getting Started](/docs/discord-social-sdk/getting-started) guide. --- @@ -36,10 +36,10 @@ If you haven't completed these prerequisites, we recommend first following the [ OAuth2 is the standard authentication flow that allows users to sign in using their Discord account. The process follows these steps: -1. [Request authorization](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD/step-1-request-authorization): Your game sends an authentication request to Discord. -2. [User Approval](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD/step-2-user-approval): The user approves the request, granting access to your application. -3. [Receive Authorization Code](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD/step-3-receiving-the-authorization-code): After approval, Discord redirects the user to your app with an authorization code. -4. [Exchange for Tokens](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD/step-4-exchanging-the-authorization-code-for-an-access-token): The authorization code is exchanged for: +1. [Request authorization](/docs/discord-social-sdk/development-guides/account-linking-with-discord#step-1-request-authorization): Your game sends an authentication request to Discord. +2. [User Approval](/docs/discord-social-sdk/development-guides/account-linking-with-discord#step-2-user-approval): The user approves the request, granting access to your application. +3. [Receive Authorization Code](/docs/discord-social-sdk/development-guides/account-linking-with-discord#step-3-receiving-the-authorization-code): After approval, Discord redirects the user to your app with an authorization code. +4. [Exchange for Tokens](/docs/discord-social-sdk/development-guides/account-linking-with-discord#step-4-exchanging-the-authorization-code-for-an-access-token): The authorization code is exchanged for: - Access Token, which is valid for ~7 days - Refresh Token, used to obtain a new access token @@ -73,7 +73,7 @@ One of the required arguments to [`Client::Authorize`] is scopes, which is the s #### Authorization Code Verifier -If you are using [`Client::GetToken`] in [Step 4](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD/step-4-exchanging-the-authorization-code-for-an-access-token), you will need to specify a "code challenge" and "code verifier" in your requests. We'll spare you the boring details of how that works (woo… crypto), as we've made a simple function to create these for you, [`Client::CreateAuthorizationCodeVerifier`], which you can use to generate the code challenge and verifier. +If you are using [`Client::GetToken`] in [Step 4](/docs/discord-social-sdk/development-guides/account-linking-with-discord#step-4-exchanging-the-authorization-code-for-an-access-token), you will need to specify a "code challenge" and "code verifier" in your requests. We'll spare you the boring details of how that works (woo… crypto), as we've made a simple function to create these for you, [`Client::CreateAuthorizationCodeVerifier`], which you can use to generate the code challenge and verifier. ```cpp // Create a code verifier and challenge if using GetToken @@ -239,13 +239,13 @@ def revoke_token(access_or_refresh_token): Now that you've successfully implemented account linking with Discord, you can integrate more social features into your game. - + Design guidelines for account linking and user authentication - + Combine Discord and game friends into a single list for easy management. - + Display game status and information to Discord friends. diff --git a/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx b/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx index b87b8d8e6e..761dc22f6c 100644 --- a/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx +++ b/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx @@ -4,7 +4,7 @@ sidebar_label: Creating a Unified Friends List import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # Creating a Unified Friends List @@ -19,9 +19,9 @@ A unified friends list combines both Discord and game-specific relationships in ### Prerequisites Before you begin, make sure you have: -- Set up the Discord Social SDK with [Getting Started Guide](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) -- Authenticated your users with [Development Guide: Account Linking](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_ACCOUNT_LINKING_WITH_DISCORD) -- Understanding of relationship types with [Development Guide: Managing Relationships in Your Game](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_RELATIONSHIPS) +- Set up the Discord Social SDK with [Getting Started Guide](/docs/discord-social-sdk/getting-started) +- Authenticated your users with [Development Guide: Account Linking](/docs/discord-social-sdk/development-guides/account-linking-with-discord) +- Understanding of relationship types with [Development Guide: Managing Relationships in Your Game](/docs/discord-social-sdk/development-guides/managing-relationships) ### Implementing a Unified Friends List @@ -29,9 +29,9 @@ The Discord friend list is ultimately constructed from two entities: Relationshi ### Relationships -[Relationships](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_RELATIONSHIPS) are how Discord models friends, friend requests, and more. All relationships for the current user are loaded when the Client connects. Each relationship has a target user id, and a type, such as `Friend`, `PendingOutgoing`, or `Blocked`. The set of all relationships can be queried with [`Client::GetRelationships`]. +[Relationships](/docs/discord-social-sdk/development-guides/managing-relationships) are how Discord models friends, friend requests, and more. All relationships for the current user are loaded when the Client connects. Each relationship has a target user id, and a type, such as `Friend`, `PendingOutgoing`, or `Blocked`. The set of all relationships can be queried with [`Client::GetRelationships`]. -To allow users to manage their relationships in your game, you should provide a way to accept or reject friend requests, block users, and manage pending requests. See [Development Guide: Managing Relationships in Your Game](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_RELATIONSHIPS) for implementation details. +To allow users to manage their relationships in your game, you should provide a way to accept or reject friend requests, block users, and manage pending requests. See [Development Guide: Managing Relationships in Your Game](/docs/discord-social-sdk/development-guides/managing-relationships) for implementation details. ### Users @@ -47,7 +47,7 @@ Presence is how Discord stores whether a user is currently online or not, as wel > info The SDK will only display activities associated with the current game, meaning you will not be able to see other game activities in Rich Presence, even if you can see them in the Discord client. -See our [Design Guidelines: Status & Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_STATUS_RICH_PRESENCE) for best practices on displaying presence information. +See our [Design Guidelines: Status & Rich Presence](/docs/discord-social-sdk/design-guidelines_STATUS_RICH_PRESENCE) for best practices on displaying presence information. Let's combine to create a unified friends list. @@ -116,7 +116,7 @@ This will output the raw relationship data to the console. You can use this info ## Step 2: Organize Relationships -Based on our design guidelines for a [Unified Friends List](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_UNIFIED_FRIENDS_LIST), you should separate the player's friends list into three sections: `Online - GameTitle`, `Online - Elsewhere`, and `Offline`. +Based on our design guidelines for a [Unified Friends List](/docs/discord-social-sdk/design-guidelines_UNIFIED_FRIENDS_LIST), you should separate the player's friends list into three sections: `Online - GameTitle`, `Online - Elsewhere`, and `Offline`. Because we are building a text console application, we will use emojis to represent the status of each friend but you can use your own design elements to convey status and presence in your game. @@ -265,13 +265,13 @@ Now your friends list will automatically update when the presence of a friend ch Now that you have a unified friends list, you can build on your social features by allowing players to manage relationships, send game invites, and more. Check out our other guides for more information: - + Best practices for designing your Unified Friends List. - + Allow players to manage their friends, friend requests, and blocked users. - + Allow players to invite friends to join their game session or party. diff --git a/docs/discord-social-sdk/development-guides/debugging-logging.mdx b/docs/discord-social-sdk/development-guides/debugging-logging.mdx index 99cc3ea4ec..ce1ca460b9 100644 --- a/docs/discord-social-sdk/development-guides/debugging-logging.mdx +++ b/docs/discord-social-sdk/development-guides/debugging-logging.mdx @@ -4,7 +4,7 @@ sidebar_label: Debugging & Logging import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -37,13 +37,13 @@ client->AddLogCallback([](auto message, auto severity) { ## Next Steps - + Learn how to get started with the Discord Social SDK. - + Understand the core concepts of the Discord Social SDK. - + Learn how to link user accounts with Discord. diff --git a/docs/discord-social-sdk/development-guides/joining-voice-chat.mdx b/docs/discord-social-sdk/development-guides/joining-voice-chat.mdx index 0226dc505a..e696f4b7ff 100644 --- a/docs/discord-social-sdk/development-guides/joining-voice-chat.mdx +++ b/docs/discord-social-sdk/development-guides/joining-voice-chat.mdx @@ -5,7 +5,7 @@ import LimitedAccessCallout from '../partials/callouts/limited-access.mdx'; import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -23,13 +23,13 @@ Lobbies support voice chat, allowing players to communicate with each other whil ## Next Steps - + Combine Discord and game friends into a single list for easy management. - + Display game status and information to Discord friends. - + Allow players to invite friends to join their game session or party. diff --git a/docs/discord-social-sdk/development-guides/linked-channels.mdx b/docs/discord-social-sdk/development-guides/linked-channels.mdx index fee11cf787..b16a53e14b 100644 --- a/docs/discord-social-sdk/development-guides/linked-channels.mdx +++ b/docs/discord-social-sdk/development-guides/linked-channels.mdx @@ -5,7 +5,7 @@ import LimitedAccessCallout from '../partials/callouts/limited-access.mdx'; import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -24,8 +24,8 @@ When linked: Before implementing Linked Channels, make sure you have: -- [Set up the Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) -- An understanding of [Creating and Managing Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES) +- [Set up the Discord Social SDK](/docs/discord-social-sdk/getting-started) +- An understanding of [Creating and Managing Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) --- @@ -69,7 +69,7 @@ To help you identify which channels are public or private, we have added a `isVi #### Linking A Lobby -The lobby member must have the `CanLinkLobby` flag set to link a channel to a lobby. This flag is disabled by default and must be explicitly set using the [Lobby API](#DOCS_RESOURCES_LOBBY) for users you want elevated permissions. We recommend only toggling this on for the equivalent of the administrator/owner of a lobby. +The lobby member must have the `CanLinkLobby` flag set to link a channel to a lobby. This flag is disabled by default and must be explicitly set using the [Lobby API](/docs/resources/lobby) for users you want elevated permissions. We recommend only toggling this on for the equivalent of the administrator/owner of a lobby. This allows you, as the game developer, to say, "Only the admins of this guild are allowed to configure the linked channel." @@ -116,14 +116,14 @@ struct GuildChannel { ### Saving a channel link selection -Once the user has chosen a channel to link to, you can call [`Client::LinkChannelToLobby`] to set or change the channel a lobby is linked to. You can also use [`Client::UnlinkChannelFromLobby`] to remove the link. The conditions specified in [Linked Channel Requirements](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_LINKED_CHANNELS/channel-requirements) must be met for the given lobby, channel, and user. +Once the user has chosen a channel to link to, you can call [`Client::LinkChannelToLobby`] to set or change the channel a lobby is linked to. You can also use [`Client::UnlinkChannelFromLobby`] to remove the link. The conditions specified in [Linked Channel Requirements](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS/channel-requirements) must be met for the given lobby, channel, and user. ### Try It Out To test Linked Channels before building out a player interface, here are some steps you can follow to get things working in a prototype using the Discord API: -1. Create a lobby using the **[Create Lobby](#DOCS_RESOURCES_LOBBY/create-lobby)** endpoint. -2. Enable the `CanLinkLobby` flag (`1 << 0`) on your lobby member by either sending a request to the `/lobbies//members/` endpoint or by including the member data in the body of the [Create Lobby](#DOCS_RESOURCES_LOBBY/create-lobby) request. +1. Create a lobby using the **[Create Lobby](/docs/resources/lobby#create-lobby)** endpoint. +2. Enable the `CanLinkLobby` flag (`1 << 0`) on your lobby member by either sending a request to the `/lobbies//members/` endpoint or by including the member data in the body of the [Create Lobby](/docs/resources/lobby#create-lobby) request. 3. Identify a Discord server text channel that your `lobby_member` has the specified permissions enabled for (again, read/write and manage channels) and grab the channel's id. 4. Send a request to the `/lobbies//channel-linking` endpoint described above with the channel id. @@ -295,13 +295,13 @@ int main() { ## Next Steps - + Combine Discord and game friends into a single list for easy management. - + Display game status and information to Discord friends. - + Allow players to invite friends to join their game session or party. diff --git a/docs/discord-social-sdk/development-guides/managing-game-invites.mdx b/docs/discord-social-sdk/development-guides/managing-game-invites.mdx index ebe9c4ba58..dc76ce4d06 100644 --- a/docs/discord-social-sdk/development-guides/managing-game-invites.mdx +++ b/docs/discord-social-sdk/development-guides/managing-game-invites.mdx @@ -4,7 +4,7 @@ sidebar_label: Managing Game Invites import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -16,11 +16,11 @@ Game Invites allow users to invite others to join their game session or party. T Before you begin, make sure you have: -- Set up the Discord Social SDK with our [Getting Started guide](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) -- Familiarized yourself with [Setting Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) +- Set up the Discord Social SDK with our [Getting Started guide](/docs/discord-social-sdk/getting-started) +- Familiarized yourself with [Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) > info -> Let's talk about the naming of some Discord primitives first. Rich Presence, aka "Activity", can be thought of as the "current activity of a user" and is represented by the [`Activity`] class in the SDK and [in our gateway events](#DOCS_EVENTS_GATEWAY_EVENTS#activity-object). This is not to be confused with [Discord Activities](#DOCS_ACTIVITIES_OVERVIEW), which are embedded games that can also set and display rich presence. +> Let's talk about the naming of some Discord primitives first. Rich Presence, aka "Activity", can be thought of as the "current activity of a user" and is represented by the [`Activity`] class in the SDK and [in our gateway events](/docs/events/gateway-events#activity-object). This is not to be confused with [Discord Activities](/docs/activities/overview), which are embedded games that can also set and display rich presence. --- @@ -28,7 +28,7 @@ Before you begin, make sure you have: Game invites, or activity invites, are powered by rich presence. -We covered the basics of [Setting Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) in a previous guide but let's go over the key points again. +We covered the basics of [Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) in a previous guide but let's go over the key points again. ### Setting Up Rich Presence @@ -83,7 +83,7 @@ We're almost there! Let's add the join secret next so we can send and receive ga The last step is to add a join secret to your rich presence activity. -The `Join Secret` is a generic secret that you can use to [join a Discord lobby](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES), a game session, or something else. The game invite system is a way for players to share this secret value with other players - how you use it is up to you. +The `Join Secret` is a generic secret that you can use to [join a Discord lobby](/docs/discord-social-sdk/development-guides/managing-lobbies), a game session, or something else. The game invite system is a way for players to share this secret value with other players - how you use it is up to you. You will also need to set the supported platforms for joining the game so that the Discord client can display the correct invite button for the user's platform. @@ -247,7 +247,7 @@ client->SetActivityJoinCallback([&client](std::string joinSecret) { ## Using Game Invites with Lobbies -Game invites can be used in conjunction with [Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES) to create a seamless experience for players to join a game session or party. +Game invites can be used in conjunction with [Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) to create a seamless experience for players to join a game session or party. When a player accepts a game invite, you can use the join secret to connect the two players in your game. @@ -426,13 +426,13 @@ activity.SetSupportedPlatforms( ## Next Steps - + Combine Discord and game friends into a single list for easy management. - + Bring players together in a shared lobby with invites, text chat, and voice comms. - + Enable private messaging between players. diff --git a/docs/discord-social-sdk/development-guides/managing-lobbies.mdx b/docs/discord-social-sdk/development-guides/managing-lobbies.mdx index 413ff402a4..b25e4697dc 100644 --- a/docs/discord-social-sdk/development-guides/managing-lobbies.mdx +++ b/docs/discord-social-sdk/development-guides/managing-lobbies.mdx @@ -5,7 +5,7 @@ import LimitedAccessCallout from '../partials/callouts/limited-access.mdx'; import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # Creating and Managing Lobbies @@ -25,7 +25,7 @@ This guide will show you how to: Before you begin, make sure you have: -- Set up the Discord Social SDK with our [Getting Started guide](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) +- Set up the Discord Social SDK with our [Getting Started guide](/docs/discord-social-sdk/getting-started) --- @@ -60,7 +60,7 @@ There are two ways to manage lobbies: You can use the Discord HTTP API to create, update, and delete lobbies and manage lobby membership. -See the [Lobby](#DOCS_RESOURCES_LOBBY) API resource for available endpoints and [Using with Discord APIs](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_USING_WITH_DISCORD_APIS) for information on how to authenticate your requests. +See the [Lobby](/docs/resources/lobby) API resource for available endpoints and [Using with Discord APIs](/docs/discord-social-sdk/development-guides/using-with-discord-apis) for information on how to authenticate your requests. > info > Clients will not be able to use [`Client::CreateOrJoinLobby`] or [`Client::LeaveLobby`] with lobbies created using the API. @@ -72,7 +72,7 @@ The SDK client can also create and join lobbies. This works by associating a sec - The relevant SDK functions are [`Client::CreateOrJoinLobby`] and [`Client::LeaveLobby`]. - Lobby secrets are unique per game (ie: application). For example, use a new secret if you want to generate a new lobby at the end of the match. Calling [`Client::LeaveLobby`] and then [`Client::CreateOrJoinLobby`] with the same secret value will just re-add you to the same lobby. - Calling [`Client::CreateOrJoinLobby`] while the user is already in the lobby will update their metadata (if included) instead. -- Discord's Rich Presence system supports syncing this secret, too. Using this flow, clients can request to join another user's activity. When approved, the SDK will be given the secret, which you can access and join the associated lobby if you choose to do so. See the [Game Invites for Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES/creating-lobby-invites) example below. +- Discord's Rich Presence system supports syncing this secret, too. Using this flow, clients can request to join another user's activity. When approved, the SDK will be given the secret, which you can access and join the associated lobby if you choose to do so. See the [Game Invites for Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies#creating-lobby-invites) example below. - If you want to keep track of metadata for the lobby or the lobby members, you can use the [`Client::CreateOrJoinLobbyWithMetadata`] function. This function takes a JSON object as an argument, which will be stored with the lobby and the lobby members. This metadata can be retrieved using the discordpp::Client::GetLobbyHandle function. ```cpp @@ -149,13 +149,13 @@ client->SetMessageCreatedCallback([&client](uint64_t messageId) { You can connect a lobby to a Discord text channel with Linked Channels. Linked Channels allows users to chat with each other in the lobby using Discord, even if they are not in the game. -See our guide on [Linked Channels](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_LINKED_CHANNELS) for more information on how to link a channel to a lobby. +See our guide on [Linked Channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) for more information on how to link a channel to a lobby. --- ## Joining Voice Chat -See our guide on [Joining Voice Chat](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_JOINING_VOICE_CHAT) for more information on how to start a voice call in a lobby. +See our guide on [Joining Voice Chat](/docs/discord-social-sdk/development-guides_JOINING_VOICE_CHAT) for more information on how to start a voice call in a lobby. --- @@ -163,7 +163,7 @@ See our guide on [Joining Voice Chat](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDE Your game can use lobbies and game invites to allow users to invite friends to join an existing lobby. -Check out the [Using Game Invites with Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_GAME_INVITES/using-game-invites-with-lobbies) example to try it out in your game. +Check out the [Using Game Invites with Lobbies](/docs/discord-social-sdk/development-guides/managing-game-invites#using-game-invites-with-lobbies) example to try it out in your game. --- @@ -172,13 +172,13 @@ Check out the [Using Game Invites with Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOP With your game able to create and manage lobbies, you can now implement additional features: - + Allow players to invite friends to join their game session or party. - + Add voice communication to your lobbies. - + Connect lobbies to Discord text channels. diff --git a/docs/discord-social-sdk/development-guides/managing-relationships.mdx b/docs/discord-social-sdk/development-guides/managing-relationships.mdx index 6f678d9fcc..d86f12b006 100644 --- a/docs/discord-social-sdk/development-guides/managing-relationships.mdx +++ b/docs/discord-social-sdk/development-guides/managing-relationships.mdx @@ -4,7 +4,7 @@ sidebar_label: Managing Relationships import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # Managing Relationships in Your Game @@ -21,8 +21,8 @@ The Discord Social SDK lets you manage relationships between players in your gam Before you begin, make sure you have: -- Completed the [Getting Started](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) guide -- Completed the [Creating a Unified Friends List](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_CREATING_A_UNIFIED_FRIENDS_LIST) guide +- Completed the [Getting Started](/docs/discord-social-sdk/getting-started) guide +- Completed the [Creating a Unified Friends List](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) guide --- @@ -65,7 +65,7 @@ While our API technically supports users being both types of friends, you don't ## Relationship Actions -Once you've [created a unified friends list](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_CREATING_A_UNIFIED_FRIENDS_LIST), you can start managing relationships between players in your game. +Once you've [created a unified friends list](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list), you can start managing relationships between players in your game. Here are some common actions you might want to take: @@ -233,13 +233,13 @@ client->UnblockUser(userId, [](discordpp::ClientResult result) { Continue learning about the Discord Social SDK with these guides: - + Combine Discord and game friends into a single list for easy management. - + Allow players to invite friends to join their game session or party. - + Bring players together in a shared lobby with invites, text chat, and voice comms. diff --git a/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx b/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx index 08bfe346fd..0332cc172e 100644 --- a/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx +++ b/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx @@ -5,7 +5,7 @@ import LimitedAccessCallout from '../partials/callouts/limited-access.mdx'; import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -22,8 +22,8 @@ Direct Messages (DMs) allow players to communicate privately. This guide will sh The Discord Social SDK SDK supports two types of chat: -- [Direct messages (DMs) between two users](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SENDING_DIRECT_MESSAGES/sending-a-direct-message-to-a-user) -- [Chat messages within a lobby](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES/sending-messages-to-a-lobby) +- [Direct messages (DMs) between two users](/docs/discord-social-sdk/development-guides/sending-direct-messages#sending-a-direct-message-to-a-user) +- [Chat messages within a lobby](/docs/discord-social-sdk/development-guides/managing-lobbies#sending-messages-to-a-lobby) The SDK receives messages in the following channel types: @@ -60,7 +60,7 @@ client->SendUserMessage(recipientId, message, [](auto result, uint64_t messageId In some situations, messages from your game with the Social SDK will also appear in Discord. This will happen for: - 1 on 1 chat when at least one of the users is a full Discord user -- Lobby chat when the lobby is [linked to a Discord channel](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_LINKED_CHANNELS) +- Lobby chat when the lobby is [linked to a Discord channel](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) - The message must have been sent by a user who is not banned on Discord. When messaging between provisional accounts or non-friends, channel ID and recipient ID is set to the other user's ID. These messages are sent ephemerally and do not persist within a channel. Because of that, you will not be able to resolve a [`ChannelHandle`] for them. @@ -101,7 +101,7 @@ Messages sent on Discord can contain content that may not be renderable in-game, You can use this metadata to render a placeholder message for players and can link out to Discord using [`Client::CanOpenMessageInDiscord`] and [`Client::OpenMessageInDiscord`]. -There is also more information about [messages in the Discord API](#DOCS_RESOURCES_MESSAGE) documentation. +There is also more information about [messages in the Discord API](/docs/resources/message) documentation. --- @@ -110,13 +110,13 @@ There is also more information about [messages in the Discord API](#DOCS_RESOURC Now that you know how to send and receive messages, check out these other Discord Social SDK features: - + Display in-game status and activity to friends. - + Bring players together in a shared lobby with invites, text chat, and voice comms. - + Enable cross-platform text chat between a Discord channel and your game. diff --git a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx index aa79d7cda2..d896f18a92 100644 --- a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx +++ b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx @@ -4,7 +4,7 @@ sidebar_label: Setting Rich Presence import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -15,7 +15,7 @@ Rich Presence allows you to display detailed information about what players are ### Prerequisites Before you begin, make sure you have: -- [Set up the Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) +- [Set up the Discord Social SDK](/docs/discord-social-sdk/getting-started) - Connected to Discord with a valid client instance --- @@ -29,7 +29,7 @@ Rich Presence allows you to display detailed information about players' actions - Server member lists > info -> Let's talk about the naming of some Discord primitives first. Rich Presence, aka "Activity", can be thought of as the "current activity of a user" and is represented by the [`Activity`] class in the SDK and [in our gateway events](#DOCS_EVENTS_GATEWAY_EVENTS#activity-object). This is not to be confused with [Discord Activities](#DOCS_ACTIVITIES_OVERVIEW), which are embedded games that can also set and display rich presence. +> Let's talk about the naming of some Discord primitives first. Rich Presence, aka "Activity", can be thought of as the "current activity of a user" and is represented by the [`Activity`] class in the SDK and [in our gateway events](/docs/events/gateway-events#activity-object). This is not to be confused with [Discord Activities](/docs/activities/overview), which are embedded games that can also set and display rich presence. Each [`Activity`] contains fields that describe the following: @@ -42,7 +42,7 @@ Each [`Activity`] contains fields that describe the following: | `party` | Party information | Shows party size and capacity (e.g., "2 of 4") | | `timestamps` | Activity duration | Shows elapsed or remaining time | | `assets` | Custom artwork | Game/map thumbnails and character icons | -| `secrets` | Join/spectate tokens | Enable [Game Invite](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_GAME_INVITES) functionality | +| `secrets` | Join/spectate tokens | Enable [Game Invite](/docs/discord-social-sdk/development-guides/managing-game-invites) functionality | | `supportedPlatforms` | Platform flags | Control where join buttons appear | See below for examples of how to set these fields in your code. @@ -71,7 +71,7 @@ This diagram visually shows the field mapping: ![Graphical representation of the legend for rich presence details](images/rp-legend.png) > info -> For tips on designing Rich Presence, take a look at the [Rich Presence best practices guide](#DOCS_RICH_PRESENCE_BEST_PRACTICES). +> For tips on designing Rich Presence, take a look at the [Rich Presence best practices guide](/docs/rich-presence/best-practices). --- @@ -93,14 +93,14 @@ To add custom assets for Rich Presence, navigate to your app's settings and clic Up to 300 custom assets can be added to your app for later use when setting Rich Presence for a Discord user. These assets can be anything that help orient others to what a user is doing inside of your Activity or 3rd party game. -If you need more than 300 custom assets or want to use images stored somewhere else, you can also [specify an external URL](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) as long it still has the proper dimensions and size. +If you need more than 300 custom assets or want to use images stored somewhere else, you can also [specify an external URL](/docs/events/gateway-events#activity-object-activity-asset-image) as long it still has the proper dimensions and size. > info -> For tips on choosing assets, take a look at the [Rich Presence best practices guide](#DOCS_RICH_PRESENCE_BEST_PRACTICES/have-interesting-expressive-art). +> For tips on choosing assets, take a look at the [Rich Presence best practices guide](/docs/rich-presence/best-practices#have-interesting-expressive-art). When uploading Rich Presence assets, **the asset keys will automatically be changed to lowercase**. You can see this reflected in your app's settings after saving a newly uploaded asset, and you should keep it in mind when referencing any asset keys in your code. -Once you've uploaded these assets, you can use the asset key to reference them in your code when [Setting Assets in Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE/setting-assets). +Once you've uploaded these assets, you can use the asset key to reference them in your code when [Setting Assets in Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence#setting-assets). ![Rich Presence assets in app settings](images/rich-presence-asset-images.png) @@ -156,13 +156,13 @@ activity.SetAssets(assets); ``` > info -> If you need more than 300 custom assets or want to use images stored somewhere else, you can also [specify an external URL](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) as long it still has the proper dimensions and size. +> If you need more than 300 custom assets or want to use images stored somewhere else, you can also [specify an external URL](/docs/events/gateway-events#activity-object-activity-asset-image) as long it still has the proper dimensions and size. --- ## Setting Party and Join Secret -You can also include party details and a join secret in your Rich Presence to power Game Invites. Check out the [Game Invites guide](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_GAME_INVITES) for more information. +You can also include party details and a join secret in your Rich Presence to power Game Invites. Check out the [Game Invites guide](/docs/discord-social-sdk/development-guides/managing-game-invites) for more information. ```cpp @@ -200,13 +200,13 @@ See the `ActivityGamePlatforms` enum for all supported platforms. Now that you've set up Rich Presence, you might want to explore: - + Allow players to invite friends to join their game session or party. - + Bring players together in a shared lobby with invites, text chat, and voice comms. - + Best practices for Rich Presence UI/UX. diff --git a/docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx b/docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx index db8cbe4f5e..01702b9f8f 100644 --- a/docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx +++ b/docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx @@ -4,7 +4,7 @@ sidebar_label: Using Provisional Accounts import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # Using Provisional Accounts @@ -31,7 +31,7 @@ This guide will show you how to: Before you begin, make sure you have: -- A basic understanding of how the SDK works from the [Getting Started Guide](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED) +- A basic understanding of how the SDK works from the [Getting Started Guide](/docs/discord-social-sdk/getting-started) - An external authentication provider set up for your game --- @@ -391,13 +391,13 @@ def unmerge_provisional_account(external_auth_token): Now that you've set up provisional accounts for your game, you can explore more features of the Discord Social SDK: - + Design guidelines for implementing provisional accounts in your game. - + Combine Discord and game friends into a single list for easy management. - + Display game status and information to Discord friends. diff --git a/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx b/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx index d40e0f566d..3a1032d5be 100644 --- a/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx +++ b/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx @@ -4,7 +4,7 @@ sidebar_label: Using with Discord APIs import PublicClient from '../partials/callouts/public-client.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Development Guides](/docs/discord-social-sdk/development-guides) > {sidebar_label} # {sidebar_label} @@ -122,13 +122,13 @@ with openapi_client.ApiClient(configuration) as api_client: Now that you've set up Rich Presence, you might want to explore: - + Allow players to invite friends to join their game session or party. - + Bring players together in a shared lobby with invites, text chat, and voice comms. - + Best practices for Rich Presence UI/UX. diff --git a/docs/discord-social-sdk/getting-started.mdx b/docs/discord-social-sdk/getting-started.mdx index 6c55177d72..194052316f 100644 --- a/docs/discord-social-sdk/getting-started.mdx +++ b/docs/discord-social-sdk/getting-started.mdx @@ -6,13 +6,13 @@ subpages: - getting-started/using-unreal-engine.mdx --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > Getting Started +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > Getting Started # Getting Started with the Discord Social SDK The Discord Social SDK allows you to integrate Discord social features into your game. With the Discord Social SDK, you can offer a seamless social experience for your players, allowing them to connect with their friends and communities on Discord without leaving your game. -If this is your first time learning about the Discord Social SDK, check out the Discord Social SDK [Overview](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) and [Core Concepts](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS) for more information on what the SDK can do and how it can benefit your game. +If this is your first time learning about the Discord Social SDK, check out the Discord Social SDK [Overview](/docs/discord-social-sdk/overview) and [Core Concepts](/docs/discord-social-sdk/core-concepts) for more information on what the SDK can do and how it can benefit your game. ## Let's Get Started @@ -21,22 +21,22 @@ Select a platform to get started. If you are unsure which platform to choose, we recommend starting with the C++ guide to familiarize yourself with the SDK's core concepts. - + For use with custom engines or standalone applications. - + For use with Unity. - + For use with Unreal Engine. > info -> To see a complete list of currently compatible platforms, check out our [Platform Compatibility](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS/sdk-platform-compatibility) section. +> To see a complete list of currently compatible platforms, check out our [Platform Compatibility](/docs/discord-social-sdk/core-concepts#sdk-platform-compatibility) section. --- ## Next Steps -After you've run through a guide for your preferred platform, you can implement features such as a unified friend list, rich presence, and more. Check out the [Development Guides](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES) for detailed information on using the SDK for each feature. \ No newline at end of file +After you've run through a guide for your preferred platform, you can implement features such as a unified friend list, rich presence, and more. Check out the [Development Guides](/docs/discord-social-sdk/development-guides) for detailed information on using the SDK for each feature. \ No newline at end of file diff --git a/docs/discord-social-sdk/getting-started/partials/getting-started.mdx b/docs/discord-social-sdk/getting-started/partials/getting-started.mdx index f3c3d86b19..2afded95c0 100644 --- a/docs/discord-social-sdk/getting-started/partials/getting-started.mdx +++ b/docs/discord-social-sdk/getting-started/partials/getting-started.mdx @@ -19,7 +19,7 @@ Later, you can invite your team members to your new team to collaborate on your 4. Enable the `Public Client` toggle in the `OAuth2` tab. > warn -> **Note:** This guide requires enabling **Public Client** to allow you to get started with the SDK quickly. Most games will not want to ship as a public client. This setting should be reviewed by your team prior to releasing your game. [Learn more about public clients](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS/oauth2-client-types). +> **Note:** This guide requires enabling **Public Client** to allow you to get started with the SDK quickly. Most games will not want to ship as a public client. This setting should be reviewed by your team prior to releasing your game. [Learn more about public clients](/docs/discord-social-sdk/core-concepts#oauth2-client-types). --- diff --git a/docs/discord-social-sdk/getting-started/using-c++.mdx b/docs/discord-social-sdk/getting-started/using-c++.mdx index 458c684d22..7ebc9b7db9 100644 --- a/docs/discord-social-sdk/getting-started/using-c++.mdx +++ b/docs/discord-social-sdk/getting-started/using-c++.mdx @@ -6,7 +6,7 @@ import ConsoleAccess from '../partials/callouts/console-access.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; import DylibMacError from './partials/dylib-mac-error.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > {sidebar_label} # Getting Started with C++ and the Discord Social SDK @@ -942,13 +942,13 @@ Congratulations! You've successfully integrated the Discord Social SDK into your You have successfully set up the Discord Social SDK with C++ and authenticated with Discord! You can now use the SDK to add more social features in your project. - + Create a unified friends list combining Discord and game-specific friendships - + Customize your game's rich presence to show more advanced information and game invites - + Allow players to invite friends to join their game session or party. diff --git a/docs/discord-social-sdk/getting-started/using-unity.mdx b/docs/discord-social-sdk/getting-started/using-unity.mdx index 2e35bc01ff..c209da68b2 100644 --- a/docs/discord-social-sdk/getting-started/using-unity.mdx +++ b/docs/discord-social-sdk/getting-started/using-unity.mdx @@ -6,7 +6,7 @@ import ConsoleAccess from '../partials/callouts/console-access.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; import DylibMacError from './partials/dylib-mac-error.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > {sidebar_label} # Getting Started with Unity and the Discord Social SDK @@ -154,7 +154,7 @@ This will hook up the API status changes to your text in the game. Then we'll ne - The **status callback** tells you when you're connected and ready to use Discord features > info -> The Unity plugin handles running the SDK callbacks for you in Unity, no need to use [`RunCallbacks`] like we do in the [C++ guide](#DOCS_DISCORD_SOCIAL_SDK_GETTING_STARTED_USING_C++). +> The Unity plugin handles running the SDK callbacks for you in Unity, no need to use [`RunCallbacks`] like we do in the [C++ guide](/docs/discord-social-sdk/getting-started_USING_C++). > info > Most Discord features won't work until the status is `Ready`. The status callback lets you know when you can start using them. @@ -879,13 +879,13 @@ Congratulations! You've successfully integrated the Discord Social SDK into Unit You have successfully set up the Discord Social SDK with Unity and authenticated with Discord!You can now use the SDK to add more social features in your project. - + Create a unified friends list combining Discord and game-specific friendships - + Customize your game's rich presence to show more advanced information and game invites - + Allow players to invite friends to join their game session or party. diff --git a/docs/discord-social-sdk/getting-started/using-unreal-engine.mdx b/docs/discord-social-sdk/getting-started/using-unreal-engine.mdx index 4c3fa3fd06..edaf70901e 100644 --- a/docs/discord-social-sdk/getting-started/using-unreal-engine.mdx +++ b/docs/discord-social-sdk/getting-started/using-unreal-engine.mdx @@ -6,7 +6,7 @@ import ConsoleAccess from '../partials/callouts/console-access.mdx'; import SupportCallout from '../partials/callouts/support.mdx'; import DylibMacError from './partials/dylib-mac-error.mdx'; -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > {sidebar_label} +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > {sidebar_label} # Getting Started with Unreal Engine and the Discord Social SDK @@ -685,13 +685,13 @@ Congratulations! You've successfully integrated the Discord Social SDK into your You have successfully set up the Discord Social SDK with Unreal Engine and authenticated with Discord! You can now use the SDK to add more social features in your project. - + Create a unified friends list combining Discord and game-specific friendships - + Customize your game's rich presence to show more advanced information and game invites - + Allow players to invite friends to join their game session or party. diff --git a/docs/discord-social-sdk/overview.mdx b/docs/discord-social-sdk/overview.mdx index e87f111546..0454136f9d 100644 --- a/docs/discord-social-sdk/overview.mdx +++ b/docs/discord-social-sdk/overview.mdx @@ -1,7 +1,7 @@ --- sidebar_label: Overview --- -[Home](#DOCS_INTRO) > [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) > Overview +[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > Overview # Discord Social SDK @@ -14,10 +14,10 @@ Start integrating the SDK into your game with our getting started guides, design ## Integrate Social Features in Your Game - + Learn how the SDK works and explore its key features. - + Follow our step-by-step guides to add the SDK to your game engine. @@ -25,10 +25,10 @@ Start integrating the SDK into your game with our getting started guides, design ## Dive Deeper into the Discord Social SDK - + Dive into feature guides for **account linking, friends lists, game invites, and voice chat**. - + Learn how to design your game's UI to integrate social features. @@ -43,7 +43,7 @@ Start integrating the SDK into your game with our getting started guides, design Discord Social SDK features for text and voice communication are available but have limited access. > preview -> For more information on how to access these features, please see [Core Concepts: Limited Access Features](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS/limited-access-features). +> For more information on how to access these features, please see [Core Concepts: Limited Access Features](/docs/discord-social-sdk/core-concepts#limited-access-features). --- diff --git a/docs/discord-social-sdk/partials/callouts/limited-access.mdx b/docs/discord-social-sdk/partials/callouts/limited-access.mdx index 4ffcf063ad..c95b5103aa 100644 --- a/docs/discord-social-sdk/partials/callouts/limited-access.mdx +++ b/docs/discord-social-sdk/partials/callouts/limited-access.mdx @@ -1,2 +1,2 @@ > preview -> This feature is currently available with [limited access](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS/limited-access-features). To apply for full access to closed beta features, or to reach out to Discord directly to discuss your game, please fill out [this form](https://discord.com/developers/social-sdk-closed-beta-access-request-form). \ No newline at end of file +> This feature is currently available with [limited access](/docs/discord-social-sdk/core-concepts#limited-access-features). To apply for full access to closed beta features, or to reach out to Discord directly to discuss your game, please fill out [this form](https://discord.com/developers/social-sdk-closed-beta-access-request-form). \ No newline at end of file diff --git a/docs/discord-social-sdk/partials/callouts/public-client.mdx b/docs/discord-social-sdk/partials/callouts/public-client.mdx index bfca8241ce..3a9ae63151 100644 --- a/docs/discord-social-sdk/partials/callouts/public-client.mdx +++ b/docs/discord-social-sdk/partials/callouts/public-client.mdx @@ -1,2 +1,2 @@ > warn -> This method requires enabling **Public Client** for your app. Most games will not want to ship with this enabled. [Learn more](#DOCS_DISCORD_SOCIAL_SDK_CORE_CONCEPTS/oauth2-client-types) \ No newline at end of file +> This method requires enabling **Public Client** for your app. Most games will not want to ship with this enabled. [Learn more](/docs/discord-social-sdk/core-concepts#oauth2-client-types) \ No newline at end of file diff --git a/docs/discovery/best-practices.md b/docs/discovery/best-practices.md index 2a314f6982..16c5821a86 100644 --- a/docs/discovery/best-practices.md +++ b/docs/discovery/best-practices.md @@ -7,7 +7,7 @@ sidebar_label: Best Practices So you’ve made an app on Discord and are ready to opt in to discovery on the App Directory! Or maybe you have already listed your app but aren’t seeing as much traction to it as you’d like? Whatever stage you’re at, this guide has some tips and tricks from your friendly Discord Staff members to help boost performance of your App Directory Product Page. > info -> This guide references settings and information you can set up and modify within your [app's settings](https://discord.com/developers/applications). If you don't have an app yet, you can follow the [Getting Started guide](#DOCS_QUICK_START_GETTING_STARTED). +> This guide references settings and information you can set up and modify within your [app's settings](https://discord.com/developers/applications). If you don't have an app yet, you can follow the [Getting Started guide](/docs/quick-start/getting-started). ## The Elevator Pitch diff --git a/docs/discovery/enabling-discovery.mdx b/docs/discovery/enabling-discovery.mdx index 85f53a1caa..cde564641e 100644 --- a/docs/discovery/enabling-discovery.mdx +++ b/docs/discovery/enabling-discovery.mdx @@ -3,13 +3,13 @@ Are you ready for your app to be discovered by new users and server admins? -Enabling **Discovery** for your app will make it available in the [App Directory](#DOCS_DISCOVERY_OVERVIEW/app-directory) and [App Launcher](#DOCS_DISCOVERY_OVERVIEW/app-launcher) for users to search for and install. +Enabling **Discovery** for your app will make it available in the [App Directory](/docs/discovery/overview#app-directory) and [App Launcher](/docs/discovery/overview#app-launcher) for users to search for and install. ## Step 1: Verify Your App To enable **Discovery** for your app, we require your team owner to complete identity and application verification. -**App Verification** also allows you to add [monetization features](#DOCS_MONETIZATION_OVERVIEW) to your app, such as in-app purchases and subscriptions. +**App Verification** also allows you to add [monetization features](/docs/monetization/overview) to your app, such as in-app purchases and subscriptions. To see the list of requirements for **App Verification**: @@ -50,7 +50,7 @@ To check if your app is discoverable, search for it in the App Directory or App Now that you've enabled **Discovery** for your app, you can start customizing your app's appearance in the App Directory and App Launcher. - + Check out our guide on how to make your app stand out. \ No newline at end of file diff --git a/docs/discovery/overview.mdx b/docs/discovery/overview.mdx index 3c1cfb2fb8..075021ec8e 100644 --- a/docs/discovery/overview.mdx +++ b/docs/discovery/overview.mdx @@ -8,7 +8,7 @@ Learn how to make your app discoverable on Discord through various surfaces and ## Discovery Surfaces -Once you've [enabled discovery for your app](#DOCS_DISCOVERY_ENABLING_DISCOVERY), users can find your app in Discord through the App Directory and the App Launcher. +Once you've [enabled discovery for your app](/docs/discovery/enabling-discovery), users can find your app in Discord through the App Directory and the App Launcher. ### App Directory @@ -54,7 +54,7 @@ Create shareable links to your app's profile page, store page, or specific items ![A shared embed link in Discord for the Sandscape app](images/discovery-sharing-links.png) ### Rich Presence -Use [Rich Presence](#DOCS_RICH_PRESENCE_OVERVIEW) to show what users are doing in your app, driving more users to discover it. +Use [Rich Presence](/docs/rich-presence/overview) to show what users are doing in your app, driving more users to discover it. ![Examples of Rich Presence data on Discord user profiles](images/rich-presence-examples.png) @@ -65,10 +65,10 @@ Use [Rich Presence](#DOCS_RICH_PRESENCE_OVERVIEW) to show what users are doing i Ready to enable discovery for your app? - + Enable discovery for your app to make it available in the App Directory and App Launcher. - + Learn how to make your app stand out and drive more users to discover it. \ No newline at end of file diff --git a/docs/events/gateway-events.mdx b/docs/events/gateway-events.mdx index 4cfc53c8bc..d12e8a7a20 100644 --- a/docs/events/gateway-events.mdx +++ b/docs/events/gateway-events.mdx @@ -9,16 +9,16 @@ Gateway connections are WebSockets, meaning they're bidirectional and either sid - **Send events** are Gateway events sent by an app to Discord (like when identifying with the Gateway) - **Receive events** are Gateway events that are sent by Discord to an app. These events typically represent something happening inside of a server where an app is installed, like a channel being updated. -All Gateway events are encapsulated in a [Gateway event payload](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure). +All Gateway events are encapsulated in a [Gateway event payload](/docs/events/gateway-events#payload-structure). -For more information about interacting with the Gateway, you can reference the [Gateway documentation](#DOCS_EVENTS_GATEWAY). +For more information about interacting with the Gateway, you can reference the [Gateway documentation](/docs/events/gateway). > warn > Not all Gateway event fields are documented. You should assume that undocumented fields are not supported for apps, and their format and data may change at any time. ### Event Names -In practice, event names are UPPER-CASED with under_scores joining each word in the name. For instance, [Channel Create](#DOCS_EVENTS_GATEWAY_EVENTS/channel-create) would be `CHANNEL_CREATE` and [Voice State Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-state-update) would be `VOICE_STATE_UPDATE`. +In practice, event names are UPPER-CASED with under_scores joining each word in the name. For instance, [Channel Create](/docs/events/gateway-events#channel-create) would be `CHANNEL_CREATE` and [Voice State Update](/docs/events/gateway-events#voice-state-update) would be `VOICE_STATE_UPDATE`. For readability, event names in the following documentation are typically left in Title Case. @@ -28,12 +28,12 @@ Gateway event payloads have a common structure, but the contents of the associat | Field | Type | Description | |-------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| op | integer | [Gateway opcode](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-opcodes), which indicates the payload type | +| op | integer | [Gateway opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes), which indicates the payload type | | d | ?mixed (any JSON value) | Event data | -| s | ?integer \* | Sequence number of event used for [resuming sessions](#DOCS_EVENTS_GATEWAY/resuming) and [heartbeating](#DOCS_EVENTS_GATEWAY/sending-heartbeats) | +| s | ?integer \* | Sequence number of event used for [resuming sessions](/docs/events/gateway#resuming) and [heartbeating](/docs/events/gateway#sending-heartbeats) | | t | ?string \* | Event name | -\* `s` and `t` are `null` when `op` is not `0` ([Gateway Dispatch opcode](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-opcodes)). +\* `s` and `t` are `null` when `op` is not `0` ([Gateway Dispatch opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes)). ###### Example Gateway Event Payload @@ -48,38 +48,38 @@ Gateway event payloads have a common structure, but the contents of the associat ## Send Events -Send events are Gateway events encapsulated in an [event payload](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure), and are sent by an app to Discord through a Gateway connection. +Send events are Gateway events encapsulated in an [event payload](/docs/events/gateway-events#payload-structure), and are sent by an app to Discord through a Gateway connection. > info > Previously, Gateway send events were labeled as commands | Name | Description | |------------------------------------------------------------------------------------|-----------------------------------------------------------| -| [Identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify) | Triggers the initial handshake with the gateway | -| [Resume](#DOCS_EVENTS_GATEWAY_EVENTS/resume) | Resumes a dropped gateway connection | -| [Heartbeat](#DOCS_EVENTS_GATEWAY_EVENTS/heartbeat) | Maintains an active gateway connection | -| [Request Guild Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) | Requests members for a guild | -| [Request Soundboard Sounds](#DOCS_EVENTS_GATEWAY_EVENTS/request-soundboard-sounds) | Requests soundboard sounds in a set of guilds | -| [Update Voice State](#DOCS_EVENTS_GATEWAY_EVENTS/update-voice-state) | Joins, moves, or disconnects the app from a voice channel | -| [Update Presence](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence) | Updates an app's presence | +| [Identify](/docs/events/gateway-events#identify) | Triggers the initial handshake with the gateway | +| [Resume](/docs/events/gateway-events#resume) | Resumes a dropped gateway connection | +| [Heartbeat](/docs/events/gateway-events#heartbeat) | Maintains an active gateway connection | +| [Request Guild Members](/docs/events/gateway-events#request-guild-members) | Requests members for a guild | +| [Request Soundboard Sounds](/docs/events/gateway-events#request-soundboard-sounds) | Requests soundboard sounds in a set of guilds | +| [Update Voice State](/docs/events/gateway-events#update-voice-state) | Joins, moves, or disconnects the app from a voice channel | +| [Update Presence](/docs/events/gateway-events#update-presence) | Updates an app's presence | #### Identify Used to trigger the initial handshake with the gateway. -Details about identifying is in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/identifying). +Details about identifying is in the [Gateway documentation](/docs/events/gateway#identifying). ###### Identify Structure | Field | Type | Description | Default | |------------------|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|---------| | token | string | Authentication token | - | -| properties | object | [Connection properties](#DOCS_EVENTS_GATEWAY_EVENTS/identify-identify-connection-properties) | - | +| properties | object | [Connection properties](/docs/events/gateway-events#identify-identify-connection-properties) | - | | compress? | boolean | Whether this connection supports compression of packets | false | | large_threshold? | integer | Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list | 50 | -| shard? | array of two integers (shard_id, num_shards) | Used for [Guild Sharding](#DOCS_EVENTS_GATEWAY/sharding) | - | -| presence? | [update presence](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence) object | Presence structure for initial presence information | - | -| intents | integer | [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents) you wish to receive | - | +| shard? | array of two integers (shard_id, num_shards) | Used for [Guild Sharding](/docs/events/gateway#sharding) | - | +| presence? | [update presence](/docs/events/gateway-events#update-presence) object | Presence structure for initial presence information | - | +| intents | integer | [Gateway Intents](/docs/events/gateway#gateway-intents) you wish to receive | - | ###### Identify Connection Properties @@ -90,7 +90,7 @@ Details about identifying is in the [Gateway documentation](#DOCS_EVENTS_GATEWAY | device | string | Your library name | > warn -> These fields originally were $ prefixed (i.e: `$browser`) but [this syntax is deprecated](#DOCS_CHANGE_LOG/updated-connection-property-field-names). While they currently still work, it is recommended to move to non-prefixed fields. +> These fields originally were $ prefixed (i.e: `$browser`) but [this syntax is deprecated](/docs/change-log#updated-connection-property-field-names). While they currently still work, it is recommended to move to non-prefixed fields. ###### Example Identify @@ -127,7 +127,7 @@ Details about identifying is in the [Gateway documentation](#DOCS_EVENTS_GATEWAY Used to replay missed events when a disconnected client resumes. -Details about resuming are in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/resuming). +Details about resuming are in the [Gateway documentation](/docs/events/gateway#resuming). ###### Resume Structure @@ -152,9 +152,9 @@ Details about resuming are in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/r #### Heartbeat -Used to maintain an active gateway connection. Must be sent every `heartbeat_interval` milliseconds after the [Opcode 10 Hello](#DOCS_EVENTS_GATEWAY_EVENTS/hello) payload is received. The inner `d` key is the last sequence number—`s`—received by the client. If you have not yet received one, send `null`. +Used to maintain an active gateway connection. Must be sent every `heartbeat_interval` milliseconds after the [Opcode 10 Hello](/docs/events/gateway-events#hello) payload is received. The inner `d` key is the last sequence number—`s`—received by the client. If you have not yet received one, send `null`. -Details about heartbeats are in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/sending-heartbeats). +Details about heartbeats are in the [Gateway documentation](/docs/events/gateway#sending-heartbeats). ###### Example Heartbeat @@ -167,7 +167,7 @@ Details about heartbeats are in the [Gateway documentation](#DOCS_EVENTS_GATEWAY #### Request Guild Members -Used to request all members for a guild or a list of guilds. When initially connecting, if you don't have the `GUILD_PRESENCES` [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents), or if the guild is over 75k members, it will only send members who are in voice, plus the member for you (the connecting user). Otherwise, if a guild has over `large_threshold` members (value in the [Gateway Identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify)), it will only send members who are online, have a role, have a nickname, or are in a voice channel, and if it has under `large_threshold` members, it will send all members. If a client wishes to receive additional members, they need to explicitly request them via this operation. The server will send [Guild Members Chunk](#DOCS_EVENTS_GATEWAY_EVENTS/guild-members-chunk) events in response with up to 1000 members per chunk until all members that match the request have been sent. +Used to request all members for a guild or a list of guilds. When initially connecting, if you don't have the `GUILD_PRESENCES` [Gateway Intent](/docs/events/gateway#gateway-intents), or if the guild is over 75k members, it will only send members who are in voice, plus the member for you (the connecting user). Otherwise, if a guild has over `large_threshold` members (value in the [Gateway Identify](/docs/events/gateway-events#identify)), it will only send members who are online, have a role, have a nickname, or are in a voice channel, and if it has under `large_threshold` members, it will send all members. If a client wishes to receive additional members, they need to explicitly request them via this operation. The server will send [Guild Members Chunk](/docs/events/gateway-events#guild-members-chunk) events in response with up to 1000 members per chunk until all members that match the request have been sent. Due to our privacy and infrastructural concerns with this feature, there are some limitations that apply: @@ -186,7 +186,7 @@ Due to our privacy and infrastructural concerns with this feature, there are som | limit | integer | maximum number of members to send matching the `query`; a limit of `0` can be used with an empty string `query` to return all members | true when specifying query | | presences? | boolean | used to specify if we want the presences of the matched members | false | | user_ids? | snowflake or array of snowflakes | used to specify which users you wish to fetch | one of query or user_ids | -| nonce? | string | nonce to identify the [Guild Members Chunk](#DOCS_EVENTS_GATEWAY_EVENTS/guild-members-chunk) response | false | +| nonce? | string | nonce to identify the [Guild Members Chunk](/docs/events/gateway-events#guild-members-chunk) response | false | > info > Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a nonce set. @@ -206,7 +206,7 @@ Due to our privacy and infrastructural concerns with this feature, there are som #### Request Soundboard Sounds -Used to request soundboard sounds for a list of guilds. The server will send [Soundboard Sounds](#DOCS_EVENTS_GATEWAY_EVENTS/soundboard-sounds) events for each guild in response. +Used to request soundboard sounds for a list of guilds. The server will send [Soundboard Sounds](/docs/events/gateway-events#soundboard-sounds) events for each guild in response. ###### Request Soundboard Sounds Structure @@ -261,8 +261,8 @@ Sent by the client to indicate a presence or status update. | Field | Type | Description | |------------|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| | since | ?integer | Unix time (in milliseconds) of when the client went idle, or null if the client is not idle | -| activities | array of [activity](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object) objects | User's activities | -| status | string | User's new [status](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence-status-types) | +| activities | array of [activity](/docs/events/gateway-events#activity-object) objects | User's activities | +| status | string | User's new [status](/docs/events/gateway-events#update-presence-status-types) | | afk | boolean | Whether or not the client is afk | ###### Status Types @@ -294,88 +294,88 @@ Sent by the client to indicate a presence or status update. ## Receive Events -Receive events are Gateway events encapsulated in an [event payload](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure), and are sent by Discord to an app through a Gateway connection. Receive events correspond to events that happen in a Discord server where the app is installed. +Receive events are Gateway events encapsulated in an [event payload](/docs/events/gateway-events#payload-structure), and are sent by Discord to an app through a Gateway connection. Receive events correspond to events that happen in a Discord server where the app is installed. | Name | Description | |--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| -| [Hello](#DOCS_EVENTS_GATEWAY_EVENTS/hello) | Defines the heartbeat interval | -| [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) | Contains the initial state information | -| [Resumed](#DOCS_EVENTS_GATEWAY_EVENTS/resumed) | Response to [Resume](#DOCS_EVENTS_GATEWAY_EVENTS/resume) | -| [Reconnect](#DOCS_EVENTS_GATEWAY_EVENTS/reconnect) | Server is going away, client should reconnect to gateway and resume | -| [Invalid Session](#DOCS_EVENTS_GATEWAY_EVENTS/invalid-session) | Failure response to [Identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify) or [Resume](#DOCS_EVENTS_GATEWAY_EVENTS/resume) or invalid active session | -| [Application Command Permissions Update](#DOCS_EVENTS_GATEWAY_EVENTS/application-command-permissions-update) | Application command permission was updated | -| [Auto Moderation Rule Create](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-create) | Auto Moderation rule was created | -| [Auto Moderation Rule Update](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-update) | Auto Moderation rule was updated | -| [Auto Moderation Rule Delete](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-delete) | Auto Moderation rule was deleted | -| [Auto Moderation Action Execution](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-action-execution) | Auto Moderation rule was triggered and an action was executed (e.g. a message was blocked) | -| [Channel Create](#DOCS_EVENTS_GATEWAY_EVENTS/channel-create) | New guild channel created | -| [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) | Channel was updated | -| [Channel Delete](#DOCS_EVENTS_GATEWAY_EVENTS/channel-delete) | Channel was deleted | -| [Channel Pins Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-pins-update) | Message was pinned or unpinned | -| [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) | Thread created, also sent when being added to a private thread | -| [Thread Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-update) | Thread was updated | -| [Thread Delete](#DOCS_EVENTS_GATEWAY_EVENTS/thread-delete) | Thread was deleted | -| [Thread List Sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync) | Sent when gaining access to a channel, contains all active threads in that channel | -| [Thread Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-member-update) | [Thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) for the current user was updated | -| [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) | Some user(s) were added to or removed from a thread | -| [Entitlement Create](#DOCS_EVENTS_GATEWAY_EVENTS/entitlement-create) | Entitlement was created | -| [Entitlement Update](#DOCS_EVENTS_GATEWAY_EVENTS/entitlement-update) | Entitlement was updated or renewed | -| [Entitlement Delete](#DOCS_EVENTS_GATEWAY_EVENTS/entitlement-delete) | Entitlement was deleted | -| [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) | Lazy-load for unavailable guild, guild became available, or user joined a new guild | -| [Guild Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-update) | Guild was updated | -| [Guild Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-delete) | Guild became unavailable, or user left/was removed from a guild | -| [Guild Audit Log Entry Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-audit-log-entry-create) | A guild audit log entry was created | -| [Guild Ban Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-ban-add) | User was banned from a guild | -| [Guild Ban Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-ban-remove) | User was unbanned from a guild | -| [Guild Emojis Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-emojis-update) | Guild emojis were updated | -| [Guild Stickers Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-stickers-update) | Guild stickers were updated | -| [Guild Integrations Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-integrations-update) | Guild integration was updated | -| [Guild Member Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-add) | New user joined a guild | -| [Guild Member Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-remove) | User was removed from a guild | -| [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) | Guild member was updated | -| [Guild Members Chunk](#DOCS_EVENTS_GATEWAY_EVENTS/guild-members-chunk) | Response to [Request Guild Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) | -| [Guild Role Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-create) | Guild role was created | -| [Guild Role Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-update) | Guild role was updated | -| [Guild Role Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-delete) | Guild role was deleted | -| [Guild Scheduled Event Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-create) | Guild scheduled event was created | -| [Guild Scheduled Event Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-update) | Guild scheduled event was updated | -| [Guild Scheduled Event Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-delete) | Guild scheduled event was deleted | -| [Guild Scheduled Event User Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-user-add) | User subscribed to a guild scheduled event | -| [Guild Scheduled Event User Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-user-remove) | User unsubscribed from a guild scheduled event | -| [Guild Soundboard Sound Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sound-create) | Guild soundboard sound was created | -| [Guild Soundboard Sound Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sound-update) | Guild soundboard sound was updated | -| [Guild Soundboard Sound Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sound-delete) | Guild soundboard sound was deleted | -| [Guild Soundboard Sounds Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sounds-update) | Guild soundboard sounds were updated | -| [Soundboard Sounds](#DOCS_EVENTS_GATEWAY_EVENTS/soundboard-sounds) | Response to [Request Soundboard Sounds](#DOCS_EVENTS_GATEWAY_EVENTS/request-soundboard-sounds) | -| [Integration Create](#DOCS_EVENTS_GATEWAY_EVENTS/integration-create) | Guild integration was created | -| [Integration Update](#DOCS_EVENTS_GATEWAY_EVENTS/integration-update) | Guild integration was updated | -| [Integration Delete](#DOCS_EVENTS_GATEWAY_EVENTS/integration-delete) | Guild integration was deleted | -| [Interaction Create](#DOCS_EVENTS_GATEWAY_EVENTS/interaction-create) | User used an interaction, such as an [Application Command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/) | -| [Invite Create](#DOCS_EVENTS_GATEWAY_EVENTS/invite-create) | Invite to a channel was created | -| [Invite Delete](#DOCS_EVENTS_GATEWAY_EVENTS/invite-delete) | Invite to a channel was deleted | -| [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) | Message was created | -| [Message Update](#DOCS_EVENTS_GATEWAY_EVENTS/message-update) | Message was edited | -| [Message Delete](#DOCS_EVENTS_GATEWAY_EVENTS/message-delete) | Message was deleted | -| [Message Delete Bulk](#DOCS_EVENTS_GATEWAY_EVENTS/message-delete-bulk) | Multiple messages were deleted at once | -| [Message Reaction Add](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-add) | User reacted to a message | -| [Message Reaction Remove](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove) | User removed a reaction from a message | -| [Message Reaction Remove All](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove-all) | All reactions were explicitly removed from a message | -| [Message Reaction Remove Emoji](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove-emoji) | All reactions for a given emoji were explicitly removed from a message | -| [Presence Update](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) | User was updated | -| [Stage Instance Create](#DOCS_EVENTS_GATEWAY_EVENTS/stage-instance-create) | Stage instance was created | -| [Stage Instance Update](#DOCS_EVENTS_GATEWAY_EVENTS/stage-instance-update) | Stage instance was updated | -| [Stage Instance Delete](#DOCS_EVENTS_GATEWAY_EVENTS/stage-instance-delete) | Stage instance was deleted or closed | -| [Subscription Create](#DOCS_EVENTS_GATEWAY_EVENTS/subscription-create) | Premium App Subscription was created | -| [Subscription Update](#DOCS_EVENTS_GATEWAY_EVENTS/subscription-update) | Premium App Subscription was updated | -| [Subscription Delete](#DOCS_EVENTS_GATEWAY_EVENTS/subscription-delete) | Premium App Subscription was deleted | -| [Typing Start](#DOCS_EVENTS_GATEWAY_EVENTS/typing-start) | User started typing in a channel | -| [User Update](#DOCS_EVENTS_GATEWAY_EVENTS/user-update) | Properties about the user changed | -| [Voice Channel Effect Send](#DOCS_EVENTS_GATEWAY_EVENTS/voice-channel-effect-send) | Someone sent an effect in a voice channel the current user is connected to | -| [Voice State Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-state-update) | Someone joined, left, or moved a voice channel | -| [Voice Server Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-server-update) | Guild's voice server was updated | -| [Webhooks Update](#DOCS_EVENTS_GATEWAY_EVENTS/webhooks-update) | Guild channel webhook was created, update, or deleted | -| [Message Poll Vote Add](#DOCS_EVENTS_GATEWAY_EVENTS/message-poll-vote-add) | User voted on a poll | -| [Message Poll Vote Remove](#DOCS_EVENTS_GATEWAY_EVENTS/message-poll-vote-remove) | User removed a vote on a poll | +| [Hello](/docs/events/gateway-events#hello) | Defines the heartbeat interval | +| [Ready](/docs/events/gateway-events#ready) | Contains the initial state information | +| [Resumed](/docs/events/gateway-events#resumed) | Response to [Resume](/docs/events/gateway-events#resume) | +| [Reconnect](/docs/events/gateway-events#reconnect) | Server is going away, client should reconnect to gateway and resume | +| [Invalid Session](/docs/events/gateway-events#invalid-session) | Failure response to [Identify](/docs/events/gateway-events#identify) or [Resume](/docs/events/gateway-events#resume) or invalid active session | +| [Application Command Permissions Update](/docs/events/gateway-events#application-command-permissions-update) | Application command permission was updated | +| [Auto Moderation Rule Create](/docs/events/gateway-events#auto-moderation-rule-create) | Auto Moderation rule was created | +| [Auto Moderation Rule Update](/docs/events/gateway-events#auto-moderation-rule-update) | Auto Moderation rule was updated | +| [Auto Moderation Rule Delete](/docs/events/gateway-events#auto-moderation-rule-delete) | Auto Moderation rule was deleted | +| [Auto Moderation Action Execution](/docs/events/gateway-events#auto-moderation-action-execution) | Auto Moderation rule was triggered and an action was executed (e.g. a message was blocked) | +| [Channel Create](/docs/events/gateway-events#channel-create) | New guild channel created | +| [Channel Update](/docs/events/gateway-events#channel-update) | Channel was updated | +| [Channel Delete](/docs/events/gateway-events#channel-delete) | Channel was deleted | +| [Channel Pins Update](/docs/events/gateway-events#channel-pins-update) | Message was pinned or unpinned | +| [Thread Create](/docs/events/gateway-events#thread-create) | Thread created, also sent when being added to a private thread | +| [Thread Update](/docs/events/gateway-events#thread-update) | Thread was updated | +| [Thread Delete](/docs/events/gateway-events#thread-delete) | Thread was deleted | +| [Thread List Sync](/docs/events/gateway-events#thread-list-sync) | Sent when gaining access to a channel, contains all active threads in that channel | +| [Thread Member Update](/docs/events/gateway-events#thread-member-update) | [Thread member](/docs/resources/channel#thread-member-object) for the current user was updated | +| [Thread Members Update](/docs/events/gateway-events#thread-members-update) | Some user(s) were added to or removed from a thread | +| [Entitlement Create](/docs/events/gateway-events#entitlement-create) | Entitlement was created | +| [Entitlement Update](/docs/events/gateway-events#entitlement-update) | Entitlement was updated or renewed | +| [Entitlement Delete](/docs/events/gateway-events#entitlement-delete) | Entitlement was deleted | +| [Guild Create](/docs/events/gateway-events#guild-create) | Lazy-load for unavailable guild, guild became available, or user joined a new guild | +| [Guild Update](/docs/events/gateway-events#guild-update) | Guild was updated | +| [Guild Delete](/docs/events/gateway-events#guild-delete) | Guild became unavailable, or user left/was removed from a guild | +| [Guild Audit Log Entry Create](/docs/events/gateway-events#guild-audit-log-entry-create) | A guild audit log entry was created | +| [Guild Ban Add](/docs/events/gateway-events#guild-ban-add) | User was banned from a guild | +| [Guild Ban Remove](/docs/events/gateway-events#guild-ban-remove) | User was unbanned from a guild | +| [Guild Emojis Update](/docs/events/gateway-events#guild-emojis-update) | Guild emojis were updated | +| [Guild Stickers Update](/docs/events/gateway-events#guild-stickers-update) | Guild stickers were updated | +| [Guild Integrations Update](/docs/events/gateway-events#guild-integrations-update) | Guild integration was updated | +| [Guild Member Add](/docs/events/gateway-events#guild-member-add) | New user joined a guild | +| [Guild Member Remove](/docs/events/gateway-events#guild-member-remove) | User was removed from a guild | +| [Guild Member Update](/docs/events/gateway-events#guild-member-update) | Guild member was updated | +| [Guild Members Chunk](/docs/events/gateway-events#guild-members-chunk) | Response to [Request Guild Members](/docs/events/gateway-events#request-guild-members) | +| [Guild Role Create](/docs/events/gateway-events#guild-role-create) | Guild role was created | +| [Guild Role Update](/docs/events/gateway-events#guild-role-update) | Guild role was updated | +| [Guild Role Delete](/docs/events/gateway-events#guild-role-delete) | Guild role was deleted | +| [Guild Scheduled Event Create](/docs/events/gateway-events#guild-scheduled-event-create) | Guild scheduled event was created | +| [Guild Scheduled Event Update](/docs/events/gateway-events#guild-scheduled-event-update) | Guild scheduled event was updated | +| [Guild Scheduled Event Delete](/docs/events/gateway-events#guild-scheduled-event-delete) | Guild scheduled event was deleted | +| [Guild Scheduled Event User Add](/docs/events/gateway-events#guild-scheduled-event-user-add) | User subscribed to a guild scheduled event | +| [Guild Scheduled Event User Remove](/docs/events/gateway-events#guild-scheduled-event-user-remove) | User unsubscribed from a guild scheduled event | +| [Guild Soundboard Sound Create](/docs/events/gateway-events#guild-soundboard-sound-create) | Guild soundboard sound was created | +| [Guild Soundboard Sound Update](/docs/events/gateway-events#guild-soundboard-sound-update) | Guild soundboard sound was updated | +| [Guild Soundboard Sound Delete](/docs/events/gateway-events#guild-soundboard-sound-delete) | Guild soundboard sound was deleted | +| [Guild Soundboard Sounds Update](/docs/events/gateway-events#guild-soundboard-sounds-update) | Guild soundboard sounds were updated | +| [Soundboard Sounds](/docs/events/gateway-events#soundboard-sounds) | Response to [Request Soundboard Sounds](/docs/events/gateway-events#request-soundboard-sounds) | +| [Integration Create](/docs/events/gateway-events#integration-create) | Guild integration was created | +| [Integration Update](/docs/events/gateway-events#integration-update) | Guild integration was updated | +| [Integration Delete](/docs/events/gateway-events#integration-delete) | Guild integration was deleted | +| [Interaction Create](/docs/events/gateway-events#interaction-create) | User used an interaction, such as an [Application Command](/docs/interactions/application-commands#) | +| [Invite Create](/docs/events/gateway-events#invite-create) | Invite to a channel was created | +| [Invite Delete](/docs/events/gateway-events#invite-delete) | Invite to a channel was deleted | +| [Message Create](/docs/events/gateway-events#message-create) | Message was created | +| [Message Update](/docs/events/gateway-events#message-update) | Message was edited | +| [Message Delete](/docs/events/gateway-events#message-delete) | Message was deleted | +| [Message Delete Bulk](/docs/events/gateway-events#message-delete-bulk) | Multiple messages were deleted at once | +| [Message Reaction Add](/docs/events/gateway-events#message-reaction-add) | User reacted to a message | +| [Message Reaction Remove](/docs/events/gateway-events#message-reaction-remove) | User removed a reaction from a message | +| [Message Reaction Remove All](/docs/events/gateway-events#message-reaction-remove-all) | All reactions were explicitly removed from a message | +| [Message Reaction Remove Emoji](/docs/events/gateway-events#message-reaction-remove-emoji) | All reactions for a given emoji were explicitly removed from a message | +| [Presence Update](/docs/events/gateway-events#presence-update) | User was updated | +| [Stage Instance Create](/docs/events/gateway-events#stage-instance-create) | Stage instance was created | +| [Stage Instance Update](/docs/events/gateway-events#stage-instance-update) | Stage instance was updated | +| [Stage Instance Delete](/docs/events/gateway-events#stage-instance-delete) | Stage instance was deleted or closed | +| [Subscription Create](/docs/events/gateway-events#subscription-create) | Premium App Subscription was created | +| [Subscription Update](/docs/events/gateway-events#subscription-update) | Premium App Subscription was updated | +| [Subscription Delete](/docs/events/gateway-events#subscription-delete) | Premium App Subscription was deleted | +| [Typing Start](/docs/events/gateway-events#typing-start) | User started typing in a channel | +| [User Update](/docs/events/gateway-events#user-update) | Properties about the user changed | +| [Voice Channel Effect Send](/docs/events/gateway-events#voice-channel-effect-send) | Someone sent an effect in a voice channel the current user is connected to | +| [Voice State Update](/docs/events/gateway-events#voice-state-update) | Someone joined, left, or moved a voice channel | +| [Voice Server Update](/docs/events/gateway-events#voice-server-update) | Guild's voice server was updated | +| [Webhooks Update](/docs/events/gateway-events#webhooks-update) | Guild channel webhook was created, update, or deleted | +| [Message Poll Vote Add](/docs/events/gateway-events#message-poll-vote-add) | User voted on a poll | +| [Message Poll Vote Remove](/docs/events/gateway-events#message-poll-vote-remove) | User removed a vote on a poll | #### Hello @@ -402,27 +402,27 @@ Sent on connection to the websocket. Defines the heartbeat interval that an app The ready event is dispatched when a client has completed the initial handshake with the gateway (for new sessions). The ready event can be the largest and most complex event the gateway will send, as it contains all the state required for a client to begin interacting with the rest of the platform. -`guilds` are the guilds of which your bot is a member. They start out as unavailable when you connect to the gateway. As they become available, your bot will be notified via [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) events. +`guilds` are the guilds of which your bot is a member. They start out as unavailable when you connect to the gateway. As they become available, your bot will be notified via [Guild Create](/docs/events/gateway-events#guild-create) events. ###### Ready Event Fields | Field | Type | Description | |--------------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------| -| v | integer | [API version](#DOCS_REFERENCE/api-versioning-api-versions) | -| user | [user](#DOCS_RESOURCES_USER/user-object) object | Information about the user including email | -| guilds | array of [Unavailable Guild](#DOCS_RESOURCES_GUILD/unavailable-guild-object) objects | Guilds the user is in | +| v | integer | [API version](/docs/reference#api-versioning-api-versions) | +| user | [user](/docs/resources/user#user-object) object | Information about the user including email | +| guilds | array of [Unavailable Guild](/docs/resources/guild#unavailable-guild-object) objects | Guilds the user is in | | session_id | string | Used for resuming connections | | resume_gateway_url | string | Gateway URL for resuming connections | -| shard? | array of two integers (shard_id, num_shards) | [Shard information](#DOCS_EVENTS_GATEWAY/sharding) associated with this session, if sent when identifying | -| application | partial [application object](#DOCS_RESOURCES_APPLICATION/application-object) | Contains `id` and `flags` | +| shard? | array of two integers (shard_id, num_shards) | [Shard information](/docs/events/gateway#sharding) associated with this session, if sent when identifying | +| application | partial [application object](/docs/resources/application#application-object) | Contains `id` and `flags` | #### Resumed -The resumed event is dispatched when a client has sent a [resume payload](#DOCS_EVENTS_GATEWAY_EVENTS/resume) to the gateway (for resuming existing sessions). +The resumed event is dispatched when a client has sent a [resume payload](/docs/events/gateway-events#resume) to the gateway (for resuming existing sessions). #### Reconnect -The reconnect event is dispatched when a client should reconnect to the gateway (and resume their existing session, if they have one). This can occur at any point in the gateway connection lifecycle, even before/in place of receiving a [Hello](#DOCS_EVENTS_GATEWAY_EVENTS/hello) event. A few seconds after the reconnect event is dispatched, the connection may be closed by the server. +The reconnect event is dispatched when a client should reconnect to the gateway (and resume their existing session, if they have one). This can occur at any point in the gateway connection lifecycle, even before/in place of receiving a [Hello](/docs/events/gateway-events#hello) event. A few seconds after the reconnect event is dispatched, the connection may be closed by the server. ###### Example Gateway Reconnect @@ -437,11 +437,11 @@ The reconnect event is dispatched when a client should reconnect to the gateway Sent to indicate one of at least three different situations: -- the gateway could not initialize a session after receiving an [Opcode 2 Identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify) -- the gateway could not resume a previous session after receiving an [Opcode 6 Resume](#DOCS_EVENTS_GATEWAY_EVENTS/resume) +- the gateway could not initialize a session after receiving an [Opcode 2 Identify](/docs/events/gateway-events#identify) +- the gateway could not resume a previous session after receiving an [Opcode 6 Resume](/docs/events/gateway-events#resume) - the gateway has invalidated an active session and is requesting client action -The inner `d` key is a boolean that indicates whether the session may be resumable. See [Connecting](#DOCS_EVENTS_GATEWAY/connecting) and [Resuming](#DOCS_EVENTS_GATEWAY/resuming) for more information. +The inner `d` key is a boolean that indicates whether the session may be resumable. See [Connecting](/docs/events/gateway#connecting) and [Resuming](/docs/events/gateway#resuming) for more information. ###### Example Gateway Invalid Session @@ -456,23 +456,23 @@ The inner `d` key is a boolean that indicates whether the session may be resumab #### Application Command Permissions Update -`APPLICATION_COMMAND_PERMISSIONS_UPDATE` event, sent when an application command's permissions are updated. The inner payload is an [application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-guild-application-command-permissions-structure) object. +`APPLICATION_COMMAND_PERMISSIONS_UPDATE` event, sent when an application command's permissions are updated. The inner payload is an [application command permissions](/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure) object. ### Auto Moderation -All [Auto Moderation](#DOCS_RESOURCES_AUTO_MODERATION) related events are only sent to bot users which have the `MANAGE_GUILD` permission. +All [Auto Moderation](/docs/resorces/auto-moderation) related events are only sent to bot users which have the `MANAGE_GUILD` permission. #### Auto Moderation Rule Create -Sent when a rule is created. The inner payload is an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) object. +Sent when a rule is created. The inner payload is an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) object. #### Auto Moderation Rule Update -Sent when a rule is updated. The inner payload is an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) object. +Sent when a rule is updated. The inner payload is an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) object. #### Auto Moderation Rule Delete -Sent when a rule is deleted. The inner payload is an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) object. +Sent when a rule is deleted. The inner payload is an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) object. #### Auto Moderation Action Execution @@ -483,9 +483,9 @@ Sent when a rule is triggered and an action is executed (e.g. when a message is | Field | Type | Description | |--------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------| | guild_id | snowflake | ID of the guild in which action was executed | -| action | [auto moderation action](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object) object | Action which was executed | +| action | [auto moderation action](/docs/resources/auto-moderation#auto-moderation-action-object) object | Action which was executed | | rule_id | snowflake | ID of the rule which action belongs to | -| rule_trigger_type | [trigger_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) | Trigger type of rule which was triggered | +| rule_trigger_type | [trigger_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) | Trigger type of rule which was triggered | | user_id | snowflake | ID of the user which generated the content which triggered the rule | | channel_id? | snowflake | ID of the channel in which user content was posted | | message_id? | snowflake | ID of any user message which content belongs to * | @@ -494,42 +494,42 @@ Sent when a rule is triggered and an action is executed (e.g. when a message is | matched_keyword | ?string | Word or phrase configured in the rule that triggered the rule | | matched_content *** | ?string | Substring in content that triggered the rule | -\* `message_id` will not exist if message was blocked by [Auto Moderation](#DOCS_RESOURCES_AUTO_MODERATION) or content was not part of any message +\* `message_id` will not exist if message was blocked by [Auto Moderation](/docs/resorces/auto-moderation) or content was not part of any message \*\* `alert_system_message_id` will not exist if this event does not correspond to an action with type `SEND_ALERT_MESSAGE` -\*\*\* `MESSAGE_CONTENT` (`1 << 15`) [gateway intent](#DOCS_EVENTS_GATEWAY/gateway-intents) is required to receive the `content` and `matched_content` fields +\*\*\* `MESSAGE_CONTENT` (`1 << 15`) [gateway intent](/docs/events/gateway#gateway-intents) is required to receive the `content` and `matched_content` fields ### Channels #### Channel Create -Sent when a new guild channel is created, relevant to the current user. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. +Sent when a new guild channel is created, relevant to the current user. The inner payload is a [channel](/docs/resources/channel#channel-object) object. #### Channel Update -Sent when a channel is updated. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. This is not sent when the field `last_message_id` is altered. To keep track of the last_message_id changes, you must listen for [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) events (or [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) events for `GUILD_FORUM` and `GUILD_MEDIA` channels). +Sent when a channel is updated. The inner payload is a [channel](/docs/resources/channel#channel-object) object. This is not sent when the field `last_message_id` is altered. To keep track of the last_message_id changes, you must listen for [Message Create](/docs/events/gateway-events#message-create) events (or [Thread Create](/docs/events/gateway-events#thread-create) events for `GUILD_FORUM` and `GUILD_MEDIA` channels). This event may reference roles or guild members that no longer exist in the guild. #### Channel Delete -Sent when a channel relevant to the current user is deleted. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. +Sent when a channel relevant to the current user is deleted. The inner payload is a [channel](/docs/resources/channel#channel-object) object. #### Thread Create -Sent when a thread is created, relevant to the current user, or when the current user is added to a thread. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. +Sent when a thread is created, relevant to the current user, or when the current user is added to a thread. The inner payload is a [channel](/docs/resources/channel#channel-object) object. - When a thread is created, includes an additional `newly_created` boolean field. -- When being added to an existing private thread, includes a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object. +- When being added to an existing private thread, includes a [thread member](/docs/resources/channel#thread-member-object) object. #### Thread Update -Sent when a thread is updated. The inner payload is a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. This is not sent when the field `last_message_id` is altered. To keep track of the last_message_id changes, you must listen for [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) events. +Sent when a thread is updated. The inner payload is a [channel](/docs/resources/channel#channel-object) object. This is not sent when the field `last_message_id` is altered. To keep track of the last_message_id changes, you must listen for [Message Create](/docs/events/gateway-events#message-create) events. #### Thread Delete -Sent when a thread relevant to the current user is deleted. The inner payload is a subset of the [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object, containing just the `id`, `guild_id`, `parent_id`, and `type` fields. +Sent when a thread relevant to the current user is deleted. The inner payload is a subset of the [channel](/docs/resources/channel#channel-object) object, containing just the `id`, `guild_id`, `parent_id`, and `type` fields. #### Thread List Sync @@ -541,12 +541,12 @@ Sent when the current user _gains_ access to a channel. |--------------|--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | guild_id | snowflake | ID of the guild | | channel_ids? | array of snowflakes | Parent channel IDs whose threads are being synced. If omitted, then threads were synced for the entire guild. This array may contain channel_ids that have no active threads as well, so you know to clear that data. | -| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | All active threads in the given channels that the current user can access | -| members | array of [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to | +| threads | array of [channel](/docs/resources/channel#channel-object) objects | All active threads in the given channels that the current user can access | +| members | array of [thread member](/docs/resources/channel#thread-member-object) objects | All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to | #### Thread Member Update -Sent when the [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object for the current user is updated. The inner payload is a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object with an extra `guild_id` field. This event is documented for completeness, but unlikely to be used by most bots. For bots, this event largely is just a signal that you are a member of the thread. See the [threads docs](#DOCS_TOPICS_THREADS) for more details. +Sent when the [thread member](/docs/resources/channel#thread-member-object) object for the current user is updated. The inner payload is a [thread member](/docs/resources/channel#thread-member-object) object with an extra `guild_id` field. This event is documented for completeness, but unlikely to be used by most bots. For bots, this event largely is just a signal that you are a member of the thread. See the [threads docs](/docs/topics/threads) for more details. ###### Thread Member Update Event Extra Fields @@ -557,7 +557,7 @@ Sent when the [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) obje #### Thread Members Update -Sent when anyone is added to or removed from a thread. If the current user does not have the `GUILD_MEMBERS` [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents), then this event will only be sent if the current user was added to or removed from the thread. +Sent when anyone is added to or removed from a thread. If the current user does not have the `GUILD_MEMBERS` [Gateway Intent](/docs/events/gateway#gateway-intents), then this event will only be sent if the current user was added to or removed from the thread. ###### Thread Members Update Event Fields @@ -566,10 +566,10 @@ Sent when anyone is added to or removed from a thread. If the current user does | id | snowflake | ID of the thread | | guild_id | snowflake | ID of the guild | | member_count | integer | Approximate number of members in the thread, capped at 50 | -| added_members?\* | array of [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | Users who were added to the thread | +| added_members?\* | array of [thread member](/docs/resources/channel#thread-member-object) objects | Users who were added to the thread | | removed_member_ids? | array of snowflakes | ID of the users who were removed from the thread | -\* In this gateway event, the thread member objects will also include the [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) and nullable [presence](#DOCS_EVENTS_GATEWAY_EVENTS/presence) objects for each added thread member. +\* In this gateway event, the thread member objects will also include the [guild member](/docs/resources/guild#guild-member-object) and nullable [presence](/docs/events/gateway-events#presence) objects for each added thread member. #### Channel Pins Update @@ -588,22 +588,22 @@ Sent when a message is pinned or unpinned in a text channel. This is not sent wh #### Entitlement Create > warn -> Note: The`ENTITLEMENT_CREATE` event behavior changed on October 1, 2024. Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what changed. +> Note: The`ENTITLEMENT_CREATE` event behavior changed on October 1, 2024. Please see the [Change Log and Entitlement Migration Guide](/docs/change-log#premium-apps-entitlement-migration-and-new-subscription-api) for more information on what changed. -Sent when an entitlement is created. The inner payload is an [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) object. +Sent when an entitlement is created. The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-object) object. #### Entitlement Update > warn -> Note: The`ENTITLEMENT_UPDATE` event behavior changed on October 1, 2024. Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what changed. +> Note: The`ENTITLEMENT_UPDATE` event behavior changed on October 1, 2024. Please see the [Change Log and Entitlement Migration Guide](/docs/change-log#premium-apps-entitlement-migration-and-new-subscription-api) for more information on what changed. -Sent when an entitlement is updated. The inner payload is an [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) object. +Sent when an entitlement is updated. The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-object) object. For subscription entitlements, this event is triggered only when a user's subscription ends, providing an `ends_at` timestamp that indicates the end of the entitlement. #### Entitlement Delete -Sent when an entitlement is deleted. The inner payload is an [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) object. +Sent when an entitlement is deleted. The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-object) object. Entitlement deletions are infrequent, and occur when: @@ -619,7 +619,7 @@ Entitlements are _not_ deleted when they expire. This event can be sent in three different scenarios: -1. When a user is initially connecting, to lazily load and backfill information for all unavailable guilds sent in the [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) event. Guilds that are unavailable due to an outage will send a [Guild Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-delete) event. +1. When a user is initially connecting, to lazily load and backfill information for all unavailable guilds sent in the [Ready](/docs/events/gateway-events#ready) event. Guilds that are unavailable due to an outage will send a [Guild Delete](/docs/events/gateway-events#guild-delete) event. 2. When a Guild becomes available again to the client. 3. When the current user joins a new Guild. @@ -628,8 +628,8 @@ This event can be sent in three different scenarios: The inner payload can be: -- An available Guild: a [guild](#DOCS_RESOURCES_GUILD/guild-object) object with extra fields, as noted below. -- An unavailable Guild: an [unavailable guild](#DOCS_RESOURCES_GUILD/unavailable-guild-object) object. +- An available Guild: a [guild](/docs/resources/guild#guild-object) object with extra fields, as noted below. +- An unavailable Guild: an [unavailable guild](/docs/resources/guild#unavailable-guild-object) object. ###### Guild Create Extra Fields @@ -639,29 +639,29 @@ The inner payload can be: | large | boolean | `true` if this is considered a large guild | | unavailable? | boolean | `true` if this guild is unavailable due to an outage | | member_count | integer | Total number of members in this guild | -| voice_states | array of partial [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) objects | States of members currently in voice channels; lacks the `guild_id` key | -| members | array of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | Users in the guild | -| channels | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | Channels in the guild | -| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | All active threads in the guild that current user has permission to view | -| presences | array of partial [presence update](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) objects | Presences of the members in the guild, will only include non-offline members if the size is greater than `large threshold` | -| stage_instances | array of [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) objects | Stage instances in the guild | -| guild_scheduled_events | array of [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) objects | Scheduled events in the guild | -| soundboard_sounds | array of [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) objects | Soundboard sounds in the guild | +| voice_states | array of partial [voice state](/docs/resources/voice#voice-state-object) objects | States of members currently in voice channels; lacks the `guild_id` key | +| members | array of [guild member](/docs/resources/guild#guild-member-object) objects | Users in the guild | +| channels | array of [channel](/docs/resources/channel#channel-object) objects | Channels in the guild | +| threads | array of [channel](/docs/resources/channel#channel-object) objects | All active threads in the guild that current user has permission to view | +| presences | array of partial [presence update](/docs/events/gateway-events#presence-update) objects | Presences of the members in the guild, will only include non-offline members if the size is greater than `large threshold` | +| stage_instances | array of [stage instance](/docs/resources/stage-instance#stage-instance-object) objects | Stage instances in the guild | +| guild_scheduled_events | array of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) objects | Scheduled events in the guild | +| soundboard_sounds | array of [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) objects | Soundboard sounds in the guild | > warn -> If your bot does not have the `GUILD_PRESENCES` [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents), or if the guild has over 75k members, members and presences returned in this event will only contain your bot and users in voice channels. +> If your bot does not have the `GUILD_PRESENCES` [Gateway Intent](/docs/events/gateway#gateway-intents), or if the guild has over 75k members, members and presences returned in this event will only contain your bot and users in voice channels. #### Guild Update -Sent when a guild is updated. The inner payload is a [guild](#DOCS_RESOURCES_GUILD/guild-object) object. +Sent when a guild is updated. The inner payload is a [guild](/docs/resources/guild#guild-object) object. #### Guild Delete -Sent when a guild becomes or was already unavailable due to an outage, or when the user leaves or is removed from a guild. The inner payload is an [unavailable guild](#DOCS_RESOURCES_GUILD/unavailable-guild-object) object. If the `unavailable` field is not set, the user was removed from the guild. +Sent when a guild becomes or was already unavailable due to an outage, or when the user leaves or is removed from a guild. The inner payload is an [unavailable guild](/docs/resources/guild#unavailable-guild-object) object. If the `unavailable` field is not set, the user was removed from the guild. #### Guild Audit Log Entry Create -Sent when a guild audit log entry is created. The inner payload is an [Audit Log Entry](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object) object with an extra `guild_id` key. This event is only sent to bots with the `VIEW_AUDIT_LOG` permission. +Sent when a guild audit log entry is created. The inner payload is an [Audit Log Entry](/docs/resources/audit-log#audit-log-entry-object) object with an extra `guild_id` key. This event is only sent to bots with the `VIEW_AUDIT_LOG` permission. ###### Guild Audit Log Entry Create Event Extra Fields @@ -678,7 +678,7 @@ Sent when a user is banned from a guild. | Field | Type | Description | |----------|---------------------------------------------------|---------------------| | guild_id | snowflake | ID of the guild | -| user | a [user](#DOCS_RESOURCES_USER/user-object) object | User who was banned | +| user | a [user](/docs/resources/user#user-object) object | User who was banned | #### Guild Ban Remove @@ -689,7 +689,7 @@ Sent when a user is unbanned from a guild. | Field | Type | Description | |----------|---------------------------------------------------|-----------------------| | guild_id | snowflake | ID of the guild | -| user | a [user](#DOCS_RESOURCES_USER/user-object) object | User who was unbanned | +| user | a [user](/docs/resources/user#user-object) object | User who was unbanned | #### Guild Emojis Update @@ -700,7 +700,7 @@ Sent when a guild's emojis have been updated. | Field | Type | Description | |----------|-----------|-------------------------------------------------------| | guild_id | snowflake | ID of the guild | -| emojis | array | Array of [emojis](#DOCS_RESOURCES_EMOJI/emoji-object) | +| emojis | array | Array of [emojis](/docs/resources/emoji#emoji-object) | #### Guild Stickers Update @@ -711,7 +711,7 @@ Sent when a guild's stickers have been updated. | Field | Type | Description | |----------|-----------|-------------------------------------------------------------| | guild_id | snowflake | ID of the guild | -| stickers | array | Array of [stickers](#DOCS_RESOURCES_STICKER/sticker-object) | +| stickers | array | Array of [stickers](/docs/resources/sticker#sticker-object) | #### Guild Integrations Update @@ -726,9 +726,9 @@ Sent when a guild integration is updated. #### Guild Member Add > warn -> If using [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents), the `GUILD_MEMBERS` intent will be required to receive this event. +> If using [Gateway Intents](/docs/events/gateway#gateway-intents), the `GUILD_MEMBERS` intent will be required to receive this event. -Sent when a new user joins a guild. The inner payload is a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object with an extra `guild_id` key: +Sent when a new user joins a guild. The inner payload is a [guild member](/docs/resources/guild#guild-member-object) object with an extra `guild_id` key: ###### Guild Member Add Extra Fields @@ -739,7 +739,7 @@ Sent when a new user joins a guild. The inner payload is a [guild member](#DOCS_ #### Guild Member Remove > warn -> If using [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents), the `GUILD_MEMBERS` intent will be required to receive this event. +> If using [Gateway Intents](/docs/events/gateway#gateway-intents), the `GUILD_MEMBERS` intent will be required to receive this event. Sent when a user is removed from a guild (leave/kick/ban). @@ -748,12 +748,12 @@ Sent when a user is removed from a guild (leave/kick/ban). | Field | Type | Description | |----------|---------------------------------------------------|----------------------| | guild_id | snowflake | ID of the guild | -| user | a [user](#DOCS_RESOURCES_USER/user-object) object | User who was removed | +| user | a [user](/docs/resources/user#user-object) object | User who was removed | #### Guild Member Update > warn -> If using [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents), the `GUILD_MEMBERS` intent will be required to receive this event. +> If using [Gateway Intents](/docs/events/gateway#gateway-intents), the `GUILD_MEMBERS` intent will be required to receive this event. Sent when a guild member is updated. This will also fire when the user object of a guild member changes. @@ -763,22 +763,22 @@ Sent when a guild member is updated. This will also fire when the user object of |-------------------------------|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | guild_id | snowflake | ID of the guild | | roles | array of snowflakes | User role ids | -| user | a [user](#DOCS_RESOURCES_USER/user-object) object | User | +| user | a [user](/docs/resources/user#user-object) object | User | | nick? | ?string | Nickname of the user in the guild | -| avatar | ?string | Member's [guild avatar hash](#DOCS_REFERENCE/image-formatting) | -| banner | ?string | Member's [guild banner hash](#DOCS_REFERENCE/image-formatting) | +| avatar | ?string | Member's [guild avatar hash](/docs/reference#image-formatting) | +| banner | ?string | Member's [guild banner hash](/docs/reference#image-formatting) | | joined_at | ?ISO8601 timestamp | When the user joined the guild | | premium_since? | ?ISO8601 timestamp | When the user starting [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild | | deaf? | boolean | Whether the user is deafened in voice channels | | mute? | boolean | Whether the user is muted in voice channels | -| pending? | boolean | Whether the user has not yet passed the guild's [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) requirements | +| pending? | boolean | Whether the user has not yet passed the guild's [Membership Screening](/docs/resources/guild#membership-screening-object) requirements | | communication_disabled_until? | ?ISO8601 timestamp | When the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out | -| flags? | integer | [Guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags) represented as a bit set, defaults to 0 | -| avatar_decoration_data? | ?[avatar decoration data](#DOCS_RESOURCES_USER/avatar-decoration-data-object) | Data for the member's guild avatar decoration | +| flags? | integer | [Guild member flags](/docs/resources/guild#guild-member-object-guild-member-flags) represented as a bit set, defaults to 0 | +| avatar_decoration_data? | ?[avatar decoration data](/docs/resources/user#avatar-decoration-data-object) | Data for the member's guild avatar decoration | #### Guild Members Chunk -Sent in response to [Guild Request Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members). +Sent in response to [Guild Request Members](/docs/events/gateway-events#request-guild-members). You can use the `chunk_index` and `chunk_count` to calculate how many chunks are left for your request. ###### Guild Members Chunk Event Fields @@ -786,12 +786,12 @@ You can use the `chunk_index` and `chunk_count` to calculate how many chunks are | Field | Type | Description | |-------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------| | guild_id | snowflake | ID of the guild | -| members | array of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | Set of guild members | +| members | array of [guild member](/docs/resources/guild#guild-member-object) objects | Set of guild members | | chunk_index | integer | Chunk index in the expected chunks for this response (`0 <= chunk\_index < chunk\_count`) | | chunk_count | integer | Total number of expected chunks for this response | | not_found? | array | When passing an invalid ID to `REQUEST_GUILD_MEMBERS`, it will be returned here | -| presences? | array of [presence](#DOCS_EVENTS_GATEWAY_EVENTS/presence) objects | When passing `true` to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here | -| nonce? | string | Nonce used in the [Guild Members Request](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) | +| presences? | array of [presence](/docs/events/gateway-events#presence) objects | When passing `true` to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here | +| nonce? | string | Nonce used in the [Guild Members Request](/docs/events/gateway-events#request-guild-members) | #### Guild Role Create @@ -802,7 +802,7 @@ Sent when a guild role is created. | Field | Type | Description | |----------|-------------------------------------------------------|-----------------------| | guild_id | snowflake | ID of the guild | -| role | a [role](#DOCS_TOPICS_PERMISSIONS/role-object) object | Role that was created | +| role | a [role](/docs/topics/permissions#role-object) object | Role that was created | #### Guild Role Update @@ -813,7 +813,7 @@ Sent when a guild role is updated. | Field | Type | Description | |----------|-------------------------------------------------------|-----------------------| | guild_id | snowflake | ID of the guild | -| role | a [role](#DOCS_TOPICS_PERMISSIONS/role-object) object | Role that was updated | +| role | a [role](/docs/topics/permissions#role-object) object | Role that was updated | #### Guild Role Delete @@ -828,15 +828,15 @@ Sent when a guild role is deleted. #### Guild Scheduled Event Create -Sent when a guild scheduled event is created. The inner payload is a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object. +Sent when a guild scheduled event is created. The inner payload is a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object. #### Guild Scheduled Event Update -Sent when a guild scheduled event is updated. The inner payload is a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object. +Sent when a guild scheduled event is updated. The inner payload is a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object. #### Guild Scheduled Event Delete -Sent when a guild scheduled event is deleted. The inner payload is a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object. +Sent when a guild scheduled event is deleted. The inner payload is a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object. #### Guild Scheduled Event User Add @@ -864,11 +864,11 @@ Sent when a user has unsubscribed from a guild scheduled event. #### Guild Soundboard Sound Create -Sent when a guild soundboard sound is created. The inner payload is a [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) object. +Sent when a guild soundboard sound is created. The inner payload is a [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) object. #### Guild Soundboard Sound Update -Sent when a guild soundboard sound is updated. The inner payload is a [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) object. +Sent when a guild soundboard sound is updated. The inner payload is a [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) object. #### Guild Soundboard Sound Delete @@ -889,25 +889,25 @@ Sent when multiple guild soundboard sounds are updated. | Field | Type | Description | |-------------------|-----------------------------------------------------------------------------------------|-------------------------------| -| soundboard_sounds | array of [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) objects | The guild's soundboard sounds | +| soundboard_sounds | array of [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) objects | The guild's soundboard sounds | | guild_id | snowflake | ID of the guild | #### Soundboard Sounds -Includes a guild's list of soundboard sounds. Sent in response to [Request Soundboard Sounds](#DOCS_EVENTS_GATEWAY_EVENTS/request-soundboard-sounds). +Includes a guild's list of soundboard sounds. Sent in response to [Request Soundboard Sounds](/docs/events/gateway-events#request-soundboard-sounds). ###### Soundboard Sounds Event Fields | Field | Type | Description | |-------------------|-----------------------------------------------------------------------------------------|-------------------------------| -| soundboard_sounds | array of [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) objects | The guild's soundboard sounds | +| soundboard_sounds | array of [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) objects | The guild's soundboard sounds | | guild_id | snowflake | ID of the guild | ### Integrations #### Integration Create -Sent when an integration is created. The inner payload is an [integration](#DOCS_RESOURCES_GUILD/integration-object) object with `user` omitted and an additional `guild_id` key: +Sent when an integration is created. The inner payload is an [integration](/docs/resources/guild#integration-object) object with `user` omitted and an additional `guild_id` key: ###### Integration Create Event Additional Fields @@ -917,7 +917,7 @@ Sent when an integration is created. The inner payload is an [integration](#DOCS #### Integration Update -Sent when an integration is updated. The inner payload is an [integration](#DOCS_RESOURCES_GUILD/integration-object) object with `user` omitted and an additional `guild_id` key: +Sent when an integration is updated. The inner payload is an [integration](/docs/resources/guild#integration-object) object with `user` omitted and an additional `guild_id` key: ###### Integration Update Event Additional Fields @@ -939,7 +939,7 @@ Sent when an integration is deleted. ### Invites -All [Invite](#DOCS_RESOURCES_INVITE) related events are only sent to bot users with the `MANAGE_CHANNELS` permission on the channel. +All [Invite](/docs/resources/invite) related events are only sent to bot users with the `MANAGE_CHANNELS` permission on the channel. #### Invite Create @@ -950,15 +950,15 @@ Sent when a new invite to a channel is created. | Field | Type | Description | |---------------------|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| | channel_id | snowflake | Channel the invite is for | -| code | string | Unique invite [code](#DOCS_RESOURCES_INVITE/invite-object) | +| code | string | Unique invite [code](/docs/resources/invite#invite-object) | | created_at | ISO8601 timestamp | Time at which the invite was created | | guild_id? | snowflake | Guild of the invite | -| inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | User that created the invite | +| inviter? | [user](/docs/resources/user#user-object) object | User that created the invite | | max_age | integer | How long the invite is valid for (in seconds) | | max_uses | integer | Maximum number of times the invite can be used | -| target_type? | integer | [Type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite | -| target_user? | [user](#DOCS_RESOURCES_USER/user-object) object | User whose stream to display for this voice channel stream invite | -| target_application? | partial [application](#DOCS_RESOURCES_APPLICATION/application-object) object | Embedded application to open for this voice channel embedded application invite | +| target_type? | integer | [Type of target](/docs/resources/invite#invite-object-invite-target-types) for this voice channel invite | +| target_user? | [user](/docs/resources/user#user-object) object | User whose stream to display for this voice channel stream invite | +| target_application? | partial [application](/docs/resources/application#application-object) object | Embedded application to open for this voice channel embedded application invite | | temporary | boolean | Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) | | uses | integer | How many times the invite has been used (always will be 0) | @@ -972,28 +972,28 @@ Sent when an invite is deleted. |------------|-----------|------------------------------------------------------------| | channel_id | snowflake | Channel of the invite | | guild_id? | snowflake | Guild of the invite | -| code | string | Unique invite [code](#DOCS_RESOURCES_INVITE/invite-object) | +| code | string | Unique invite [code](/docs/resources/invite#invite-object) | ### Messages > warn -> Unlike persistent messages, ephemeral messages are sent directly to the user and the bot who sent the message rather than through the guild channel. Because of this, ephemeral messages are tied to the [`DIRECT_MESSAGES` intent](#DOCS_EVENTS_GATEWAY/list-of-intents), and the message object won't include `guild_id` or `member`. +> Unlike persistent messages, ephemeral messages are sent directly to the user and the bot who sent the message rather than through the guild channel. Because of this, ephemeral messages are tied to the [`DIRECT_MESSAGES` intent](/docs/events/gateway#list-of-intents), and the message object won't include `guild_id` or `member`. #### Message Create -Sent when a message is created. The inner payload is a [message](#DOCS_RESOURCES_MESSAGE/message-object) object with the following extra fields: +Sent when a message is created. The inner payload is a [message](/docs/resources/message#message-object) object with the following extra fields: ###### Message Create Extra Fields | Field | Type | Description | |-----------|-------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| | guild_id? | snowflake | ID of the guild the message was sent in - unless it is an ephemeral message | -| member? | partial [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Member properties for this message's author. Missing for ephemeral messages and messages from webhooks | -| mentions | array of [user](#DOCS_RESOURCES_USER/user-object) objects, with an additional partial [member](#DOCS_RESOURCES_GUILD/guild-member-object) field | Users specifically mentioned in the message | +| member? | partial [guild member](/docs/resources/guild#guild-member-object) object | Member properties for this message's author. Missing for ephemeral messages and messages from webhooks | +| mentions | array of [user](/docs/resources/user#user-object) objects, with an additional partial [member](/docs/resources/guild#guild-member-object) field | Users specifically mentioned in the message | #### Message Update -Sent when a message is updated. The inner payload is a [message](#DOCS_RESOURCES_MESSAGE/message-object) object with the same extra fields as [MESSAGE_CREATE](#DOCS_EVENTS_GATEWAY_EVENTS/message-create). +Sent when a message is updated. The inner payload is a [message](/docs/resources/message#message-object) object with the same extra fields as [MESSAGE_CREATE](/docs/events/gateway-events#message-create). > warn > The value for `tts` will always be false in message updates. @@ -1034,12 +1034,12 @@ Sent when a user adds a reaction to a message. | channel_id | snowflake | ID of the channel | | message_id | snowflake | ID of the message | | guild_id? | snowflake | ID of the guild | -| member? | [member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Member who reacted if this happened in a guild | -| emoji | a partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | Emoji used to react - [example](#DOCS_RESOURCES_EMOJI/emoji-object-standard-emoji-example) | +| member? | [member](/docs/resources/guild#guild-member-object) object | Member who reacted if this happened in a guild | +| emoji | a partial [emoji](/docs/resources/emoji#emoji-object) object | Emoji used to react - [example](/docs/resources/emoji#emoji-object-standard-emoji-example) | | message_author_id? | snowflake | ID of the user who authored the message which was reacted to | | burst | boolean | true if this is a super-reaction | | burst_colors? | array of strings | Colors used for super-reaction animation in "#rrggbb" format | -| type | integer | The [type of reaction](#DOCS_RESOURCES_MESSAGE/get-reactions-reaction-types) | +| type | integer | The [type of reaction](/docs/resources/message#get-reactions-reaction-types) | #### Message Reaction Remove @@ -1053,9 +1053,9 @@ Sent when a user removes a reaction from a message. | channel_id | snowflake | ID of the channel | | message_id | snowflake | ID of the message | | guild_id? | snowflake | ID of the guild | -| emoji | a partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | Emoji used to react - [example](#DOCS_RESOURCES_EMOJI/emoji-object-standard-emoji-example) | +| emoji | a partial [emoji](/docs/resources/emoji#emoji-object) object | Emoji used to react - [example](/docs/resources/emoji#emoji-object-standard-emoji-example) | | burst | boolean | true if this was a super-reaction | -| type | integer | The [type of reaction](#DOCS_RESOURCES_MESSAGE/get-reactions-reaction-types) | +| type | integer | The [type of reaction](/docs/resources/message#get-reactions-reaction-types) | #### Message Reaction Remove All @@ -1080,14 +1080,14 @@ Sent when a bot removes all instances of a given emoji from the reactions of a m | channel_id | snowflake | ID of the channel | | guild_id? | snowflake | ID of the guild | | message_id | snowflake | ID of the message | -| emoji | [partial emoji object](#DOCS_RESOURCES_EMOJI/emoji-object) | Emoji that was removed | +| emoji | [partial emoji object](/docs/resources/emoji#emoji-object) | Emoji that was removed | ### Presence #### Presence Update > warn -> If you are using [Gateway Intents](#DOCS_EVENTS_GATEWAY/gateway-intents), you _must_ specify the `GUILD_PRESENCES` intent in order to receive Presence Update events +> If you are using [Gateway Intents](/docs/events/gateway#gateway-intents), you _must_ specify the `GUILD_PRESENCES` intent in order to receive Presence Update events A user's presence is their current state on a guild. This event is sent when a user's presence or info, such as name or avatar, is updated. @@ -1098,11 +1098,11 @@ A user's presence is their current state on a guild. This event is sent when a u | Field | Type | Description | |---------------|--------------------------------------------------------------------------|----------------------------------------------| -| user | [user](#DOCS_RESOURCES_USER/user-object) object | User whose presence is being updated | +| user | [user](/docs/resources/user#user-object) object | User whose presence is being updated | | guild_id | snowflake | ID of the guild | | status | string | Either "idle", "dnd", "online", or "offline" | -| activities | array of [activity](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object) objects | User's current activities | -| client_status | [client_status](#DOCS_EVENTS_GATEWAY_EVENTS/client-status-object) object | User's platform-dependent status | +| activities | array of [activity](/docs/events/gateway-events#activity-object) objects | User's current activities | +| client_status | [client_status](/docs/events/gateway-events#client-status-object) object | User's platform-dependent status | #### Client Status Object @@ -1121,20 +1121,20 @@ Active sessions are indicated with an "online", "idle", or "dnd" string per plat | Field | Type | Description | |-----------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------| | name | string | Activity's name | -| type | integer | [Activity type](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-types) | +| type | integer | [Activity type](/docs/events/gateway-events#activity-object-activity-types) | | url? | ?string | Stream URL, is validated when type is 1 | | created_at | integer | Unix timestamp (in milliseconds) of when the activity was added to the user's session | -| timestamps? | [timestamps](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-timestamps) object | Unix timestamps for start and/or end of the game | +| timestamps? | [timestamps](/docs/events/gateway-events#activity-object-activity-timestamps) object | Unix timestamps for start and/or end of the game | | application_id? | snowflake | Application ID for the game | | details? | ?string | What the player is currently doing | | state? | ?string | User's current party status, or text used for a custom status | -| emoji? | ?[emoji](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-emoji) object | Emoji used for a custom status | -| party? | [party](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-party) object | Information for the current party of the player | -| assets? | [assets](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-assets) object | Images for the presence and their hover texts | -| secrets? | [secrets](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-secrets) object | Secrets for Rich Presence joining and spectating | +| emoji? | ?[emoji](/docs/events/gateway-events#activity-object-activity-emoji) object | Emoji used for a custom status | +| party? | [party](/docs/events/gateway-events#activity-object-activity-party) object | Information for the current party of the player | +| assets? | [assets](/docs/events/gateway-events#activity-object-activity-assets) object | Images for the presence and their hover texts | +| secrets? | [secrets](/docs/events/gateway-events#activity-object-activity-secrets) object | Secrets for Rich Presence joining and spectating | | instance? | boolean | Whether or not the activity is an instanced game session | -| flags? | integer | [Activity flags](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-flags) `OR`d together, describes what the payload includes | -| buttons? | array of [buttons](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-buttons) | Custom buttons shown in the Rich Presence (max 2) | +| flags? | integer | [Activity flags](/docs/events/gateway-events#activity-object-activity-flags) `OR`d together, describes what the payload includes | +| buttons? | array of [buttons](/docs/events/gateway-events#activity-object-activity-buttons) | Custom buttons shown in the Rich Presence (max 2) | > info > Bot users are only able to set `name`, `state`, `type`, and `url`. @@ -1182,9 +1182,9 @@ Active sessions are indicated with an "online", "idle", or "dnd" string per plat | Field | Type | Description | |--------------|--------|----------------------------------------------------------------------------------------------| -| large_image? | string | See [Activity Asset Image](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) | +| large_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | | large_text? | string | Text displayed when hovering over the large image of the activity | -| small_image? | string | See [Activity Asset Image](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) | +| small_image? | string | See [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image) | | small_text? | string | Text displayed when hovering over the small image of the activity | ###### Activity Asset Image @@ -1195,7 +1195,7 @@ To use an external image via media proxy, specify the URL as the field's value w | Type | Format | Image URL | |-------------------|--------------------------|----------------------------------------------------------------------------| -| Application Asset | `{application_asset_id}` | See [Application Asset Image Formatting](#DOCS_REFERENCE/image-formatting) | +| Application Asset | `{application_asset_id}` | See [Application Asset Image Formatting](/docs/reference#image-formatting) | | Media Proxy Image | `mp:{image_id}` | `https://media.discordapp.net/{image_id}` | ###### Activity Secrets @@ -1286,11 +1286,11 @@ Sent when a user starts typing in a channel. | guild_id? | snowflake | ID of the guild | | user_id | snowflake | ID of the user | | timestamp | integer | Unix time (in seconds) of when the user started typing | -| member? | [member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Member who started typing if this happened in a guild | +| member? | [member](/docs/resources/guild#guild-member-object) object | Member who started typing if this happened in a guild | #### User Update -Sent when properties about the current bot's user change. Inner payload is a [user](#DOCS_RESOURCES_USER/user-object) object. +Sent when properties about the current bot's user change. Inner payload is a [user](/docs/resources/user#user-object) object. ### Voice @@ -1305,8 +1305,8 @@ Sent when someone sends an effect, such as an emoji reaction or a soundboard sou | channel_id | snowflake | ID of the channel the effect was sent in | | guild_id | snowflake | ID of the guild the effect was sent in | | user_id | snowflake | ID of the user who sent the effect | -| emoji? | ?[emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | The emoji sent, for emoji reaction and soundboard effects | -| animation_type? | ?integer | The [type of emoji animation](#DOCS_EVENTS_GATEWAY_EVENTS/voice-channel-effect-send-animation-types), for emoji reaction and soundboard effects | +| emoji? | ?[emoji](/docs/resources/emoji#emoji-object) object | The emoji sent, for emoji reaction and soundboard effects | +| animation_type? | ?integer | The [type of emoji animation](/docs/events/gateway-events#voice-channel-effect-send-animation-types), for emoji reaction and soundboard effects | | animation_id? | integer | The ID of the emoji animation, for emoji reaction and soundboard effects | | sound_id? | snowflake or integer | The ID of the soundboard sound, for soundboard effects | | sound_volume? | double | The volume of the soundboard sound, from 0 to 1, for soundboard effects | @@ -1320,7 +1320,7 @@ Sent when someone sends an effect, such as an emoji reaction or a soundboard sou #### Voice State Update -Sent when someone joins/leaves/moves voice channels. Inner payload is a [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) object. +Sent when someone joins/leaves/moves voice channels. Inner payload is a [voice state](/docs/resources/voice#voice-state-object) object. #### Voice Server Update @@ -1364,40 +1364,40 @@ Sent when a guild channel's webhook is created, updated, or deleted. #### Interaction Create -Sent when a user uses an [Application Command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/) or [Message Component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS). Inner payload is an [Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure). +Sent when a user uses an [Application Command](/docs/interactions/application-commands#) or [Message Component](/docs/interactions/message-components). Inner payload is an [Interaction](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure). ### Stage Instances #### Stage Instance Create -Sent when a [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE) is created (i.e. the Stage is now "live"). Inner payload is a [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) +Sent when a [Stage instance](/docs/resources/stage-instance) is created (i.e. the Stage is now "live"). Inner payload is a [Stage instance](/docs/resources/stage-instance#stage-instance-object) #### Stage Instance Update -Sent when a [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE) has been updated. Inner payload is a [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) +Sent when a [Stage instance](/docs/resources/stage-instance) has been updated. Inner payload is a [Stage instance](/docs/resources/stage-instance#stage-instance-object) #### Stage Instance Delete -Sent when a [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE) has been deleted (i.e. the Stage has been closed). Inner payload is a [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) +Sent when a [Stage instance](/docs/resources/stage-instance) has been deleted (i.e. the Stage has been closed). Inner payload is a [Stage instance](/docs/resources/stage-instance#stage-instance-object) ### Subscriptions #### Subscription Create > info -> Subscription status should not be used to grant perks. Use [entitlements](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) as an indication of whether a user should have access to a specific SKU. See our guide on [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS) for more information. +> Subscription status should not be used to grant perks. Use [entitlements](/docs/resources/entitlement#entitlement-object) as an indication of whether a user should have access to a specific SKU. See our guide on [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions) for more information. -Sent when a [Subscription](#DOCS_RESOURCES_SUBSCRIPTION) for a Premium App is created. Inner payload is a [Subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object). +Sent when a [Subscription](/docs/resources/subscription) for a Premium App is created. Inner payload is a [Subscription](/docs/resources/subscription#subscription-object). A Subscription's `status` can be either **inactive** or **active** when this event is received. You will receive subsequent `SUBSCRIPTION_UPDATE` events if the `status` is updated to **active**. As a best practice, you should not grant any perks to users until the entitlements are created. #### Subscription Update -Sent when a [Subscription](#DOCS_RESOURCES_SUBSCRIPTION) for a Premium App has been updated. Inner payload is a [Subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object) object. +Sent when a [Subscription](/docs/resources/subscription) for a Premium App has been updated. Inner payload is a [Subscription](/docs/resources/subscription#subscription-object) object. #### Subscription Delete -Sent when a [Subscription](#DOCS_RESOURCES_SUBSCRIPTION) for a Premium App has been deleted. Inner payload is a [Subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object) object. +Sent when a [Subscription](/docs/resources/subscription) for a Premium App has been deleted. Inner payload is a [Subscription](/docs/resources/subscription#subscription-object) object. ### Polls diff --git a/docs/events/gateway.mdx b/docs/events/gateway.mdx index 630b1e3133..09d4320e42 100644 --- a/docs/events/gateway.mdx +++ b/docs/events/gateway.mdx @@ -7,17 +7,17 @@ sidebar_label: Using Gateway The Gateway API lets apps open secure WebSocket connections with Discord to receive events about actions that take place in a server/guild, like when a channel is updated or a role is created. There are a few cases where apps will *also* use Gateway connections to update or request resources, like when updating voice state. > info -> In *most* cases, performing REST operations on Discord resources can be done using the [HTTP API](#DOCS_REFERENCE/http-api) rather than the Gateway API. +> In *most* cases, performing REST operations on Discord resources can be done using the [HTTP API](/docs/reference#http-api) rather than the Gateway API. -The Gateway is Discord's form of real-time communication used by clients (including apps), so there are nuances and data passed that simply isn't relevant to apps. Interacting with the Gateway can be tricky, but there are [community-built libraries](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES/libraries) with built-in support that simplify the most complicated bits and pieces. If you're planning on writing a custom implementation, be sure to read the following documentation in its entirety so you understand the sacred secrets of the Gateway (or at least those that matter for apps). +The Gateway is Discord's form of real-time communication used by clients (including apps), so there are nuances and data passed that simply isn't relevant to apps. Interacting with the Gateway can be tricky, but there are [community-built libraries](/docs/developer-tools/community-resources/libraries) with built-in support that simplify the most complicated bits and pieces. If you're planning on writing a custom implementation, be sure to read the following documentation in its entirety so you understand the sacred secrets of the Gateway (or at least those that matter for apps). ## Gateway Events -Gateway events are [payloads](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure) sent over a [Gateway connection](#DOCS_EVENTS_GATEWAY/connections)—either from an app to Discord, or from Discord to an app. An app typically [*sends* events](#DOCS_EVENTS_GATEWAY/sending-events) when connecting and managing its connection to the Gateway, and [*receives* events](#DOCS_EVENTS_GATEWAY/receiving-events) when listening to actions taking place in a server. +Gateway events are [payloads](/docs/events/gateway-events#payload-structure) sent over a [Gateway connection](/docs/events/gateway#connections)—either from an app to Discord, or from Discord to an app. An app typically [*sends* events](/docs/events/gateway#sending-events) when connecting and managing its connection to the Gateway, and [*receives* events](/docs/events/gateway#receiving-events) when listening to actions taking place in a server. -All Gateway events are encapsulated in a [Gateway event payload](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure). +All Gateway events are encapsulated in a [Gateway event payload](/docs/events/gateway-events#payload-structure). -A full list of Gateway events and their details are in the [Gateway events documentation](#DOCS_EVENTS_GATEWAY_EVENTS). +A full list of Gateway events and their details are in the [Gateway events documentation](/docs/events/gateway-events). ###### Example Gateway Event @@ -30,40 +30,40 @@ A full list of Gateway events and their details are in the [Gateway events docum } ``` -Details about Gateway event payloads are in the [Gateway events documentation](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure). +Details about Gateway event payloads are in the [Gateway events documentation](/docs/events/gateway-events#payload-structure). ### Sending Events -When sending a Gateway event (like when [performing an initial handshake](#DOCS_EVENTS_GATEWAY_EVENTS/identify) or [updating presence](#DOCS_EVENTS_GATEWAY_EVENTS/update-presence)), your app must send an [event payload object](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure) with a valid opcode (`op`) and inner data object (`d`). +When sending a Gateway event (like when [performing an initial handshake](/docs/events/gateway-events#identify) or [updating presence](/docs/events/gateway-events#update-presence)), your app must send an [event payload object](/docs/events/gateway-events#payload-structure) with a valid opcode (`op`) and inner data object (`d`). > info -> Specific rate limits are applied when sending events, which you can read about in the [Rate Limiting](#DOCS_EVENTS_GATEWAY/rate-limiting) section. +> Specific rate limits are applied when sending events, which you can read about in the [Rate Limiting](/docs/events/gateway#rate-limiting) section. Event payloads sent over a Gateway connection: -1. Must be serialized in [plain-text JSON or binary ETF](#DOCS_EVENTS_GATEWAY/encoding-and-compression). -2. Must not exceed 4096 bytes. If an event payload *does* exceed 4096 bytes, the connection will be closed with a [`4002` close event code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes). +1. Must be serialized in [plain-text JSON or binary ETF](/docs/events/gateway#encoding-and-compression). +2. Must not exceed 4096 bytes. If an event payload *does* exceed 4096 bytes, the connection will be closed with a [`4002` close event code](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes). -All events that your app can send via a connection are in [Gateway event documentation](#DOCS_EVENTS_GATEWAY_EVENTS/send-events). +All events that your app can send via a connection are in [Gateway event documentation](/docs/events/gateway-events#send-events). ### Receiving Events -Receiving a Gateway event from Discord (like when [a reaction is added to a message](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-add)) is much more common (and slightly more complex) than sending them. +Receiving a Gateway event from Discord (like when [a reaction is added to a message](/docs/events/gateway-events#message-reaction-add)) is much more common (and slightly more complex) than sending them. -While some events are sent to your app automatically, most events require your app to define intents when [Identifying](#DOCS_EVENTS_GATEWAY/identifying). Intents are bitwise values that can be ORed (`|`) to indicate which events (or groups of events) you want Discord to send your app. A list of intents and their corresponding events are listed in the [intents section](#DOCS_EVENTS_GATEWAY/gateway-intents). +While some events are sent to your app automatically, most events require your app to define intents when [Identifying](/docs/events/gateway#identifying). Intents are bitwise values that can be ORed (`|`) to indicate which events (or groups of events) you want Discord to send your app. A list of intents and their corresponding events are listed in the [intents section](/docs/events/gateway#gateway-intents). -When receiving events, you can also configure *how* events will be sent to your app, like the [encoding and compression](#DOCS_EVENTS_GATEWAY/encoding-and-compression), or whether [sharding should be enabled](#DOCS_EVENTS_GATEWAY/sharding)). +When receiving events, you can also configure *how* events will be sent to your app, like the [encoding and compression](/docs/events/gateway#encoding-and-compression), or whether [sharding should be enabled](/docs/events/gateway#sharding)). -All events that your app can receive via a connection are in the [Gateway event documentation](#DOCS_EVENTS_GATEWAY_EVENTS/receive-events). +All events that your app can receive via a connection are in the [Gateway event documentation](/docs/events/gateway-events#receive-events). #### Dispatch Events -[Dispatch (opcode `0`)](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-opcodes) events are the most common type of event your app will receive. *Most* Gateway events which represent actions taking place in a guild will be sent to your app as Dispatch events. +[Dispatch (opcode `0`)](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes) events are the most common type of event your app will receive. *Most* Gateway events which represent actions taking place in a guild will be sent to your app as Dispatch events. When your app is parsing a Dispatch event: -- The `t` field can be used to determine which [Gateway event](#DOCS_EVENTS_GATEWAY_EVENTS/receive-events) the payload represents the data you can expect in the `d` field. -- The `s` field represents the sequence number of the event, which is the relative order in which it occurred. You need to cache the most recent non-null `s` value for heartbeats, and to pass when [Resuming](#DOCS_EVENTS_GATEWAY/resuming) a connection. +- The `t` field can be used to determine which [Gateway event](/docs/events/gateway-events#receive-events) the payload represents the data you can expect in the `d` field. +- The `s` field represents the sequence number of the event, which is the relative order in which it occurred. You need to cache the most recent non-null `s` value for heartbeats, and to pass when [Resuming](/docs/events/gateway#resuming) a connection. ## Connections @@ -78,23 +78,23 @@ At a high-level, Gateway connections consist of the following cycle: ![Flowchart with an overview of Gateway connection lifecycle](images/gateway-lifecycle.svg) -1. App establishes a connection with the Gateway after fetching and caching a WSS URL using the [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway) or [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot) endpoint. -2. Discord sends the app a [Hello (opcode `10`)](#DOCS_EVENTS_GATEWAY/hello-event) event containing a heartbeat interval in milliseconds. **Read the section on [Connecting](#DOCS_EVENTS_GATEWAY/connecting)** -3. Start the Heartbeat interval. App must send a [Heartbeat (opcode `1`)](#DOCS_EVENTS_GATEWAY_EVENTS/heartbeat) event, then continue to send them every heartbeat interval until the connection is closed. **Read the section on [Sending Heartbeats](#DOCS_EVENTS_GATEWAY/sending-heartbeats)** - - Discord will respond to each Heartbeat event with a [Heartbeat ACK (opcode `11`)](#DOCS_EVENTS_GATEWAY/sending-heartbeats) event to confirm it was received. If an app doesn't receive a Heartbeat ACK, it should close the connection and reconnect. - - Discord may send the app a [Heartbeat (opcode `1`)](#DOCS_EVENTS_GATEWAY_EVENTS/heartbeat) event, in which case the app should send a Heartbeat event immediately. -4. App sends an [Identify (opcode `2`)](#DOCS_EVENTS_GATEWAY_EVENTS/identify) event to perform the initial handshake with the Gateway. **Read the section on [Identifying](#DOCS_EVENTS_GATEWAY/identifying)** -5. Discord sends the app a [Ready (opcode `0`)](#DOCS_EVENTS_GATEWAY_EVENTS/ready) event which indicates the handshake was successful and the connection is established. The Ready event contains a `resume_gateway_url` that the app should keep track of to determine the WebSocket URL an app should use to Resume. **Read the section on [the Ready event](#DOCS_EVENTS_GATEWAY/ready-event)** -6. The connection may be dropped for a variety of reasons at any time. Whether the app can [Resume](#DOCS_EVENTS_GATEWAY/resuming) the connection or whether it must re-identify is determined by a variety of factors like the [opcode](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-opcodes) and [close code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes) that it receives. **Read the section on [Disconnecting](#DOCS_EVENTS_GATEWAY/disconnecting)** -7. If an app **can** resume/reconnect, it should open a new connection using `resume_gateway_url` with the same version and encoding, then send a [Resume (opcode `6`)](#DOCS_EVENTS_GATEWAY_EVENTS/resume) event. If an app **cannot** resume/reconnect, it should open a new connection using the cached URL from step #1, then repeat the whole Gateway cycle. *Yipee!* **Read the section on [Resuming](#DOCS_EVENTS_GATEWAY/resuming)** +1. App establishes a connection with the Gateway after fetching and caching a WSS URL using the [Get Gateway](/docs/events/gateway#get-gateway) or [Get Gateway Bot](/docs/events/gateway#get-gateway-bot) endpoint. +2. Discord sends the app a [Hello (opcode `10`)](/docs/events/gateway#hello-event) event containing a heartbeat interval in milliseconds. **Read the section on [Connecting](/docs/events/gateway#connecting)** +3. Start the Heartbeat interval. App must send a [Heartbeat (opcode `1`)](/docs/events/gateway-events#heartbeat) event, then continue to send them every heartbeat interval until the connection is closed. **Read the section on [Sending Heartbeats](/docs/events/gateway#sending-heartbeats)** + - Discord will respond to each Heartbeat event with a [Heartbeat ACK (opcode `11`)](/docs/events/gateway#sending-heartbeats) event to confirm it was received. If an app doesn't receive a Heartbeat ACK, it should close the connection and reconnect. + - Discord may send the app a [Heartbeat (opcode `1`)](/docs/events/gateway-events#heartbeat) event, in which case the app should send a Heartbeat event immediately. +4. App sends an [Identify (opcode `2`)](/docs/events/gateway-events#identify) event to perform the initial handshake with the Gateway. **Read the section on [Identifying](/docs/events/gateway#identifying)** +5. Discord sends the app a [Ready (opcode `0`)](/docs/events/gateway-events#ready) event which indicates the handshake was successful and the connection is established. The Ready event contains a `resume_gateway_url` that the app should keep track of to determine the WebSocket URL an app should use to Resume. **Read the section on [the Ready event](/docs/events/gateway#ready-event)** +6. The connection may be dropped for a variety of reasons at any time. Whether the app can [Resume](/docs/events/gateway#resuming) the connection or whether it must re-identify is determined by a variety of factors like the [opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes) and [close code](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes) that it receives. **Read the section on [Disconnecting](/docs/events/gateway#disconnecting)** +7. If an app **can** resume/reconnect, it should open a new connection using `resume_gateway_url` with the same version and encoding, then send a [Resume (opcode `6`)](/docs/events/gateway-events#resume) event. If an app **cannot** resume/reconnect, it should open a new connection using the cached URL from step #1, then repeat the whole Gateway cycle. *Yipee!* **Read the section on [Resuming](/docs/events/gateway#resuming)** ### Connecting -Before your app can establish a connection to the Gateway, it should call the [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway) or the [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot) endpoint. Either endpoint will return a payload with a `url` field whose value is the WSS URL you can use to open a WebSocket connection. In addition to the URL, [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot) contains additional information about the recommended number of shards and the session start limits for your app. +Before your app can establish a connection to the Gateway, it should call the [Get Gateway](/docs/events/gateway#get-gateway) or the [Get Gateway Bot](/docs/events/gateway#get-gateway-bot) endpoint. Either endpoint will return a payload with a `url` field whose value is the WSS URL you can use to open a WebSocket connection. In addition to the URL, [Get Gateway Bot](/docs/events/gateway#get-gateway-bot) contains additional information about the recommended number of shards and the session start limits for your app. -When initially calling either [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway) or [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot), you should cache the value of the `url` field and use that when re-connecting to the Gateway. +When initially calling either [Get Gateway](/docs/events/gateway#get-gateway) or [Get Gateway Bot](/docs/events/gateway#get-gateway-bot), you should cache the value of the `url` field and use that when re-connecting to the Gateway. -When connecting to the URL, it's a good idea to explicitly pass the API version and [encoding](#DOCS_EVENTS_GATEWAY/encoding-and-compression) as query parameters. You can also optionally include whether Discord should [compress](#DOCS_EVENTS_GATEWAY/encoding-and-compression) data that it sends your app. +When connecting to the URL, it's a good idea to explicitly pass the API version and [encoding](/docs/events/gateway#encoding-and-compression) as query parameters. You can also optionally include whether Discord should [compress](/docs/events/gateway#encoding-and-compression) data that it sends your app. > info > `wss://gateway.discord.gg/?v=10&encoding=json` is an example of a WSS URL an app may use to connect to the Gateway. @@ -106,15 +106,15 @@ When connecting to the URL, it's a good idea to explicitly pass the API version | Field | Type | Description | Accepted Values | |-----------|---------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------| -| v | integer | [API Version](#DOCS_REFERENCE/api-versioning) to use | [API version](#DOCS_REFERENCE/api-versioning-api-versions) | -| encoding | string | The [encoding](#DOCS_EVENTS_GATEWAY/encoding-and-compression) of received gateway packets | `json` or `etf` | -| compress? | string | The optional [transport compression](#DOCS_EVENTS_GATEWAY/transport-compression) of gateway packets | `zlib-stream` or `zstd-stream` | +| v | integer | [API Version](/docs/reference#api-versioning) to use | [API version](/docs/reference#api-versioning-api-versions) | +| encoding | string | The [encoding](/docs/events/gateway#encoding-and-compression) of received gateway packets | `json` or `etf` | +| compress? | string | The optional [transport compression](/docs/events/gateway#transport-compression) of gateway packets | `zlib-stream` or `zstd-stream` | #### Hello Event -Once connected to the Gateway, your app will receive a [Hello (opcode `10`)](#DOCS_EVENTS_GATEWAY/hello-event) event that contains your connection's heartbeat interval (`heartbeat_interval`). +Once connected to the Gateway, your app will receive a [Hello (opcode `10`)](/docs/events/gateway#hello-event) event that contains your connection's heartbeat interval (`heartbeat_interval`). -The heartbeat interval indicates a length of time in milliseconds that you should use to determine how often your app needs to send a Heartbeat event in order to maintain the active connection. Heartbeating is detailed in the [Sending Heartbeats](#DOCS_EVENTS_GATEWAY/sending-heartbeats) section. +The heartbeat interval indicates a length of time in milliseconds that you should use to determine how often your app needs to send a Heartbeat event in order to maintain the active connection. Heartbeating is detailed in the [Sending Heartbeats](/docs/events/gateway#sending-heartbeats) section. ###### Example Hello Event @@ -133,18 +133,18 @@ Heartbeats are pings used to let Discord know that your app is still actively us #### Heartbeat Interval -When your app opens a Gateway connection, it will receive a [Hello (opcode `10`)](#DOCS_EVENTS_GATEWAY/hello-event) event which includes a `heartbeat_interval` field that has a value representing a length of time in milliseconds. +When your app opens a Gateway connection, it will receive a [Hello (opcode `10`)](/docs/events/gateway#hello-event) event which includes a `heartbeat_interval` field that has a value representing a length of time in milliseconds. -Upon receiving the Hello event, your app should wait `heartbeat_interval * jitter` where `jitter` is any random value between 0 and 1, then send its first [Heartbeat (opcode `1`)](#DOCS_EVENTS_GATEWAY_EVENTS/heartbeat) event. From that point until the connection is closed, your app must continually send Discord a heartbeat every `heartbeat_interval` milliseconds. If your app fails to send a heartbeat event in time, your connection will be closed and you will be forced to [Resume](#DOCS_EVENTS_GATEWAY/resuming). +Upon receiving the Hello event, your app should wait `heartbeat_interval * jitter` where `jitter` is any random value between 0 and 1, then send its first [Heartbeat (opcode `1`)](/docs/events/gateway-events#heartbeat) event. From that point until the connection is closed, your app must continually send Discord a heartbeat every `heartbeat_interval` milliseconds. If your app fails to send a heartbeat event in time, your connection will be closed and you will be forced to [Resume](/docs/events/gateway#resuming). -When sending a heartbeat, your app will need to include the last sequence number your app received in the `d` field. The sequence number is sent to your app in the [event payload](#DOCS_EVENTS_GATEWAY_EVENTS/payload-structure) in the `s` field. If your app hasn't received any events yet, you can just pass `null` in the `d` field. +When sending a heartbeat, your app will need to include the last sequence number your app received in the `d` field. The sequence number is sent to your app in the [event payload](/docs/events/gateway-events#payload-structure) in the `s` field. If your app hasn't received any events yet, you can just pass `null` in the `d` field. > info > In the first heartbeat, `jitter` is an offset value between 0 and `heartbeat_interval` that is meant to prevent too many clients (both desktop and apps) from reconnecting their sessions at the exact same time (which could cause an influx of traffic). You *can* send heartbeats before the `heartbeat_interval` elapses, but you should avoid doing so unless necessary. There is already tolerance in the `heartbeat_interval` that will cover network latency, so you don't need to account for it in your implementation. -When you send a Heartbeat event, Discord will respond with a [Heartbeat ACK (opcode `11`)](#DOCS_EVENTS_GATEWAY/heartbeat-interval-example-heartbeat-ack) event, which is an acknowledgement that the heartbeat was received: +When you send a Heartbeat event, Discord will respond with a [Heartbeat ACK (opcode `11`)](/docs/events/gateway#heartbeat-interval-example-heartbeat-ack) event, which is an acknowledgement that the heartbeat was received: ###### Example Heartbeat ACK @@ -157,21 +157,21 @@ When you send a Heartbeat event, Discord will respond with a [Heartbeat ACK (opc > info > In the event of a service outage where you stay connected to the Gateway, you should continue to send heartbeats and receive heartbeat ACKs. The Gateway will eventually respond and issue a session once it's able to. -If a client does not receive a heartbeat ACK between its attempts at sending heartbeats, this may be due to a failed or "zombied" connection. The client should immediately terminate the connection with any close code besides `1000` or `1001`, then reconnect and attempt to [Resume](#DOCS_EVENTS_GATEWAY/resuming). +If a client does not receive a heartbeat ACK between its attempts at sending heartbeats, this may be due to a failed or "zombied" connection. The client should immediately terminate the connection with any close code besides `1000` or `1001`, then reconnect and attempt to [Resume](/docs/events/gateway#resuming). #### Heartbeat Requests -In addition to the Heartbeat interval, Discord may request additional heartbeats from your app by sending a [Heartbeat (opcode `1`)](#DOCS_EVENTS_GATEWAY_EVENTS/heartbeat) event. Upon receiving the event, your app should immediately send back another Heartbeat event without waiting the remainder of the current interval. +In addition to the Heartbeat interval, Discord may request additional heartbeats from your app by sending a [Heartbeat (opcode `1`)](/docs/events/gateway-events#heartbeat) event. Upon receiving the event, your app should immediately send back another Heartbeat event without waiting the remainder of the current interval. -Just like with the interval, Discord will respond with an [Heartbeat ACK (opcode `11`)](#DOCS_EVENTS_GATEWAY/heartbeat-interval-example-heartbeat-ack) event. +Just like with the interval, Discord will respond with an [Heartbeat ACK (opcode `11`)](/docs/events/gateway#heartbeat-interval-example-heartbeat-ack) event. ### Identifying -After the connection is open and your app is sending heartbeats, you should send an [Identify (opcode `2`)](#DOCS_EVENTS_GATEWAY_EVENTS/identify) event. The Identify event is an initial handshake with the Gateway that's required before your app can begin sending or receiving most Gateway events. +After the connection is open and your app is sending heartbeats, you should send an [Identify (opcode `2`)](/docs/events/gateway-events#identify) event. The Identify event is an initial handshake with the Gateway that's required before your app can begin sending or receiving most Gateway events. -Apps are limited by maximum concurrency (`max_concurrency` in the [session start limit object](#DOCS_EVENTS_GATEWAY/session-start-limit-object)) when identifying. If your app exceeds this limit, Discord will respond with a [Invalid Session (opcode `9`)](#DOCS_EVENTS_GATEWAY_EVENTS/invalid-session) event. +Apps are limited by maximum concurrency (`max_concurrency` in the [session start limit object](/docs/events/gateway#session-start-limit-object)) when identifying. If your app exceeds this limit, Discord will respond with a [Invalid Session (opcode `9`)](/docs/events/gateway-events#invalid-session) event. -After your app sends a valid Identify payload, Discord will respond with a [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) event which indicates that your app is in a successfully-connected state with the Gateway. The Ready event is sent as a standard [Dispatch (opcode `0`)](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-opcodes). +After your app sends a valid Identify payload, Discord will respond with a [Ready](/docs/events/gateway-events#ready) event which indicates that your app is in a successfully-connected state with the Gateway. The Ready event is sent as a standard [Dispatch (opcode `0`)](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes). > warn > Clients are limited to 1000 `IDENTIFY` calls to the websocket in a 24-hour period. This limit is global and across all shards, but does not include `RESUME` calls. Upon hitting this limit, all active sessions for the app will be terminated, the bot token will be reset, and the owner will receive an email notification. It's up to the owner to update their application with the new token. @@ -180,7 +180,7 @@ After your app sends a valid Identify payload, Discord will respond with a [Read Below is a minimal `IDENTIFY` payload. `IDENTIFY` supports additional fields for other session properties like payload compression and an initial presence state. -See the [Identify Structure](#DOCS_EVENTS_GATEWAY_EVENTS/identify-identify-structure) for details about the event. +See the [Identify Structure](/docs/events/gateway-events#identify-identify-structure) for details about the event. ```json { @@ -199,13 +199,13 @@ See the [Identify Structure](#DOCS_EVENTS_GATEWAY_EVENTS/identify-identify-struc #### Ready event -As mentioned above, the [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) event is sent to your app after it sends a valid Identify payload. The Ready event includes state, like the guilds your app is in, that it needs to start interacting with the rest of the platform. +As mentioned above, the [Ready](/docs/events/gateway-events#ready) event is sent to your app after it sends a valid Identify payload. The Ready event includes state, like the guilds your app is in, that it needs to start interacting with the rest of the platform. -The Ready event also includes fields that you'll need to cache in order to eventually [Resume](#DOCS_EVENTS_GATEWAY/resuming) your connection after disconnects. Two fields in particular are important to call out: -- `resume_gateway_url` is a WebSocket URL that your app should use when it Resumes after a disconnect. The `resume_gateway_url` should be used instead of the URL [used when connecting](#DOCS_EVENTS_GATEWAY/connecting). +The Ready event also includes fields that you'll need to cache in order to eventually [Resume](/docs/events/gateway#resuming) your connection after disconnects. Two fields in particular are important to call out: +- `resume_gateway_url` is a WebSocket URL that your app should use when it Resumes after a disconnect. The `resume_gateway_url` should be used instead of the URL [used when connecting](/docs/events/gateway#connecting). - `session_id` is the ID for the Gateway session for the new connection. It's required to know which stream of events were associated with your disconnection connection. -Full details about the Ready event is in the [Gateway events documentation](#DOCS_EVENTS_GATEWAY_EVENTS). +Full details about the Ready event is in the [Gateway events documentation](/docs/events/gateway-events). ### Disconnecting @@ -213,20 +213,20 @@ Gateway disconnects happen for a variety of reasons, and may be initiated by Dis #### Handling a Disconnect -Due to Discord's architecture, disconnects are a semi-regular event and should be expected and handled. When your app encounters a disconnect, it will typically be sent a [close code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes) which can be used to determine whether you can reconnect and [Resume](#DOCS_EVENTS_GATEWAY/resuming) the session, or whether you have to start over and re-Identify. +Due to Discord's architecture, disconnects are a semi-regular event and should be expected and handled. When your app encounters a disconnect, it will typically be sent a [close code](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes) which can be used to determine whether you can reconnect and [Resume](/docs/events/gateway#resuming) the session, or whether you have to start over and re-Identify. After you determine whether or not your app can reconnect, you will do one of the following: -- If you determine that your app *can* reconnect and resume the previous session, then you should reconnect using the `resume_gateway_url` and `session_id` from the [Ready](#DOCS_EVENTS_GATEWAY_EVENTS/ready) event. Details about when and how to resume can be found in the [Resuming](#DOCS_EVENTS_GATEWAY/resuming) section. -- If you *cannot* reconnect **or the reconnect fails**, you should open a new connection using the URL from the initial call to [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway) or [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot). In the case you cannot reconnect, you'll have to re-identify after opening a new connection. +- If you determine that your app *can* reconnect and resume the previous session, then you should reconnect using the `resume_gateway_url` and `session_id` from the [Ready](/docs/events/gateway-events#ready) event. Details about when and how to resume can be found in the [Resuming](/docs/events/gateway#resuming) section. +- If you *cannot* reconnect **or the reconnect fails**, you should open a new connection using the URL from the initial call to [Get Gateway](/docs/events/gateway#get-gateway) or [Get Gateway Bot](/docs/events/gateway#get-gateway-bot). In the case you cannot reconnect, you'll have to re-identify after opening a new connection. -A full list of the close codes can be found in the [Response Codes](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes) documentation. +A full list of the close codes can be found in the [Response Codes](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes) documentation. #### Initiating a Disconnect When you close the connection to the gateway with close code `1000` or `1001`, your session will be invalidated and your bot will appear offline. -If you simply close the TCP connection or use a different close code, the session will remain active and timeout after a few minutes. This can be useful when you're [Resuming](#DOCS_EVENTS_GATEWAY/resuming) the previous session. +If you simply close the TCP connection or use a different close code, the session will remain active and timeout after a few minutes. This can be useful when you're [Resuming](/docs/events/gateway#resuming) the previous session. ### Resuming @@ -234,27 +234,27 @@ When your app is disconnected, Discord has a process for reconnecting and resumi There are a handful of scenarios when your app should attempt to resume: -1. It receives a [Reconnect (opcode `7`)](#DOCS_EVENTS_GATEWAY_EVENTS/reconnect) event -2. It's disconnected with a close code that indicates it can reconnect. A list of close codes is in the [Opcodes and Status Codes](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes) documentation. +1. It receives a [Reconnect (opcode `7`)](/docs/events/gateway-events#reconnect) event +2. It's disconnected with a close code that indicates it can reconnect. A list of close codes is in the [Opcodes and Status Codes](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes) documentation. 3. It's disconnected but doesn't receive *any* close code. -4. It receives an [Invalid Session (opcode `9`)](#DOCS_EVENTS_GATEWAY_EVENTS/invalid-session) event with the `d` field set to `true`. This is an unlikely scenario, but it is possible. +4. It receives an [Invalid Session (opcode `9`)](/docs/events/gateway-events#invalid-session) event with the `d` field set to `true`. This is an unlikely scenario, but it is possible. #### Preparing to Resume -Before your app can send a [Resume (opcode `6`)](#DOCS_EVENTS_GATEWAY_EVENTS/resume) event, it will need three values: the `session_id` and the `resume_gateway_url` from the [Ready](#DOCS_EVENTS_GATEWAY/ready-event) event, and the sequence number (`s`) from the last Dispatch (opcode `0`) event it received before the disconnect. +Before your app can send a [Resume (opcode `6`)](/docs/events/gateway-events#resume) event, it will need three values: the `session_id` and the `resume_gateway_url` from the [Ready](/docs/events/gateway#ready-event) event, and the sequence number (`s`) from the last Dispatch (opcode `0`) event it received before the disconnect. -After the connection is closed, your app should open a new connection using `resume_gateway_url` rather than the URL used to initially connect, with the same query parameters from the initial [Connection](#DOCS_EVENTS_GATEWAY/connecting). If your app doesn't use the `resume_gateway_url` when reconnecting, it will experience disconnects at a higher rate than normal. +After the connection is closed, your app should open a new connection using `resume_gateway_url` rather than the URL used to initially connect, with the same query parameters from the initial [Connection](/docs/events/gateway#connecting). If your app doesn't use the `resume_gateway_url` when reconnecting, it will experience disconnects at a higher rate than normal. -Once the new connection is opened, your app should send a [Gateway Resume](#DOCS_EVENTS_GATEWAY_EVENTS/resume) event using the `session_id` and sequence number mentioned above. When sending the event, `session_id` will have the same field name, but the last sequence number will be passed as `seq` in the data object (`d`). +Once the new connection is opened, your app should send a [Gateway Resume](/docs/events/gateway-events#resume) event using the `session_id` and sequence number mentioned above. When sending the event, `session_id` will have the same field name, but the last sequence number will be passed as `seq` in the data object (`d`). When Resuming, you do not need to send an Identify event after opening the connection. -If successful, the Gateway will send the missed events in order, finishing with a [Resumed](#DOCS_EVENTS_GATEWAY_EVENTS/resumed) event to signal event replay has finished and that all subsequent events will be new. +If successful, the Gateway will send the missed events in order, finishing with a [Resumed](/docs/events/gateway-events#resumed) event to signal event replay has finished and that all subsequent events will be new. > info > When resuming with the `resume_gateway_url` you need to provide the same version and encoding as the initial connection. -It's possible your app won't reconnect in time to Resume, in which case it will receive an [Invalid Session (opcode `9`)](#DOCS_EVENTS_GATEWAY_EVENTS/invalid-session) event. If the `d` field is set to `false` (which is most of the time), your app should disconnect. After disconnect, your app should create a new connection with your cached URL from the [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway) or the [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot) endpoint, then send an [Identify (opcode `2`)](#DOCS_EVENTS_GATEWAY_EVENTS/identify) event. +It's possible your app won't reconnect in time to Resume, in which case it will receive an [Invalid Session (opcode `9`)](/docs/events/gateway-events#invalid-session) event. If the `d` field is set to `false` (which is most of the time), your app should disconnect. After disconnect, your app should create a new connection with your cached URL from the [Get Gateway](/docs/events/gateway#get-gateway) or the [Get Gateway Bot](/docs/events/gateway#get-gateway-bot) endpoint, then send an [Identify (opcode `2`)](/docs/events/gateway-events#identify) event. ###### Example Gateway Resume Event @@ -273,7 +273,7 @@ It's possible your app won't reconnect in time to Resume, in which case it will Maintaining a stateful application can be difficult when it comes to the amount of data your app is expected to process over a Gateway connection, especially at scale. Gateway intents are a system to help you lower the computational burden. -Intents are bitwise values passed in the `intents` parameter when [Identifying](#DOCS_EVENTS_GATEWAY/identifying) which correlate to a set of related events. For example, the event sent when a guild is created (`GUILD_CREATE`) and when a channel is updated (`CHANNEL_UPDATE`) both require the same `GUILDS (1 << 0)` intent (as listed in the table below). If you do not specify an intent when identifying, you will not receive *any* of the Gateway events associated with that intent. +Intents are bitwise values passed in the `intents` parameter when [Identifying](/docs/events/gateway#identifying) which correlate to a set of related events. For example, the event sent when a guild is created (`GUILD_CREATE`) and when a channel is updated (`CHANNEL_UPDATE`) both require the same `GUILDS (1 << 0)` intent (as listed in the table below). If you do not specify an intent when identifying, you will not receive *any* of the Gateway events associated with that intent. > info > Intents are optionally supported on the v6 gateway but required as of v8 @@ -281,15 +281,15 @@ Intents are bitwise values passed in the `intents` parameter when [Identifying]( Two types of intents exist: - **Standard intents** can be passed by default. You don't need any additional permissions or configurations. -- [**Privileged intents**](#DOCS_EVENTS_GATEWAY/privileged-intents) require you to toggle the intent for your app in your app's settings within the Developer Portal before passing said intent. For verified apps (required for apps in 100+ guilds), the intent must also be approved after the verification process to use the intent. More information about privileged intents can be found [in the section below](#DOCS_EVENTS_GATEWAY/privileged-intents). +- [**Privileged intents**](/docs/events/gateway#privileged-intents) require you to toggle the intent for your app in your app's settings within the Developer Portal before passing said intent. For verified apps (required for apps in 100+ guilds), the intent must also be approved after the verification process to use the intent. More information about privileged intents can be found [in the section below](/docs/events/gateway#privileged-intents). -The connection with your app will be closed if it passes invalid intents ([`4013` close code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes)), or a privileged intent that hasn't been configured or approved for your app ([`4014` close code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes)). +The connection with your app will be closed if it passes invalid intents ([`4013` close code](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes)), or a privileged intent that hasn't been configured or approved for your app ([`4014` close code](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes)). ### List of Intents Below is a list of all intents and the Gateway events associated with them. Any events *not* listed means it's not associated with an intent and will always be sent to your app. -All events, including those that aren't associated with an intent, are in the [Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS) documentation. +All events, including those that aren't associated with an intent, are in the [Gateway events](/docs/events/gateway-events) documentation. ``` GUILDS (1 << 0) @@ -408,19 +408,19 @@ DIRECT_MESSAGE_POLLS (1 << 25) - MESSAGE_POLL_VOTE_REMOVE ``` -\* [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) contains different data depending on which intents are used. +\* [Thread Members Update](/docs/events/gateway-events#thread-members-update) contains different data depending on which intents are used. \*\* Events under the `GUILD_PRESENCES` and `GUILD_MEMBERS` intents are turned **off by default on all API versions**. If you are using **API v6**, you will receive those events if you are authorized to receive them and have enabled the intents in the Developer Portal. You do not need to use intents on API v6 to receive these events; you just need to enable the flags. If you are using **API v8** or above, intents are mandatory and must be specified when identifying. -\*\*\* `MESSAGE_CONTENT` does not represent individual events, but rather affects what data is present for events that could contain message content fields. More information is in the [message content intent](#DOCS_EVENTS_GATEWAY/message-content-intent) section. +\*\*\* `MESSAGE_CONTENT` does not represent individual events, but rather affects what data is present for events that could contain message content fields. More information is in the [message content intent](/docs/events/gateway#message-content-intent) section. ### Caveats -[Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) is sent for current-user updates regardless of whether the `GUILD_MEMBERS` intent is set. +[Guild Member Update](/docs/events/gateway-events#guild-member-update) is sent for current-user updates regardless of whether the `GUILD_MEMBERS` intent is set. -[Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) and [Request Guild Members](#DOCS_EVENTS_GATEWAY_EVENTS/request-guild-members) are uniquely affected by intents. See these sections for more information. +[Guild Create](/docs/events/gateway-events#guild-create) and [Request Guild Members](/docs/events/gateway-events#request-guild-members) are uniquely affected by intents. See these sections for more information. -[Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) by default only includes if the current user was added to or removed from a thread. To receive these updates for other users, request the `GUILD_MEMBERS` [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents). +[Thread Members Update](/docs/events/gateway-events#thread-members-update) by default only includes if the current user was added to or removed from a thread. To receive these updates for other users, request the `GUILD_MEMBERS` [Gateway Intent](/docs/events/gateway#gateway-intents). ### Privileged Intents @@ -428,7 +428,7 @@ Some intents are defined as "privileged" due to the sensitive nature of the data - `GUILD_PRESENCES` - `GUILD_MEMBERS` -- [`MESSAGE_CONTENT`](#DOCS_EVENTS_GATEWAY/message-content-intent) +- [`MESSAGE_CONTENT`](/docs/events/gateway#message-content-intent) Apps that qualify for verification **must** be approved for the privileged intent(s) before they can use them. After your app is verified, you can request privileged intents within the app's settings within the Developer Portal. @@ -437,7 +437,7 @@ Before you specify privileged intents in your `IDENTIFY` payload, you must enabl > info > Unverified apps can use privileged intents without approval, but still must enable them in their app's settings. If the app's verification status changes, it will then have to apply for the privileged intent(s). -In addition to the gateway restrictions described here, Discord's REST API is also affected by Privileged Intents. For example, to use the [List Guild Members](#DOCS_RESOURCES_GUILD/list-guild-members) endpoint, you must have the `GUILD_MEMBERS` intent enabled for your application. This behavior is independent of whether the intent is set during `IDENTIFY`. +In addition to the gateway restrictions described here, Discord's REST API is also affected by Privileged Intents. For example, to use the [List Guild Members](/docs/resources/guild#list-guild-members) endpoint, you must have the `GUILD_MEMBERS` intent enabled for your application. This behavior is independent of whether the intent is set during `IDENTIFY`. #### Enabling Privileged Intents @@ -447,7 +447,7 @@ If your app qualifies for [verification](https://support-dev.discord.com/hc/en-u #### Gateway Restrictions -Privileged intents affect which Gateway events your app is permitted to receive. When using **API v8** and above, all intents (privileged and not) must be specified in the `intents` parameter when Identifying. If you pass a privileged intent in the `intents` parameter without configuring it in your app's settings, or being approved for it during verification, your Gateway connection will be closed with a ([`4014` close code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes)). +Privileged intents affect which Gateway events your app is permitted to receive. When using **API v8** and above, all intents (privileged and not) must be specified in the `intents` parameter when Identifying. If you pass a privileged intent in the `intents` parameter without configuring it in your app's settings, or being approved for it during verification, your Gateway connection will be closed with a ([`4014` close code](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes)). > info > For **API v6**, you will receive events associated with the privileged intents your app has configured and is authorized to receive *without* passing those intents into the `intents` parameter when Identifying. @@ -456,7 +456,7 @@ Events associated with the `GUILD_PRESENCES` and `GUILD_MEMBERS` intents are tur #### HTTP Restrictions -In addition to Gateway restrictions, privileged intents also affect the [HTTP API](#DOCS_REFERENCE/http-api) endpoints your app is permitted to call, and the data it can receive. For example, to use the [List Guild Members](#DOCS_RESOURCES_GUILD/list-guild-members) endpoint, your app must enable the `GUILD_MEMBERS` intent (and be approved for it if eligible for verification). +In addition to Gateway restrictions, privileged intents also affect the [HTTP API](/docs/reference#http-api) endpoints your app is permitted to call, and the data it can receive. For example, to use the [List Guild Members](/docs/resources/guild#list-guild-members) endpoint, your app must enable the `GUILD_MEMBERS` intent (and be approved for it if eligible for verification). HTTP API restrictions are independent of Gateway restrictions, and are unaffected by which intents your app passes in the `intents` parameter when Identifying. @@ -464,7 +464,7 @@ HTTP API restrictions are independent of Gateway restrictions, and are unaffecte `MESSAGE_CONTENT (1 << 15)` is a unique privileged intent that isn't directly associated with any Gateway events. Instead, access to `MESSAGE_CONTENT` permits your app to receive message content data across the APIs. -Any fields affected by the message content intent are noted in the relevant documentation. For example, the `content`, `embeds`, `attachments`, `components`, and `poll` fields in [message objects](#DOCS_RESOURCES_MESSAGE/message-object) all contain message content and therefore require the intent. +Any fields affected by the message content intent are noted in the relevant documentation. For example, the `content`, `embeds`, `attachments`, `components`, and `poll` fields in [message objects](/docs/resources/message#message-object) all contain message content and therefore require the intent. > info > Like other privileged intents, `MESSAGE_CONTENT` must be approved for your app. After your app is verified, you can apply for the intent from your app's settings within the Developer Portal. You can read more about the message content intent review policy [in the Help Center](https://support-dev.discord.com/hc/en-us/articles/5324827539479). @@ -472,40 +472,40 @@ Any fields affected by the message content intent are noted in the relevant docu Apps **without** the intent will receive empty values in fields that contain user-inputted content with a few exceptions: - Content in messages that an app sends - Content in DMs with the app -- Content in which the app is [mentioned](#DOCS_REFERENCE/message-formatting-formats) -- Content of the message a [message context menu command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) is used on +- Content in which the app is [mentioned](/docs/reference#message-formatting-formats) +- Content of the message a [message context menu command](/docs/interactions/application-commands#message-commands) is used on ## Rate Limiting > info -> This section refers to Gateway rate limits, not [HTTP API rate limits](#DOCS_TOPICS_RATE_LIMITS) +> This section refers to Gateway rate limits, not [HTTP API rate limits](/docs/topics/rate-limits) -Apps can send 120 [gateway events](#DOCS_EVENTS_GATEWAY_EVENTS) per [connection](#DOCS_EVENTS_GATEWAY/connections) every 60 seconds, meaning an average of 2 commands per second. Apps that surpass the limit are immediately disconnected from the Gateway. Similar to other rate limits, repeat offenders will have their API access revoked. +Apps can send 120 [gateway events](/docs/events/gateway-events) per [connection](/docs/events/gateway#connections) every 60 seconds, meaning an average of 2 commands per second. Apps that surpass the limit are immediately disconnected from the Gateway. Similar to other rate limits, repeat offenders will have their API access revoked. -Apps also have a limit for [concurrent](#DOCS_EVENTS_GATEWAY/session-start-limit-object) [Identify](#DOCS_EVENTS_GATEWAY/identifying) requests allowed per 5 seconds. If you hit this limit, the Gateway will respond with an [Invalid Session (opcode `9`)](#DOCS_EVENTS_GATEWAY_EVENTS/invalid-session). +Apps also have a limit for [concurrent](/docs/events/gateway#session-start-limit-object) [Identify](/docs/events/gateway#identifying) requests allowed per 5 seconds. If you hit this limit, the Gateway will respond with an [Invalid Session (opcode `9`)](/docs/events/gateway-events#invalid-session). ## Encoding and Compression -When [establishing a connection](#DOCS_EVENTS_GATEWAY/connecting) to the Gateway, apps can use the `encoding` parameter to choose whether to communicate with Discord using a plain-text JSON or binary [ETF](https://erlang.org/doc/apps/erts/erl_ext_dist.html) encoding. You can pick whichever encoding type you're more comfortable with, but both have their own quirks. If you aren't sure which encoding to use, JSON is generally recommended. +When [establishing a connection](/docs/events/gateway#connecting) to the Gateway, apps can use the `encoding` parameter to choose whether to communicate with Discord using a plain-text JSON or binary [ETF](https://erlang.org/doc/apps/erts/erl_ext_dist.html) encoding. You can pick whichever encoding type you're more comfortable with, but both have their own quirks. If you aren't sure which encoding to use, JSON is generally recommended. -Apps can also optionally enable compression to receive zlib-compressed or zstd-compressed packets. [Payload compression](#DOCS_EVENTS_GATEWAY/payload-compression) can only be enabled when using a JSON encoding, but [transport compression](#DOCS_EVENTS_GATEWAY/transport-compression) can be used regardless of encoding type. +Apps can also optionally enable compression to receive zlib-compressed or zstd-compressed packets. [Payload compression](/docs/events/gateway#payload-compression) can only be enabled when using a JSON encoding, but [transport compression](/docs/events/gateway#transport-compression) can be used regardless of encoding type. ### Using JSON Encoding -When using the plain-text JSON encoding, apps have the option to enable [payload compression](#DOCS_EVENTS_GATEWAY/payload-compression). +When using the plain-text JSON encoding, apps have the option to enable [payload compression](/docs/events/gateway#payload-compression). #### Payload Compression > warn -> If an app is using payload compression, it cannot use [transport compression](#DOCS_EVENTS_GATEWAY/transport-compression). +> If an app is using payload compression, it cannot use [transport compression](/docs/events/gateway#transport-compression). Payload compression enables optional per-packet compression for *some* events when Discord is sending events over the connection. -Payload compression uses the zlib format (see [RFC1950 2.2](https://tools.ietf.org/html/rfc1950#section-2.2)) when sending payloads. To enable payload compression, your app can set `compress` to `true` when sending an [Identify (opcode `2`)](#DOCS_EVENTS_GATEWAY_EVENTS/identify) event. Note that even when payload compression is enabled, not all payloads will be compressed. +Payload compression uses the zlib format (see [RFC1950 2.2](https://tools.ietf.org/html/rfc1950#section-2.2)) when sending payloads. To enable payload compression, your app can set `compress` to `true` when sending an [Identify (opcode `2`)](/docs/events/gateway-events#identify) event. Note that even when payload compression is enabled, not all payloads will be compressed. When payload compression is enabled, your app (or library) _must_ detect and decompress these payloads to plain-text JSON before attempting to parse them. If you are using payload compression, the gateway does not implement a shared compression context between events sent. -Payload compression will be disabled if you use [transport compression](#DOCS_EVENTS_GATEWAY/transport-compression). +Payload compression will be disabled if you use [transport compression](/docs/events/gateway#transport-compression). ### Using ETF Encoding @@ -513,7 +513,7 @@ When using ETF (External Term Format) encoding, there are some specific behavior - Snowflake IDs are transmitted as 64-bit integers or strings. - Your app can't send compressed messages to the server. -- When sending payloads, you must use string keys. Using atom keys will result in a [`4002`](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-close-event-codes) decode error. +- When sending payloads, you must use string keys. Using atom keys will result in a [`4002`](/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes) decode error. See [erlpack](https://github.com/discord/erlpack) for an ETF implementation example. @@ -564,18 +564,18 @@ When processing data, each websocket message corresponds to a single gateway mes ## Tracking State -Most of a client's state is provided during the initial [Ready](#DOCS_EVENTS_GATEWAY/ready-event) event and in the [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) events that follow. +Most of a client's state is provided during the initial [Ready](/docs/events/gateway#ready-event) event and in the [Guild Create](/docs/events/gateway-events#guild-create) events that follow. As resources continue to be created, updated, and deleted, Gateway events are sent to notify the app of these changes and to provide associated data. To avoid excessive API calls, apps should cache as many relevant resource states as possible, and update them as new events are received. > info -> For larger apps, client state can grow to be very large. Therefore, we recommend only storing data in memory that are *needed* for the app to operate. In some cases, there isn't a need to cache member information (like roles or permissions) since some events like [MESSAGE_CREATE](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) have the full member object included. +> For larger apps, client state can grow to be very large. Therefore, we recommend only storing data in memory that are *needed* for the app to operate. In some cases, there isn't a need to cache member information (like roles or permissions) since some events like [MESSAGE_CREATE](/docs/events/gateway-events#message-create) have the full member object included. -An example of state tracking can be considered in the case of an app that wants to track member status: when initially connecting to the Gateway, the app will receive information about the online status of guild members (whether they're online, idle, dnd, or offline). To keep the state updated, the app will track and parse [Presence Update](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) events as they're received, then update the cached member objects accordingly. +An example of state tracking can be considered in the case of an app that wants to track member status: when initially connecting to the Gateway, the app will receive information about the online status of guild members (whether they're online, idle, dnd, or offline). To keep the state updated, the app will track and parse [Presence Update](/docs/events/gateway-events#presence-update) events as they're received, then update the cached member objects accordingly. ## Guild Availability -When connecting to the gateway as a bot user, guilds that the bot is a part of will start out as unavailable. Don't fret! The gateway will automatically attempt to reconnect on your behalf. As guilds become available to you, you will receive [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) events. +When connecting to the gateway as a bot user, guilds that the bot is a part of will start out as unavailable. Don't fret! The gateway will automatically attempt to reconnect on your behalf. As guilds become available to you, you will receive [Guild Create](/docs/events/gateway-events#guild-create) events. ## Sharding @@ -584,10 +584,10 @@ As apps grow and are added to an increasing number of guilds, some developers ma > warn > Each shard can only support a maximum of 2500 guilds, and apps that are in 2500+ guilds *must* enable sharding. -To enable sharding on a connection, the app should send the `shard` array in the [Identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify) payload. The first item in this array should be the zero-based integer value of the current shard, while the second represents the total number of shards. DMs will only be sent to shard 0. +To enable sharding on a connection, the app should send the `shard` array in the [Identify](/docs/events/gateway-events#identify) payload. The first item in this array should be the zero-based integer value of the current shard, while the second represents the total number of shards. DMs will only be sent to shard 0. > info -> The [Get Gateway Bot](#DOCS_EVENTS_GATEWAY/get-gateway-bot) endpoint provides a recommended number of shards for your app in the `shards` field +> The [Get Gateway Bot](/docs/events/gateway#get-gateway-bot) endpoint provides a recommended number of shards for your app in the `shards` field To calculate which events will be sent to which shard, the following formula can be used: @@ -603,7 +603,7 @@ Note that `num_shards` does not relate to (or limit) the total number of potenti ###### Max Concurrency -If you have multiple shards, you may start them concurrently based on the [`max_concurrency`](#DOCS_EVENTS_GATEWAY/session-start-limit-object) value returned to you on session start. Which shards you can start concurrently are assigned based on a key for each shard. The rate limit key for a given shard can be computed with +If you have multiple shards, you may start them concurrently based on the [`max_concurrency`](/docs/events/gateway#session-start-limit-object) value returned to you on session start. Which shards you can start concurrently are assigned based on a key for each shard. The rate limit key for a given shard can be computed with ``` rate_limit_key = shard_id % max_concurrency @@ -675,16 +675,16 @@ If your bot is in more than 150,000 guilds, there are some additional considerat The number of shards you run must be a multiple of the shard number provided when reaching out to you. If you attempt to start your bot with an invalid number of shards, your Gateway connection will close with a `4010` Invalid Shard close code. -The [Get Gateway Bot endpoint](#DOCS_EVENTS_GATEWAY/get-gateway-bot) will always return the correct amount of shards, so if you're already using this endpoint to determine your number of shards, you shouldn't require any changes. +The [Get Gateway Bot endpoint](/docs/events/gateway#get-gateway-bot) will always return the correct amount of shards, so if you're already using this endpoint to determine your number of shards, you shouldn't require any changes. -The session start limit for these bots will also be increased from 1000 to `max(2000, (guild_count / 1000) * 5)` per day. You also receive an increased `max_concurrency`, the number of [shards you can concurrently start](#DOCS_EVENTS_GATEWAY/session-start-limit-object). +The session start limit for these bots will also be increased from 1000 to `max(2000, (guild_count / 1000) * 5)` per day. You also receive an increased `max_concurrency`, the number of [shards you can concurrently start](/docs/events/gateway#session-start-limit-object). ## Get Gateway % GET /gateway > info > This endpoint does not require authentication. -Returns an object with a valid WSS URL which the app can use when [Connecting](#DOCS_EVENTS_GATEWAY/connecting) to the Gateway. Apps should cache this value and only call this endpoint to retrieve a new URL when they are unable to properly establish a connection using the cached one. +Returns an object with a valid WSS URL which the app can use when [Connecting](/docs/events/gateway#connecting) to the Gateway. Apps should cache this value and only call this endpoint to retrieve a new URL when they are unable to properly establish a connection using the cached one. ###### Example Response @@ -699,15 +699,15 @@ Returns an object with a valid WSS URL which the app can use when [Connecting](# > warn > This endpoint requires authentication using a valid bot token. -Returns an object based on the information in [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway), plus additional metadata that can help during the operation of large or [sharded](#DOCS_EVENTS_GATEWAY/sharding) bots. Unlike the [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway), this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds. +Returns an object based on the information in [Get Gateway](/docs/events/gateway#get-gateway), plus additional metadata that can help during the operation of large or [sharded](/docs/events/gateway#sharding) bots. Unlike the [Get Gateway](/docs/events/gateway#get-gateway), this route should not be cached for extended periods of time as the value is not guaranteed to be the same per-call, and changes as the bot joins/leaves guilds. ###### JSON Response | Field | Type | Description | |---------------------|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| | url | string | WSS URL that can be used for connecting to the Gateway | -| shards | integer | Recommended number of [shards](#DOCS_EVENTS_GATEWAY/sharding) to use when connecting | -| session_start_limit | [session_start_limit](#DOCS_EVENTS_GATEWAY/session-start-limit-object) object | Information on the current session start limit | +| shards | integer | Recommended number of [shards](/docs/events/gateway#sharding) to use when connecting | +| session_start_limit | [session_start_limit](/docs/events/gateway#session-start-limit-object) object | Information on the current session start limit | ###### Example Response diff --git a/docs/events/overview.mdx b/docs/events/overview.mdx index 7ea46e3a95..1181c754ab 100644 --- a/docs/events/overview.mdx +++ b/docs/events/overview.mdx @@ -9,43 +9,43 @@ Apps can listen to events happening in Discord to stay up-to-date with changes a ## Receiving Events There are many event types that can be accessed using different transport methods: -- **[Gateway events](#DOCS_EVENTS_OVERVIEW/using-gateway)** are sent over a WebSocket connection between your app and Discord, and is the primary way to receive and send events. **Most events are only available via Gateway connections.** -- **[Webhook events](#DOCS_EVENTS_OVERVIEW/using-webhooks)** are sent to your app's Webhook Event URL over HTTP. -- **[SDK events](#DOCS_EVENTS_OVERVIEW/using-the-embedded-app-sdk)** are sent to your app when using the Embedded App SDK. +- **[Gateway events](/docs/events/overview#using-gateway)** are sent over a WebSocket connection between your app and Discord, and is the primary way to receive and send events. **Most events are only available via Gateway connections.** +- **[Webhook events](/docs/events/overview#using-webhooks)** are sent to your app's Webhook Event URL over HTTP. +- **[SDK events](/docs/events/overview#using-the-embedded-app-sdk)** are sent to your app when using the Embedded App SDK. Read details about each way to receive events in the sections below. ### Using Gateway -Gateway events are the primary way apps can listen and send events. Most events related to resources in Discord, like updates to channels, guilds, roles, and messages, are only available over [Gateway](#DOCS_EVENTS_GATEWAY). +Gateway events are the primary way apps can listen and send events. Most events related to resources in Discord, like updates to channels, guilds, roles, and messages, are only available over [Gateway](/docs/events/gateway). -Gateway events are sent over a WebSocket-based [Gateway connection](#DOCS_EVENTS_GATEWAY/connections) between Discord and your app. To receive Gateway events, your app must open and maintain a persistent Gateway connection which you can read details about in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/connections). To make receiving Gateway events simpler, we suggest using a [developer library](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES/libraries) which helps setup, maintain, and handle common pitfalls with Gateway connections (like [rate limits](#DOCS_EVENTS_GATEWAY/rate-limiting)). +Gateway events are sent over a WebSocket-based [Gateway connection](/docs/events/gateway#connections) between Discord and your app. To receive Gateway events, your app must open and maintain a persistent Gateway connection which you can read details about in the [Gateway documentation](/docs/events/gateway#connections). To make receiving Gateway events simpler, we suggest using a [developer library](/docs/developer-tools/community-resources/libraries) which helps setup, maintain, and handle common pitfalls with Gateway connections (like [rate limits](/docs/events/gateway#rate-limiting)). -Details about receiving events using the Gateway API is in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/receiving-events), and the full list of available Gateway events is in the [Gateway Events documentation](#DOCS_EVENTS_GATEWAY_EVENTS). +Details about receiving events using the Gateway API is in the [Gateway documentation](/docs/events/gateway#receiving-events), and the full list of available Gateway events is in the [Gateway Events documentation](/docs/events/gateway-events). ### Using Webhooks -Webhook events let you receive a small number of events over HTTP. While many events aren't supported over HTTP, some events like [Application Authorized](#DOCS_EVENTS_WEBHOOK_EVENTS/application-authorized) (sent when your app is installed to a user or server) aren't available using other transport methods like Gateway. +Webhook events let you receive a small number of events over HTTP. While many events aren't supported over HTTP, some events like [Application Authorized](/docs/events/webhook-events#application-authorized) (sent when your app is installed to a user or server) aren't available using other transport methods like Gateway. -Find the [list of webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) and details about subscribing and handling them in the [Webhook Events documentation](#DOCS_EVENTS_WEBHOOK_EVENTS). +Find the [list of webhook events](/docs/events/webhook-events#event-types) and details about subscribing and handling them in the [Webhook Events documentation](/docs/events/webhook-events). ### Using the Embedded App SDK -When developing [Activities](#DOCS_ACTIVITIES_OVERVIEW), you can listen to a collection of [SDK events](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/sdk-events), like updates to a user's voice status or screen orientation. To listen to SDK events, you can call [`subscribe()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/subscribe) with the SDK event name. +When developing [Activities](/docs/activities/overview), you can listen to a collection of [SDK events](/docs/developer-tools/embedded-app-sdk#sdk-events), like updates to a user's voice status or screen orientation. To listen to SDK events, you can call [`subscribe()`](/docs/developer-tools/embedded-app-sdk#subscribe) with the SDK event name. -Details about listening to events using the Embedded App SDK is in the [Embedded App SDK documentation](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK). +Details about listening to events using the Embedded App SDK is in the [Embedded App SDK documentation](/docs/developer-tools/embedded-app-sdk). ## Next Steps - + Gateway is the primary apps receive events on Discord. Read details about using the Gateway and receiving Gateway Events. - + Read details about receiving and responding a small number of HTTP-based Webhook Events. - + Read details about subscribing and receiving events specific to your Activity using the Embedded App SDK. diff --git a/docs/events/webhook-events.mdx b/docs/events/webhook-events.mdx index 24a3c6ad14..2b441603aa 100644 --- a/docs/events/webhook-events.mdx +++ b/docs/events/webhook-events.mdx @@ -4,22 +4,22 @@ sidebar_label: Webhook Events # Webhook Events -Webhook events are one-way events sent to your app over HTTP to notify you when an event occured. Unlike events that are [sent over Gateway connections](#DOCS_EVENTS_GATEWAY), events sent over webhooks are not realtime or guaranteed to be in order. +Webhook events are one-way events sent to your app over HTTP to notify you when an event occured. Unlike events that are [sent over Gateway connections](/docs/events/gateway), events sent over webhooks are not realtime or guaranteed to be in order. -While [incoming webhooks](#DOCS_RESOURCES_WEBHOOK) are triggered by an external service, webhook events (i.e. outgoing webhooks) are triggered by events happening in Discord. This means your app will need to set up a public URL where you can receive HTTP events, which is detailed in the [preparing for events](#DOCS_EVENTS_WEBHOOK_EVENTS/preparing-for-events) section. +While [incoming webhooks](/docs/resources/webhook) are triggered by an external service, webhook events (i.e. outgoing webhooks) are triggered by events happening in Discord. This means your app will need to set up a public URL where you can receive HTTP events, which is detailed in the [preparing for events](/docs/events/webhook-events#preparing-for-events) section. ## Subscribing to Events To configure webhook events, you'll need to configure your URL and select the events you want your app to receive. > info -> The steps below walk through subscribing using the developer portal. If you prefer to use the API, you can call [Edit Current Application](#DOCS_RESOURCES_APPLICATION/edit-current-application). +> The steps below walk through subscribing using the developer portal. If you prefer to use the API, you can call [Edit Current Application](/docs/resources/application#edit-current-application). In your [app's settings](https://discord.com/developers/applications), navigate to the **Webhooks** page from the left-hand sidebar then complete the following: -1. Under **Endpoint**, add a public URL that is set up to receive and acknowledge webhook events. Details about setting up a Webhook Events URL is in the [preparing for events](#DOCS_EVENTS_WEBHOOK_EVENTS/preparing-for-events) section. +1. Under **Endpoint**, add a public URL that is set up to receive and acknowledge webhook events. Details about setting up a Webhook Events URL is in the [preparing for events](/docs/events/webhook-events#preparing-for-events) section. 2. Enable Events by clicking the toggle in the **Events** section. -3. Select the [webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) you want your app to receive. +3. Select the [webhook events](/docs/events/webhook-events#event-types) you want your app to receive. 4. Click **Save Changes**. If your URL is successfully verified, your app should begin receiving the events you selected. @@ -30,7 +30,7 @@ To receive webhook events, you'll need to configure your app's **Webhook Event U ### Configuring a Webhook Events URL -A **Webhook Events URL** is a public endpoint for your app where Discord can send your app HTTP-based events. If your app is using [Gateway events](#DOCS_EVENTS_GATEWAY), you don't need to configure a Webhook Events URL. +A **Webhook Events URL** is a public endpoint for your app where Discord can send your app HTTP-based events. If your app is using [Gateway events](/docs/events/gateway), you don't need to configure a Webhook Events URL. #### Setting Up an Endpoint @@ -46,7 +46,7 @@ If either of these are not complete, your Webhook Events URL will not be validat When adding your Webhook Events URL, Discord will send a `POST` request with a `PING` payload with a `type: 0` to your endpoint. Your app is expected to acknowledge the request by returning a `204` response with an empty body. > info -> You must provide a valid `Content-Type` when responding to `PING`s. See [here](#DOCS_REFERENCE/http-api) for further information. +> You must provide a valid `Content-Type` when responding to `PING`s. See [here](/docs/reference#http-api) for further information. To properly acknowledge a `PING` payload, return a `204` response with no body: @@ -68,11 +68,11 @@ Each webhook is sent with the following headers: - `X-Signature-Ed25519` as a signature - `X-Signature-Timestamp` as a timestamp -Using your favorite security library, you **must validate the request each time you receive an event**. If the signature fails validation, your app should respond with a `401` error code. Code examples of validating security headers is in the [Interactions documentation](#DOCS_INTERACTIONS_OVERVIEW/setting-up-an-endpoint-validating-security-request-headers). +Using your favorite security library, you **must validate the request each time you receive an event**. If the signature fails validation, your app should respond with a `401` error code. Code examples of validating security headers is in the [Interactions documentation](/docs/interactions/overview#setting-up-an-endpoint-validating-security-request-headers). In addition to ensuring your app validates security-related request headers at the time of saving your endpoint, Discord will also perform automated, routine security checks against your endpoint, including purposefully sending you invalid signatures. If you fail the validation, we will remove your Webhook Events URL and alert you via email and System DM. -We recommend checking out our [Community Resources](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES) and the libraries found there. +We recommend checking out our [Community Resources](/docs/developer-tools/community-resources) and the libraries found there. #### Adding an Webhook Events Endpoint URL @@ -80,7 +80,7 @@ After you have a public endpoint to use as your app's Event Webhooks URL, you ca On the **Webhooks** page, look for the **Endpoint URL** field. Paste your public URL that is set up to acknowledge `PING` messages and correctly handles security-related signature headers. -After you configure your Webhook Events URL, you can [enable and subscribe to events](#DOCS_EVENTS_WEBHOOK_EVENTS/subscribing-to-events) on the same page. +After you configure your Webhook Events URL, you can [enable and subscribe to events](/docs/events/webhook-events#subscribing-to-events) on the same page. ## Responding to Events @@ -101,40 +101,40 @@ Structure of the outer webhook payload |----------------|--------------------------------------------------------------------|----------------------------------------------------------------| | version | integer | Version scheme for the webhook event. Currently always `1` | | application_id | snowflake | ID of your app | -| type | [webhook type](#DOCS_EVENTS_WEBHOOK_EVENTS/webhook-types) | Type of webhook, either `0` for PING or `1` for webhook events | -| event? | [event body](#DOCS_EVENTS_WEBHOOK_EVENTS/event-body-object) object | Event data payload | +| type | [webhook type](/docs/events/webhook-events#webhook-types) | Type of webhook, either `0` for PING or `1` for webhook events | +| event? | [event body](/docs/events/webhook-events#event-body-object) object | Event data payload | #### Webhook Types | Type | Value | Description | |-------|-------|---------------------------------------------------------------------------------------------------------| | PING | `0` | PING event sent to verify your Webhook Event URL is active | -| Event | `1` | Webhook event (details for event in [event body](#DOCS_EVENTS_WEBHOOK_EVENTS/event-body-object) object) | +| Event | `1` | Webhook event (details for event in [event body](/docs/events/webhook-events#event-body-object) object) | #### Event Body Object The event body contains high-level data about the event, like the type and time it was triggered. -The inner `data` object contains information specific to the [event type](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types). +The inner `data` object contains information specific to the [event type](/docs/events/webhook-events#event-types). | Field | Type | Description | |-----------|--------|----------------------------------------------------------------------------------------------------| -| type | string | [Event type](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) | -| timestamp | string | Timestamp of when the event occurred in [ISO8601 format](#DOCS_REFERENCE/iso8601-datetime) | -| data? | object | Data for the event. The shape depends on the [event type](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) | +| type | string | [Event type](/docs/events/webhook-events#event-types) | +| timestamp | string | Timestamp of when the event occurred in [ISO8601 format](/docs/reference#iso8601-datetime) | +| data? | object | Data for the event. The shape depends on the [event type](/docs/events/webhook-events#event-types) | ## Event Types The table below includes the different webhook event types your app can subscribe to. -The "Value" column corresponds to the event's `type` field value in the [event body object](#DOCS_EVENTS_WEBHOOK_EVENTS/event-body-object). +The "Value" column corresponds to the event's `type` field value in the [event body object](/docs/events/webhook-events#event-body-object). | Name | Value | Description | |------------------------------------------------------------------------------|--------------------------|------------------------------------------------------------------------| -| [Application Authorized](#DOCS_EVENTS_WEBHOOK_EVENTS/application-authorized) | `APPLICATION_AUTHORIZED` | Sent when an app was authorized by a user to a server or their account | -| [Entitlement Create](#DOCS_EVENTS_WEBHOOK_EVENTS/entitlement-create) | `ENTITLEMENT_CREATE` | Entitlement was created | -| [Quest User Enrollment](#DOCS_EVENTS_WEBHOOK_EVENTS/quest-user-enrollment) | `QUEST_USER_ENROLLMENT` | User was added to a Quest (currently unavailable) | +| [Application Authorized](/docs/events/webhook-events#application-authorized) | `APPLICATION_AUTHORIZED` | Sent when an app was authorized by a user to a server or their account | +| [Entitlement Create](/docs/events/webhook-events#entitlement-create) | `ENTITLEMENT_CREATE` | Entitlement was created | +| [Quest User Enrollment](/docs/events/webhook-events#quest-user-enrollment) | `QUEST_USER_ENROLLMENT` | User was added to a Quest (currently unavailable) | #### Application Authorized @@ -144,10 +144,10 @@ The "Value" column corresponds to the event's `type` field value in the [event b | Field | Type | Description | |-------------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| integration_type? | integer | [Installation context](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) for the authorization. Either guild (`0`) if installed to a server or user (`1`) if installed to a user's account | -| user | [user object](#DOCS_RESOURCES_USER/user-object-user-structure) | User who authorized the app | -| scopes | array of strings | List of [scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) the user authorized | -| guild? | [guild object](#DOCS_RESOURCES_GUILD/guild-object-guild-structure) | Server which app was authorized for (when integration type is `0`) | +| integration_type? | integer | [Installation context](/docs/resources/application#application-object-application-integration-types) for the authorization. Either guild (`0`) if installed to a server or user (`1`) if installed to a user's account | +| user | [user object](/docs/resources/user#user-object-user-structure) | User who authorized the app | +| scopes | array of strings | List of [scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) the user authorized | +| guild? | [guild object](/docs/resources/guild#guild-object-guild-structure) | Server which app was authorized for (when integration type is `0`) | ###### Application Authorized Example @@ -175,11 +175,11 @@ The "Value" column corresponds to the event's `type` field value in the [event b #### Entitlement Create -`ENTITLEMENT_CREATE` is sent when an [entitlement](#DOCS_RESOURCES_ENTITLEMENT) is created when a user purchases or is otherwise granted one of your app's SKUs. Refer to the [Monetization documentation](#DOCS_MONETIZATION_OVERVIEW) for details. +`ENTITLEMENT_CREATE` is sent when an [entitlement](/docs/resources/entitlement) is created when a user purchases or is otherwise granted one of your app's SKUs. Refer to the [Monetization documentation](/docs/monetization/overview) for details. ###### Entitlement Create Structure -The inner payload is an [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) object. +The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-object) object. ###### Entitlement Create Example diff --git a/docs/interactions/application-commands.mdx b/docs/interactions/application-commands.mdx index 9d4dfeeab8..05d00c37e0 100644 --- a/docs/interactions/application-commands.mdx +++ b/docs/interactions/application-commands.mdx @@ -15,22 +15,22 @@ Application commands are native ways to interact with apps in the Discord client | Field | Type | Description | Valid Types | |----------------------------|--------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| | id | snowflake | Unique ID of command | all | -| type? | one of [command types](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) | [Type of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types), defaults to `1` | all | +| type? | one of [command types](/docs/interactions/application-commands#application-command-object-application-command-types) | [Type of command](/docs/interactions/application-commands#application-command-object-application-command-types), defaults to `1` | all | | application_id | snowflake | ID of the parent application | all | | guild_id? | snowflake | Guild ID of the command, if not global | all | -| name | string | [Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters | all | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for `name` field. Values follow the same restrictions as `name` | all | +| name | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | all | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for `name` field. Values follow the same restrictions as `name` | all | | description | string | Description for `CHAT_INPUT` commands, 1-100 characters. Empty string for `USER` and `MESSAGE` commands | all | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for `description` field. Values follow the same restrictions as `description` | all | -| options? \* | array of [command options](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | CHAT_INPUT | -| default_member_permissions | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set | all | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for `description` field. Values follow the same restrictions as `description` | all | +| options? \* | array of [command options](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | CHAT_INPUT | +| default_member_permissions | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | all | | dm_permission? | boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | all | | default_permission? | ?boolean | Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to `true` | all | -| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands), defaults to `false` | all | -| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available, only for globally-scoped commands. Defaults to your app's [configured contexts](#DOCS_RESOURCES_APPLICATION/installation-context/setting-supported-installation-contexts) | all | -| contexts? | ?list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands), defaults to `false` | all | +| integration_types? | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation contexts](/docs/resources/application#installation-context) where the command is available, only for globally-scoped commands. Defaults to your app's [configured contexts](/docs/resources/application#installation-context/setting-supported-installation-contexts) | all | +| contexts? | ?list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all | | version | snowflake | Autoincrementing version identifier updated during substantial record changes | all | -| handler? | one of [command handler types](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-entry-point-command-handler-types) | Determines whether the interaction is handled by the app's interactions handler or by Discord | PRIMARY_ENTRY_POINT | +| handler? | one of [command handler types](/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types) | Determines whether the interaction is handled by the app's interactions handler or by Discord | PRIMARY_ENTRY_POINT | \* `options` can only be set for application commands of type `CHAT_INPUT`. @@ -46,7 +46,7 @@ Application commands are native ways to interact with apps in the Discord client | CHAT_INPUT | 1 | Slash commands; a text-based command that shows up when a user types `/` | | USER | 2 | A UI-based command that shows up when you right click or tap on a user | | MESSAGE | 3 | A UI-based command that shows up when you right click or tap on a message | -| PRIMARY_ENTRY_POINT | 4 | A UI-based command that represents the primary way to invoke an app's [Activity](#DOCS_ACTIVITIES_OVERVIEW) | +| PRIMARY_ENTRY_POINT | 4 | A UI-based command that represents the primary way to invoke an app's [Activity](/docs/activities/overview) | ###### Application Command Option Structure @@ -55,22 +55,22 @@ Application commands are native ways to interact with apps in the Discord client | Field | Type | Description | Valid Option Types | |----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------| -| type | one of [application command option type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type) | Type of option | all | -| name \* | string | [1-32 character name](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming) | all | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | all | +| type | one of [application command option type](/docs/interactions/application-commands#application-command-object-application-command-option-type) | Type of option | all | +| name \* | string | [1-32 character name](/docs/interactions/application-commands#application-command-object-application-command-naming) | all | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | all | | description | string | 1-100 character description | all | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | all | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | all | | required? | boolean | Whether the parameter is required or optional, default `false` | all but `SUB_COMMAND` and `SUB_COMMAND_GROUP` | -| choices? | array of [application command option choice](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-choice-structure) | Choices for the user to pick from, max 25 | `STRING`, `INTEGER`, `NUMBER` | -| options? | array of [application command option](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | If the option is a subcommand or subcommand group type, these nested options will be the parameters or subcommands respectively; up to 25 | `SUB_COMMAND` , `SUB_COMMAND_GROUP` | -| channel_types? | array of [channel types](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) | The channels shown will be restricted to these types | `CHANNEL` | +| choices? | array of [application command option choice](/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure) | Choices for the user to pick from, max 25 | `STRING`, `INTEGER`, `NUMBER` | +| options? | array of [application command option](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | If the option is a subcommand or subcommand group type, these nested options will be the parameters or subcommands respectively; up to 25 | `SUB_COMMAND` , `SUB_COMMAND_GROUP` | +| channel_types? | array of [channel types](/docs/resources/channel#channel-object-channel-types) | The channels shown will be restricted to these types | `CHANNEL` | | min_value? | integer for `INTEGER` options, double for `NUMBER` options | The minimum value permitted | `INTEGER` , `NUMBER` | | max_value? | integer for `INTEGER` options, double for `NUMBER` options | The maximum value permitted | `INTEGER` , `NUMBER` | | min_length? | integer | The minimum allowed length (minimum of `0`, maximum of `6000`) | `STRING` | | max_length? | integer | The maximum allowed length (minimum of `1`, maximum of `6000`) | `STRING` | | autocomplete? \*\* | boolean | If autocomplete interactions are enabled for this option | `STRING`, `INTEGER`, `NUMBER` | -\* `name` must be unique within an array of [application command options](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure). +\* `name` must be unique within an array of [application command options](/docs/interactions/application-commands#application-command-object-application-command-option-structure). \*\* `autocomplete` may not be set to true if `choices` are present. @@ -91,7 +91,7 @@ Application commands are native ways to interact with apps in the Discord client | ROLE | 8 | | | MENTIONABLE | 9 | Includes users and roles | | NUMBER | 10 | Any double between -2^53 and 2^53 | -| ATTACHMENT | 11 | [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) object | +| ATTACHMENT | 11 | [attachment](/docs/resources/message#attachment-object) object | ###### Application Command Option Choice Structure @@ -101,10 +101,10 @@ Application commands are native ways to interact with apps in the Discord client | Field | Type | Description | |---------------------|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------| | name | string | 1-100 character choice name | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | | value | string, integer, or double \* | Value for the choice, up to 100 characters if string | -\* Type of `value` depends on the [option type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type) that the choice belongs to. +\* Type of `value` depends on the [option type](/docs/interactions/application-commands#application-command-object-application-command-option-type) that the choice belongs to. ###### Entry Point Command Handler Types @@ -113,11 +113,11 @@ Application commands are native ways to interact with apps in the Discord client | APP_HANDLER | 1 | The app handles the interaction using an interaction token | | DISCORD_LAUNCH_ACTIVITY | 2 | Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with the app | -Details about Entry Point command handler types are in the [Entry Point handlers](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-handlers) section. +Details about Entry Point command handler types are in the [Entry Point handlers](/docs/interactions/application-commands#entry-point-handlers) section. ## Authorizing Your Application -Application commands do not depend on a bot user in the guild; they use the [interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) model. To create commands in a guild, your app must be authorized with the `applications.commands` scope which can be used independently, but is also automatically included with the `bot` scope. +Application commands do not depend on a bot user in the guild; they use the [interactions](/docs/interactions/receiving-and-responding#) model. To create commands in a guild, your app must be authorized with the `applications.commands` scope which can be used independently, but is also automatically included with the `bot` scope. When requesting this scope, we "shortcut" the OAuth2 flow similar to adding a bot. You don't need to complete the flow, exchange for a token, or any of that. @@ -257,32 +257,32 @@ Commands can be deleted and updated by making `DELETE` and `PATCH` calls to the Because commands have unique names within a type and scope, we treat `POST` requests for new commands as upserts. That means **making a new command with an already-used name for your application will update the existing command**. -Detailed documentation about application command endpoints and their parameters are [in the endpoints section](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/endpoints). +Detailed documentation about application command endpoints and their parameters are [in the endpoints section](/docs/interactions/application-commands#endpoints). ## Contexts -Commands have two sets of contexts on the [application command object](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) that let you to configure when and where it can be used: -- `integration_types` defines the **[installation contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/installation-context)** that a command supports -- `contexts` defines the **[interaction contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts)** where a command can be used +Commands have two sets of contexts on the [application command object](/docs/interactions/application-commands#application-command-object) that let you to configure when and where it can be used: +- `integration_types` defines the **[installation contexts](/docs/interactions/application-commands#installation-context)** that a command supports +- `contexts` defines the **[interaction contexts](/docs/interactions/application-commands#interaction-contexts)** where a command can be used Details for both types of command contexts are in the sections below. > info -> Contexts are distinct from, and do not affect, any [command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) for apps installed to a server. +> Contexts are distinct from, and do not affect, any [command permissions](/docs/interactions/application-commands#permissions) for apps installed to a server. ### Installation Context -The [installation context](#DOCS_RESOURCES_APPLICATION/installation-context) is where your app was installed—to a server, a user, or both. If your app supports both installation contexts, there may be cases where you want some of your app's commands to only be available for one or the other. For example, maybe your app has a `/profile` command that is only relevant when it's installed to a user. +The [installation context](/docs/resources/application#installation-context) is where your app was installed—to a server, a user, or both. If your app supports both installation contexts, there may be cases where you want some of your app's commands to only be available for one or the other. For example, maybe your app has a `/profile` command that is only relevant when it's installed to a user. -A command's supported installation context(s) can be set using the [`integration_types` field](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) when creating or updating a command as long as any included contexts are already [supported on the application-level](#DOCS_RESOURCES_APPLICATION/setting-supported-installation-contexts). +A command's supported installation context(s) can be set using the [`integration_types` field](/docs/interactions/application-commands#application-command-object-application-command-structure) when creating or updating a command as long as any included contexts are already [supported on the application-level](/docs/resources/application#setting-supported-installation-contexts). -A command's value for `integration_types` may affect which [interaction contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) a command is visible in. +A command's value for `integration_types` may affect which [interaction contexts](/docs/interactions/application-commands#interaction-contexts) a command is visible in. ### Interaction Contexts -The interaction contexts for a command determines where in the Discord client it can be used, and can be configured by setting the [`contexts` field](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) when creating or updating a command. +The interaction contexts for a command determines where in the Discord client it can be used, and can be configured by setting the [`contexts` field](/docs/interactions/application-commands#application-command-object-application-command-structure) when creating or updating a command. -There are three [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) that correspond to different surfaces: `GUILD` (`0`), `BOT_DM` (`1`), and `PRIVATE_CHANNEL` (`2`). However, the `PRIVATE_CHANNEL` interaction context is only meaningful for commands installed to a user (when the command's `integration_types` includes `USER_INSTALL`). +There are three [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) that correspond to different surfaces: `GUILD` (`0`), `BOT_DM` (`1`), and `PRIVATE_CHANNEL` (`2`). However, the `PRIVATE_CHANNEL` interaction context is only meaningful for commands installed to a user (when the command's `integration_types` includes `USER_INSTALL`). By default, `contexts` includes all interaction context types. @@ -291,14 +291,14 @@ By default, `contexts` includes all interaction context types. Application command permissions allow your app to enable or disable commands for up to 100 users, roles, and channels within a guild. Command permissions can also be updated by users in the client if they have the necessary permissions. > warn -> Command permissions can only be updated using a [Bearer token](#DOCS_TOPICS_OAUTH2/client-credentials-grant). Authenticating with a bot token will result in an error. +> Command permissions can only be updated using a [Bearer token](/docs/topics/oauth2#client-credentials-grant). Authenticating with a bot token will result in an error. -A command's current permissions can be retrieved using the [`GET /applications/\{application.id}/guilds/\{guild.id}/commands/\{command.id}/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/get-application-command-permissions) endpoint. The response will include an array called `permissions` with associated IDs and permission types. +A command's current permissions can be retrieved using the [`GET /applications/\{application.id}/guilds/\{guild.id}/commands/\{command.id}/permissions`](/docs/interactions/application-commands#get-application-command-permissions) endpoint. The response will include an array called `permissions` with associated IDs and permission types. -Command permissions can be updated with the [`PUT /applications/\{application.id}/guilds/\{guild.id}/commands/\{command.id}/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-application-command-permissions) endpoint. To call the endpoint, apps must use a Bearer token that's authorized with the [`applications.commands.permissions.update`](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) scope from a user with sufficient permissions. For their permissions to be considered sufficient, all of the following must be true for **the authenticating user** (not your app or bot user): -- Has [permission to Manage Guild and Manage Roles](#DOCS_TOPICS_PERMISSIONS) in the guild where the command is being edited +Command permissions can be updated with the [`PUT /applications/\{application.id}/guilds/\{guild.id}/commands/\{command.id}/permissions`](/docs/interactions/application-commands#edit-application-command-permissions) endpoint. To call the endpoint, apps must use a Bearer token that's authorized with the [`applications.commands.permissions.update`](/docs/topics/oauth2#shared-resources-oauth2-scopes) scope from a user with sufficient permissions. For their permissions to be considered sufficient, all of the following must be true for **the authenticating user** (not your app or bot user): +- Has [permission to Manage Guild and Manage Roles](/docs/topics/permissions) in the guild where the command is being edited - Has the ability to run the command being edited -- Has permission to manage the resources that will be affected (roles, users, and/or channels depending on the [permission types](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permission-type)) +- Has permission to manage the resources that will be affected (roles, users, and/or channels depending on the [permission types](/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type)) ### Syncing and Unsyncing Permissions @@ -317,7 +317,7 @@ Returned when fetching the permissions for an app's command(s) in a guild. | id | snowflake | ID of the command or the application ID | | application_id | snowflake | ID of the application the command belongs to | | guild_id | snowflake | ID of the guild | -| permissions | array of [application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-structure) | Permissions for the command in the guild, max of 100 | +| permissions | array of [application command permissions](/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure) | Permissions for the command in the guild, max of 100 | When the `id` field is the application ID instead of a command ID, the permissions apply to all commands that do not contain explicit overwrites. @@ -327,8 +327,8 @@ Application command permissions allow you to enable or disable commands for spec | Field | Type | Description | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| id | snowflake | ID of the role, user, or channel. It can also be a [permission constant](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-constants) | -| type | [application command permission type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permission-type) | role (`1`), user (`2`), or channel (`3`) | +| id | snowflake | ID of the role, user, or channel. It can also be a [permission constant](/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants) | +| type | [application command permission type](/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type) | role (`1`), user (`2`), or channel (`3`) | | permission | boolean | `true` to allow, `false`, to disallow | ###### Application Command Permissions Constants @@ -348,9 +348,9 @@ The following constants can be used in the `id` field for command permissions pa | USER | 2 | | CHANNEL | 3 | -To allow for fine-tuned access to commands, application command permissions are supported for guild and global commands of all types. Guild members and apps with the [necessary permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) can allow or deny specific users and roles from using a command, or toggle commands for entire channels. +To allow for fine-tuned access to commands, application command permissions are supported for guild and global commands of all types. Guild members and apps with the [necessary permissions](/docs/interactions/application-commands#permissions) can allow or deny specific users and roles from using a command, or toggle commands for entire channels. -Similar to how threads [inherit user and role permissions from the parent channel](#DOCS_TOPICS_THREADS/permissions), any command permissions for a channel will apply to the threads it contains. +Similar to how threads [inherit user and role permissions from the parent channel](/docs/topics/threads#permissions), any command permissions for a channel will apply to the threads it contains. > info > If you don't have permission to use a command, it will not show up in the command picker. Members with the Administrator permission can use all commands. @@ -359,9 +359,9 @@ Similar to how threads [inherit user and role permissions from the parent channe Default permissions can be added to a command during creation using the `default_member_permissions` and `context` fields. Adding default permissions doesn't require any Bearer token since it's configured during command creation and isn't targeting specific roles, users, or channels. -The `default_member_permissions` field can be used when creating a command to set the permissions a user must have to use it. The value for `default_member_permissions` is a bitwise OR-ed set of [permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags), serialized as a string. Setting it to `"0"` will prohibit anyone in a guild from using the command unless a specific overwrite is configured or the user has admin permissions. +The `default_member_permissions` field can be used when creating a command to set the permissions a user must have to use it. The value for `default_member_permissions` is a bitwise OR-ed set of [permissions](/docs/topics/permissions#permissions-bitwise-permission-flags), serialized as a string. Setting it to `"0"` will prohibit anyone in a guild from using the command unless a specific overwrite is configured or the user has admin permissions. -You can also include `BOT_DM` (`1`) in `contexts` when setting a global command's [interaction contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) to control whether it can be run in DMs with your app. Guild commands don't support the `BOT_DM` interaction context. +You can also include `BOT_DM` (`1`) in `contexts` when setting a global command's [interaction contexts](/docs/interactions/application-commands#interaction-contexts) to control whether it can be run in DMs with your app. Guild commands don't support the `BOT_DM` interaction context. ###### Example of editing permissions @@ -419,7 +419,7 @@ Slash commands—the `CHAT_INPUT` type—are a type of application command. They Slash commands can also have groups and subcommands to further organize commands. More on those later. > warn -> Slash commands can have a maximum of 8000 characters for combined name, description, and value properties for each command, its options (including subcommands and groups), and choices. When [localization fields](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/localization) are present, only the longest localization for each field (including the default value) is counted towards the size limit. +> Slash commands can have a maximum of 8000 characters for combined name, description, and value properties for each command, its options (including subcommands and groups), and choices. When [localization fields](/docs/interactions/application-commands#localization) are present, only the longest localization for each field (including the default value) is counted towards the size limit. ###### Example Slash Command @@ -977,9 +977,9 @@ When someone uses a message command, your application will receive an interactio ## Entry Point Commands -An Entry Point command serves as the primary way for users to open an app's [Activity](#DOCS_ACTIVITIES_OVERVIEW) from the [App Launcher](https://support.discord.com/hc/articles/21334461140375-Using-Apps-on-Discord#h_01HRQSA6C8TRHS722P1H3HW1TV). +An Entry Point command serves as the primary way for users to open an app's [Activity](/docs/activities/overview) from the [App Launcher](https://support.discord.com/hc/articles/21334461140375-Using-Apps-on-Discord#h_01HRQSA6C8TRHS722P1H3HW1TV). -For the Entry Point command to be visible to users, an app must have [Activities](#DOCS_ACTIVITIES_OVERVIEW) enabled. +For the Entry Point command to be visible to users, an app must have [Activities](/docs/activities/overview) enabled. ![Entry Point command in App Launcher](images/command-entry-point.png) ###### Example Entry Point Command @@ -995,16 +995,16 @@ For the Entry Point command to be visible to users, an app must have [Activities ### Entry Point handlers -When a user invokes an app's Entry Point command, the value of [`handler`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) will determine how the interaction is handled: +When a user invokes an app's Entry Point command, the value of [`handler`](/docs/interactions/application-commands#application-command-object-application-command-structure) will determine how the interaction is handled: -- For `APP_HANDLER` (`1`), the app is responsible for [responding to the interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/responding-to-an-interaction). It can respond by launching the app's associated Activity using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/#interaction-response-object-interaction-callback-type), or take another action (like sending a follow-up message in channel). +- For `APP_HANDLER` (`1`), the app is responsible for [responding to the interaction](/docs/interactions/receiving-and-responding#responding-to-an-interaction). It can respond by launching the app's associated Activity using the `LAUNCH_ACTIVITY` (type `12`) [interaction callback type](/docs/interactions/receiving-and-responding##interaction-response-object-interaction-callback-type), or take another action (like sending a follow-up message in channel). - For `DISCORD_LAUNCH_ACTIVITY` (`2`), Discord will handle the interaction automatically by launching the associated Activity and sending a message to the channel where it was launched. ### Default Entry Point command -When you enable Activities, an Entry Point command (named "Launch") is automatically created for your app with `DISCORD_LAUNCH_ACTIVITY` (`2`) set as the [Entry Point handler](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/entry-point-handlers). You can retrieve details for the automatically-created command, like its ID, by calling the [Get Global Application Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/#get-global-application-commands) endpoint and looking for the "Launch" command. +When you enable Activities, an Entry Point command (named "Launch") is automatically created for your app with `DISCORD_LAUNCH_ACTIVITY` (`2`) set as the [Entry Point handler](/docs/interactions/application-commands#entry-point-handlers). You can retrieve details for the automatically-created command, like its ID, by calling the [Get Global Application Commands](/docs/interactions/application-commands##get-global-application-commands) endpoint and looking for the "Launch" command. -Details about updating or replacing the default Entry Point command is in the [Setting Up an Entry Point Command guide](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/setting-up-an-entry-point-command). +Details about updating or replacing the default Entry Point command is in the [Setting Up an Entry Point Command guide](/docs/activities/development-guides#setting-up-an-entry-point-command). ## Autocomplete @@ -1039,7 +1039,7 @@ An autocomplete interaction **can return partial data** for option values. Your Application commands can be localized, which will cause them to use localized names and descriptions depending on the client's selected language. This is entirely optional. Localization is available for names and descriptions of commands, subcommands, and options, as well as the names of choices, by submitting the appropriate `name_localizations` and `description_localizations` fields when creating or updating the application command. -Application commands may be partially localized - not all [available locales](#DOCS_REFERENCE/locales) are required, nor do different fields within a command need to support the same set of locales. If a locale is not present in a localizations dictionary for a field, users in that locale will see the default value for that field. It's not necessary to fill out all locales with the default value. Any localized values that are identical to the default will be ignored. +Application commands may be partially localized - not all [available locales](/docs/reference#locales) are required, nor do different fields within a command need to support the same set of locales. If a locale is not present in a localizations dictionary for a field, users in that locale will see the default value for that field. It's not necessary to fill out all locales with the default value. Any localized values that are identical to the default will be ignored. Localized option names are subject to an additional constraint, which is that they must be distinct from all other default option names of that command, as well as all other option names within that locale on that command. @@ -1120,7 +1120,7 @@ Locale is determined by looking at the `X-Discord-Locale` header, then the `Acce ## Age-Restricted Commands -A command that contains age-restricted content should have the [`nsfw` field](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) set to `true` upon creation or update. Marking a command as age-restricted will limit who can see and access the command, and from which channels. +A command that contains age-restricted content should have the [`nsfw` field](/docs/interactions/application-commands#application-command-object-application-command-structure) set to `true` upon creation or update. Marking a command as age-restricted will limit who can see and access the command, and from which channels. > warn > Apps with [discovery enabled](https://support-dev.discord.com/hc/en-us/articles/9489299950487) (which is required to appear in the App Directory) cannot contain any age-restricted commands or content. @@ -1136,148 +1136,148 @@ Details about accessing and using age-restricted commands is in [the Help Center ### Endpoints > info -> For authorization, all endpoints take either a [bot token](#DOCS_REFERENCE/authentication) or [client credentials token](#DOCS_TOPICS_OAUTH2/client-credentials-grant) for your application +> For authorization, all endpoints take either a [bot token](/docs/reference#authentication) or [client credentials token](/docs/topics/oauth2#client-credentials-grant) for your application -## Get Global Application Commands % GET /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/commands +## Get Global Application Commands % GET /applications/\{application.id/docs/resources/application#application-object\}/commands > warn -> The objects returned by this endpoint may be augmented with [additional fields if localization is active](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/retrieving-localized-commands). +> The objects returned by this endpoint may be augmented with [additional fields if localization is active](/docs/interactions/application-commands#retrieving-localized-commands). -Fetch all of the global commands for your application. Returns an array of [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) objects. +Fetch all of the global commands for your application. Returns an array of [application command](/docs/interactions/application-commands#application-command-object) objects. ###### Query String Params | Field | Type | Description | |---------------------|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| with_localizations? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether to include full localization dictionaries (`name_localizations` and `description_localizations`) in the returned objects, instead of the `name_localized` and `description_localized` fields. Default `false`. | +| with_localizations? | [boolean](/docs/reference#boolean-query-strings) | Whether to include full localization dictionaries (`name_localizations` and `description_localizations`) in the returned objects, instead of the `name_localized` and `description_localized` fields. Default `false`. | -## Create Global Application Command % POST /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/commands +## Create Global Application Command % POST /applications/\{application.id/docs/resources/application#application-object\}/commands > warn > Creating a command with the same name as an existing command for your application will overwrite the old command. -Create a new global command. Returns `201` if a command with the same name does not already exist, or a `200` if it does (in which case the previous command will be overwritten). Both responses include an [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) object. +Create a new global command. Returns `201` if a command with the same name does not already exist, or a `200` if it does (in which case the previous command will be overwritten). Both responses include an [application command](/docs/interactions/application-commands#application-command-object) object. ###### JSON Params | Field | Type | Description | |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | string | [Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | +| name | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | | description? | string | 1-100 character description for `CHAT_INPUT` commands | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | -| options? | array of [application command option](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | the parameters for the command, max of 25 | -| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | +| options? | array of [application command option](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | the parameters for the command, max of 25 | +| default_member_permissions? | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | | dm_permission? | ?boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | | default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` | -| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available | -| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used | -| type? | one of [application command type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) | Type of command, defaults `1` if not set | -| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) | +| integration_types? | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation context(s)](/docs/resources/application#installation-context) where the command is available | +| contexts? | list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used | +| type? | one of [application command type](/docs/interactions/application-commands#application-command-object-application-command-types) | Type of command, defaults `1` if not set | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands) | -## Get Global Application Command % GET /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\} +## Get Global Application Command % GET /applications/\{application.id/docs/resources/application#application-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\} -Fetch a global command for your application. Returns an [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) object. +Fetch a global command for your application. Returns an [application command](/docs/interactions/application-commands#application-command-object) object. -## Edit Global Application Command % PATCH /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\} +## Edit Global Application Command % PATCH /applications/\{application.id/docs/resources/application#application-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\} > info > All parameters for this endpoint are optional. -Edit a global command. Returns `200` and an [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) object. All fields are optional, but any fields provided will entirely overwrite the existing values of those fields. +Edit a global command. Returns `200` and an [application command](/docs/interactions/application-commands#application-command-object) object. All fields are optional, but any fields provided will entirely overwrite the existing values of those fields. ###### JSON Params | Field | Type | Description | |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name? | string | [Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | +| name? | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | | description? | string | 1-100 character description | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | -| options? | array of [application command option](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | the parameters for the command | -| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | +| options? | array of [application command option](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | the parameters for the command | +| default_member_permissions? | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | | dm_permission? | ?boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | | default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` | -| integration_types? | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available | -| contexts? | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used | -| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) | +| integration_types? | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation context(s)](/docs/resources/application#installation-context) where the command is available | +| contexts? | list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands) | -## Delete Global Application Command % DELETE /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\} +## Delete Global Application Command % DELETE /applications/\{application.id/docs/resources/application#application-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\} Deletes a global command. Returns `204 No Content` on success. -## Bulk Overwrite Global Application Commands % PUT /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/commands +## Bulk Overwrite Global Application Commands % PUT /applications/\{application.id/docs/resources/application#application-object\}/commands -Takes a list of application commands, overwriting the existing global command list for this application. Returns `200` and a list of [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) objects. Commands that do not already exist will count toward daily application command create limits. +Takes a list of application commands, overwriting the existing global command list for this application. Returns `200` and a list of [application command](/docs/interactions/application-commands#application-command-object) objects. Commands that do not already exist will count toward daily application command create limits. > danger > This will overwrite **all** types of application commands: slash commands, user commands, and message commands. -## Get Guild Application Commands % GET /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands +## Get Guild Application Commands % GET /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands > warn -> The objects returned by this endpoint may be augmented with [additional fields if localization is active](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/retrieving-localized-commands). +> The objects returned by this endpoint may be augmented with [additional fields if localization is active](/docs/interactions/application-commands#retrieving-localized-commands). -Fetch all of the guild commands for your application for a specific guild. Returns an array of [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) objects. +Fetch all of the guild commands for your application for a specific guild. Returns an array of [application command](/docs/interactions/application-commands#application-command-object) objects. ###### Query String Params | Field | Type | Description | |---------------------|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| with_localizations? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether to include full localization dictionaries (`name_localizations` and `description_localizations`) in the returned objects, instead of the `name_localized` and `description_localized` fields. Default `false`. | +| with_localizations? | [boolean](/docs/reference#boolean-query-strings) | Whether to include full localization dictionaries (`name_localizations` and `description_localizations`) in the returned objects, instead of the `name_localized` and `description_localized` fields. Default `false`. | -## Create Guild Application Command % POST /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands +## Create Guild Application Command % POST /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands > danger > Creating a command with the same name as an existing command for your application will overwrite the old command. -Create a new guild command. New guild commands will be available in the guild immediately. Returns `201` if a command with the same name does not already exist, or a `200` if it does (in which case the previous command will be overwritten). Both responses include an [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) object. +Create a new guild command. New guild commands will be available in the guild immediately. Returns `201` if a command with the same name does not already exist, or a `200` if it does (in which case the previous command will be overwritten). Both responses include an [application command](/docs/interactions/application-commands#application-command-object) object. ###### JSON Params | Field | Type | Description | |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | string | [Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | +| name | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | | description? | string | 1-100 character description for `CHAT_INPUT` commands | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | -| options? | array of [application command option](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | -| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | +| options? | array of [application command option](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | +| default_member_permissions? | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | | default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` | -| type? | one of [application command type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) | Type of command, defaults `1` if not set | -| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) | +| type? | one of [application command type](/docs/interactions/application-commands#application-command-object-application-command-types) | Type of command, defaults `1` if not set | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands) | -## Get Guild Application Command % GET /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\} +## Get Guild Application Command % GET /applications/\{application.id/docs/resources/application#application-object}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\} -Fetch a guild command for your application. Returns an [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) object. +Fetch a guild command for your application. Returns an [application command](/docs/interactions/application-commands#application-command-object) object. -## Edit Guild Application Command % PATCH /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\} +## Edit Guild Application Command % PATCH /applications/\{application.id/docs/resources/application#application-object}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\} > info > All parameters for this endpoint are optional. -Edit a guild command. Updates for guild commands will be available immediately. Returns `200` and an [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) object. All fields are optional, but any fields provided will entirely overwrite the existing values of those fields. +Edit a guild command. Updates for guild commands will be available immediately. Returns `200` and an [application command](/docs/interactions/application-commands#application-command-object) object. All fields are optional, but any fields provided will entirely overwrite the existing values of those fields. ###### JSON Params | Field | Type | Description | |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name? | string | [Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | +| name? | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | | description? | string | 1-100 character description | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | -| options? | array of [application command option](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | -| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | +| options? | array of [application command option](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | +| default_member_permissions? | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | | default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` | -| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands) | -## Delete Guild Application Command % DELETE /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\} +## Delete Guild Application Command % DELETE /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\} Delete a guild command. Returns `204 No Content` on success. -## Bulk Overwrite Guild Application Commands % PUT /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands +## Bulk Overwrite Guild Application Commands % PUT /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands -Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns `200` and a list of [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) objects. +Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns `200` and a list of [application command](/docs/interactions/application-commands#application-command-object) objects. > danger > This will overwrite **all** types of application commands: slash commands, user commands, and message commands. @@ -1287,38 +1287,38 @@ Takes a list of application commands, overwriting the existing command list for | Field | Type | Description | |-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id? | snowflake | ID of the command, if known | -| name | string | [Name of command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-naming), 1-32 characters | -| name_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | +| name | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `name` field. Values follow the same restrictions as `name` | | description | string | 1-100 character description | -| description_localizations? | ?dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | -| options? | array of [application command option](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) | Parameters for the command | -| default_member_permissions? | ?string | Set of [permissions](#DOCS_TOPICS_PERMISSIONS) represented as a bit set | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for the `description` field. Values follow the same restrictions as `description` | +| options? | array of [application command option](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | Parameters for the command | +| default_member_permissions? | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | | dm_permission? | ?boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | | default_permission? | boolean | Replaced by `default_member_permissions` and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to `true` | -| integration_types | list of [integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | [Installation context(s)](#DOCS_RESOURCES_APPLICATION/installation-context) where the command is available, defaults to `GUILD_INSTALL` (`[0]`) | -| contexts | list of [interaction context types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | [Interaction context(s)](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) where the command can be used, defaults to all contexts `[0,1,2]` | -| type? | one of [application command type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-types) | Type of command, defaults `1` if not set | -| nsfw? | boolean | Indicates whether the command is [age-restricted](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/agerestricted-commands) | +| integration_types | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation context(s)](/docs/resources/application#installation-context) where the command is available, defaults to `GUILD_INSTALL` (`[0]`) | +| contexts | list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used, defaults to all contexts `[0,1,2]` | +| type? | one of [application command type](/docs/interactions/application-commands#application-command-object-application-command-types) | Type of command, defaults `1` if not set | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands) | -## Get Guild Application Command Permissions % GET /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/permissions +## Get Guild Application Command Permissions % GET /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/permissions -Fetches permissions for all commands for your application in a guild. Returns an array of [guild application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-guild-application-command-permissions-structure) objects. +Fetches permissions for all commands for your application in a guild. Returns an array of [guild application command permissions](/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure) objects. -## Get Application Command Permissions % GET /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\}/permissions +## Get Application Command Permissions % GET /applications/\{application.id/docs/resources/application#application-object}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\}/permissions -Fetches permissions for a specific command for your application in a guild. Returns a [guild application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-guild-application-command-permissions-structure) object. +Fetches permissions for a specific command for your application in a guild. Returns a [guild application command permissions](/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure) object. -## Edit Application Command Permissions % PUT /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/\{command.id#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object\}/permissions +## Edit Application Command Permissions % PUT /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/\{command.id/docs/interactions/application-commands#application-command-object\}/permissions > warn > This endpoint will overwrite existing permissions for the command in that guild -Edits command permissions for a specific command for your application in a guild and returns a [guild application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-guild-application-command-permissions-structure) object. Fires an [Application Command Permissions Update](#DOCS_EVENTS_GATEWAY_EVENTS/application-command-permissions-update) Gateway event. +Edits command permissions for a specific command for your application in a guild and returns a [guild application command permissions](/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure) object. Fires an [Application Command Permissions Update](/docs/events/gateway-events#application-command-permissions-update) Gateway event. You can add up to 100 permission overwrites for a command. > info -> This endpoint requires authentication with a Bearer token that has permission to manage the guild and its roles. For more information, read above about [application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions). +> This endpoint requires authentication with a Bearer token that has permission to manage the guild and its roles. For more information, read above about [application command permissions](/docs/interactions/application-commands#permissions). > warn > Deleting or renaming a command will permanently delete all permissions for the command @@ -1327,9 +1327,9 @@ You can add up to 100 permission overwrites for a command. | Field | Type | Description | |-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------| -| permissions | array of [application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-structure) | Permissions for the command in the guild | +| permissions | array of [application command permissions](/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure) | Permissions for the command in the guild | -## Batch Edit Application Command Permissions % PUT /applications/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/commands/permissions +## Batch Edit Application Command Permissions % PUT /applications/\{application.id/docs/resources/application#application-object\}/guilds/\{guild.id/docs/resources/guild#guild-object\}/commands/permissions > danger -> This endpoint has been disabled with [updates to command permissions (Permissions v2)](#DOCS_CHANGE_LOG/updated-command-permissions). Instead, you can [edit each application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-application-command-permissions) (though you should be careful to handle any potential [rate limits](#DOCS_TOPICS_RATE_LIMITS)). +> This endpoint has been disabled with [updates to command permissions (Permissions v2)](/docs/change-log#updated-command-permissions). Instead, you can [edit each application command permissions](/docs/interactions/application-commands#edit-application-command-permissions) (though you should be careful to handle any potential [rate limits](/docs/topics/rate-limits)). diff --git a/docs/interactions/message-components.md b/docs/interactions/message-components.md index 6735af985d..5eab856122 100644 --- a/docs/interactions/message-components.md +++ b/docs/interactions/message-components.md @@ -6,7 +6,7 @@ There are several different types of components; this documentation will outline ## What is a Component -Components are a field on the [message object](#DOCS_RESOURCES_MESSAGE/message-object), so you can use them whether you're sending messages or responding to a [slash command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/) or other interaction. +Components are a field on the [message object](/docs/resources/message#message-object), so you can use them whether you're sending messages or responding to a [slash command](/docs/interactions/application-commands#) or other interaction. ### Component Object @@ -68,7 +68,7 @@ An Action Row is a non-interactive container component for other types of compon ## Responding to a Component Interaction -Responding to a user interacting with a component is the same as other interaction types, like application commands. You can simply ACK the request, send a followup message, or edit the original message to something new. Check out [Responding to An Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/responding-to-an-interaction) and [interaction response](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object) for more. +Responding to a user interacting with a component is the same as other interaction types, like application commands. You can simply ACK the request, send a followup message, or edit the original message to something new. Check out [Responding to An Interaction](/docs/interactions/receiving-and-responding#responding-to-an-interaction) and [interaction response](/docs/interactions/receiving-and-responding#interaction-response-object) for more. ## Custom ID @@ -78,7 +78,7 @@ Components, aside from Action Rows, must have a `custom_id` field. This field is ## Buttons -Buttons are interactive components that render in messages. They can be clicked by users, and send an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) to your app when clicked. +Buttons are interactive components that render in messages. They can be clicked by users, and send an [interaction](/docs/interactions/receiving-and-responding#interaction-object) to your app when clicked. - Buttons must be sent inside an Action Row - An Action Row can contain up to 5 buttons @@ -91,11 +91,11 @@ Buttons are interactive components that render in messages. They can be clicked | Field | Type | Description | |------------|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| | type | integer | `2` for a button | -| style | integer | A [button style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles) | +| style | integer | A [button style](/docs/interactions/message-components#button-object-button-styles) | | label? | string | Text that appears on the button; max 80 characters | -| emoji? | partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) | `name`, `id`, and `animated` | +| emoji? | partial [emoji](/docs/resources/emoji#emoji-object) | `name`, `id`, and `animated` | | custom_id? | string | Developer-defined identifier for the button; max 100 characters | -| sku_id? | snowflake | Identifier for a purchasable [SKU](#DOCS_RESOURCES_SKU/sku-object), only available when using premium-style buttons | +| sku_id? | snowflake | Identifier for a purchasable [SKU](/docs/resources/sku#sku-object), only available when using premium-style buttons | | url? | string | URL for link-style buttons | | disabled? | boolean | Whether the button is disabled (defaults to `false`) | @@ -103,9 +103,9 @@ Buttons come in a variety of styles to convey different types of actions. These - Non-link and Non-premium buttons **must** have a `custom_id`, and cannot have a `url` or a `sku_id`. - Link buttons **must** have a `url`, and cannot have a `custom_id` -- Link buttons do not send an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) to your app when clicked +- Link buttons do not send an [interaction](/docs/interactions/receiving-and-responding#interaction-object) to your app when clicked - Premium buttons **must** contain a `sku_id`, and cannot have a `custom_id`, `label`, `url`, or `emoji`. -- Premium buttons do not send an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) to your app when clicked +- Premium buttons do not send an [interaction](/docs/interactions/receiving-and-responding#interaction-object) to your app when clicked ###### Button Styles @@ -120,7 +120,7 @@ Buttons come in a variety of styles to convey different types of actions. These ![An image showing the different button styles](images/button-styles.png) -When a user clicks on a button, your app will receive an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) including the message the button was on: +When a user clicks on a button, your app will receive an [interaction](/docs/interactions/receiving-and-responding#interaction-object) including the message the button was on: ### Button Design Guidelines @@ -239,7 +239,7 @@ Select menus are interactive components that allow users to select one or more o ![A role select component on desktop](images/desktop-role-select-menu.png) -Select menus support single-select and multi-select behavior, meaning you can prompt a user to choose just one item from a list, or multiple. When a user finishes making their choice(s) by clicking out of the dropdown or closing the half-sheet, your app will receive an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure). +Select menus support single-select and multi-select behavior, meaning you can prompt a user to choose just one item from a list, or multiple. When a user finishes making their choice(s) by clicking out of the dropdown or closing the half-sheet, your app will receive an [interaction](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure). - Select menus must be sent inside an Action Row - An Action Row can contain only one select menu @@ -247,13 +247,13 @@ Select menus support single-select and multi-select behavior, meaning you can pr ### Select Menu Types -There are 5 different [select menu components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) that can be included in Action Rows. +There are 5 different [select menu components](/docs/interactions/message-components#component-object-component-types) that can be included in Action Rows. -The string select menu (type `3`) is the *only* select type that allows (and *requires*) apps to define the `options` that appear in the dropdown list. The other 4 select menu components (users, roles, mentionables, and channels) are auto-populated with options corresponding to the resource type—similar to [command option types](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type). +The string select menu (type `3`) is the *only* select type that allows (and *requires*) apps to define the `options` that appear in the dropdown list. The other 4 select menu components (users, roles, mentionables, and channels) are auto-populated with options corresponding to the resource type—similar to [command option types](/docs/interactions/application-commands#application-command-object-application-command-option-type). -In addition to the `values` array in all [select menu interaction payloads](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-menu-interaction), auto-populated select menu components (user, role, mentionable, and channel) also include an additional [`resolved` object](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-menu-resolved-object) that provides additional details about the user's selected resource. +In addition to the `values` array in all [select menu interaction payloads](/docs/interactions/message-components#select-menu-object-select-menu-interaction), auto-populated select menu components (user, role, mentionable, and channel) also include an additional [`resolved` object](/docs/interactions/message-components#select-menu-object-select-menu-resolved-object) that provides additional details about the user's selected resource. -The payloads for the select menu components are detailed in the [select menu structure](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-menu-structure). +The payloads for the select menu components are detailed in the [select menu structure](/docs/interactions/message-components#select-menu-object-select-menu-structure). ###### Select Menu Example @@ -313,12 +313,12 @@ The payloads for the select menu components are detailed in the [select menu str | Field | Type | Description | |-----------------------|---------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| type | integer | [Type](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) of select menu component (text: `3`, user: `5`, role: `6`, mentionable: `7`, channels: `8`) | +| type | integer | [Type](/docs/interactions/message-components#component-object-component-types) of select menu component (text: `3`, user: `5`, role: `6`, mentionable: `7`, channels: `8`) | | custom_id | string | ID for the select menu; max 100 characters | -| options?\* | array of [select options](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-option-structure) | Specified choices in a select menu (only required and available for string selects (type `3`); max 25 | -| channel_types?\*\* | array of [channel types](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) | List of channel types to include in the channel select component (type `8`) | +| options?\* | array of [select options](/docs/interactions/message-components#select-menu-object-select-option-structure) | Specified choices in a select menu (only required and available for string selects (type `3`); max 25 | +| channel_types?\*\* | array of [channel types](/docs/resources/channel#channel-object-channel-types) | List of channel types to include in the channel select component (type `8`) | | placeholder? | string | Placeholder text if nothing is selected; max 150 characters | -| default_values?\*\*\* | array of [default value objects](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-default-value-structure) | List of default values for auto-populated select menu components; number of default values must be in the range defined by `min_values` and `max_values` | +| default_values?\*\*\* | array of [default value objects](/docs/interactions/message-components#select-menu-object-select-default-value-structure) | List of default values for auto-populated select menu components; number of default values must be in the range defined by `min_values` and `max_values` | | min_values? | integer | Minimum number of items that must be chosen (defaults to 1); min 0, max 25 | | max_values? | integer | Maximum number of items that can be chosen (defaults to 1); max 25 | | disabled? | boolean | Whether select menu is disabled (defaults to `false`) | @@ -327,7 +327,7 @@ The payloads for the select menu components are detailed in the [select menu str \*\* `channel_types` can only be used for channel select menu components. -\*\*\* `default_values` is only available for auto-populated select menu components, which include user (`5`), role (`6`), mentionable (`7`), and channel (`8`) [components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types). +\*\*\* `default_values` is only available for auto-populated select menu components, which include user (`5`), role (`6`), mentionable (`7`), and channel (`8`) [components](/docs/interactions/message-components#component-object-component-types). ###### Select Option Structure @@ -336,7 +336,7 @@ The payloads for the select menu components are detailed in the [select menu str | label | string | User-facing name of the option; max 100 characters | | value | string | Dev-defined value of the option; max 100 characters | | description? | string | Additional description of the option; max 100 characters | -| emoji? | partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | `id`, `name`, and `animated` | +| emoji? | partial [emoji](/docs/resources/emoji#emoji-object) object | `id`, `name`, and `animated` | | default? | boolean | Will show this option as selected by default | ###### Select Default Value Structure @@ -505,7 +505,7 @@ A sample `data` object (a subset of the interaction payload) for a channel selec Text inputs are an interactive component that render in modals. They can be used to collect short-form or long-form text. -When defining a text input component, you can set attributes to customize the behavior and appearance of it. However, not all attributes will be returned in the [text input interaction payload](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/text-input-object-text-input-interaction). +When defining a text input component, you can set attributes to customize the behavior and appearance of it. However, not all attributes will be returned in the [text input interaction payload](/docs/interactions/message-components#text-input-object-text-input-interaction). ![A text input in a modal on desktop client](images/modal-desktop.png) @@ -540,7 +540,7 @@ When defining a text input component, you can set attributes to customize the be |--------------|---------|---------------------------------------------------------------------------------------------------| | type | integer | `4` for a text input | | custom_id | string | Developer-defined identifier for the input; max 100 characters | -| style | integer | The [Text Input Style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/text-input-object-text-input-styles) | +| style | integer | The [Text Input Style](/docs/interactions/message-components#text-input-object-text-input-styles) | | label | string | Label for this component; max 45 characters | | min_length? | integer | Minimum input length for a text input; min 0, max 4000 | | max_length? | integer | Maximum input length for a text input; min 1, max 4000 | diff --git a/docs/interactions/overview.mdx b/docs/interactions/overview.mdx index a17bace804..d2637ccc46 100644 --- a/docs/interactions/overview.mdx +++ b/docs/interactions/overview.mdx @@ -4,9 +4,9 @@ sidebar_label: Overview # Overview of Interactions -Interactive features like commands and message components allows users to invoke an app natively within Discord. When a user engages with one of your app's interactive features, your app will receive an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object). +Interactive features like commands and message components allows users to invoke an app natively within Discord. When a user engages with one of your app's interactive features, your app will receive an [interaction](/docs/interactions/receiving-and-responding#interaction-object). -This overview includes an overview of the main types of interactions, and steps for you to prepare your app to use and receive interactions. Reference documentation and details about handling interactions are in [Receiving and Responding](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING). +This overview includes an overview of the main types of interactions, and steps for you to prepare your app to use and receive interactions. Reference documentation and details about handling interactions are in [Receiving and Responding](/docs/interactions/receiving-and-responding). --- @@ -16,7 +16,7 @@ There are different types of interactions in your app's toolbelt that can pick a ### Commands -**[Application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS)** provide users a native way to invoke an app in Discord. They often map to an app's core features or functionality. +**[Application commands](/docs/interactions/application-commands)** provide users a native way to invoke an app in Discord. They often map to an app's core features or functionality. ![Command launcher in the Desktop client](images/overview-command-desktop.png) @@ -25,33 +25,33 @@ When an app creates a command it can choose the command's type, which determines - **Slash commands** are the most common type of command and are accessed by typing `/` in the chat input, or by opening the command picker. - **Message commands** are commands related to a message or a message's content. They're accessed by clicking on the context menu (the three dots) at the top-right of a message (or right clicking on a message), then navigating to the "Apps" section. - **User commands** are commands that related to a user in Discord. They're accessed by right clicking on a user profile, then navigating to the "Apps" section. -- **Entry Point commands** are commands used as the primary way to launch [Activities](#DOCS_ACTIVITIES_OVERVIEW) from the App Launcher. +- **Entry Point commands** are commands used as the primary way to launch [Activities](/docs/activities/overview) from the App Launcher. -Details about creating commands and handling command interactions are in the [Application Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) documentation. +Details about creating commands and handling command interactions are in the [Application Commands](/docs/interactions/application-commands) documentation. ### Message Components -**[Message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS)** are interactive elements that can be included in the content of a message that your app sends in Discord. +**[Message components](/docs/interactions/message-components)** are interactive elements that can be included in the content of a message that your app sends in Discord. ![Button message components in a message](images/overview-components.png) The main interactive components that apps can send in messages include: -- [Buttons](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/buttons) are clickable components that can be customized with different styles, texts, and emoji. -- [Static select menus](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus) are components that a user can open to see a list of developer-defined select options with custom labels and descriptions. -- [Auto-populated select menus](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-types) are a set of four different select components that are populated with contextual Discord resources, like a list of users or channels in a server. +- [Buttons](/docs/interactions/message-components#buttons) are clickable components that can be customized with different styles, texts, and emoji. +- [Static select menus](/docs/interactions/message-components#select-menus) are components that a user can open to see a list of developer-defined select options with custom labels and descriptions. +- [Auto-populated select menus](/docs/interactions/message-components#select-menu-types) are a set of four different select components that are populated with contextual Discord resources, like a list of users or channels in a server. -A list of all message components and details on sending and receiving component interactions is in the [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS) documentation. +A list of all message components and details on sending and receiving component interactions is in the [Message Components](/docs/interactions/message-components) documentation. ### Modals -**[Modals](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-modal)** are single-user pop-up interfaces that allow apps to collect form-like data. Modals can only be opened in response to a user invoking one of your app's commands or message components. +**[Modals](/docs/interactions/receiving-and-responding#interaction-response-object-modal)** are single-user pop-up interfaces that allow apps to collect form-like data. Modals can only be opened in response to a user invoking one of your app's commands or message components. ![Modals in the Discord client](images/overview-modals.png) -The only interactive component that modals can contain are [text inputs](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/text-inputs), which allow users to fill out single-or-multi line form inputs. +The only interactive component that modals can contain are [text inputs](/docs/interactions/message-components#text-inputs), which allow users to fill out single-or-multi line form inputs. -Details about creating and using modals is in the [Receiving and Responding](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-modal) documentation. +Details about creating and using modals is in the [Receiving and Responding](/docs/interactions/receiving-and-responding#interaction-response-object-modal) documentation. --- @@ -61,11 +61,11 @@ When a user interacts with your app, you have the option for your app to receive - WebSocket-based Gateway connection - HTTP via outgoing webhooks -By default your app will receive interactions via a Gateway connection, but you can opt-in to HTTP-based interactions by adding a **Interactions Endpoint URL** to your app's settings. Technical details about handling interactions is in the [Receiving and Responding](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) documentation. +By default your app will receive interactions via a Gateway connection, but you can opt-in to HTTP-based interactions by adding a **Interactions Endpoint URL** to your app's settings. Technical details about handling interactions is in the [Receiving and Responding](/docs/interactions/receiving-and-responding) documentation. ### Configuring an Interactions Endpoint URL -A **Interactions Endpoint URL** is a public endpoint for your app where Discord can send your app HTTP-based interactions. If your app is using [Gateway](#DOCS_EVENTS_GATEWAY)-based interactions, you don't need to configure an Interactions Endpoint URL. +A **Interactions Endpoint URL** is a public endpoint for your app where Discord can send your app HTTP-based interactions. If your app is using [Gateway](/docs/events/gateway)-based interactions, you don't need to configure an Interactions Endpoint URL. #### Setting Up an Endpoint @@ -78,10 +78,10 @@ If either of these are not complete, your Interactions Endpoint URL will not be ###### Acknowledging PING requests -When adding your Interactions Endpoint URL, Discord will send a `POST` request with a `PING` payload with a `type: 1` to your endpoint. Your app is expected to acknowledge the request by returning a `200` response with a `PONG` payload (which has the same `type: 1`). Details about interaction responses are in the [Receiving and Responding documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING). +When adding your Interactions Endpoint URL, Discord will send a `POST` request with a `PING` payload with a `type: 1` to your endpoint. Your app is expected to acknowledge the request by returning a `200` response with a `PONG` payload (which has the same `type: 1`). Details about interaction responses are in the [Receiving and Responding documentation](/docs/interactions/receiving-and-responding). > info -> You must provide a valid `Content-Type` when responding to `PING`s. See [here](#DOCS_REFERENCE/http-api) for further information. +> You must provide a valid `Content-Type` when responding to `PING`s. See [here](/docs/reference#http-api) for further information. To properly acknowledge a `PING` payload, return a `200` response with a payload of `type: 1`: @@ -105,7 +105,7 @@ Each interaction is sent with the following headers: - `X-Signature-Ed25519` as a signature - `X-Signature-Timestamp` as a timestamp -Using your favorite security library, you **must validate the request each time you receive an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object)**. If the signature fails validation, your app should respond with a `401` error code. +Using your favorite security library, you **must validate the request each time you receive an [interaction](/docs/interactions/receiving-and-responding#interaction-object)**. If the signature fails validation, your app should respond with a `401` error code. Below are some code examples that show how to validate the headers sent in interactions requests. @@ -157,7 +157,7 @@ except BadSignatureError: In addition to ensuring your app validates security-related request headers at the time of saving your endpoint, Discord will also perform automated, routine security checks against your endpoint, including purposefully sending you invalid signatures. If you fail the validation, we will remove your interactions URL and alert you via email and System DM. -We highly recommend checking out our [Community Resources](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES/interactions) and the libraries found there. They not only provide typing for Interactions data models, but also include decorators for API frameworks like Flask and Express to make validation easy. +We highly recommend checking out our [Community Resources](/docs/developer-tools/community-resources/interactions) and the libraries found there. They not only provide typing for Interactions data models, but also include decorators for API frameworks like Flask and Express to make validation easy. #### Adding an Interactions Endpoint URL @@ -169,4 +169,4 @@ On the **General Overview** page, look for the **Interactive Endpoint URL** fiel ## Handling Interactions -Once your app is prepared for interactions, you can explore the [Receiving and Responding](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) documentation which goes into the technical details of handling interactions requests in your app. +Once your app is prepared for interactions, you can explore the [Receiving and Responding](/docs/interactions/receiving-and-responding) documentation which goes into the technical details of handling interactions requests in your app. diff --git a/docs/interactions/receiving-and-responding.mdx b/docs/interactions/receiving-and-responding.mdx index 9503a085c3..74ffea6a00 100644 --- a/docs/interactions/receiving-and-responding.mdx +++ b/docs/interactions/receiving-and-responding.mdx @@ -4,13 +4,13 @@ sidebar_label: Receiving and Responding # Interactions -An **[Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object)** is the message that your application receives when a user uses an application command or a message component. +An **[Interaction](/docs/interactions/receiving-and-responding#interaction-object)** is the message that your application receives when a user uses an application command or a message component. -For [Slash Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/slash-commands), it includes the values that the user submitted. +For [Slash Commands](/docs/interactions/application-commands#slash-commands), it includes the values that the user submitted. -For [User Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) and [Message Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands), it includes the resolved user or message on which the action was taken. +For [User Commands](/docs/interactions/application-commands#user-commands) and [Message Commands](/docs/interactions/application-commands#message-commands), it includes the resolved user or message on which the action was taken. -For [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) it includes identifying information about the component that was used. It will also include some metadata about how the interaction was triggered: the `guild_id`, `channel`, `member` and other fields. You can find all the values in our data models below. +For [Message Components](/docs/interactions/message-components#) it includes identifying information about the component that was used. It will also include some metadata about how the interaction was triggered: the `guild_id`, `channel`, `member` and other fields. You can find all the values in our data models below. ### Interaction Object @@ -20,23 +20,23 @@ For [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) it includes ide |--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the interaction | | application_id | snowflake | ID of the application this interaction is for | -| type | [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | Type of interaction | -| data?\* | [interaction data](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-data) | Interaction data payload | -| guild? | [partial guild](#DOCS_RESOURCES_GUILD/guild-object) object | Guild that the interaction was sent from | +| type | [interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) | Type of interaction | +| data?\* | [interaction data](/docs/interactions/receiving-and-responding#interaction-object-interaction-data) | Interaction data payload | +| guild? | [partial guild](/docs/resources/guild#guild-object) object | Guild that the interaction was sent from | | guild_id? | snowflake | Guild that the interaction was sent from | -| channel? | [partial channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | Channel that the interaction was sent from | +| channel? | [partial channel](/docs/resources/channel#channel-object) object | Channel that the interaction was sent from | | channel_id? | snowflake | Channel that the interaction was sent from | -| member?\*\* | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Guild member data for the invoking user, including permissions | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | User object for the invoking user, if invoked in a DM | +| member?\*\* | [guild member](/docs/resources/guild#guild-member-object) object | Guild member data for the invoking user, including permissions | +| user? | [user](/docs/resources/user#user-object) object | User object for the invoking user, if invoked in a DM | | token | string | Continuation token for responding to the interaction | | version | integer | Read-only property, always `1` | -| message? | [message](#DOCS_RESOURCES_MESSAGE/message-object) object | For components, the message they were attached to | +| message? | [message](/docs/resources/message#message-object) object | For components, the message they were attached to | | app_permissions\*\*\* | string | Bitwise set of permissions the app has in the source location of the interaction | -| locale?\*\*\*\* | string | Selected [language](#DOCS_REFERENCE/locales) of the invoking user | -| guild_locale? | string | [Guild's preferred locale](#DOCS_RESOURCES_GUILD/guild-object), if invoked in a guild | -| entitlements | array of [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) objects | For [monetized apps](#DOCS_MONETIZATION_OVERVIEW), any entitlements for the invoking user, representing access to premium [SKUs](#DOCS_RESOURCES_SKU) | -| authorizing_integration_owners | dictionary with keys of [application integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | Mapping of installation contexts that the interaction was authorized for to related user or guild IDs. See [Authorizing Integration Owners Object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) for details | -| context? | [interaction context type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) | Context where the interaction was triggered from | +| locale?\*\*\*\* | string | Selected [language](/docs/reference#locales) of the invoking user | +| guild_locale? | string | [Guild's preferred locale](/docs/resources/guild#guild-object), if invoked in a guild | +| entitlements | array of [entitlement](/docs/resources/entitlement#entitlement-object) objects | For [monetized apps](/docs/monetization/overview), any entitlements for the invoking user, representing access to premium [SKUs](/docs/resources/sku) | +| authorizing_integration_owners | dictionary with keys of [application integration types](/docs/resources/application#application-object-application-integration-types) | Mapping of installation contexts that the interaction was authorized for to related user or guild IDs. See [Authorizing Integration Owners Object](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) for details | +| context? | [interaction context type](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | Context where the interaction was triggered from | | attachment_size_limit | integer | Attachment size limit in bytes | \* This is always present on application command, message component, and modal submit interaction types. It is optional for future-proofing against new interaction types @@ -59,7 +59,7 @@ For [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) it includes ide ###### Interaction Context Types -Context in Discord where an interaction can be used, or where it was triggered from. Details about using interaction contexts for application commands is in the [commands context documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts). +Context in Discord where an interaction can be used, or where it was triggered from. Details about using interaction contexts for application commands is in the [commands context documentation](/docs/interactions/application-commands#interaction-contexts). | Name | Type | Description | |-----------------|------|--------------------------------------------------------------------------------| @@ -72,9 +72,9 @@ Context in Discord where an interaction can be used, or where it was triggered f The `authorizing_integration_owners` field includes details about the authorizing user or server for the installation(s) relevant to the interaction. For apps installed to a user, it can be used to tell the difference between the authorizing user and the user that triggered an interaction (like a message component). A key will only be present if the following are true: -- The app has been authorized to the [installation context](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) corresponding to the key (`GUILD_INSTALL` or `USER_INSTALL`) -- The interaction is supported in the source [interaction context](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-context-types) (`GUILD`, `BOT_DM`, or `PRIVATE_CHANNEL`) for the installation context corresponding to the key -- And for command invocations, the command must be supported in the installation context (using [`integration_types`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts)) +- The app has been authorized to the [installation context](/docs/resources/application#application-object-application-integration-types) corresponding to the key (`GUILD_INSTALL` or `USER_INSTALL`) +- The interaction is supported in the source [interaction context](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) (`GUILD`, `BOT_DM`, or `PRIVATE_CHANNEL`) for the installation context corresponding to the key +- And for command invocations, the command must be supported in the installation context (using [`integration_types`](/docs/interactions/application-commands#contexts)) The values in `authorizing_integration_owners` depend on the key— @@ -85,7 +85,7 @@ The values in `authorizing_integration_owners` depend on the key— ###### Interaction Data -While the `data` field is guaranteed to be present for all [interaction types](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) besides `PING`, its structure will vary. The following tables detail the inner `data` payload for each interaction type. +While the `data` field is guaranteed to be present for all [interaction types](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) besides `PING`, its structure will vary. The following tables detail the inner `data` payload for each interaction type. ###### Application Command Data Structure @@ -94,24 +94,24 @@ While the `data` field is guaranteed to be present for all [interaction types](# | Field | Type | Description | |------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| id | snowflake | [`ID`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) of the invoked command | -| name | string | [`name`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) of the invoked command | -| type | integer | [`type`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure) of the invoked command | -| resolved? | [resolved data](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-resolved-data-structure) | Converted users + roles + channels + attachments | -| options?\* | array of [application command interaction data option](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-application-command-interaction-data-option-structure) | Params + values from the user | +| id | snowflake | [`ID`](/docs/interactions/application-commands#application-command-object-application-command-structure) of the invoked command | +| name | string | [`name`](/docs/interactions/application-commands#application-command-object-application-command-structure) of the invoked command | +| type | integer | [`type`](/docs/interactions/application-commands#application-command-object-application-command-structure) of the invoked command | +| resolved? | [resolved data](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) | Converted users + roles + channels + attachments | +| options?\* | array of [application command interaction data option](/docs/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure) | Params + values from the user | | guild_id? | snowflake | ID of the guild the command is registered to | -| target_id? | snowflake | ID of the user or message targeted by a [user](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) or [message](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) command | +| target_id? | snowflake | ID of the user or message targeted by a [user](/docs/interactions/application-commands#user-commands) or [message](/docs/interactions/application-commands#message-commands) command | -\* This [can be partial](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/autocomplete) when in response to `APPLICATION_COMMAND_AUTOCOMPLETE` +\* This [can be partial](/docs/interactions/application-commands#autocomplete) when in response to `APPLICATION_COMMAND_AUTOCOMPLETE` ###### Message Component Data Structure | Field | Type | Description | |----------------|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| -| custom_id | string | [`custom_id`](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/custom-id) of the component | -| component_type | integer | [type](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) of the component | -| values?\* | array of [select option values](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-option-structure) | Values the user selected in a [select menu](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object) component | -| resolved? | [resolved data](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-resolved-data-structure) | Resolved entities from selected options | +| custom_id | string | [`custom_id`](/docs/interactions/message-components#custom-id) of the component | +| component_type | integer | [type](/docs/interactions/message-components#component-object-component-types) of the component | +| values?\* | array of [select option values](/docs/interactions/message-components#select-menu-object-select-option-structure) | Values the user selected in a [select menu](/docs/interactions/message-components#select-menu-object) component | +| resolved? | [resolved data](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) | Resolved entities from selected options | \* This is always present for select menu components @@ -119,8 +119,8 @@ While the `data` field is guaranteed to be present for all [interaction types](# | Field | Type | Description | |------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------| -| custom_id | string | [`custom_id`](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/custom-id) of the modal | -| components | array of [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/message-components) | Values submitted by the user | +| custom_id | string | [`custom_id`](/docs/interactions/message-components#custom-id) of the modal | +| components | array of [message components](/docs/interactions/message-components#message-components) | Values submitted by the user | ###### Resolved Data Structure @@ -129,12 +129,12 @@ While the `data` field is guaranteed to be present for all [interaction types](# | Field | Type | Description | |---------------|------------------------------------------------------------------------------------------|---------------------------------| -| users? | Map of Snowflakes to [user](#DOCS_RESOURCES_USER/user-object) objects | IDs and User objects | -| members?\* | Map of Snowflakes to [partial member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | IDs and partial Member objects | -| roles? | Map of Snowflakes to [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | IDs and Role objects | -| channels?\*\* | Map of Snowflakes to [partial channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | IDs and partial Channel objects | -| messages? | Map of Snowflakes to [partial messages](#DOCS_RESOURCES_MESSAGE/message-object) objects | IDs and partial Message objects | -| attachments? | Map of Snowflakes to [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | IDs and attachment objects | +| users? | Map of Snowflakes to [user](/docs/resources/user#user-object) objects | IDs and User objects | +| members?\* | Map of Snowflakes to [partial member](/docs/resources/guild#guild-member-object) objects | IDs and partial Member objects | +| roles? | Map of Snowflakes to [role](/docs/topics/permissions#role-object) objects | IDs and Role objects | +| channels?\*\* | Map of Snowflakes to [partial channel](/docs/resources/channel#channel-object) objects | IDs and partial Channel objects | +| messages? | Map of Snowflakes to [partial messages](/docs/resources/message#message-object) objects | IDs and partial Message objects | +| attachments? | Map of Snowflakes to [attachment](/docs/resources/message#attachment-object) objects | IDs and attachment objects | \* Partial `Member` objects are missing `user`, `deaf` and `mute` fields @@ -149,50 +149,50 @@ All options have names, and an option can either be a parameter and input value- | Field | Type | Description | |----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | name | string | Name of the parameter | -| type | integer | Value of [application command option type](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type) | +| type | integer | Value of [application command option type](/docs/interactions/application-commands#application-command-object-application-command-option-type) | | value? | string, integer, double, or boolean | Value of the option resulting from user input | -| options? | array of [application command interaction data option](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-application-command-interaction-data-option-structure) | Present if this option is a group or subcommand | +| options? | array of [application command interaction data option](/docs/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure) | Present if this option is a group or subcommand | | focused? | boolean | `true` if this option is the currently focused option for autocomplete | ### Message Interaction Object -This is sent on the [message object](#DOCS_RESOURCES_MESSAGE/message-object) when the message is a response to an Interaction without an existing message. +This is sent on the [message object](/docs/resources/message#message-object) when the message is a response to an Interaction without an existing message. > info -> This means responses to [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) do not include this property, instead including a [message reference](#DOCS_RESOURCES_MESSAGE/message-reference-structure) object as components _always_ exist on preexisting messages. +> This means responses to [Message Components](/docs/interactions/message-components#) do not include this property, instead including a [message reference](/docs/resources/message#message-reference-structure) object as components _always_ exist on preexisting messages. ###### Message Interaction Structure | Field | Type | Description | |---------|-----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the interaction | -| type | [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | Type of interaction | -| name | string | Name of the [application command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure), including subcommands and subcommand groups | -| user | [user object](#DOCS_RESOURCES_USER/user-object) | User who invoked the interaction | -| member? | [partial member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Member who invoked the interaction in the guild | +| type | [interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) | Type of interaction | +| name | string | Name of the [application command](/docs/interactions/application-commands#application-command-object-application-command-structure), including subcommands and subcommand groups | +| user | [user object](/docs/resources/user#user-object) | User who invoked the interaction | +| member? | [partial member](/docs/resources/guild#guild-member-object) object | Member who invoked the interaction in the guild | ## Receiving an Interaction -When a user interacts with your app, your app will receive an **[Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object)**. Your app can receive an interaction in one of two ways: +When a user interacts with your app, your app will receive an **[Interaction](/docs/interactions/receiving-and-responding#interaction-object)**. Your app can receive an interaction in one of two ways: -- Via [Interaction Create](#DOCS_EVENTS_GATEWAY_EVENTS/interaction-create) gateway event +- Via [Interaction Create](/docs/events/gateway-events#interaction-create) gateway event - Via outgoing webhook -These two methods are **mutually exclusive**; you can _only_ receive Interactions one of the two ways. The `INTERACTION_CREATE` [Gateway Event](#DOCS_EVENTS_GATEWAY_EVENTS/interaction-create) may be handled by connected clients, while the webhook method detailed below does not require a connected client. +These two methods are **mutually exclusive**; you can _only_ receive Interactions one of the two ways. The `INTERACTION_CREATE` [Gateway Event](/docs/events/gateway-events#interaction-create) may be handled by connected clients, while the webhook method detailed below does not require a connected client. -If you want to receive interactions via HTTP-based outgoing webhooks, you must configure an Interactions Endpoint URL for your app. You can read about preparing and adding an Interactions Endpoint URL to your app in the [Preparing for Interactions](#DOCS_INTERACTIONS_OVERVIEW/preparing-for-interactions) section in Interactions Overview. +If you want to receive interactions via HTTP-based outgoing webhooks, you must configure an Interactions Endpoint URL for your app. You can read about preparing and adding an Interactions Endpoint URL to your app in the [Preparing for Interactions](/docs/interactions/overview#preparing-for-interactions) section in Interactions Overview. ### Interaction Metadata -An [Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) includes metadata to aid your application in handling it as well as `data` specific to the interaction type. You can find samples for each interaction type on their respective pages: +An [Interaction](/docs/interactions/receiving-and-responding#interaction-object) includes metadata to aid your application in handling it as well as `data` specific to the interaction type. You can find samples for each interaction type on their respective pages: -- [Slash Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/slash-commands-example-interaction) -- [User Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands-example-interaction) -- [Message Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands-example-interaction) -- [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-interaction-object-sample-component-interaction) -- [Select Menu Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-menu-interaction) +- [Slash Commands](/docs/interactions/application-commands#slash-commands-example-interaction) +- [User Commands](/docs/interactions/application-commands#user-commands-example-interaction) +- [Message Commands](/docs/interactions/application-commands#message-commands-example-interaction) +- [Message Components](/docs/interactions/message-components#component-interaction-object-sample-component-interaction) +- [Select Menu Message Components](/docs/interactions/message-components#select-menu-object-select-menu-interaction) -An explanation of all the fields can be found in our [data models](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object). +An explanation of all the fields can be found in our [data models](/docs/interactions/receiving-and-responding#interaction-object). Now that you've gotten the data from the user, it's time to respond to them. @@ -202,7 +202,7 @@ Now that you've gotten the data from the user, it's time to respond to them. Interactions--both receiving and responding--are webhooks under the hood. So responding to an Interaction is just like sending a webhook request! > info -> Interaction responses have the same header requirements as normal HTTP API requests. See [here](#DOCS_REFERENCE/http-api) for further information. +> Interaction responses have the same header requirements as normal HTTP API requests. See [here](/docs/reference#http-api) for further information. There are a number of ways you can respond to an interaction: @@ -212,8 +212,8 @@ There are a number of ways you can respond to an interaction: | Field | Type | Description | |-------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------| -| type | [interaction callback type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type) | Type of response | -| data? | [interaction callback data](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-data-structure) | An optional response message | +| type | [interaction callback type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) | Type of response | +| data? | [interaction callback data](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure) | An optional response message | ###### Interaction Callback Type @@ -226,10 +226,10 @@ There are a number of ways you can respond to an interaction: | UPDATE_MESSAGE\* | 7 | For components, edit the message the component was attached to | | APPLICATION_COMMAND_AUTOCOMPLETE_RESULT | 8 | Respond to an autocomplete interaction with suggested choices | | MODAL\*\* | 9 | Respond to an interaction with a popup modal | -| PREMIUM_REQUIRED | 10 | [**Deprecated**](#DOCS_CHANGE_LOG/premium-apps-new-premium-button-style-deep-linking-url-schemes); respond to an interaction with an upgrade button, only available for apps with [monetization](#DOCS_MONETIZATION_OVERVIEW) enabled | -| LAUNCH_ACTIVITY | 12 | Launch the Activity associated with the app. Only available for apps with [Activities](#DOCS_ACTIVITIES_OVERVIEW) enabled | +| PREMIUM_REQUIRED | 10 | [**Deprecated**](/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes); respond to an interaction with an upgrade button, only available for apps with [monetization](/docs/monetization/overview) enabled | +| LAUNCH_ACTIVITY | 12 | Launch the Activity associated with the app. Only available for apps with [Activities](/docs/activities/overview) enabled | -\* Only valid for [component-based](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) interactions +\* Only valid for [component-based](/docs/interactions/message-components#) interactions \*\* Not available for `MODAL_SUBMIT` and `PING` interactions. @@ -244,22 +244,22 @@ Not all message fields are currently supported. |-------------------|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | tts? | boolean | Whether the response is TTS | | content? | string | Message content | -| embeds? | array of [embeds](#DOCS_RESOURCES_MESSAGE/embed-object) | Supports up to 10 embeds | -| allowed_mentions? | [allowed mentions](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) | [Allowed mentions](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) object | -| flags? \* | integer | [Message flags](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS`, `EPHEMERAL`, and `SUPPRESS_NOTIFICATIONS` can be set) | -| components? | array of [components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) | Message components | -| attachments? \*\* | array of partial [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | Attachment objects with filename and description | -| poll? | [poll](#DOCS_RESOURCES_POLL/poll-create-request-object) request object | Details about the poll | +| embeds? | array of [embeds](/docs/resources/message#embed-object) | Supports up to 10 embeds | +| allowed_mentions? | [allowed mentions](/docs/resources/message#allowed-mentions-object) | [Allowed mentions](/docs/resources/message#allowed-mentions-object) object | +| flags? \* | integer | [Message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS`, `EPHEMERAL`, and `SUPPRESS_NOTIFICATIONS` can be set) | +| components? | array of [components](/docs/interactions/message-components#) | Message components | +| attachments? \*\* | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with filename and description | +| poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | Details about the poll | -\* If you create a callback with the [type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type) `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` the only valid [message flag](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) you may use is `EPHEMERAL`. +\* If you create a callback with the [type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` the only valid [message flag](/docs/resources/message#message-object-message-flags) you may use is `EPHEMERAL`. -\*\* See [Uploading Files](#DOCS_REFERENCE/uploading-files) for details. +\*\* See [Uploading Files](/docs/reference#uploading-files) for details. ###### Autocomplete | Field | Type | Description | |---------|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------| -| choices | array of [choices](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-choice-structure) | autocomplete choices (max of 25 choices) | +| choices | array of [choices](/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure) | autocomplete choices (max of 25 choices) | ###### Modal @@ -270,10 +270,10 @@ Not all message fields are currently supported. |------------|---------------------------------------------------------------|----------------------------------------------------------------| | custom_id | string | Developer-defined identifier for the modal, max 100 characters | | title | string | Title of the popup modal, max 45 characters | -| components | array of [components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) | Between 1 and 5 (inclusive) components that make up the modal | +| components | array of [components](/docs/interactions/message-components#) | Between 1 and 5 (inclusive) components that make up the modal | > warn -> If your application responds with user data, you should use [`allowed_mentions`](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) to filter which mentions in the content actually ping. +> If your application responds with user data, you should use [`allowed_mentions`](/docs/resources/message#allowed-mentions-object) to filter which mentions in the content actually ping. ## Interaction Callback @@ -301,7 +301,7 @@ r = requests.post(url, json=json) > Interaction `tokens` are valid for **15 minutes** and can be used to send followup messages but you **must send an initial response within 3 seconds of receiving the event**. If the 3 second deadline is exceeded, the token will be invalidated. - If you receive interactions over HTTP, your server can also respond to the received `POST` request. You'll want to respond with a `200` status code (if everything went well), as well as specifying a `type` and `data`, which is an [Interaction Response](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object) object: + If you receive interactions over HTTP, your server can also respond to the received `POST` request. You'll want to respond with a `200` status code (if everything went well), as well as specifying a `type` and `data`, which is an [Interaction Response](/docs/interactions/receiving-and-responding#interaction-response-object) object: ```py @app.route('/', methods=['POST']) @@ -328,15 +328,15 @@ r = requests.post(url, json=json) | Field | Type | Description | |-------------|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------| -| interaction | [interaction callback object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-callback-interaction-callback-object) | The interaction object associated with the interaction response. | -| resource? | [interaction resource object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-callback-interaction-callback-resource-object) | The resource that was created by the interaction response. | +| interaction | [interaction callback object](/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object) | The interaction object associated with the interaction response. | +| resource? | [interaction resource object](/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object) | The resource that was created by the interaction response. | ###### Interaction Callback Object | Field | Type | Description | |-----------------------------|-----------|-----------------------------------------------------------------------------------------------------| | id | snowflake | ID of the interaction | -| type | integer | [Interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | +| type | integer | [Interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) | | activity_instance_id? | string | Instance ID of the Activity if one was launched or joined | | response_message_id? | snowflake | ID of the message that was created by the interaction | | response_message_loading? | boolean | Whether or not the message is in a loading state | @@ -346,9 +346,9 @@ r = requests.post(url, json=json) | Field | Type | Description | |----------------------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| -| type | integer | [Interaction callback type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type) | -| activity_instance?\* | [Activity instance resource](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-callback-interaction-callback-activity-instance-resource) | Represents the Activity launched by this interaction. | -| message?\*\* | [message object](#DOCS_RESOURCES_MESSAGE/message-object) | Message created by the interaction. | +| type | integer | [Interaction callback type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) | +| activity_instance?\* | [Activity instance resource](/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource) | Represents the Activity launched by this interaction. | +| message?\*\* | [message object](/docs/resources/message#message-object) | Message created by the interaction. | \* Only present if type is `LAUNCH_ACTIVITY`. @@ -365,10 +365,10 @@ r = requests.post(url, json=json) Sometimes, your bot will want to send followup messages to a user after responding to an interaction. Or, you may want to edit your original response. Whether you receive Interactions over the gateway or by outgoing webhook, you can use the following endpoints to edit your initial response or send followup messages: -- [`PATCH /webhooks///messages/@original`](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/edit-original-interaction-response) to edit your initial response to an Interaction -- [`DELETE /webhooks///messages/@original`](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/delete-original-interaction-response) to delete your initial response to an Interaction -- [`POST /webhooks//`](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/create-followup-message) to send a new followup message -- [`PATCH /webhooks///messages/`](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/edit-followup-message) to edit a message sent with that `token` +- [`PATCH /webhooks///messages/@original`](/docs/interactions/receiving-and-responding#edit-original-interaction-response) to edit your initial response to an Interaction +- [`DELETE /webhooks///messages/@original`](/docs/interactions/receiving-and-responding#delete-original-interaction-response) to delete your initial response to an Interaction +- [`POST /webhooks//`](/docs/interactions/receiving-and-responding#create-followup-message) to send a new followup message +- [`PATCH /webhooks///messages/`](/docs/interactions/receiving-and-responding#edit-followup-message) to edit a message sent with that `token` > info > Interactions webhooks share the same rate limit properties as normal webhooks. @@ -378,50 +378,50 @@ Interaction tokens are valid for **15 minutes**, meaning you can respond to an i ### Endpoints > info -> The endpoints below are not bound to the application's [Global Rate Limit](#DOCS_TOPICS_RATE_LIMITS/global-rate-limit). +> The endpoints below are not bound to the application's [Global Rate Limit](/docs/topics/rate-limits#global-rate-limit). -## Create Interaction Response % POST /interactions/\{interaction.id#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/callback +## Create Interaction Response % POST /interactions/\{interaction.id/docs/interactions/receiving-and-responding#interaction-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/callback -Create a response to an Interaction. Body is an [interaction response](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object). Returns `204` unless `with_response` is set to `true` which returns `200` with the body as [interaction callback response](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-callback-interaction-callback-response-object). +Create a response to an Interaction. Body is an [interaction response](/docs/interactions/receiving-and-responding#interaction-response-object). Returns `204` unless `with_response` is set to `true` which returns `200` with the body as [interaction callback response](/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object). -This endpoint also supports file attachments similar to the webhook endpoints. Refer to [Uploading Files](#DOCS_REFERENCE/uploading-files) for details on uploading files and `multipart/form-data` requests. +This endpoint also supports file attachments similar to the webhook endpoints. Refer to [Uploading Files](/docs/reference#uploading-files) for details on uploading files and `multipart/form-data` requests. ###### Query String Params | Field | Type | Description | |----------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| with_response? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether to include an [interaction callback object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-callback-interaction-callback-response-object) as the response | +| with_response? | [boolean](/docs/reference#boolean-query-strings) | Whether to include an [interaction callback object](/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object) as the response | -## Get Original Interaction Response % GET /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/messages/@original +## Get Original Interaction Response % GET /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/@original -Returns the initial Interaction response. Functions the same as [Get Webhook Message](#DOCS_RESOURCES_WEBHOOK/get-webhook-message). +Returns the initial Interaction response. Functions the same as [Get Webhook Message](/docs/resources/webhook#get-webhook-message). -## Edit Original Interaction Response % PATCH /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/messages/@original +## Edit Original Interaction Response % PATCH /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/@original -Edits the initial Interaction response. Functions the same as [Edit Webhook Message](#DOCS_RESOURCES_WEBHOOK/edit-webhook-message). +Edits the initial Interaction response. Functions the same as [Edit Webhook Message](/docs/resources/webhook#edit-webhook-message). -## Delete Original Interaction Response % DELETE /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/messages/@original +## Delete Original Interaction Response % DELETE /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/@original Deletes the initial Interaction response. Returns `204 No Content` on success. -## Create Followup Message % POST /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\} +## Create Followup Message % POST /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\} > info -> Apps are limited to 5 followup messages per interaction if it was initiated from a user-installed app and isn't installed in the server (meaning the [authorizing integration owners object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) only contains `USER_INSTALL`) +> Apps are limited to 5 followup messages per interaction if it was initiated from a user-installed app and isn't installed in the server (meaning the [authorizing integration owners object](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) only contains `USER_INSTALL`) -Create a followup message for an Interaction. Functions the same as [Execute Webhook](#DOCS_RESOURCES_WEBHOOK/execute-webhook), but `wait` is always true. The `thread_id`, `avatar_url`, and `username` parameters are not supported when using this endpoint for interaction followups. You can use the `EPHEMERAL` [message flag](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) `1 << 6` (64) to send a message that only the user can see. +Create a followup message for an Interaction. Functions the same as [Execute Webhook](/docs/resources/webhook#execute-webhook), but `wait` is always true. The `thread_id`, `avatar_url`, and `username` parameters are not supported when using this endpoint for interaction followups. You can use the `EPHEMERAL` [message flag](/docs/resources/message#message-object-message-flags) `1 << 6` (64) to send a message that only the user can see. -When using this endpoint directly after responding to an interaction with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE`, this endpoint will function as [Edit Original Interaction Response](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/edit-original-interaction-response) for backwards compatibility. In this case, no new message will be created, and the loading message will be edited instead. The ephemeral flag will be ignored, and the value you provided in the initial defer response will be preserved, as an existing message's ephemeral state cannot be changed. This behavior is deprecated, and you should use the Edit Original Interaction Response endpoint in this case instead. +When using this endpoint directly after responding to an interaction with `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE`, this endpoint will function as [Edit Original Interaction Response](/docs/interactions/receiving-and-responding#edit-original-interaction-response) for backwards compatibility. In this case, no new message will be created, and the loading message will be edited instead. The ephemeral flag will be ignored, and the value you provided in the initial defer response will be preserved, as an existing message's ephemeral state cannot be changed. This behavior is deprecated, and you should use the Edit Original Interaction Response endpoint in this case instead. -## Get Followup Message % GET /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/messages/\{message.id#DOCS_RESOURCES_CHANNEL/message-object\} +## Get Followup Message % GET /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/\{message.id/docs/resources/channel#message-object\} -Returns a followup message for an Interaction. Functions the same as [Get Webhook Message](#DOCS_RESOURCES_WEBHOOK/get-webhook-message). +Returns a followup message for an Interaction. Functions the same as [Get Webhook Message](/docs/resources/webhook#get-webhook-message). -## Edit Followup Message % PATCH /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/messages/\{message.id#DOCS_RESOURCES_CHANNEL/message-object\} +## Edit Followup Message % PATCH /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/\{message.id/docs/resources/channel#message-object\} -Edits a followup message for an Interaction. Functions the same as [Edit Webhook Message](#DOCS_RESOURCES_WEBHOOK/edit-webhook-message). +Edits a followup message for an Interaction. Functions the same as [Edit Webhook Message](/docs/resources/webhook#edit-webhook-message). -## Delete Followup Message % DELETE /webhooks/\{application.id#DOCS_RESOURCES_APPLICATION/application-object\}/\{interaction.token#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object\}/messages/\{message.id#DOCS_RESOURCES_CHANNEL/message-object\} +## Delete Followup Message % DELETE /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/\{message.id/docs/resources/channel#message-object\} Deletes a followup message for an Interaction. Returns `204 No Content` on success. diff --git a/docs/intro.mdx b/docs/intro.mdx index df55c85827..815df361e3 100644 --- a/docs/intro.mdx +++ b/docs/intro.mdx @@ -11,13 +11,13 @@ title: Intro Discord provides a platform for building social experiences, whether you're creating apps within Discord or integrating Discord's features into your game. - + Develop apps, bots, and integrations to enhance the Discord experience. - + Build multiplayer games and social experiences that run directly in Discord. - + Add rich social features into your game across desktop, mobile, and console. @@ -27,13 +27,13 @@ Discord provides a platform for building social experiences, whether you're crea Enhance the Discord experience with custom apps, commands, and integrations. - + Learn the fundamentals of building Discord apps and commands. - + Create a bot user that plays "rock, paper, scissors" with users. - + Create custom commands and interactions for your app. @@ -43,13 +43,13 @@ Enhance the Discord experience with custom apps, commands, and integrations. Use the Embedded App SDK to create real-time games and social experiences that users can launch directly inside Discord. - + Discover how Activities work in Discord. - + Build and test an Activity using the Embedded App SDK. - + Best practices for multiplayer, game design, and player experience. @@ -59,13 +59,13 @@ Use the Embedded App SDK to create real-time games and social experiences that u Enable rich presence, voice chat, and more to create a seamless social experience for your players and grow your game. - + Explore rich presence, relationships, voice chat, and more. - + Start here for a step-by-step guide to adding social features to your game. - + Best practices for integrating Discord Social SDK features into your game. diff --git a/docs/monetization/enabling-monetization.mdx b/docs/monetization/enabling-monetization.mdx index 61ab54cfcf..1a7c18950d 100644 --- a/docs/monetization/enabling-monetization.mdx +++ b/docs/monetization/enabling-monetization.mdx @@ -11,13 +11,13 @@ Before you can add monetization to your app, you must ensure that your app and t 5. Implement monetization in your app 6. Start offering your premium features -Once these are complete, you can [create SKUs](#DOCS_MONETIZATION_MANAGING_SKUS/creating-a-sku) to represent your premium offerings and [add support for your premium offering](#DOCS_MONETIZATION_ENABLING_MONETIZATION/step-5-implement-monetization-in-your-app) in your app. +Once these are complete, you can [create SKUs](/docs/monetization/managing-skus#creating-a-sku) to represent your premium offerings and [add support for your premium offering](/docs/monetization/enabling-monetization#step-5-implement-monetization-in-your-app) in your app. ## Step 1. Set Up Your Developer Team and App Before monetization can be enabled, you will need: -- A [team](#DOCS_TOPICS_TEAMS) in the developer portal. If you don't have one, you can [create one on the Teams page](https://discord.com/developers/teams) +- A [team](/docs/topics/teams) in the developer portal. If you don't have one, you can [create one on the Teams page](https://discord.com/developers/teams) - A [verified app](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified) that is _owned by that team_ - Your app and team must be eligible for monetization. See the Eligibility Checklist below for details. @@ -64,17 +64,17 @@ For more information, read the [Premium Apps Payouts](https://support-dev.discor ## Step 4: Create Your Premium Offering -You are now ready to start setting up your SKUs and offering premium features in your app. Check out our guide on [Managing your Premium Offerings](#DOCS_MONETIZATION_MANAGING_SKUS/creating-a-sku) to create one-time purchases and subscriptions for your app. +You are now ready to start setting up your SKUs and offering premium features in your app. Check out our guide on [Managing your Premium Offerings](/docs/monetization/managing-skus#creating-a-sku) to create one-time purchases and subscriptions for your app. ## Step 5: Implement Monetization in your App Now that you've set up your app for monetization, you can start adding code to support your premium features. We have guides for the following monetization strategies: - + Learn how to start and manage recurring subscriptions within your app. - + Learn how to implement one-time purchases in your app. @@ -82,4 +82,4 @@ Now that you've set up your app for monetization, you can start adding code to s ## Step 6: Start Offering Your Premium Features Congratulations! You've successfully set up your app for monetization. Now you can start earning money from your app and providing premium features to your users. -You can now [link to your Store](#DOCS_MONETIZATION_MANAGING_SKUS/linking-to-your-store) page, [link to a specific SKU](#DOCS_MONETIZATION_MANAGING_SKUS/linking-to-a-specific-sku), or [include a premium styled button in Message Components](#DOCS_MONETIZATION_MANAGING_SKUS/responding-with-a-premium-button) to allow your users to make purchases. +You can now [link to your Store](/docs/monetization/managing-skus#linking-to-your-store) page, [link to a specific SKU](/docs/monetization/managing-skus#linking-to-a-specific-sku), or [include a premium styled button in Message Components](/docs/monetization/managing-skus#responding-with-a-premium-button) to allow your users to make purchases. diff --git a/docs/monetization/implementing-app-subscriptions.mdx b/docs/monetization/implementing-app-subscriptions.mdx index 175329c066..b015ce301e 100644 --- a/docs/monetization/implementing-app-subscriptions.mdx +++ b/docs/monetization/implementing-app-subscriptions.mdx @@ -2,8 +2,8 @@ Charge users for premium app functionality with a recurring user or guild subscription. -- Before you can add an app subscription to your app, you must [Enable Monetization](#DOCS_MONETIZATION_ENABLING_MONETIZATION) for your app. -- Once you've confirmed eligibility for your app and team, you will be able to set up a [SKU](#DOCS_RESOURCES_SKU) (stock-keeping unit) to represent your subscription. +- Before you can add an app subscription to your app, you must [Enable Monetization](/docs/monetization/enabling-monetization) for your app. +- Once you've confirmed eligibility for your app and team, you will be able to set up a [SKU](/docs/resources/sku) (stock-keeping unit) to represent your subscription. --- @@ -18,7 +18,7 @@ When creating subscriptions, you will need to choose between user or guild subsc ## How App Subscriptions Work -- When a user purchases your subscription SKU, Discord creates an [Entitlement](#DOCS_RESOURCES_ENTITLEMENT) for the user (or guild) and that specific Subscription [SKU](#DOCS_RESOURCES_SKU). +- When a user purchases your subscription SKU, Discord creates an [Entitlement](/docs/resources/entitlement) for the user (or guild) and that specific Subscription [SKU](/docs/resources/sku). - You will receive an `ENTITLEMENT_CREATE` event via the Gateway. - This entitlement will be available via the `LIST Entitlements` API endpoint. - This entitlement will be available on `Interaction Payloads` initiated from the entitled user or users in a guild (for guild subscriptions). @@ -48,13 +48,13 @@ Because entitlements are granted indefinitely and don't update on renewal or can ## Working with Entitlements -When a user purchases a subscription, an entitlement is created. [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) represent the user's access to your app's premium features. +When a user purchases a subscription, an entitlement is created. [Entitlements](/docs/resources/entitlement) represent the user's access to your app's premium features. -Depending on your app's features, you can use a combination of [Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements), the [Entitlement HTTP API](#DOCS_RESOURCES_ENTITLEMENT), and [interaction payloads](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) to keep track of user and guild entitlements and grant features to users who are subscribed to your app. +Depending on your app's features, you can use a combination of [Gateway events](/docs/events/gateway-events#entitlements), the [Entitlement HTTP API](/docs/resources/entitlement), and [interaction payloads](/docs/interactions/receiving-and-responding) to keep track of user and guild entitlements and grant features to users who are subscribed to your app. ### Accessing Entitlements with Gateway Events -When users make a purchase in your app, Discord will emit [Entitlement Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements). +When users make a purchase in your app, Discord will emit [Entitlement Gateway events](/docs/events/gateway-events#entitlements). For subscription SKUs, you will receive the following entitlement events: @@ -62,21 +62,21 @@ For subscription SKUs, you will receive the following entitlement events: |----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `ENTITLEMENT_CREATE` | When a user is granted an entitlement to your app's subscription SKU | | `ENTITLEMENT_UPDATE` | When an entitlement to a subscription SKU ends | -| `ENTITLEMENT_DELETE` | When Discord refunds a subscription, removes an entitlement, or when a developer [deletes a Test Entitlement](#DOCS_RESOURCES_ENTITLEMENT/delete-test-entitlement) | +| `ENTITLEMENT_DELETE` | When Discord refunds a subscription, removes an entitlement, or when a developer [deletes a Test Entitlement](/docs/resources/entitlement#delete-test-entitlement) | ### Accessing Entitlements with the HTTP API -For apps requiring background processing or not solely reliant on interactions, keeping track of entitlements is essential. You can utilize the [List Entitlements](#DOCS_RESOURCES_ENTITLEMENT/list-entitlements) endpoint to list active and expired entitlements. Your app can filter entitlements by a specific user or guild by using the `?user_id=XYZ` or `?guild_id=XYZ` query params. +For apps requiring background processing or not solely reliant on interactions, keeping track of entitlements is essential. You can utilize the [List Entitlements](/docs/resources/entitlement#list-entitlements) endpoint to list active and expired entitlements. Your app can filter entitlements by a specific user or guild by using the `?user_id=XYZ` or `?guild_id=XYZ` query params. For example, you might keep track of our entitlements in a database and check if a user still has access to a specific SKU before performing a cron job or other task. ### Accessing Entitlements on Interaction Payloads -Entitlements are also available on the `Interaction Payload` when a user interacts with your app. You can find the entitlements on the `entitlements` field of the `Interaction Payload` when [receiving and responding to interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING). You can use this field to determine if the user or guild is subscribed to your app. +Entitlements are also available on the `Interaction Payload` when a user interacts with your app. You can find the entitlements on the `entitlements` field of the `Interaction Payload` when [receiving and responding to interactions](/docs/interactions/receiving-and-responding). You can use this field to determine if the user or guild is subscribed to your app. ### Accessing Entitlements with the Embedded App SDK -When using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) to build an [Activity](#DOCS_ACTIVITIES_OVERVIEW), you can also [access a user's entitlements](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements). Check out the [Implementing In-App Purchases for Activities](#DOCS_MONETIZATION_IMPLEMENTING_IAP_FOR_ACTIVITIES) guide to learn more about monetization with the Embedded App SDK. +When using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) to build an [Activity](/docs/activities/overview), you can also [access a user's entitlements](/docs/developer-tools/embedded-app-sdk#getentitlements). Check out the [Implementing In-App Purchases for Activities](/docs/monetization/implementing-iap-for-activities) guide to learn more about monetization with the Embedded App SDK. --- @@ -84,23 +84,23 @@ When using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) to bui ### Responding with a Premium Button -[Responding with a premium button](#DOCS_MONETIZATION_MANAGING_SKUS/responding-with-a-premium-button) gives you the ability to prompt users to subscribe to your app when they attempt to use a premium feature without a subscription. +[Responding with a premium button](/docs/monetization/managing-skus#responding-with-a-premium-button) gives you the ability to prompt users to subscribe to your app when they attempt to use a premium feature without a subscription. -You can do this by sending a message with a [button](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/buttons) with a [premium style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles) and a `sku_id` that allows the user to upgrade to your premium offering. +You can do this by sending a message with a [button](/docs/interactions/message-components#buttons) with a [premium style](/docs/interactions/message-components#button-object-button-styles) and a `sku_id` that allows the user to upgrade to your premium offering. ### Starting a Purchase from an Activity -If you are using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) to build an [Activity](#DOCS_ACTIVITIES_OVERVIEW), you can also launch the purchase flow for a specific SKU using the SDK. Check out the [Implementing In-App Purchases for Activities](#DOCS_MONETIZATION_IMPLEMENTING_IAP_FOR_ACTIVITIES) guide to learn more about monetization with the Embedded App SDK. +If you are using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) to build an [Activity](/docs/activities/overview), you can also launch the purchase flow for a specific SKU using the SDK. Check out the [Implementing In-App Purchases for Activities](/docs/monetization/implementing-iap-for-activities) guide to learn more about monetization with the Embedded App SDK. ### Purchasing from the Store Page -Users can start, upgrade, or downgrade their subscription from your app's [Store](#DOCS_MONETIZATION_MANAGING_SKUS/viewing-your-store-page) page. You can link directly to your Store page using our [Application Directory Store URL scheme](#DOCS_MONETIZATION_MANAGING_SKUS/linking-to-your-store). +Users can start, upgrade, or downgrade their subscription from your app's [Store](/docs/monetization/managing-skus#viewing-your-store-page) page. You can link directly to your Store page using our [Application Directory Store URL scheme](/docs/monetization/managing-skus#linking-to-your-store). --- ## Supporting Subscriptions -To support subscriptions in your app, you need to [create a subscription SKU](#DOCS_MONETIZATION_MANAGING_SKUS/creating-a-sku) and handle the following scenarios: +To support subscriptions in your app, you need to [create a subscription SKU](/docs/monetization/managing-skus#creating-a-sku) and handle the following scenarios: ### Starting a new subscription @@ -145,9 +145,9 @@ When a user resumes their subscription, you will receive the following events: ## Supporting Upgrades and Downgrades -If you offer multiple subscription tiers in your app, users can upgrade or downgrade their subscription at any time from your [Store page](#DOCS_MONETIZATION_MANAGING_SKUS/viewing-your-store-page) or their App Subscription settings. +If you offer multiple subscription tiers in your app, users can upgrade or downgrade their subscription at any time from your [Store page](/docs/monetization/managing-skus#viewing-your-store-page) or their App Subscription settings. -To create multiple subscription tiers, you will need to [create multiple subscription SKUs](#DOCS_MONETIZATION_MANAGING_SKUS/creating-a-sku) and support the following scenarios in your app: +To create multiple subscription tiers, you will need to [create multiple subscription SKUs](/docs/monetization/managing-skus#creating-a-sku) and support the following scenarios in your app: ### Upgrading an existing subscription @@ -185,13 +185,13 @@ Once the user's current subscription expires on `subscription.current_period_end ## Using the Subscription API > info -> When implementing monetization, [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) should be considered the source of truth for a user's access to a specific SKU. The Subscription API is intended for reporting and lifecycle management purposes that happen outside the flow of a user's interaction with your app. +> When implementing monetization, [Entitlements](/docs/resources/entitlement) should be considered the source of truth for a user's access to a specific SKU. The Subscription API is intended for reporting and lifecycle management purposes that happen outside the flow of a user's interaction with your app. -You can use the [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) to check on the status of your app subscriptions. This API allows you to list subscriptions by user for reporting purposes and to check on the status of subscriptions without having to access entitlements directly. +You can use the [Subscription API](/docs/resources/subscription) to check on the status of your app subscriptions. This API allows you to list subscriptions by user for reporting purposes and to check on the status of subscriptions without having to access entitlements directly. -- [List SKU Subscriptions](#DOCS_RESOURCES_SUBSCRIPTION/list-sku-subscriptions): List all subscriptions for a specific SKU in your app. -- [Get SKU Subscription](#DOCS_RESOURCES_SUBSCRIPTION/get-sku-subscription): Get a specific subscription in your app. -- [Subscription Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/subscriptions): Discord will emit gateway events when a subscription is created, updated, and very rarely, deleted. +- [List SKU Subscriptions](/docs/resources/subscription#list-sku-subscriptions): List all subscriptions for a specific SKU in your app. +- [Get SKU Subscription](/docs/resources/subscription#get-sku-subscription): Get a specific subscription in your app. +- [Subscription Gateway events](/docs/events/gateway-events#subscriptions): Discord will emit gateway events when a subscription is created, updated, and very rarely, deleted. --- @@ -199,18 +199,18 @@ You can use the [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) to check on the ### Using Test Entitlements -You can test your implementation by [creating](#DOCS_RESOURCES_ENTITLEMENT/create-test-entitlement) and [deleting](#DOCS_RESOURCES_ENTITLEMENT/delete-test-entitlement) test entitlements. These entitlements will allow you to test your premium offering in both a subscribed and unsubscribed state as a user or guild. +You can test your implementation by [creating](/docs/resources/entitlement#create-test-entitlement) and [deleting](/docs/resources/entitlement#delete-test-entitlement) test entitlements. These entitlements will allow you to test your premium offering in both a subscribed and unsubscribed state as a user or guild. -This method will not let you test out the full payment flow in Discord but will allow you to test your app's behavior when a user is subscribed or unsubscribed. See [Using Live Entitlements](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/using-live-entitlements) if you'd like to see the full payment flow. +This method will not let you test out the full payment flow in Discord but will allow you to test your app's behavior when a user is subscribed or unsubscribed. See [Using Live Entitlements](/docs/monetization/implementing-app-subscriptions#using-live-entitlements) if you'd like to see the full payment flow. > info > Test Entitlements do not have a `starts_at` or `ends_at` field as they are valid until they are deleted. ### Using Live Entitlements -If you'd like to test the full payment flow for your app, you can do so by interacting with your Store page or a [premium styled button](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/prompting-users-to-subscribe). Any team members associated with your app will automatically see a 100% discount on the price of the subscription, allowing you to purchase without the use of live payment method. +If you'd like to test the full payment flow for your app, you can do so by interacting with your Store page or a [premium styled button](/docs/monetization/implementing-app-subscriptions#prompting-users-to-subscribe). Any team members associated with your app will automatically see a 100% discount on the price of the subscription, allowing you to purchase without the use of live payment method. -After checkout, you will have a live subscription. This subscription will renew until canceled and can be used in testing subscription renewals in your app. If you cancel this subscription, it will remain an active entitlement until the end of the subscription billing period, represented by the `period_ends_at` field on the [Subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object). +After checkout, you will have a live subscription. This subscription will renew until canceled and can be used in testing subscription renewals in your app. If you cancel this subscription, it will remain an active entitlement until the end of the subscription billing period, represented by the `period_ends_at` field on the [Subscription](/docs/resources/subscription#subscription-object). > info -> You can only delete entitlements created using the [create entitlement](#DOCS_RESOURCES_ENTITLEMENT/create-test-entitlement) endpoint. If you need to toggle access to your premium features during your development process, it is best to use Test Entitlements. \ No newline at end of file +> You can only delete entitlements created using the [create entitlement](/docs/resources/entitlement#create-test-entitlement) endpoint. If you need to toggle access to your premium features during your development process, it is best to use Test Entitlements. \ No newline at end of file diff --git a/docs/monetization/implementing-iap-for-activities.mdx b/docs/monetization/implementing-iap-for-activities.mdx index bfcbbe4477..db21e74c52 100644 --- a/docs/monetization/implementing-iap-for-activities.mdx +++ b/docs/monetization/implementing-iap-for-activities.mdx @@ -4,9 +4,9 @@ sidebar_label: Implementing IAP for Activities # Implementing In-App Purchases for Activities -In-App Purchases (IAP) for [Activities](#DOCS_ACTIVITIES_OVERVIEW) allows developers to easily monetize their Activity by allowing users to buy premium subscriptions or items natively in Discord. This guide will walk you through the process of implementing monetization using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK). +In-App Purchases (IAP) for [Activities](/docs/activities/overview) allows developers to easily monetize their Activity by allowing users to buy premium subscriptions or items natively in Discord. This guide will walk you through the process of implementing monetization using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk). -Before you can add premium products with the Embedded App SDK in an Activity, you must [Enable Monetization](#DOCS_MONETIZATION_ENABLING_MONETIZATION) for your app. +Before you can add premium products with the Embedded App SDK in an Activity, you must [Enable Monetization](/docs/monetization/enabling-monetization) for your app. --- @@ -18,7 +18,7 @@ Before implementing monetization in your app, it's important to understand the f - **Entitlements**: Represent the user's access to your premium products. - **Subscriptions**: Represent an ongoing agreement for a user to pay for an entitlement on a recurring basis until canceled. -You can learn more about these concepts in the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW). +You can learn more about these concepts in the [Monetization Overview](/docs/monetization/overview). --- @@ -26,7 +26,7 @@ You can learn more about these concepts in the [Monetization Overview](#DOCS_MON SKUs represent the premium products you offer in your app. Before you can start implementing monetization in your app, you will need to create a SKU for each premium product. -To learn more about creating and managing SKUs and the different types of SKUs you can create, see the [Managing SKUs](#DOCS_MONETIZATION_MANAGING_SKUS) guide. +To learn more about creating and managing SKUs and the different types of SKUs you can create, see the [Managing SKUs](/docs/monetization/managing-skus) guide. ### Publishing SKUs for Activities @@ -34,12 +34,12 @@ When publishing SKUs, you can choose to publish them to your **Store and the API #### Published to Store and the API -- Your SKUs will be visible to users in the Discord client in your [app's store](#DOCS_MONETIZATION_MANAGING_SKUS/viewing-your-store-page) or your Activity's custom storefront. +- Your SKUs will be visible to users in the Discord client in your [app's store](/docs/monetization/managing-skus#viewing-your-store-page) or your Activity's custom storefront. - Your users will be able to purchase them directly from the Discord client without having your Activity open so you should handle the purchase flow accordingly. #### Published to API Only -- Your SKUs will **not** be visible to users in your [app's store](#DOCS_MONETIZATION_MANAGING_SKUS/viewing-your-store-page), and users will only be able to purchase them through your Activity's custom storefront. +- Your SKUs will **not** be visible to users in your [app's store](/docs/monetization/managing-skus#viewing-your-store-page), and users will only be able to purchase them through your Activity's custom storefront. Next, we'll cover how to create and render your own custom storefront in your Activity. @@ -52,9 +52,9 @@ Once you have created your SKUs, you will need to build and render your own cust ### Listing SKUs -To fetch the list of products for displaying in your Activity, you can call the [`getSkus()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getskus) command from the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK). +To fetch the list of products for displaying in your Activity, you can call the [`getSkus()`](/docs/developer-tools/embedded-app-sdk#getskus) command from the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk). -You can also fetch SKUs using the [HTTP API](#DOCS_RESOURCES_SKU/list-skus). +You can also fetch SKUs using the [HTTP API](/docs/resources/sku#list-skus). ### Mapping SKUs to Your Premium Perks @@ -81,31 +81,31 @@ console.log(`The price is ${displayPrice}!`); ## Working with Entitlements -When a user purchases a SKU, an entitlement is created. [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) represent the user's access to your premium product. +When a user purchases a SKU, an entitlement is created. [Entitlements](/docs/resources/entitlement) represent the user's access to your premium product. -Depending on your app's features, you can use a combination of the [Embedded App SDK events](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements), [Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements), the [Entitlement HTTP API](#DOCS_RESOURCES_ENTITLEMENT), and [interaction payloads](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) to keep track of entitlements to users who have purchased items in your app. +Depending on your app's features, you can use a combination of the [Embedded App SDK events](/docs/developer-tools/embedded-app-sdk#getentitlements), [Gateway events](/docs/events/gateway-events#entitlements), the [Entitlement HTTP API](/docs/resources/entitlement), and [interaction payloads](/docs/interactions/receiving-and-responding) to keep track of entitlements to users who have purchased items in your app. ### Fetching Entitlements with the Embedded App SDK -Use the [`getEntitlements()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements) SDK command to fetch a list of entitlements for a user. This command will return a list of entitlement objects that represent the user's access to your premium products. +Use the [`getEntitlements()`](/docs/developer-tools/embedded-app-sdk#getentitlements) SDK command to fetch a list of entitlements for a user. This command will return a list of entitlement objects that represent the user's access to your premium products. ### Handling Subscription Entitlements -When a user purchases a subscription SKU, an entitlement is created. For more information on handling subscription entitlements, see the [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS) guide. +When a user purchases a subscription SKU, an entitlement is created. For more information on handling subscription entitlements, see the [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions) guide. ### Handling One-Time Purchase Entitlements -When a user purchases a one-time purchase SKU, an entitlement is created. For more information on handling one-time purchase entitlements, see the [Implementing One-Time Purchases](#DOCS_MONETIZATION_IMPLEMENTING_ONE_TIME_PURCHASES) guide. +When a user purchases a one-time purchase SKU, an entitlement is created. For more information on handling one-time purchase entitlements, see the [Implementing One-Time Purchases](/docs/monetization/implementing-one-time-purchases) guide. #### One-Time Purchases: Consumable and Durable Items It is common in Activities to have consumable or one-time-use items, such as a single-use potion or power-up. -When a user purchases a consumable SKU, an entitlement is created. This entitlement will be marked as `consumed: false`. Your application should process the item purchase and [consume the entitlement](#DOCS_RESOURCES_ENTITLEMENT/consume-an-entitlement) as soon as possible to grant the user the perks associated with the item. +When a user purchases a consumable SKU, an entitlement is created. This entitlement will be marked as `consumed: false`. Your application should process the item purchase and [consume the entitlement](/docs/resources/entitlement#consume-an-entitlement) as soon as possible to grant the user the perks associated with the item. If you want to offer an item that grants perks for an unlimited amount of time, you should use a durable SKU instead of a consumable SKU. -Learn more about consumable and durable items in the [Implementing One-Time Purchases](#DOCS_MONETIZATION_IMPLEMENTING_ONE_TIME_PURCHASES) guide. +Learn more about consumable and durable items in the [Implementing One-Time Purchases](/docs/monetization/implementing-one-time-purchases) guide. --- @@ -113,9 +113,9 @@ Learn more about consumable and durable items in the [Implementing One-Time Purc After displaying your SKUs in your custom storefront, you will need to initiate a purchase when a user selects a SKU to purchase. -To initiate a purchase in your activity, use the Embedded App SDK to call the [`startPurchase()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchase) command with the selected SKU `id`. This command will open the purchase flow modal in the Discord client, allowing users to purchase that SKU. +To initiate a purchase in your activity, use the Embedded App SDK to call the [`startPurchase()`](/docs/developer-tools/embedded-app-sdk#startpurchase) command with the selected SKU `id`. This command will open the purchase flow modal in the Discord client, allowing users to purchase that SKU. -Learn more about the [`startPurchase()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/startpurchase) command in the [Embedded App SDK Reference](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK). +Learn more about the [`startPurchase()`](/docs/developer-tools/embedded-app-sdk#startpurchase) command in the [Embedded App SDK Reference](/docs/developer-tools/embedded-app-sdk). To know when it has been completed, you can subscribe to `ENTITLEMENT_CREATE` events. @@ -123,7 +123,7 @@ To know when it has been completed, you can subscribe to `ENTITLEMENT_CREATE` ev Once a user has completed a purchase, Discord will emit an `ENTITLEMENT_CREATE` event. You can subscribe to this event using the Embedded App SDK to know when a user has successfully purchased a SKU and is granted an entitlement. -You can subscribe to the `ENTITLEMENT_CREATE` event using the [`subscribe()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/subscribe) method in the Embedded App SDK. +You can subscribe to the `ENTITLEMENT_CREATE` event using the [`subscribe()`](/docs/developer-tools/embedded-app-sdk#subscribe) method in the Embedded App SDK. Here's an example of how to subscribe to the `ENTITLEMENT_CREATE` event: @@ -138,7 +138,7 @@ const handleEntitlementCreate = () => { discordSdk.subscribe('ENTITLEMENT_CREATE', handleEntitlementCreate); ``` -You can also subscribe to the `ENTITLEMENT_CREATE` event using the [Gateway API](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements) to receive the event in your app's backend or use the [List Entitlements](#DOCS_RESOURCES_ENTITLEMENT/list-entitlements) HTTP API endpoint to fetch a user's entitlements. +You can also subscribe to the `ENTITLEMENT_CREATE` event using the [Gateway API](/docs/events/gateway-events#entitlements) to receive the event in your app's backend or use the [List Entitlements](/docs/resources/entitlement#list-entitlements) HTTP API endpoint to fetch a user's entitlements. --- @@ -146,9 +146,9 @@ You can also subscribe to the `ENTITLEMENT_CREATE` event using the [Gateway API] When working with SKUs and Entitlements in an Activity, it's crucial to ensure the security and integrity of your application's data. Here are some things to keep in mind: -Developers should ensure the accuracy of data obtained via [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) commands and events. A malicious actor could potentially establish their own RPC connection and interact with your application client, posing as Discord. While this might not be an issue for most SDK commands and events, it becomes critical when dealing with perks offered through In-App purchases. +Developers should ensure the accuracy of data obtained via [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) commands and events. A malicious actor could potentially establish their own RPC connection and interact with your application client, posing as Discord. While this might not be an issue for most SDK commands and events, it becomes critical when dealing with perks offered through In-App purchases. -If your application relies solely on SDK data to determine a user's entitlements, a malicious actor could exploit this to gain access to premium products, features, or advantages without paying. This is particularly relevant for commands like [`getEntitlements()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements). +If your application relies solely on SDK data to determine a user's entitlements, a malicious actor could exploit this to gain access to premium products, features, or advantages without paying. This is particularly relevant for commands like [`getEntitlements()`](/docs/developer-tools/embedded-app-sdk#getentitlements). ### Use the Discord HTTP API for Verification @@ -165,7 +165,7 @@ In summary, use the principle of "Trust (the SDK), but Verify (via the API)" to ## Testing Your In-App Purchases -To test your In-App Purchases in your Activity, you will need to follow testing guidelines for both types of SKUs: [One-Time Purchases](#DOCS_MONETIZATION_IMPLEMENTING_ONE_TIME_PURCHASES/testing-your-onetime-purchase-implementation) and [Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/testing-your-app-subscription-implementation). +To test your In-App Purchases in your Activity, you will need to follow testing guidelines for both types of SKUs: [One-Time Purchases](/docs/monetization/implementing-one-time-purchases#testing-your-onetime-purchase-implementation) and [Subscriptions](/docs/monetization/implementing-app-subscriptions#testing-your-app-subscription-implementation). After you've tested your In-App Purchase flows, verify that your application has correctly granted the user the premium perks associated with the SKUs that were purchased during testing. @@ -175,7 +175,7 @@ After you've tested your In-App Purchase flows, verify that your application has Check out our example implementation of In-App Purchase in our [SDK Playground Example Application](https://github.com/discord/embedded-app-sdk-examples/tree/main/sdk-playground). -The example implementation includes client-side and server-side code. It also follows the [security considerations](#DOCS_MONETIZATION_IMPLEMENTING_IAP_FOR_ACTIVITIES/data-security-considerations) you should make when working with SKUs and entitlements. +The example implementation includes client-side and server-side code. It also follows the [security considerations](/docs/monetization/implementing-iap-for-activities#data-security-considerations) you should make when working with SKUs and entitlements. diff --git a/docs/monetization/implementing-one-time-purchases.md b/docs/monetization/implementing-one-time-purchases.md index 3b7e40d769..a4a3803df1 100644 --- a/docs/monetization/implementing-one-time-purchases.md +++ b/docs/monetization/implementing-one-time-purchases.md @@ -2,8 +2,8 @@ One-time purchases enable you to charge your users for premium functionality with in-app items. -- Before you can add one-time purchases to your app, you must [Enable Monetization](#DOCS_MONETIZATION_ENABLING_MONETIZATION) for your app. -- Once you've confirmed eligibility for your app and team, you will be able to set up a [SKU](#DOCS_RESOURCES_SKU) (stock-keeping unit) to represent your one-time purchases. +- Before you can add one-time purchases to your app, you must [Enable Monetization](/docs/monetization/enabling-monetization) for your app. +- Once you've confirmed eligibility for your app and team, you will be able to set up a [SKU](/docs/resources/sku) (stock-keeping unit) to represent your one-time purchases. --- @@ -19,42 +19,42 @@ When creating items for one-time purchase, you can choose between durable and co ## How One-Time Purchases Work #### For Durable SKUs -- When a user purchases your durable SKU, Discord creates an [Entitlement](#DOCS_RESOURCES_ENTITLEMENT) for the purchasing user and that specific [SKU](#DOCS_RESOURCES_SKU). +- When a user purchases your durable SKU, Discord creates an [Entitlement](/docs/resources/entitlement) for the purchasing user and that specific [SKU](/docs/resources/sku). - You will receive an `ENTITLEMENT_CREATE` event via the Gateway. - This entitlement is now available via the `LIST Entitlements` API endpoint. - This entitlement will be available on `Interaction Payloads` initiated from the entitled user. #### For Consumable SKUs -- When a user purchases your consumable SKU, Discord creates an [Entitlement](#DOCS_RESOURCES_ENTITLEMENT) for the purchasing user and that specific SKU. +- When a user purchases your consumable SKU, Discord creates an [Entitlement](/docs/resources/entitlement) for the purchasing user and that specific SKU. - You will receive an `ENTITLEMENT_CREATE` event via the Gateway. - This entitlement is now available via the `LIST Entitlements` API endpoint. - This entitlement will be available on `Interaction Payloads` initiated from the entitled user or users in a guild (for guild subscriptions). -- The purchasing user is unable to make another purchase of this specific SKU until you consume the entitlement using the [Consume Entitlement API](#DOCS_RESOURCES_ENTITLEMENT/consume-an-entitlement) endpoint. +- The purchasing user is unable to make another purchase of this specific SKU until you consume the entitlement using the [Consume Entitlement API](/docs/resources/entitlement#consume-an-entitlement) endpoint. - When you receive an `ENTITLEMENT_CREATE` event for a consumable SKU, you should process the item purchase in your app and consume the entitlement as soon as possible. --- ## Working with Entitlements -When a user purchases a one-time purchase SKU, an entitlement is created. [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) represent the user's access to your consumable or durable item. +When a user purchases a one-time purchase SKU, an entitlement is created. [Entitlements](/docs/resources/entitlement) represent the user's access to your consumable or durable item. -Depending on your app's features, you can use a combination of [Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements), the [Entitlement HTTP API](#DOCS_RESOURCES_ENTITLEMENT), and [interaction payloads](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) to keep track of entitlements to users who have purchased items in your app. +Depending on your app's features, you can use a combination of [Gateway events](/docs/events/gateway-events#entitlements), the [Entitlement HTTP API](/docs/resources/entitlement), and [interaction payloads](/docs/interactions/receiving-and-responding) to keep track of entitlements to users who have purchased items in your app. ### Accessing Entitlements with Gateway Events -When a user purchases a SKU, Discord will emit an [`ENTITLEMENT_CREATE`](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements) event. This event will contain the entitlement object that represents the user's access to the SKU. You can use this event to keep track of the user's entitlements in near-time. For One-Time Purchases, you may also receive an `ENTITLEMENT_DELETE` event if the user's entitlement is revoked. +When a user purchases a SKU, Discord will emit an [`ENTITLEMENT_CREATE`](/docs/events/gateway-events#entitlements) event. This event will contain the entitlement object that represents the user's access to the SKU. You can use this event to keep track of the user's entitlements in near-time. For One-Time Purchases, you may also receive an `ENTITLEMENT_DELETE` event if the user's entitlement is revoked. ### Accessing Entitlements with the HTTP API -Entitlements are available via the [List Entitlements](#DOCS_RESOURCES_ENTITLEMENT/list-entitlements) endpoint. You can filter entitlements by a specific user or set of SKUs by using the `?user_id=XYZ` or `?sku_ids=XYZ` query parameters. +Entitlements are available via the [List Entitlements](/docs/resources/entitlement#list-entitlements) endpoint. You can filter entitlements by a specific user or set of SKUs by using the `?user_id=XYZ` or `?sku_ids=XYZ` query parameters. ### Accessing Entitlements on Interaction Payloads -Entitlements are also available on the `Interaction Payload` when a user interacts with your app. You can find the entitlements on the `entitlements` field of the `Interaction Payload` when [receiving and responding to interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING). +Entitlements are also available on the `Interaction Payload` when a user interacts with your app. You can find the entitlements on the `entitlements` field of the `Interaction Payload` when [receiving and responding to interactions](/docs/interactions/receiving-and-responding). ### Accessing Entitlements with the Embedded App SDK -When using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) to build an [Activity](#DOCS_ACTIVITIES_OVERVIEW), you can also [access a user's entitlements](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/getentitlements). Check out the [Implementing In-App Purchases for Activities](#DOCS_MONETIZATION_IMPLEMENTING_IAP_FOR_ACTIVITIES) guide to learn more about monetization with the Embedded App SDK. +When using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) to build an [Activity](/docs/activities/overview), you can also [access a user's entitlements](/docs/developer-tools/embedded-app-sdk#getentitlements). Check out the [Implementing In-App Purchases for Activities](/docs/monetization/implementing-iap-for-activities) guide to learn more about monetization with the Embedded App SDK. Depending on your app's needs, you can use a combination of these methods to keep track of user entitlements. @@ -69,7 +69,7 @@ When implementing one-time purchases, you should consider the following: When offering durable items, users will have access to the SKU indefinitely. Durable items can't be consumed, so you don't need to worry about the user losing access to the item except in the case of a refund. ### For Consumable One-Time Purchases -When offering consumable items, users can only have one unconsumed entitlement at a time. To handle consumable items in your app or game, you should process and store the consumable item in your app and then make a call to the [Consume Entitlement](#DOCS_RESOURCES_ENTITLEMENT/consume-an-entitlement) endpoint so that the user can purchase more of this item in the future. +When offering consumable items, users can only have one unconsumed entitlement at a time. To handle consumable items in your app or game, you should process and store the consumable item in your app and then make a call to the [Consume Entitlement](/docs/resources/entitlement#consume-an-entitlement) endpoint so that the user can purchase more of this item in the future. Consuming the entitlement will update the entitlement to return a true value in the entitlement's `consumed` field. You will need to think through how your app keeps track of consumable items to decide on the best strategy for when to consume these entitlements and store the state of the consumable item and quantity in your app. @@ -79,13 +79,13 @@ Consuming the entitlement will update the entitlement to return a true value in ### Responding with a Premium Button -[Responding with a premium button](#DOCS_MONETIZATION_MANAGING_SKUS/responding-with-a-premium-button) gives you the ability to prompt users to subscribe to your app when they attempt to use a premium feature without a subscription. +[Responding with a premium button](/docs/monetization/managing-skus#responding-with-a-premium-button) gives you the ability to prompt users to subscribe to your app when they attempt to use a premium feature without a subscription. -You can do this by sending a message with a [button](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/buttons) with a [premium style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles) and a `sku_id` that allows the user to upgrade to your premium offering. +You can do this by sending a message with a [button](/docs/interactions/message-components#buttons) with a [premium style](/docs/interactions/message-components#button-object-button-styles) and a `sku_id` that allows the user to upgrade to your premium offering. ### Starting a Purchase from an Activity -If you are using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) to build an [Activity](#DOCS_ACTIVITIES_OVERVIEW), you can also launch the purchase flow for a specific SKU using the SDK. Check out the [Implementing In-App Purchases for Activities](#DOCS_MONETIZATION_IMPLEMENTING_IAP_FOR_ACTIVITIES) guide to learn more about monetization with the Embedded App SDK. +If you are using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) to build an [Activity](/docs/activities/overview), you can also launch the purchase flow for a specific SKU using the SDK. Check out the [Implementing In-App Purchases for Activities](/docs/monetization/implementing-iap-for-activities) guide to learn more about monetization with the Embedded App SDK. --- diff --git a/docs/monetization/managing-skus.mdx b/docs/monetization/managing-skus.mdx index 74154edd06..3da9676c73 100644 --- a/docs/monetization/managing-skus.mdx +++ b/docs/monetization/managing-skus.mdx @@ -2,7 +2,7 @@ The premium items and subscriptions you offer in your app are represented by SKUs. **SKU** stands for Stock Keeping Unit and is a unique identifier for your premium offerings. -[SKUs](#DOCS_RESOURCES_SKU) are the building blocks of your premium offerings and you can manage them in the Developer Portal. +[SKUs](/docs/resources/sku) are the building blocks of your premium offerings and you can manage them in the Developer Portal. --- @@ -23,7 +23,7 @@ Once you select the SKU type, enter a name for your SKU to continue. You can create multiple subscription tiers to offer different benefits at different price points. Each tier can have its own set of benefits and price and is represented by unique SKUs. -To support upgrading and downgrading between subscription tiers, see our guide on [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/supporting-upgrades-and-downgrades). +To support upgrading and downgrading between subscription tiers, see our guide on [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions#supporting-upgrades-and-downgrades). ![Supporting multiple subscription tiers](images/multisub.png) @@ -127,7 +127,7 @@ Unpublishing a SKU has the following effects: > warn > **Danger:** Deleting a SKU can affect your users' existing subscriptions and entitlements -Deletes a SKU in the UI and makes it unavailable for publishing. Deleted SKUs are still listed when calling [List SKUs](#DOCS_RESOURCES_SKU/list-skus) in the API. +Deletes a SKU in the UI and makes it unavailable for publishing. Deleted SKUs are still listed when calling [List SKUs](/docs/resources/sku#list-skus) in the API. Deleting a SKU has the following effects: - For subscription SKUs, users and guilds will be immediately unsubscribed from the SKU. Their entitlement will still be valid until the end of the billing period. @@ -149,10 +149,10 @@ When you change the price of a user or guild subscription SKU, it will only affe After you've published your SKUs, you are ready to start implementing your premium features in your app. See our guides to get started. - + Learn how to start and manage recurring subscriptions within your app. - + Learn how to implement one-time purchases in your app. @@ -205,7 +205,7 @@ You can link directly to your Store page using our Application Directory Store U ## Responding with a Premium Button -You can prompt users to purchase item or subscription SKUs using a [button](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/buttons) with a [premium style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles) and a `sku_id`. You can use this premium button style anywhere you would use message components, such as in a command response. +You can prompt users to purchase item or subscription SKUs using a [button](/docs/interactions/message-components#buttons) with a [premium style](/docs/interactions/message-components#button-object-button-styles) and a `sku_id`. You can use this premium button style anywhere you would use message components, such as in a command response. ```javascript return new JsonResponse({ diff --git a/docs/monetization/overview.mdx b/docs/monetization/overview.mdx index fff7304445..5eab1cbaf3 100644 --- a/docs/monetization/overview.mdx +++ b/docs/monetization/overview.mdx @@ -10,9 +10,9 @@ sidebar_label: Overview Premium Apps lets you prompt customers to start subscriptions or purchase one-time items with our easy-to-use checkout and payment process. Discord notifies your app of the user's purchase, allowing you to grant access to your premium features. -- Sell monthly recurring [subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS) for your app's premium functionality within Discord -- Sell [one-time purchases](#DOCS_MONETIZATION_IMPLEMENTING_ONE_TIME_PURCHASES) for both durable and consumable items or functionality within your app -- Highlight your app's premium benefits on the App Directory and on your own [Store](#DOCS_MONETIZATION_MANAGING_SKUS/viewing-your-store-page) page +- Sell monthly recurring [subscriptions](/docs/monetization/implementing-app-subscriptions) for your app's premium functionality within Discord +- Sell [one-time purchases](/docs/monetization/implementing-one-time-purchases) for both durable and consumable items or functionality within your app +- Highlight your app's premium benefits on the App Directory and on your own [Store](/docs/monetization/managing-skus#viewing-your-store-page) page - Offer native product tie-ins and upsells on the App Directory, app profiles, and in-chat - With secure transactions & fraud detection, your customers can securely pay for purchases without leaving Discord @@ -22,9 +22,9 @@ Premium Apps lets you prompt customers to start subscriptions or purchase one-ti To integrate a premium feature into your application, there are three primary components of our Monetization API: -- [SKUs](#DOCS_RESOURCES_SKU) represent specific items or subscription options your app offers. Each SKU is a unique offering. -- [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) indicate whether a user has access to a specific premium offering or SKU. -- [Subscriptions](#DOCS_RESOURCES_SUBSCRIPTION) represent an ongoing agreement where a user commits to paying for an entitlement on a recurring basis until canceled. +- [SKUs](/docs/resources/sku) represent specific items or subscription options your app offers. Each SKU is a unique offering. +- [Entitlements](/docs/resources/entitlement) indicate whether a user has access to a specific premium offering or SKU. +- [Subscriptions](/docs/resources/subscription) represent an ongoing agreement where a user commits to paying for an entitlement on a recurring basis until canceled. ### Types of SKUs @@ -49,4 +49,4 @@ A subscription SKU represents a recurring purchase that a user can subscribe to Ready to start monetizing your app? -Follow our full guide for [Enabling Monetization](#DOCS_MONETIZATION_ENABLING_MONETIZATION) and implementing premium features in your app. \ No newline at end of file +Follow our full guide for [Enabling Monetization](/docs/monetization/enabling-monetization) and implementing premium features in your app. \ No newline at end of file diff --git a/docs/policies-and-agreements/developer-policy.md b/docs/policies-and-agreements/developer-policy.md index f78c416f09..04774bd7e9 100644 --- a/docs/policies-and-agreements/developer-policy.md +++ b/docs/policies-and-agreements/developer-policy.md @@ -5,7 +5,7 @@ sidebar_label: Developer Policy # Discord Developer Policy > info -> We’re updating our Developer Terms of Service and Developer Policy, effective July 8, 2024. Please review the updated Policy below and Terms [here](#DOCS_POLICIES_AND_AGREEMENTS_DEVELOPER_TERMS_OF_SERVICE). If you access or use the APIs on or after July 8, 2024, it means you agree to the updated Policy and Terms. Until then, the current [Developer Terms of Service](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Terms_of_Service.md) and [Developer Policy](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Policy.md) will apply. +> We’re updating our Developer Terms of Service and Developer Policy, effective July 8, 2024. Please review the updated Policy below and Terms [here](/docs/policies-and-agreements/developer-terms-of-service). If you access or use the APIs on or after July 8, 2024, it means you agree to the updated Policy and Terms. Until then, the current [Developer Terms of Service](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Terms_of_Service.md) and [Developer Policy](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Policy.md) will apply. ## Effective date: July 8, 2024 @@ -17,17 +17,18 @@ Discord is a place where developers can come to build cool experiences to furthe ## Introduction -This Discord Developer Policy is incorporated into the [Discord Developer Terms of Service](#DOCS_POLICIES_AND_AGREEMENTS_DEVELOPER_TERMS_OF_SERVICE) (“Developer Terms”), and you agree that it applies to your access to and use of our APIs in addition to the Developer Terms and other Terms. Capitalized terms not otherwise defined herein (including “API Data” and “Application”) have the meaning assigned to them in the Developer Terms. For clarity, the term “including” as used herein means “including without limitation.” +This Discord Developer Policy is incorporated into the [Discord Developer Terms of Service](/docs/policies-and-agreements/developer-terms-of-service) (“Developer Terms”), and you agree that it applies to your access to and use of our APIs in addition to the Developer Terms and other Terms. Capitalized terms not otherwise defined herein (including “API Data” and “Application”) have the meaning assigned to them in the Developer Terms. For clarity, the term “including” as used herein means “including without limitation.” As described in the Developer Terms (including Section 9), we may take enforcement actions for any Enforcement Reason, including if we believe you or your Application have violated this Developer Policy. If you come across an Application that you believe violates any of these policies, [please report it to us](https://support.discord.com/hc/en-us/requests/new). -Please check back here regularly, as we may update these policies from time to time, and your continued access to or use of the APIs after such updates go into effect means you accept and agree to them. Additional terms and policies may also apply to your access to or use of certain APIs (including as described in or available via our [Developer Portal](#DOCS_INTRO) or [Help Center](https://support-dev.discord.com/hc/en-us/categories/360000656491)). +Please check back here regularly, as we may update these policies from time to time, and your continued access to or use of the APIs after such updates go into effect means you accept and agree to them. Additional terms and policies may also apply to your access to or use of certain APIs (including as described in or available via our [Developer Portal](/docs/intro) or [Help Center](https://support-dev.discord.com/hc/en-us/categories/360000656491)). ## Monetization Requirements All Applications attempting to monetize through our services must abide by Discord’s [Monetization Terms](https://support.discord.com/hc/en-us/articles/5330075836311) and [Monetization Policy](https://support.discord.com/hc/en-us/articles/10575066024983). Beginning on October 7, 2024, in regions where Discord supports monetization through its Premium Apps products, all developers who offer paid features or capabilities for their Application will be required to: + - (i) support purchase of such features or capabilities through Discord’s Premium Apps products; and, - (ii) offer such features or capabilities at prices on Discord that are no higher than the prices at which they are offered through other payment options. @@ -51,6 +52,7 @@ Beginning on October 7, 2024, in regions where Discord supports monetization thr ## Respect Our Platform Rules **8. Do not use the APIs for any dangerous or illegal activity.** This includes, but is not limited to, activities that facilitate or promote: + - Risks to physical safety; - Environmental damage; - Financial scams; or, @@ -99,6 +101,6 @@ Note that we require developers to notify Discord and affected users of potentia For the avoidance of doubt, the above policies apply in addition to the terms relating to API Data described in the Developer Terms (including Section 5 (User Privacy and Security)), and use of data includes how you access, collect, store, retain, transmit, share, and otherwise process it. ## API Limits -As described in the [Developer Terms](#DOCS_POLICIES_AND_AGREEMENTS_DEVELOPER_TERMS_OF_SERVICE), Discord may set and enforce limits on your use of the APIs (e.g., by limiting the number of API requests that you may make, or the number of users you may serve) at our sole discretion. You agree to, and will not attempt to circumvent, such limitations we set for each API. +As described in the [Developer Terms](/docs/policies-and-agreements/developer-terms-of-service), Discord may set and enforce limits on your use of the APIs (e.g., by limiting the number of API requests that you may make, or the number of users you may serve) at our sole discretion. You agree to, and will not attempt to circumvent, such limitations we set for each API. If you would like to use any API beyond these limits, you must obtain Discord’s express written consent. Discord may, at our discretion, decline such request or condition acceptance on your agreement to additional terms and/or charges for such use. diff --git a/docs/policies-and-agreements/developer-terms-of-service.md b/docs/policies-and-agreements/developer-terms-of-service.md index ed10f75990..2da0c02b78 100644 --- a/docs/policies-and-agreements/developer-terms-of-service.md +++ b/docs/policies-and-agreements/developer-terms-of-service.md @@ -5,7 +5,7 @@ sidebar_label: Developer Terms of Service # Discord Developer Terms of Service > info -> We’re updating our Developer Terms of Service and Developer Policy, effective July 8, 2024. Please review the updated Terms below and Policy [here](#DOCS_POLICIES_AND_AGREEMENTS_DEVELOPER_POLICY). If you access or use the APIs on or after July 8, 2024, it means you agree to the updated Terms and Policy. Until then, the current [Developer Terms of Service](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Terms_of_Service.md) and [Developer Policy](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Policy.md) will apply. +> We’re updating our Developer Terms of Service and Developer Policy, effective July 8, 2024. Please review the updated Terms below and Policy [here](/docs/policies-and-agreements/developer-policy). If you access or use the APIs on or after July 8, 2024, it means you agree to the updated Terms and Policy. Until then, the current [Developer Terms of Service](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Terms_of_Service.md) and [Developer Policy](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Policy.md) will apply. ## Effective date: July 8, 2024 @@ -13,13 +13,13 @@ sidebar_label: Developer Terms of Service *For a link to the previous terms, please see **[here](https://github.com/discord/discord-api-docs/blob/e5cd463cd1412df2e55fce8ecb81e7d1ed5755b0/docs/policies_and_agreements/Developer_Policy.md)**. For a translated version in your selected language, as available, please see **[here](https://support-dev.discord.com/hc/articles/8562894815383)**.* -Welcome! Thank you for your interest in Discord’s APIs, software development kits (“DDSDKs”), and other developer products and services and associated software (including those described in or available via our [Developer Portal](#DOCS_INTRO) (collectively, "APIs" or “Developer Platform”). +Welcome! Thank you for your interest in Discord’s APIs, software development kits (“DDSDKs”), and other developer products and services and associated software (including those described in or available via our [Developer Portal](/docs/intro) (collectively, "APIs" or “Developer Platform”). These Developer Terms of Service (“Developer Terms”) apply to your access to and use of the APIs and set forth the legal obligations between us and you. When we say “Discord,” “we,” “us,” and “our” in these Developer Terms of Service, we mean Discord Inc., unless otherwise set forth in additional terms applicable to a given API. -When we say “Terms” in these Developer Terms, we mean, collectively, these Developer Terms, our [Developer Documentation](#DOCS_INTRO) and any other applicable documentation we make available (“Documentation”), our [Discord Developer Policy](#DOCS_POLICIES_AND_AGREEMENTS_DEVELOPER_POLICY), our [Terms of Service](https://discord.com/terms) (including our [Discord Community Guidelines](https://discord.com/guidelines)), and any other applicable terms, policies, and guidelines we make available (including in our [Developer Portal](#DOCS_INTRO) or [Help Center](https://support-dev.discord.com/hc)). If there is a conflict between these Developer Terms and any additional terms, then these Developer Terms will control for that conflict. If you use other Discord services in connection with the APIs, then the terms for those other services also apply to you. Additional defined terms are described in Section 13 (Definitions) below. +When we say “Terms” in these Developer Terms, we mean, collectively, these Developer Terms, our [Developer Documentation](/docs/intro) and any other applicable documentation we make available (“Documentation”), our [Discord Developer Policy](/docs/policies-and-agreements/developer-policy), our [Terms of Service](https://discord.com/terms) (including our [Discord Community Guidelines](https://discord.com/guidelines)), and any other applicable terms, policies, and guidelines we make available (including in our [Developer Portal](/docs/intro) or [Help Center](https://support-dev.discord.com/hc)). If there is a conflict between these Developer Terms and any additional terms, then these Developer Terms will control for that conflict. If you use other Discord services in connection with the APIs, then the terms for those other services also apply to you. Additional defined terms are described in Section 13 (Definitions) below. Important Note: Section 12(e) (Choice of Law; Dispute Resolution) incorporates the [dispute resolution provision](https://discord.com/terms#settling-disputes-between-you-and-discord) from our [Terms of Service](https://discord.com/terms), which includes an arbitration clause and class action waiver that applies to all U.S.-based Discord users. Please read this section carefully as it may significantly affect your legal rights, including your right to file a lawsuit in court. @@ -40,7 +40,7 @@ You may be required or requested to provide certain information about yourself ( ## Section 2: Use of the APIs ### a. License to you -Subject to your compliance with the Terms, we grant you a limited, non-exclusive, non-sublicensable, non-transferable, non-assignable, revocable license to access and use the APIs and Documentation we make available to you solely as necessary to integrate with, develop, and operate your Application to the extent permitted under the Terms (including the [Developer Policy](#DOCS_POLICIES_AND_AGREEMENTS_DEVELOPER_POLICY). We reserve all rights, title, and interest not expressly granted in the Terms and you may not access or use the APIs or Documentation except as set forth in the Terms. +Subject to your compliance with the Terms, we grant you a limited, non-exclusive, non-sublicensable, non-transferable, non-assignable, revocable license to access and use the APIs and Documentation we make available to you solely as necessary to integrate with, develop, and operate your Application to the extent permitted under the Terms (including the [Developer Policy](/docs/policies-and-agreements/developer-policy). We reserve all rights, title, and interest not expressly granted in the Terms and you may not access or use the APIs or Documentation except as set forth in the Terms. ## b. Restrictions @@ -242,7 +242,7 @@ You may not assign, sublicense, delegate, or otherwise transfer any of your righ ## Section 13: Definitions -- “APIs” (or “Developer Platform”) means, collectively, Discord’s APIs, software development kits (“SDKs”), and other developer services and associated software (including those described in or available via our [Developer Portal](#DOCS_INTRO)). +- “APIs” (or “Developer Platform”) means, collectively, Discord’s APIs, software development kits (“SDKs”), and other developer services and associated software (including those described in or available via our [Developer Portal](/docs/intro)). - “API Data” means any data, information, or other content you obtain through the APIs (including personal data). API Data includes your developer credentials and access tokens. - “App Content” means any data, information, technology, materials, or other content that you or those acting on your behalf add to our services or otherwise make available to us in connection with the APIs or your Application (including as submitted, posted, or displayed by or through your Application). - “App Review” has the meaning set forth in Section 6. diff --git a/docs/quick-start/getting-started.mdx b/docs/quick-start/getting-started.mdx index 425fde50c5..d7a65c2e8b 100644 --- a/docs/quick-start/getting-started.mdx +++ b/docs/quick-start/getting-started.mdx @@ -4,10 +4,10 @@ sidebar_label: Getting Started # Building your first Discord app -[Discord apps](#DOCS_QUICK_START_OVERVIEW_OF_APPS) let you customize and extend Discord using a collection of APIs and interactive features. This guide will walk you through building your first Discord app using JavaScript and by the end you'll have an app that uses slash commands, sends messages, and responds to component interactions. +[Discord apps](/docs/quick-start/overview-of-apps) let you customize and extend Discord using a collection of APIs and interactive features. This guide will walk you through building your first Discord app using JavaScript and by the end you'll have an app that uses slash commands, sends messages, and responds to component interactions. > info -> If you're interested in building a game or social experience in an iframe, you can follow the tutorial for [building an Activity](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) +> If you're interested in building a game or social experience in an iframe, you can follow the tutorial for [building an Activity](/docs/activities/building-an-activity) We'll be building a Discord app that lets users play rock-paper-scissors (with 7 choices instead of 3). This guide is beginner-focused, but it assumes a basic understanding of [JavaScript](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics). @@ -113,39 +113,39 @@ Now that you have the credentials you need, lets configure your bot user and ins ### Configuring your bot -Newly-created apps have a bot user enabled by default. Bot users allow your app to appear and behave similarly to other server members when it's [installed to a server](#DOCS_QUICK_START_OVERVIEW_OF_APPS/where-are-apps-installed). +Newly-created apps have a bot user enabled by default. Bot users allow your app to appear and behave similarly to other server members when it's [installed to a server](/docs/quick-start/overview-of-apps#where-are-apps-installed). -On the left hand sidebar in your app's settings, there's a **Bot** page (where we fetched the token from). On this page, you can also configure settings like its [privileged intents](#DOCS_EVENTS_GATEWAY/privileged-intents) or whether it can be installed by other users. +On the left hand sidebar in your app's settings, there's a **Bot** page (where we fetched the token from). On this page, you can also configure settings like its [privileged intents](/docs/events/gateway#privileged-intents) or whether it can be installed by other users. -Intents determine which events Discord will send your app when you're creating a [Gateway API connection](#DOCS_EVENTS_GATEWAY). For example, if you want your app to perform an action when users add a reaction to a message, you can pass the `GUILD_MESSAGE_REACTIONS` (`1 << 10`) intent. +Intents determine which events Discord will send your app when you're creating a [Gateway API connection](/docs/events/gateway). For example, if you want your app to perform an action when users add a reaction to a message, you can pass the `GUILD_MESSAGE_REACTIONS` (`1 << 10`) intent. -Some intents are [privileged](#DOCS_EVENTS_GATEWAY/privileged-intents), meaning they allow your app to access data that may be considered sensitive (like the contents of messages). Privileged intents can be toggled on the **Bot** page in your app's settings, but they must be approved before you [verify your app](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified). Standard, non-privileged intents don't require any additional permissions or configurations. +Some intents are [privileged](/docs/events/gateway#privileged-intents), meaning they allow your app to access data that may be considered sensitive (like the contents of messages). Privileged intents can be toggled on the **Bot** page in your app's settings, but they must be approved before you [verify your app](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified). Standard, non-privileged intents don't require any additional permissions or configurations. -More information about intents and a full list of available intents (along with their associated events) is in the [Gateway documentation](#DOCS_EVENTS_GATEWAY/gateway-intents). +More information about intents and a full list of available intents (along with their associated events) is in the [Gateway documentation](/docs/events/gateway#gateway-intents). For now, we don't need to configure anything additional here, but you may need to in the future depending on your app's use case. Let's go ahead and get our app ready for installation. ### Choosing installation contexts -Now we'll select where your app can be installed in Discord, which is determined by the [installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context) that your app supports. +Now we'll select where your app can be installed in Discord, which is determined by the [installation contexts](/docs/resources/application#installation-context) that your app supports. **Installation contexts** determine where your app can be installed: to servers, to users, or both. Apps can choose which installation contexts they support within the app's settings. -- Apps installed in a **[server context](#DOCS_RESOURCES_APPLICATION/server-context)** (server-installed apps) must be authorized by a server member with the `MANAGE_GUILD` permission, and are visible to all members of the server. -- Apps installed in a **[user context](#DOCS_RESOURCES_APPLICATION/user-context)** (user-installed apps) are visible only to the authorizing user, and therefore don't require any server-specific permissions. Apps installed to a user context are visible across all of the user's servers, DMs, and GDMs—however, they're limited to using commands. +- Apps installed in a **[server context](/docs/resources/application#server-context)** (server-installed apps) must be authorized by a server member with the `MANAGE_GUILD` permission, and are visible to all members of the server. +- Apps installed in a **[user context](/docs/resources/application#user-context)** (user-installed apps) are visible only to the authorizing user, and therefore don't require any server-specific permissions. Apps installed to a user context are visible across all of the user's servers, DMs, and GDMs—however, they're limited to using commands. Click on **Installation** in the left sidebar, then under **Installation Contexts** make sure both "User Install" and "Guild Install" are selected. > info -> Some apps may only want to support one installation context—for example, a moderation app may only support a server context. However, by default, we recommend supporting both installation contexts. For detailed information about supporting user-installed apps, you can read the [user-installable app tutorial](#DOCS_TUTORIALS_DEVELOPING_A_USER_INSTALLABLE_APP). +> Some apps may only want to support one installation context—for example, a moderation app may only support a server context. However, by default, we recommend supporting both installation contexts. For detailed information about supporting user-installed apps, you can read the [user-installable app tutorial](/docs/tutorials/develing-a-user-installable-app). ### Setting up an install link -[Install links](#DOCS_RESOURCES_APPLICATION/install-links) provide an easy way for users to install your app in Discord. We'll set up the default [Discord Provided Link](#DOCS_RESOURCES_APPLICATION/discord-provided-link), but you can read more about the different type of install links in the [Application documentation](#DOCS_RESOURCES_APPLICATION/types-of-install-links). +[Install links](/docs/resources/application#install-links) provide an easy way for users to install your app in Discord. We'll set up the default [Discord Provided Link](/docs/resources/application#discord-provided-link), but you can read more about the different type of install links in the [Application documentation](/docs/resources/application#types-of-install-links). On the **Installation** page, go to the **Install Link** section and select "Discord Provided Link" if it's not already selected. @@ -158,8 +158,8 @@ Apps need approval from installing users to perform actions in Discord (like cre When creating an app, scopes and permissions determine what your app can do and access in Discord. -- [OAuth2 Scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) determine what data access and actions your app can take, granted on behalf of an installing or authenticating user. -- [Permissions](#DOCS_TOPICS_PERMISSIONS/permission-overwrites) are the granular permissions for your bot user, the same as other users in Discord have. They can be approved by the installing user or later updated within server settings or with [permission overwrites](#DOCS_TOPICS_PERMISSIONS/permission-overwrites). Since apps installed to a user context can only respond to commands, these permissions are only relevant to apps installed to a server. +- [OAuth2 Scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) determine what data access and actions your app can take, granted on behalf of an installing or authenticating user. +- [Permissions](/docs/topics/permissions#permission-overwrites) are the granular permissions for your bot user, the same as other users in Discord have. They can be approved by the installing user or later updated within server settings or with [permission overwrites](/docs/topics/permissions#permission-overwrites). Since apps installed to a user context can only respond to commands, these permissions are only relevant to apps installed to a server. On the **Installation** page in the **Default Install Settings** section: @@ -168,7 +168,7 @@ On the **Installation** page in the **Default Install Settings** section: ![Default Install Settings](images/getting-started-default-install.png) -See a list of all [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes), or read more on [permissions](#DOCS_TOPICS_PERMISSIONS) in the documentation. +See a list of all [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes), or read more on [permissions](/docs/topics/permissions) in the documentation. ### Installing your app @@ -177,7 +177,7 @@ See a list of all [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-sc Once you add scopes, copy the URL from the **Install Link** section from before. -Since our app is supporting both installation contexts, we'll install your new app to both a test server and your user account so that we can test in both [installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context). +Since our app is supporting both installation contexts, we'll install your new app to both a test server and your user account so that we can test in both [installation contexts](/docs/resources/application#installation-context). ###### Install to server @@ -198,16 +198,16 @@ Follow the installation prompt to install your app to your user account. Once it With your app configured and installed to your test server and account, let's take a look at the code. > info -> To make development a bit simpler, the app uses [discord-interactions](https://github.com/discord/discord-interactions-js), which provides types and helper functions. If you prefer to use other languages or libraries, check out the [Community Resources](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES) documentation. +> To make development a bit simpler, the app uses [discord-interactions](https://github.com/discord/discord-interactions-js), which provides types and helper functions. If you prefer to use other languages or libraries, check out the [Community Resources](/docs/developer-tools/community-resources) documentation. ### Installing slash commands > info > To install slash commands, the app is using [`node-fetch`](https://github.com/node-fetch/node-fetch). You can see the implementation for the installation in `utils.js` within the `DiscordRequest()` function. -The project contains a `register` script you can use to install the commands in `ALL_COMMANDS`, which is defined at the bottom of `commands.js`. It installs the commands as global commands by calling the HTTP API's [`PUT /applications//commands`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/bulk-overwrite-global-application-commands) endpoint. +The project contains a `register` script you can use to install the commands in `ALL_COMMANDS`, which is defined at the bottom of `commands.js`. It installs the commands as global commands by calling the HTTP API's [`PUT /applications//commands`](/docs/interactions/application-commands#bulk-overwrite-global-application-commands) endpoint. -If you want to customize your commands or add additional ones, you can reference the command structure in the [commands documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-structure). +If you want to customize your commands or add additional ones, you can reference the command structure in the [commands documentation](/docs/interactions/application-commands#application-command-object-application-command-structure). In your terminal within the project folder, run the following command: @@ -218,10 +218,10 @@ npm run register If you navigate back to your server, you should see the slash commands appear. But if you try to run them, nothing will happen since your app isn't receiving or handling any requests from Discord. -Apps have access to [APIs](#DOCS_QUICK_START_OVERVIEW_OF_APPS/what-apis-can-apps-use) that you can mix-and-match to build apps: +Apps have access to [APIs](/docs/quick-start/overview-of-apps#what-apis-can-apps-use) that you can mix-and-match to build apps: -- **[HTTP API](#DOCS_REFERENCE/http-api)** is a REST-like API for general operations like sending and updating data in Discord, or fetching data about a resource. -- **[Gateway API](#DOCS_REFERENCE/gateway-websocket-api)** is a WebSocket-based API that is helpful for maintaining state or listening to events happening in a Discord server. We won't be using it in this guide, but more information about how to create a Gateway connection and the different events you can listen to are in the [Gateway documentation](#DOCS_EVENTS_GATEWAY). +- **[HTTP API](/docs/reference#http-api)** is a REST-like API for general operations like sending and updating data in Discord, or fetching data about a resource. +- **[Gateway API](/docs/reference#gateway-websocket-api)** is a WebSocket-based API that is helpful for maintaining state or listening to events happening in a Discord server. We won't be using it in this guide, but more information about how to create a Gateway connection and the different events you can listen to are in the [Gateway documentation](/docs/events/gateway). --- @@ -240,7 +240,7 @@ First, go to your project's folder and run the following to start your app: npm run start ``` -There should be output indiciating your app is running on port `3000`. Behind the scenes, our app is ready to handle interactions from Discord, which includes verifying security request headers and responding to `PING` requests. We're skipping over a lot of the details in this tutorial, but details about preparing apps for interactions is in the [Interactions Overview](#DOCS_INTERACTIONS_OVERVIEW/preparing-for-interactions) documentation. +There should be output indiciating your app is running on port `3000`. Behind the scenes, our app is ready to handle interactions from Discord, which includes verifying security request headers and responding to `PING` requests. We're skipping over a lot of the details in this tutorial, but details about preparing apps for interactions is in the [Interactions Overview](/docs/interactions/overview#preparing-for-interactions) documentation. > info > By default, the server will listen to requests sent to port 3000, but if you want to change the port, you can specify a `PORT` variable in your `.env` file. @@ -282,7 +282,7 @@ The verification is handled automatically by the sample app in two ways: - It uses the `PUBLIC_KEY` and [discord-interactions package](https://github.com/discord/discord-interactions-js#usage) with a wrapper function (imported from `utils.js`) that makes it conform to [Express's `verify` interface](http://expressjs.com/en/5x/api.html#express.json). This is run on every incoming request to your app. - It responds to incoming `PING` requests. -You can learn more about preparing your app to receive interactions in [the interactions documentation](#DOCS_INTERACTIONS_OVERVIEW/preparing-for-interactions). +You can learn more about preparing your app to receive interactions in [the interactions documentation](/docs/interactions/overview#preparing-for-interactions). ### Handling slash command requests @@ -302,7 +302,7 @@ if (name === 'test') { } ``` -The code above is responding to the interaction with a message in the channel, DM, or Group DM it originated from. You can see all available response types, like responding with a modal, [in the documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type). +The code above is responding to the interaction with a message in the channel, DM, or Group DM it originated from. You can see all available response types, like responding with a modal, [in the documentation](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type). > info > `InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE` is a constant [exported from `discord-interactions`](https://github.com/discord/discord-interactions-js/blob/main/src/index.ts#L33) @@ -321,7 +321,7 @@ The `/challenge` command will be how our rock-paper-scissors-style game is initi The `/challenge` command, called `CHALLENGE_COMMAND` in `commands.js`, has an array of `options`. In our app, the options are objects representing different things that a user can select while playing rock-paper-scissors, generated using keys of `RPSChoices` in `game.js`. -You can read more about command options and their structure [in the documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure). +You can read more about command options and their structure [in the documentation](/docs/interactions/application-commands#application-command-object-application-command-option-structure). > info > While this guide won't touch much on the `game.js` file, feel free to poke around and change commands or the options in the commands. @@ -380,7 +380,7 @@ The above code is doing a few things: > warn > The sample code uses an object as in-memory storage, but for production apps you should use a database. -When sending a message with [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/what-is-a-component), the individual payloads are appended to a `components` array. Actionable components (like buttons) need to be inside of an [action row](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/action-rows), which you can see in the code sample. +When sending a message with [message components](/docs/interactions/message-components#what-is-a-component), the individual payloads are appended to a `components` array. Actionable components (like buttons) need to be inside of an [action row](/docs/interactions/message-components#action-rows), which you can see in the code sample. Note the unique `custom_id` sent with message components, in this case `accept_button_` with the active game's ID appended to it. A `custom_id` can be used to handle requests that Discord sends you when someone interacts with the component, which you'll see in a moment. @@ -390,7 +390,7 @@ Now when you run the `/challenge` command and pick an option, your app will send -When users interact with a message component, Discord will send a request with an [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) of `3` (or the `MESSAGE_COMPONENT` value when using `discord-interactions`). +When users interact with a message component, Discord will send a request with an [interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) of `3` (or the `MESSAGE_COMPONENT` value when using `discord-interactions`). To set up a handler for the button, we'll check the `type` of interaction, followed by matching the `custom_id`. @@ -441,10 +441,10 @@ if (type === InteractionType.MESSAGE_COMPONENT) { The above code: 1. Checks for a `custom_id` that matches what we originally sent (in this case, it starts with `accept_button_`). The custom ID also has the active game ID appended, so we store that in `gameID`. -2. [Deletes the original message](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/delete-original-interaction-response) calling a webhook using `node-fetch` and passing the unique interaction `token` in the request body. This is done to clean up the channel, and so other users can't click the button. -3. Responds to the request by sending a message that contains a select menu with the object choices for the game. The payload should look fairly similar to the previous one, with the exception of the `options` array and `flags: 64`, [which indicates that the message is ephemeral](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/create-followup-message). +2. [Deletes the original message](/docs/interactions/receiving-and-responding#delete-original-interaction-response) calling a webhook using `node-fetch` and passing the unique interaction `token` in the request body. This is done to clean up the channel, and so other users can't click the button. +3. Responds to the request by sending a message that contains a select menu with the object choices for the game. The payload should look fairly similar to the previous one, with the exception of the `options` array and `flags: 64`, [which indicates that the message is ephemeral](/docs/interactions/receiving-and-responding#create-followup-message). -The `options` array is populated using the `getShuffledOptions()` method in `game.js`, which manipulates the `RPSChoices` values to conform to the shape of [message component options](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-option-structure). +The `options` array is populated using the `getShuffledOptions()` method in `game.js`, which manipulates the `RPSChoices` values to conform to the shape of [message component options](/docs/interactions/message-components#select-menu-object-select-option-structure). @@ -545,7 +545,7 @@ Similar to earlier code, the code above is getting the user ID and their object That information, along with the original user's ID and selection from the `activeGames` object, are passed to the `getResult()` function. `getResult()` determines the winner, then builds a readable string to send back to the channel. -We're also calling another webhook, this time to [update the follow-up ephemeral message](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/edit-followup-message) since it can't be deleted. +We're also calling another webhook, this time to [update the follow-up ephemeral message](/docs/interactions/receiving-and-responding#edit-followup-message) since it can't be deleted. Finally, the results are sent in the channel using the `CHANNEL_MESSAGE_WITH_SOURCE` interaction response type. @@ -562,13 +562,13 @@ Congrats on building your first Discord app! 🤖 Hopefully you learned a bit about Discord apps, how to configure them, and how to make them interactive. From here, you can continue building out your app or explore what else is possible. - + Explore the platform features and APIs you have access to when building an app on Discord - + Explore 1st party and community-built libraries and tools to speed up and simplify your development - + Tutorial on building and handling interactions for apps installed to a user diff --git a/docs/quick-start/overview-of-apps.mdx b/docs/quick-start/overview-of-apps.mdx index e33e9ac92f..2f48202780 100644 --- a/docs/quick-start/overview-of-apps.mdx +++ b/docs/quick-start/overview-of-apps.mdx @@ -10,9 +10,9 @@ Discord apps customize, extend, and enhance Discord for millions of users. Wheth On this page we'll answer the questions: -- [What can apps do?](#DOCS_QUICK_START_OVERVIEW_OF_APPS/what-can-apps-do) -- [Where are apps installed?](#DOCS_QUICK_START_OVERVIEW_OF_APPS/where-are-apps-installed) -- [What APIs can apps use?](#DOCS_QUICK_START_OVERVIEW_OF_APPS/what-apis-can-apps-use) +- [What can apps do?](/docs/quick-start/overview-of-apps#what-can-apps-do) +- [Where are apps installed?](/docs/quick-start/overview-of-apps#where-are-apps-installed) +- [What APIs can apps use?](/docs/quick-start/overview-of-apps#what-apis-can-apps-use) --- @@ -22,27 +22,27 @@ You will discover the full possibility of apps as you explore the documentation ### Send and manage messages -Messages are a core part of Discord, and that's true for apps too. Apps can send messages in a few ways—they can call the **[Create Message endpoint](#DOCS_RESOURCES_MESSAGE/create-message)**, create and execute [webhooks](#DOCS_RESOURCES_WEBHOOK), or respond with a message when responding to an [interaction](#DOCS_INTERACTIONS_OVERVIEW). Apps can also manage messages if they have the proper permissions, which is covered more in the [Message documentation](#DOCS_RESOURCES_MESSAGE). +Messages are a core part of Discord, and that's true for apps too. Apps can send messages in a few ways—they can call the **[Create Message endpoint](/docs/resources/message#create-message)**, create and execute [webhooks](/docs/resources/webhook), or respond with a message when responding to an [interaction](/docs/interactions/overview). Apps can also manage messages if they have the proper permissions, which is covered more in the [Message documentation](/docs/resources/message). ### Interact with users -Apps can use **[interactions](#DOCS_INTERACTIONS_OVERVIEW)** to create more engaging and intuitive experiences for users. When sending messages, apps can send interactive components like [buttons](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/buttons) and [select menus](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus) in the `components` field. Apps can also open form-like modals or launch an Activity [in response to interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-modal). +Apps can use **[interactions](/docs/interactions/overview)** to create more engaging and intuitive experiences for users. When sending messages, apps can send interactive components like [buttons](/docs/interactions/message-components#buttons) and [select menus](/docs/interactions/message-components#select-menus) in the `components` field. Apps can also open form-like modals or launch an Activity [in response to interactions](/docs/interactions/receiving-and-responding#interaction-response-object-modal). ### Build embedded games and experiences -Using the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK), apps can create **[Activities](#DOCS_ACTIVITIES_OVERVIEW)** which are cross-platform interactive games and social experiences in Discord. They run in iframes in Discord, where people who play games are already hanging out. +Using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk), apps can create **[Activities](/docs/activities/overview)** which are cross-platform interactive games and social experiences in Discord. They run in iframes in Discord, where people who play games are already hanging out. ### Customize servers -With the right API endpoints and proper [permissions](#DOCS_TOPICS_PERMISSIONS), apps can customize the experience of using and moderating servers by accessing and customizing all sorts of resources core to Discord—including [users](#DOCS_RESOURCES_USER), [channels](#DOCS_RESOURCES_CHANNEL), and [AutoMod](#DOCS_RESOURCES_AUTO_MODERATION) to name a few. Explore the **Resources** documentation category to learn about the different Discord resources and how apps can use them. +With the right API endpoints and proper [permissions](/docs/topics/permissions), apps can customize the experience of using and moderating servers by accessing and customizing all sorts of resources core to Discord—including [users](/docs/resources/user), [channels](/docs/resources/channel), and [AutoMod](/docs/resorces/auto-moderation) to name a few. Explore the **Resources** documentation category to learn about the different Discord resources and how apps can use them. ### Update user metadata and presence -Apps can update a Discord's user metadata with data from a party game or app in a few ways. Apps can also update a user's profile with actionable data from a game or app by integrating **[Rich Presence](#DOCS_RICH_PRESENCE_OVERVIEW)**. Apps can also use **[role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA)** to associate third-party metadata (like stats or account type) with Discord users, which server admins can use to set up roles based on. You can explore more in the [configuring metadata for linked roles](#DOCS_TUTORIALS_CONFIGURING_APP_METADATA_FOR_LINKED_ROLES) tutorial. +Apps can update a Discord's user metadata with data from a party game or app in a few ways. Apps can also update a user's profile with actionable data from a game or app by integrating **[Rich Presence](/docs/rich-presence/overview)**. Apps can also use **[role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA)** to associate third-party metadata (like stats or account type) with Discord users, which server admins can use to set up roles based on. You can explore more in the [configuring metadata for linked roles](/docs/tutorials/configuring-app-metadata-for-linked-roles) tutorial. ### Add premium features -**[App subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS)** let apps charge users and/or servers for premium functionality on a recurring basis natively within Discord. You can read more about eligibility and adding monetization features to your app in the [Monetization](#DOCS_MONETIZATION_OVERVIEW) documentation. +**[App subscriptions](/docs/monetization/implementing-app-subscriptions)** let apps charge users and/or servers for premium functionality on a recurring basis natively within Discord. You can read more about eligibility and adding monetization features to your app in the [Monetization](/docs/monetization/overview) documentation. ### ...and more @@ -54,35 +54,35 @@ This developer documentation is full of nooks and crannies with all sorts of fea Discord apps can be installed in two different contexts: -1. Apps installed **to a server** (called a [guild](#DOCS_RESOURCES_GUILD) throughout the API) by a user with the Manage Server ([`MANAGE_GUILD`](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags)) permission. Apps installed to a server can only be used within that server and DMs with the app's bot user, and are visible to all server members. +1. Apps installed **to a server** (called a [guild](/docs/resources/guild) throughout the API) by a user with the Manage Server ([`MANAGE_GUILD`](/docs/topics/permissions#permissions-bitwise-permission-flags)) permission. Apps installed to a server can only be used within that server and DMs with the app's bot user, and are visible to all server members. 2. Apps installed **to a user account**. Apps installed to a user are visible *only* to that user, across all of their servers, DMs, and Group DMs by default. -The installation contexts that an app supports can be limited by the developer when [setting up the app](#DOCS_RESOURCES_APPLICATION/setting-supported-installation-contexts). Details about installation contexts are in the [Application resource documentation](#DOCS_RESOURCES_APPLICATION/installation-context). +The installation contexts that an app supports can be limited by the developer when [setting up the app](/docs/resources/application#setting-supported-installation-contexts). Details about installation contexts are in the [Application resource documentation](/docs/resources/application#installation-context). --- ## What APIs can apps use? -There are a handful of different APIs that you can pick and choose from based on your app's functionality and which Discord features you want to access. Below is a quick overview of the main APIs on the Discord developer platform, but you can read more details and information about API usage in the [API reference](#DOCS_REFERENCE). +There are a handful of different APIs that you can pick and choose from based on your app's functionality and which Discord features you want to access. Below is a quick overview of the main APIs on the Discord developer platform, but you can read more details and information about API usage in the [API reference](/docs/reference). ### HTTP API -The **HTTP API** is a REST API that lets you interact and modify core Discord resources like [channels](#DOCS_RESOURCES_CHANNEL), [servers (or guilds)](#DOCS_RESOURCES_GUILD), [users](#DOCS_RESOURCES_USER), and [messages](#DOCS_RESOURCES_MESSAGE/message-object). +The **HTTP API** is a REST API that lets you interact and modify core Discord resources like [channels](/docs/resources/channel), [servers (or guilds)](/docs/resources/guild), [users](/docs/resources/user), and [messages](/docs/resources/message#message-object). Use the HTTP API to: - Retrieve information about a resource - Create, update, or delete a resource -Read details about using the HTTP API in the [API reference](#DOCS_REFERENCE/http-api). +Read details about using the HTTP API in the [API reference](/docs/reference#http-api). ### Gateway API -The **Gateway API** lets you receive event data over a WebSocket anytime an [event](#DOCS_EVENTS_GATEWAY_EVENTS) occurs in a server where your app is installed. +The **Gateway API** lets you receive event data over a WebSocket anytime an [event](/docs/events/gateway-events) occurs in a server where your app is installed. Use the Gateway API to: - Receive events happening in Discord -Read details about using the Gateway API in the [API reference](#DOCS_REFERENCE/gateway-websocket-api). +Read details about using the Gateway API in the [API reference](/docs/reference#gateway-websocket-api). --- @@ -91,13 +91,13 @@ Read details about using the Gateway API in the [API reference](#DOCS_REFERENCE/ Well, would you look at the time? With the basics out of the way, it's time to start building your Discord app! You can explore the reset of the documentation, go to your [Apps](https://discord.com/developers/applications), or explore the beginner resources below. - + Tutorial to develop your first Discord app with interactive components - + Tutorial to develop an Activity using the Embedded App SDK - + Explore community-built library and tools to speed up and simplify development diff --git a/docs/reference.mdx b/docs/reference.mdx index 2d0243a897..547b5803db 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -103,8 +103,8 @@ Starting in API v8, we've improved error formatting in form error responses. The Authenticating with the Discord API can be done in one of two ways: -1. Using a bot token found on the **Bot** page within your app's settings. For more information on bots see [bots vs user accounts](#DOCS_TOPICS_OAUTH2/bot-vs-user-accounts). -2. Using an OAuth2 bearer token gained through the [OAuth2 API](#DOCS_TOPICS_OAUTH2/oauth2). +1. Using a bot token found on the **Bot** page within your app's settings. For more information on bots see [bots vs user accounts](/docs/topics/oauth2#bot-vs-user-accounts). +2. Using an OAuth2 bearer token gained through the [OAuth2 API](/docs/topics/oauth2#oauth2). For all authentication types, authentication is performed with the `Authorization` HTTP header in the format `Authorization: TOKEN_TYPE TOKEN`. @@ -126,7 +126,7 @@ All HTTP-layer services and protocols (e.g. HTTP, WebSocket) within the Discord ## Snowflakes -Discord utilizes Twitter's [snowflake](https://github.com/twitter-archive/snowflake/tree/snowflake-2010) format for uniquely identifiable descriptors (IDs). These IDs are guaranteed to be unique across all of Discord, except in some unique scenarios in which child objects share their parent's ID. Because Snowflake IDs are up to 64 bits in size (e.g. a uint64), they are always returned as strings in the HTTP API to prevent integer overflows in some languages. See [Gateway ETF/JSON](#DOCS_EVENTS_GATEWAY/encoding-and-compression) for more information regarding Gateway encoding. +Discord utilizes Twitter's [snowflake](https://github.com/twitter-archive/snowflake/tree/snowflake-2010) format for uniquely identifiable descriptors (IDs). These IDs are guaranteed to be unique across all of Discord, except in some unique scenarios in which child objects share their parent's ID. Because Snowflake IDs are up to 64 bits in size (e.g. a uint64), they are always returned as strings in the HTTP API to prevent integer overflows in some languages. See [Gateway ETF/JSON](/docs/events/gateway#encoding-and-compression) for more information regarding Gateway encoding. ###### Snowflake ID Broken Down in Binary @@ -241,7 +241,7 @@ Clients using the HTTP API must provide a valid `Content-Type` header, either `a ### Rate Limiting -The HTTP API implements a process for limiting and preventing excessive requests in accordance with [RFC 6585](https://tools.ietf.org/html/rfc6585#section-4). API users that regularly hit and ignore rate limits will have their API keys revoked, and be blocked from the platform. For more information on rate limiting of requests, please see the [Rate Limits](#DOCS_TOPICS_RATE_LIMITS/rate-limits) section. +The HTTP API implements a process for limiting and preventing excessive requests in accordance with [RFC 6585](https://tools.ietf.org/html/rfc6585#section-4). API users that regularly hit and ignore rate limits will have their API keys revoked, and be blocked from the platform. For more information on rate limiting of requests, please see the [Rate Limits](/docs/topics/rate-limits#rate-limits) section. ### Boolean Query Strings @@ -249,7 +249,7 @@ Certain endpoints in the API are documented to accept booleans for their query s ## Gateway (WebSocket) API -Discord's Gateway API is used for maintaining persistent, stateful websocket connections between your client and our servers. These connections are used for sending and receiving real-time events your client can use to track and update local state. The Gateway API uses secure websocket connections as specified in [RFC 6455](https://tools.ietf.org/html/rfc6455). For information on opening Gateway connections, please see the [Gateway API](#DOCS_EVENTS_GATEWAY/connections) section. +Discord's Gateway API is used for maintaining persistent, stateful websocket connections between your client and our servers. These connections are used for sending and receiving real-time events your client can use to track and update local state. The Gateway API uses secure websocket connections as specified in [RFC 6455](https://tools.ietf.org/html/rfc6455). For information on opening Gateway connections, please see the [Gateway API](/docs/events/gateway#connections) section. ## Message Formatting @@ -299,7 +299,7 @@ Guild navigation types link to the corresponding resource in the current server. | Type | Description | |----------------------|-------------------------------------------------------------------------------------------------------| -| customize | _Customize_ tab with the server's [onboarding prompts](#DOCS_RESOURCES_GUILD/guild-onboarding-object) | +| customize | _Customize_ tab with the server's [onboarding prompts](/docs/resources/guild#guild-onboarding-object) | | browse | _Browse Channels_ tab | | guide | [Server Guide](https://support.discord.com/hc/en-us/articles/13497665141655) | | linked-roles | [Linked Roles](https://support.discord.com/hc/en-us/articles/10388356626711) | @@ -313,7 +313,7 @@ Guild navigation types link to the corresponding resource in the current server. https://cdn.discordapp.com/ ``` -Discord uses ids and hashes to render images in the client. These hashes can be retrieved through various API requests, like [Get User](#DOCS_RESOURCES_USER/get-user). Below are the formats, size limitations, and CDN endpoints for images in Discord. The returned format can be changed by changing the [extension name](#DOCS_REFERENCE/image-formatting-image-formats) at the end of the URL. The returned size can be changed by appending a querystring of `?size=desired_size` to the URL. Image size can be any power of two between 16 and 4096. +Discord uses ids and hashes to render images in the client. These hashes can be retrieved through various API requests, like [Get User](/docs/resources/user#get-user). Below are the formats, size limitations, and CDN endpoints for images in Discord. The returned format can be changed by changing the [extension name](/docs/reference#image-formatting-image-formats) at the end of the URL. The returned size can be changed by appending a querystring of `?size=desired_size` to the URL. Image size can be any power of two between 16 and 4096. ###### Image Formats @@ -329,35 +329,35 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Type | Path | Supports | |-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| -| Custom Emoji | emojis/[emoji_id](#DOCS_RESOURCES_EMOJI/emoji-object).png | PNG, JPEG, WebP, GIF | -| Guild Icon | icons/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_icon](#DOCS_RESOURCES_GUILD/guild-object).png \* | PNG, JPEG, WebP, GIF | -| Guild Splash | splashes/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_splash](#DOCS_RESOURCES_GUILD/guild-object).png | PNG, JPEG, WebP | -| Guild Discovery Splash | discovery-splashes/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_discovery_splash](#DOCS_RESOURCES_GUILD/guild-object).png | PNG, JPEG, WebP | -| Guild Banner | banners/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/[guild_banner](#DOCS_RESOURCES_GUILD/guild-object).png \* | PNG, JPEG, WebP, GIF | -| User Banner | banners/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_banner](#DOCS_RESOURCES_USER/user-object).png \* | PNG, JPEG, WebP, GIF | -| Default User Avatar | embed/avatars/[index](#DOCS_RESOURCES_USER/user-object).png \*\* \*\*\* | PNG | -| User Avatar | avatars/[user_id](#DOCS_RESOURCES_USER/user-object)/[user_avatar](#DOCS_RESOURCES_USER/user-object).png \* | PNG, JPEG, WebP, GIF | -| Guild Member Avatar | guilds/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/users/[user_id](#DOCS_RESOURCES_USER/user-object)/avatars/[member_avatar](#DOCS_RESOURCES_GUILD/guild-member-object).png \* | PNG, JPEG, WebP, GIF | -| Avatar Decoration | avatar-decoration-presets/[avatar_decoration_data_asset](#DOCS_RESOURCES_USER/avatar-decoration-data-object).png | PNG | -| Application Icon | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[icon](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP | -| Application Cover | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[cover_image](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP | -| Application Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[asset_id](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-assets).png | PNG, JPEG, WebP | -| Achievement Icon | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/achievements/[achievement_id](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#user-achievement-struct)/icons/[icon_hash](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#user-achievement-struct).png | PNG, JPEG, WebP | -| Store Page Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/store/asset_id | PNG, JPEG, WebP | -| Sticker Pack Banner | app-assets/710982414301790216/store/[sticker_pack_banner_asset_id](#DOCS_RESOURCES_STICKER/sticker-pack-object).png | PNG, JPEG, WebP | -| Team Icon | team-icons/[team_id](#DOCS_TOPICS_TEAMS/data-models-team-object)/[team_icon](#DOCS_TOPICS_TEAMS/data-models-team-object).png | PNG, JPEG, WebP | -| Sticker | stickers/[sticker_id](#DOCS_RESOURCES_STICKER/sticker-object).png \*\*\* \*\*\*\* | PNG, Lottie, GIF | -| Role Icon | role-icons/[role_id](#DOCS_TOPICS_PERMISSIONS/role-object)/[role_icon](#DOCS_TOPICS_PERMISSIONS/role-object).png | PNG, JPEG, WebP | -| Guild Scheduled Event Cover | guild-events/[scheduled_event_id](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object)/[scheduled_event_cover_image](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object).png | PNG, JPEG, WebP | -| Guild Member Banner | guilds/[guild_id](#DOCS_RESOURCES_GUILD/guild-object)/users/[user_id](#DOCS_RESOURCES_USER/user-object)/banners/[member_banner](#DOCS_RESOURCES_GUILD/guild-member-object).png \* | PNG, JPEG, WebP, GIF | +| Custom Emoji | emojis/[emoji_id](/docs/resources/emoji#emoji-object).png | PNG, JPEG, WebP, GIF | +| Guild Icon | icons/[guild_id](/docs/resources/guild#guild-object)/[guild_icon](/docs/resources/guild#guild-object).png \* | PNG, JPEG, WebP, GIF | +| Guild Splash | splashes/[guild_id](/docs/resources/guild#guild-object)/[guild_splash](/docs/resources/guild#guild-object).png | PNG, JPEG, WebP | +| Guild Discovery Splash | discovery-splashes/[guild_id](/docs/resources/guild#guild-object)/[guild_discovery_splash](/docs/resources/guild#guild-object).png | PNG, JPEG, WebP | +| Guild Banner | banners/[guild_id](/docs/resources/guild#guild-object)/[guild_banner](/docs/resources/guild#guild-object).png \* | PNG, JPEG, WebP, GIF | +| User Banner | banners/[user_id](/docs/resources/user#user-object)/[user_banner](/docs/resources/user#user-object).png \* | PNG, JPEG, WebP, GIF | +| Default User Avatar | embed/avatars/[index](/docs/resources/user#user-object).png \*\* \*\*\* | PNG | +| User Avatar | avatars/[user_id](/docs/resources/user#user-object)/[user_avatar](/docs/resources/user#user-object).png \* | PNG, JPEG, WebP, GIF | +| Guild Member Avatar | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/avatars/[member_avatar](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | +| Avatar Decoration | avatar-decoration-presets/[avatar_decoration_data_asset](/docs/resources/user#avatar-decoration-data-object).png | PNG | +| Application Icon | app-icons/[application_id](/docs/resources/application#application-object)/[icon](/docs/resources/application#application-object).png | PNG, JPEG, WebP | +| Application Cover | app-icons/[application_id](/docs/resources/application#application-object)/[cover_image](/docs/resources/application#application-object).png | PNG, JPEG, WebP | +| Application Asset | app-assets/[application_id](/docs/resources/application#application-object)/[asset_id](/docs/events/gateway-events#activity-object-activity-assets).png | PNG, JPEG, WebP | +| Achievement Icon | app-assets/[application_id](/docs/resources/application#application-object)/achievements/[achievement_id](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#user-achievement-struct)/icons/[icon_hash](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Achievements.md#user-achievement-struct).png | PNG, JPEG, WebP | +| Store Page Asset | app-assets/[application_id](/docs/resources/application#application-object)/store/asset_id | PNG, JPEG, WebP | +| Sticker Pack Banner | app-assets/710982414301790216/store/[sticker_pack_banner_asset_id](/docs/resources/sticker#sticker-pack-object).png | PNG, JPEG, WebP | +| Team Icon | team-icons/[team_id](/docs/topics/teams#data-models-team-object)/[team_icon](/docs/topics/teams#data-models-team-object).png | PNG, JPEG, WebP | +| Sticker | stickers/[sticker_id](/docs/resources/sticker#sticker-object).png \*\*\* \*\*\*\* | PNG, Lottie, GIF | +| Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | +| Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object).png | PNG, JPEG, WebP | +| Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. (example: `a_1269e74af4df7417b13759eae50c83dc`) -\*\* In the case of the Default User Avatar endpoint, the value for `index` depends on whether the user is [migrated to the new username system](#DOCS_CHANGE_LOG/unique-usernames-on-discord). For users on the new username system, `index` will be `(user_id >> 22) % 6`. For users on the *legacy* username system, `index` will be `discriminator % 5`. +\*\* In the case of the Default User Avatar endpoint, the value for `index` depends on whether the user is [migrated to the new username system](/docs/change-log#unique-usernames-on-discord). For users on the new username system, `index` will be `(user_id >> 22) % 6`. For users on the *legacy* username system, `index` will be `discriminator % 5`. \*\*\* In the case of the Default User Avatar and Sticker endpoints, the size of images returned is constant with the "size" querystring parameter being ignored. -\*\*\*\* In the case of the Sticker endpoint, the sticker will be available as PNG if its [`format_type`](#DOCS_RESOURCES_STICKER/sticker-object) is `PNG` or `APNG`, GIF if its `format_type` is `GIF`, and as [Lottie](https://airbnb.io/lottie/#/) if its `format_type` is `LOTTIE`. +\*\*\*\* In the case of the Sticker endpoint, the sticker will be available as PNG if its [`format_type`](/docs/resources/sticker#sticker-object) is `PNG` or `APNG`, GIF if its `format_type` is `GIF`, and as [Lottie](https://airbnb.io/lottie/#/) if its `format_type` is `LOTTIE`. > info > Sticker GIFs do not use the CDN base url, and can be accessed at `https://media.discordapp.net/stickers/.gif`. @@ -374,11 +374,11 @@ Ensure you use the proper content type (`image/jpeg`, `image/png`, `image/gif`) ### Signed Attachment CDN URLs -Attachments uploaded to Discord's CDN (like user and bot-uploaded images) have signed URLs with a preset expiry time. Discord automatically refreshes attachment CDN URLs that appear within the client, so when your app receives a payload with a signed URL (like when you [fetch a message](#DOCS_RESOURCES_MESSAGE/get-channel-message)), it will be valid. +Attachments uploaded to Discord's CDN (like user and bot-uploaded images) have signed URLs with a preset expiry time. Discord automatically refreshes attachment CDN URLs that appear within the client, so when your app receives a payload with a signed URL (like when you [fetch a message](/docs/resources/message#get-channel-message)), it will be valid. -When passing CDN URLs into API fields, like [`url` in an embed image object](#DOCS_RESOURCES_MESSAGE/embed-object-embed-image-structure) and [`avatar_url` for webhooks](#DOCS_RESOURCES_WEBHOOK/execute-webhook-jsonform-params), your app can pass the CDN URL without any parameters as the value and Discord will automatically render and refresh the URL. +When passing CDN URLs into API fields, like [`url` in an embed image object](/docs/resources/message#embed-object-embed-image-structure) and [`avatar_url` for webhooks](/docs/resources/webhook#execute-webhook-jsonform-params), your app can pass the CDN URL without any parameters as the value and Discord will automatically render and refresh the URL. -The [standard CDN endpoints](#DOCS_REFERENCE/image-formatting-cdn-endpoints) listed above are not signed, so they will not expire. +The [standard CDN endpoints](/docs/reference#image-formatting-cdn-endpoints) listed above are not signed, so they will not expire. ###### Example Attachment CDN URL @@ -397,11 +397,11 @@ https://cdn.discordapp.com/attachments/1012345678900020080/1234567891233211234/m ## Uploading Files > info -> The file upload size limit applies to each file in a request. The default limit is `10 MiB` for all users, but may be higher for users depending on their [Nitro](https://support.discord.com/hc/en-us/articles/115000435108-What-are-Nitro-Nitro-Basic) status or by the server's [Boost Tier](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-FAQ-#h_419c3bd5-addd-4989-b7cf-c7957ef92583). The `attachment_size_limit` value provided [when working with interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-structure) is calculated as the maximum of these values. +> The file upload size limit applies to each file in a request. The default limit is `10 MiB` for all users, but may be higher for users depending on their [Nitro](https://support.discord.com/hc/en-us/articles/115000435108-What-are-Nitro-Nitro-Basic) status or by the server's [Boost Tier](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-FAQ-#h_419c3bd5-addd-4989-b7cf-c7957ef92583). The `attachment_size_limit` value provided [when working with interactions](/docs/interactions/receiving-and-responding#interaction-object-interaction-structure) is calculated as the maximum of these values. Some endpoints support file attachments, indicated by the `files[n]` parameter. To add file(s), the standard `application/json` body must be replaced by a `multipart/form-data` body. The JSON message body can optionally be provided using the `payload_json` parameter. -All `files[n]` parameters must include a valid `Content-Disposition` subpart header with a `filename` and unique `name` parameter. Each file parameter must be uniquely named in the format `files[n]` such as `files[0]`, `files[1]`, or `files[42]`. The suffixed index `n` is the *snowflake placeholder* that can be used in the `attachments` field, which can be passed to the `payload_json` parameter (or [Callback Data Payloads](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-data-structure)). +All `files[n]` parameters must include a valid `Content-Disposition` subpart header with a `filename` and unique `name` parameter. Each file parameter must be uniquely named in the format `files[n]` such as `files[0]`, `files[1]`, or `files[42]`. The suffixed index `n` is the *snowflake placeholder* that can be used in the `attachments` field, which can be passed to the `payload_json` parameter (or [Callback Data Payloads](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure)). Images can also be referenced in embeds using the `attachment://filename` URL. The `filename` for these URLs must be ASCII alphanumeric with underscores, dashes, or dots. An example payload is provided below. diff --git a/docs/resources/application-role-connection-metadata.md b/docs/resources/application-role-connection-metadata.md index 6403b37877..e5e274b022 100644 --- a/docs/resources/application-role-connection-metadata.md +++ b/docs/resources/application-role-connection-metadata.md @@ -1,12 +1,12 @@ # Application Role Connection Metadata -A representation of role connection metadata for an [application](#DOCS_RESOURCES_APPLICATION/). +A representation of role connection metadata for an [application](/docs/resources/application#). -When a guild has added a bot and that bot has configured its [`role_connections_verification_url`](#DOCS_RESOURCES_APPLICATION/application-object) (in the developer portal), the application will render as a potential verification method in the guild's role verification configuration. +When a guild has added a bot and that bot has configured its [`role_connections_verification_url`](/docs/resources/application#application-object) (in the developer portal), the application will render as a potential verification method in the guild's role verification configuration. If an application has configured role connection metadata, its metadata will appear in the role verification configuration when the application has been added as a verification method to the role. -When a user connects their account using the bot's [`role_connections_verification_url`](#DOCS_RESOURCES_APPLICATION/application-object), the bot will [update a user's role connection with metadata](#DOCS_RESOURCES_USER/update-current-user-application-role-connection) using the OAuth2 `role_connections.write` scope. +When a user connects their account using the bot's [`role_connections_verification_url`](/docs/resources/application#application-object), the bot will [update a user's role connection with metadata](/docs/resources/user#update-current-user-application-role-connection) using the OAuth2 `role_connections.write` scope. ### Application Role Connection Metadata Object @@ -14,12 +14,12 @@ When a user connects their account using the bot's [`role_connections_verificati | Field | Type | Description | |----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| -| type | [ApplicationRoleConnectionMetadataType](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object-application-role-connection-metadata-type) | type of metadata value | +| type | [ApplicationRoleConnectionMetadataType](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object-application-role-connection-metadata-type) | type of metadata value | | key | string | dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters) | | name | string | name of the metadata field (1-100 characters) | -| name_localizations? | dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | translations of the name | +| name_localizations? | dictionary with keys in [available locales](/docs/reference#locales) | translations of the name | | description | string | description of the metadata field (1-200 characters) | -| description_localizations? | dictionary with keys in [available locales](#DOCS_REFERENCE/locales) | translations of the description | +| description_localizations? | dictionary with keys in [available locales](/docs/reference#locales) | translations of the description | ###### Application Role Connection Metadata Type @@ -37,13 +37,13 @@ When a user connects their account using the bot's [`role_connections_verificati > info > Each metadata type offers a comparison operation that allows guilds to configure role requirements based on metadata values stored by the bot. Bots specify a `metadata value` for each user and guilds specify the required `guild's configured value` within the guild role settings. -## Get Application Role Connection Metadata Records % GET /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/role-connections/metadata +## Get Application Role Connection Metadata Records % GET /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata -Returns a list of [application role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) objects for the given application. +Returns a list of [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) objects for the given application. -## Update Application Role Connection Metadata Records % PUT /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/role-connections/metadata +## Update Application Role Connection Metadata Records % PUT /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata -Updates and returns a list of [application role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) objects for the given application. +Updates and returns a list of [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) objects for the given application. > info > An application can have a maximum of 5 metadata records. diff --git a/docs/resources/application.md b/docs/resources/application.md index c7a765b383..349206ad7a 100644 --- a/docs/resources/application.md +++ b/docs/resources/application.md @@ -4,7 +4,7 @@ sidebar_label: Application # Application Resource -[Applications](#DOCS_QUICK_START_OVERVIEW_OF_APPS) (or "apps") are containers for developer platform features, and can be installed to Discord servers and/or user accounts. +[Applications](/docs/quick-start/overview-of-apps) (or "apps") are containers for developer platform features, and can be installed to Discord servers and/or user accounts. ### Application Object @@ -14,34 +14,34 @@ sidebar_label: Application |------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the app | | name | string | Name of the app | -| icon | ?string | [Icon hash](#DOCS_REFERENCE/image-formatting) of the app | +| icon | ?string | [Icon hash](/docs/reference#image-formatting) of the app | | description | string | Description of the app | | rpc_origins? | array of strings | List of RPC origin URLs, if RPC is enabled | | bot_public | boolean | When `false`, only the app owner can add the app to guilds | | bot_require_code_grant | boolean | When `true`, the app's bot will only join upon completion of the full OAuth2 code grant flow | -| bot? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the bot user associated with the app | +| bot? | partial [user](/docs/resources/user#user-object) object | Partial user object for the bot user associated with the app | | terms_of_service_url? | string | URL of the app's Terms of Service | | privacy_policy_url? | string | URL of the app's Privacy Policy | -| owner? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the owner of the app | +| owner? | partial [user](/docs/resources/user#user-object) object | Partial user object for the owner of the app | | verify_key | string | Hex encoded key for verification in interactions and the GameSDK's [GetTicket](https://github.com/discord/discord-api-docs/blob/legacy-gamesdk/docs/game_sdk/Applications.md#getticket) | -| team | ?[team](#DOCS_TOPICS_TEAMS/data-models-team-object) object | If the app belongs to a team, this will be a list of the members of that team | +| team | ?[team](/docs/topics/teams#data-models-team-object) object | If the app belongs to a team, this will be a list of the members of that team | | guild_id? | snowflake | Guild associated with the app. For example, a developer support server. | -| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | Partial object of the associated guild | +| guild? | partial [guild](/docs/resources/guild#guild-object) object | Partial object of the associated guild | | primary_sku_id? | snowflake | If this app is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists | | slug? | string | If this app is a game sold on Discord, this field will be the URL slug that links to the store page | -| cover_image? | string | App's default rich presence invite [cover image hash](#DOCS_REFERENCE/image-formatting) | -| flags? | integer | App's public [flags](#DOCS_RESOURCES_APPLICATION/application-object-application-flags) | +| cover_image? | string | App's default rich presence invite [cover image hash](/docs/reference#image-formatting) | +| flags? | integer | App's public [flags](/docs/resources/application#application-object-application-flags) | | approximate_guild_count? | integer | Approximate count of guilds the app has been added to | | approximate_user_install_count? | integer | Approximate count of users that have installed the app | | redirect_uris? | array of strings | Array of redirect URIs for the app | -| interactions_endpoint_url? | ?string | [Interactions endpoint URL](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) for the app | +| interactions_endpoint_url? | ?string | [Interactions endpoint URL](/docs/interactions/receiving-and-responding#receiving-an-interaction) for the app | | role_connections_verification_url? | ?string | Role connection verification URL for the app | -| event_webhooks_url? | ?string | [Event webhooks URL](#DOCS_EVENTS_WEBHOOK_EVENTS/preparing-for-events) for the app to receive webhook events | -| event_webhooks_status | [application event webhook status](#DOCS_RESOURCES_APPLICATION/application-object-application-event-webhook-status) | If [webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS) are enabled for the app. `1` (default) means disabled, `2` means enabled, and `3` means disabled by Discord | -| event_webhooks_types? | array of strings | List of [Webhook event types](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) the app subscribes to | +| event_webhooks_url? | ?string | [Event webhooks URL](/docs/events/webhook-events#preparing-for-events) for the app to receive webhook events | +| event_webhooks_status | [application event webhook status](/docs/resources/application#application-object-application-event-webhook-status) | If [webhook events](/docs/events/webhook-events) are enabled for the app. `1` (default) means disabled, `2` means enabled, and `3` means disabled by Discord | +| event_webhooks_types? | array of strings | List of [Webhook event types](/docs/events/webhook-events#event-types) the app subscribes to | | tags? | array of strings | List of tags describing the content and functionality of the app. Max of 5 tags. | -| install_params? | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled | -| integration_types_config? | dictionary with keys of [application integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | Default scopes and permissions for each supported installation context. Value for each key is an [integration type configuration object](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-type-configuration-object) | +| install_params? | [install params](/docs/resources/application#install-params-object) object | Settings for the app's default in-app authorization link, if enabled | +| integration_types_config? | dictionary with keys of [application integration types](/docs/resources/application#application-object-application-integration-types) | Default scopes and permissions for each supported installation context. Value for each key is an [integration type configuration object](/docs/resources/application#application-object-application-integration-type-configuration-object) | | custom_install_url? | string | Default custom authorization URL for the app, if enabled | ###### Example Application Object @@ -111,7 +111,7 @@ sidebar_label: Application ###### Application Integration Types -Where an app can be installed, also called its supported [installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context). +Where an app can be installed, also called its supported [installation contexts](/docs/resources/application#installation-context). | Type | ID | Description | |-----------------|----|-------------------------------| @@ -122,7 +122,7 @@ Where an app can be installed, also called its supported [installation contexts] | Field | Type | Description | |------------------------|----------------------------------------------------------------------------|----------------------------------------------------------------------------------| -| oauth2_install_params? | [install params object](#DOCS_RESOURCES_APPLICATION/install-params-object) | Install params for each installation context's default in-app authorization link | +| oauth2_install_params? | [install params object](/docs/resources/application#install-params-object) | Install params for each installation context's default in-app authorization link | ###### Application Event Webhook Status @@ -138,16 +138,16 @@ Status indicating whether event webhooks are enabled or disabled for an applicat | Value | Name | Description | |-----------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `1 << 6` | APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE | Indicates if an app uses the [Auto Moderation API](#DOCS_RESOURCES_AUTO_MODERATION) | -| `1 << 12` | GATEWAY_PRESENCE | Intent required for bots in **100 or more servers** to receive [`presence_update` events](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update) | -| `1 << 13` | GATEWAY_PRESENCE_LIMITED | Intent required for bots in under 100 servers to receive [`presence_update` events](#DOCS_EVENTS_GATEWAY_EVENTS/presence-update), found on the **Bot** page in your app's settings | -| `1 << 14` | GATEWAY_GUILD_MEMBERS | Intent required for bots in **100 or more servers** to receive member-related events like `guild_member_add`. See the list of member-related events [under `GUILD_MEMBERS`](#DOCS_EVENTS_GATEWAY/list-of-intents) | -| `1 << 15` | GATEWAY_GUILD_MEMBERS_LIMITED | Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found on the **Bot** page in your app's settings. See the list of member-related events [under `GUILD_MEMBERS`](#DOCS_EVENTS_GATEWAY/list-of-intents) | +| `1 << 6` | APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE | Indicates if an app uses the [Auto Moderation API](/docs/resorces/auto-moderation) | +| `1 << 12` | GATEWAY_PRESENCE | Intent required for bots in **100 or more servers** to receive [`presence_update` events](/docs/events/gateway-events#presence-update) | +| `1 << 13` | GATEWAY_PRESENCE_LIMITED | Intent required for bots in under 100 servers to receive [`presence_update` events](/docs/events/gateway-events#presence-update), found on the **Bot** page in your app's settings | +| `1 << 14` | GATEWAY_GUILD_MEMBERS | Intent required for bots in **100 or more servers** to receive member-related events like `guild_member_add`. See the list of member-related events [under `GUILD_MEMBERS`](/docs/events/gateway#list-of-intents) | +| `1 << 15` | GATEWAY_GUILD_MEMBERS_LIMITED | Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found on the **Bot** page in your app's settings. See the list of member-related events [under `GUILD_MEMBERS`](/docs/events/gateway#list-of-intents) | | `1 << 16` | VERIFICATION_PENDING_GUILD_LIMIT | Indicates unusual growth of an app that prevents verification | | `1 << 17` | EMBEDDED | Indicates if an app is embedded within the Discord client (currently unavailable publicly) | | `1 << 18` | GATEWAY_MESSAGE_CONTENT | Intent required for bots in **100 or more servers** to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055) | | `1 << 19` | GATEWAY_MESSAGE_CONTENT_LIMITED | Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055), found on the **Bot** page in your app's settings | -| `1 << 23` | APPLICATION_COMMAND_BADGE | Indicates if an app has registered global [application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) | +| `1 << 23` | APPLICATION_COMMAND_BADGE | Indicates if an app has registered global [application commands](/docs/interactions/application-commands) | ### Install Params Object @@ -155,8 +155,8 @@ Status indicating whether event webhooks are enabled or disabled for an applicat | Field | Type | Description | |-------------|------------------|--------------------------------------------------------------------------------------------------------| -| scopes | array of strings | [Scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) to add the application to the server with | -| permissions | string | [Permissions](#DOCS_TOPICS_PERMISSIONS) to request for the bot role | +| scopes | array of strings | [Scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) to add the application to the server with | +| permissions | string | [Permissions](/docs/topics/permissions) to request for the bot role | ## Installation Context @@ -166,15 +166,15 @@ The installation context affects how your app can be seen and used within Discor #### Server Context -Apps installed in a server context (server-installed apps) must be authorized by a server member with the [`MANAGE_GUILD`](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) permission. Server-installed apps are *visible* to all members of the server, but other factors (like [command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions)) determine where and when specific members can interact with the app. +Apps installed in a server context (server-installed apps) must be authorized by a server member with the [`MANAGE_GUILD`](/docs/topics/permissions#permissions-bitwise-permission-flags) permission. Server-installed apps are *visible* to all members of the server, but other factors (like [command permissions](/docs/interactions/application-commands#permissions)) determine where and when specific members can interact with the app. -During installation, server-installed apps are authorized with a specific set of [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) and [bot user permissions](#DOCS_TOPICS_PERMISSIONS) that determine what resources and data the app can access in that server. +During installation, server-installed apps are authorized with a specific set of [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) and [bot user permissions](/docs/topics/permissions) that determine what resources and data the app can access in that server. #### User Context Apps installed in a user context (user-installed apps) are visible *only* to the authorizing user, and therefore don't require any server-specific permissions. -Apps that support the user installation context are visible across all of an authorizing user's servers, DMs, and GDMs, but are forced to respect the user's permissions in the surface where the app is being used. For example, if a user invokes a command for a user-installed app from a server's channel where they don't have permission to send messages, the app won't be able to [respond to an interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-interaction-callback-type) with a non-ephemeral message. Details about how the installation context of a command affects interactions is in the [interaction context](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) documentation. +Apps that support the user installation context are visible across all of an authorizing user's servers, DMs, and GDMs, but are forced to respect the user's permissions in the surface where the app is being used. For example, if a user invokes a command for a user-installed app from a server's channel where they don't have permission to send messages, the app won't be able to [respond to an interaction](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) with a non-ephemeral message. Details about how the installation context of a command affects interactions is in the [interaction context](/docs/interactions/application-commands#interaction-contexts) documentation. ### Setting Supported Installation Contexts @@ -183,7 +183,7 @@ By default, newly-created apps only support installation to guilds. You can update which installation contexts your app supports in your [app's settings](https://discord.com/developers/applications). On the **Installation** page under the **Installation Contexts** section, you can select the installation contexts your app supports. > info -> If you update your app to support a new installation context, you will need to update your existing [commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts) if you want them to be supported in the new context. Details are in the [Application Command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts) documentation. +> If you update your app to support a new installation context, you will need to update your existing [commands](/docs/interactions/application-commands#contexts) if you want them to be supported in the new context. Details are in the [Application Command](/docs/interactions/application-commands#contexts) documentation. ## Install Links @@ -194,11 +194,11 @@ Install links provide an easy way for users to install your app in Discord. If y There are three options when configuring an install link for your app: "Discord Provided Link", "Custom URL", and "None". If you don't configure an install link (by selecting "None"), the "Add App" button will not appear for your app, and your app will not be eligible for the App Directory. > info -> Note that install links are distinct from OAuth2 flows like the [authorization code grant](#DOCS_TOPICS_OAUTH2/authorization-code-grant), which may additionally be required if you need to request user-specific [scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) like `identify` or `role_connections.write`. +> Note that install links are distinct from OAuth2 flows like the [authorization code grant](/docs/topics/oauth2#authorization-code-grant), which may additionally be required if you need to request user-specific [scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) like `identify` or `role_connections.write`. #### Discord Provided Link -The default Discord Provided Link is a short link that guides users through the installation flow with your app's [configured installation contexts](#DOCS_RESOURCES_APPLICATION/setting-supported-installation-contexts). If your app has both **User Install** and **Guild Install** enabled, the user can choose which way to install your app. +The default Discord Provided Link is a short link that guides users through the installation flow with your app's [configured installation contexts](/docs/resources/application#setting-supported-installation-contexts). If your app has both **User Install** and **Guild Install** enabled, the user can choose which way to install your app. Discord Provided Links don't have scopes or bot user permissions defined in the URL. For example: @@ -215,7 +215,7 @@ Instead, these links will prompt the user for the scopes and bot user permission A Custom URL is an alternative to the Discord Provided Link that gives you more control of where users are directed when they click "Add App" on your app's profile or App Directory page. -A Custom URL doesn't have strict limitations, but is commonly an [OAuth2 `/authorize` URL](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-urls) that has defined scopes, permissions, and an installation context (`integration_type`). +A Custom URL doesn't have strict limitations, but is commonly an [OAuth2 `/authorize` URL](/docs/topics/oauth2#shared-resources-oauth2-urls) that has defined scopes, permissions, and an installation context (`integration_type`). ### Configuring an Install Link and Default Install Settings @@ -225,11 +225,11 @@ The Default Install Settings will appear on the **Installation** page when you h ## Get Current Application % GET /applications/@me -Returns the [application](#DOCS_RESOURCES_APPLICATION/application-object) object associated with the requesting bot user. +Returns the [application](/docs/resources/application#application-object) object associated with the requesting bot user. ## Edit Current Application % PATCH /applications/@me -Edit properties of the app associated with the requesting bot user. Only properties that are passed will be updated. Returns the updated [application](#DOCS_RESOURCES_APPLICATION/application-object) object on success. +Edit properties of the app associated with the requesting bot user. Only properties that are passed will be updated. Returns the updated [application](/docs/resources/application#application-object) object on success. > info > All parameters to this endpoint are optional @@ -241,24 +241,24 @@ Edit properties of the app associated with the requesting bot user. Only propert | custom_install_url | string | Default custom authorization URL for the app, if enabled | | description | string | Description of the app | | role_connections_verification_url | string | Role connection verification URL for the app | -| install_params | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled | -| integration_types_config | dictionary with keys of [application integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | Default scopes and permissions for each supported installation context. Value for each key is an [integration type configuration object](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-type-configuration-object) | -| flags \* | integer | App's public [flags](#DOCS_RESOURCES_APPLICATION/application-object-application-flags) | -| icon | ?[image data](#DOCS_REFERENCE/image-data) | Icon for the app | -| cover_image | ?[image data](#DOCS_REFERENCE/image-data) | Default rich presence invite cover image for the app | -| interactions_endpoint_url \*\* | string | [Interactions endpoint URL](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) for the app | +| install_params | [install params](/docs/resources/application#install-params-object) object | Settings for the app's default in-app authorization link, if enabled | +| integration_types_config | dictionary with keys of [application integration types](/docs/resources/application#application-object-application-integration-types) | Default scopes and permissions for each supported installation context. Value for each key is an [integration type configuration object](/docs/resources/application#application-object-application-integration-type-configuration-object) | +| flags \* | integer | App's public [flags](/docs/resources/application#application-object-application-flags) | +| icon | ?[image data](/docs/reference#image-data) | Icon for the app | +| cover_image | ?[image data](/docs/reference#image-data) | Default rich presence invite cover image for the app | +| interactions_endpoint_url \*\* | string | [Interactions endpoint URL](/docs/interactions/receiving-and-responding#receiving-an-interaction) for the app | | tags | array of strings | List of tags describing the content and functionality of the app (max of 20 characters per tag). Max of 5 tags. | -| event_webhooks_url | string | [Event webhooks URL](#DOCS_EVENTS_WEBHOOK_EVENTS/preparing-for-events) for the app to receive webhook events | -| event_webhooks_status | [application event webhook status](#DOCS_RESOURCES_APPLICATION/application-object-application-event-webhook-status) | If [webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS) are enabled for the app. `1` to disable, and `2` to enable | -| event_webhooks_types | array of strings | List of [Webhook event types](#DOCS_EVENTS_WEBHOOK_EVENTS/event-types) to subscribe to | +| event_webhooks_url | string | [Event webhooks URL](/docs/events/webhook-events#preparing-for-events) for the app to receive webhook events | +| event_webhooks_status | [application event webhook status](/docs/resources/application#application-object-application-event-webhook-status) | If [webhook events](/docs/events/webhook-events) are enabled for the app. `1` to disable, and `2` to enable | +| event_webhooks_types | array of strings | List of [Webhook event types](/docs/events/webhook-events#event-types) to subscribe to | \* Only limited intent flags (`GATEWAY_PRESENCE_LIMITED`, `GATEWAY_GUILD_MEMBERS_LIMITED`, and `GATEWAY_MESSAGE_CONTENT_LIMITED`) can be updated via the API. -\*\* To update an Interactions endpoint URL via the API, the URL must be valid according to the [Receiving an Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) documentation. +\*\* To update an Interactions endpoint URL via the API, the URL must be valid according to the [Receiving an Interaction](/docs/interactions/receiving-and-responding#receiving-an-interaction) documentation. -## Get Application Activity Instance % GET /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/activity-instances/{instance_id} +## Get Application Activity Instance % GET /applications/{application.id/docs/resources/application#application-object}/activity-instances/{instance_id} -Returns a serialized activity instance, if it exists. Useful for [preventing unwanted activity sessions](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/preventing-unwanted-activity-sessions). +Returns a serialized activity instance, if it exists. Useful for [preventing unwanted activity sessions](/docs/activities/development-guides#preventing-unwanted-activity-sessions). ###### Example Activity Instance @@ -282,11 +282,11 @@ Returns a serialized activity instance, if it exists. Useful for [preventing unw | Field | Type | Description | |----------------|-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| -| application_id | snowflake | [Application](#DOCS_RESOURCES_APPLICATION/application-object) ID | -| instance_id | string | Activity [Instance](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/activity-instance-management) ID | +| application_id | snowflake | [Application](/docs/resources/application#application-object) ID | +| instance_id | string | Activity [Instance](/docs/activities/development-guides#activity-instance-management) ID | | launch_id | snowflake | Unique identifier for the launch | -| location | [Activity Location](#DOCS_RESOURCES_APPLICATION/get-application-activity-instance-activity-location-object) | Location the instance is running in | -| users | array of snowflakes, [user](#DOCS_RESOURCES_USER/user-object) IDs | IDs of the Users currently connected to the instance | +| location | [Activity Location](/docs/resources/application#get-application-activity-instance-activity-location-object) | Location the instance is running in | +| users | array of snowflakes, [user](/docs/resources/user#user-object) IDs | IDs of the Users currently connected to the instance | @@ -297,9 +297,9 @@ The Activity Location is an object that describes the location in which an activ | Field | Type | Description | |------------|--------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------| | id | string | Unique identifier for the location | -| kind | [Activity Location Kind Enum](#DOCS_RESOURCES_APPLICATION/get-application-activity-instance-activity-location-kind-enum) | Enum describing kind of location | -| channel_id | snowflake | ID of the [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) | -| guild_id? | ?snowflake | ID of the [Guild](#DOCS_RESOURCES_GUILD/guild-object) | +| kind | [Activity Location Kind Enum](/docs/resources/application#get-application-activity-instance-activity-location-kind-enum) | Enum describing kind of location | +| channel_id | snowflake | ID of the [Channel](/docs/resources/channel#channel-object) | +| guild_id? | ?snowflake | ID of the [Guild](/docs/resources/guild#guild-object) | ###### Activity Location Kind Enum diff --git a/docs/resources/audit-log.md b/docs/resources/audit-log.md index 832b0c7ee9..7877baaf33 100644 --- a/docs/resources/audit-log.md +++ b/docs/resources/audit-log.md @@ -6,9 +6,9 @@ sidebar_label: Audit Log ## Audit Logs -When an administrative action is performed in a guild, an entry is added to its audit log. Viewing audit logs requires the `VIEW_AUDIT_LOG` permission and can be fetched by apps using the [`GET /guilds/{guild.id}/audit-logs` endpoint](#DOCS_RESOURCES_AUDIT_LOG/get-guild-audit-log), or seen by users in the guild's **Server Settings**. All audit log entries are stored for 45 days. +When an administrative action is performed in a guild, an entry is added to its audit log. Viewing audit logs requires the `VIEW_AUDIT_LOG` permission and can be fetched by apps using the [`GET /guilds/{guild.id}/audit-logs` endpoint](/docs/resources/audit-log#get-guild-audit-log), or seen by users in the guild's **Server Settings**. All audit log entries are stored for 45 days. -When an app is performing an eligible action using the APIs, it can pass an `X-Audit-Log-Reason` header to indicate why the action was taken. More information is in the [audit log entry](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object) section. +When an app is performing an eligible action using the APIs, it can pass an `X-Audit-Log-Reason` header to indicate why the action was taken. More information is in the [audit log entry](/docs/resources/audit-log#audit-log-entry-object) section. ### Audit Log Object @@ -16,14 +16,14 @@ When an app is performing an eligible action using the APIs, it can pass an `X-A | Field | Type | Description | |------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------| -| application_commands | array of [application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object) objects | List of application commands referenced in the audit log | -| audit_log_entries | array of [audit log entry](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object) objects | List of audit log entries, sorted from most to least recent | -| auto_moderation_rules | array of [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) objects | List of auto moderation rules referenced in the audit log | -| guild_scheduled_events | array of [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) objects | List of guild scheduled events referenced in the audit log | -| integrations | array of partial [integration](#DOCS_RESOURCES_GUILD/integration-object) objects | List of partial integration objects | -| threads | array of thread-specific [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | List of threads referenced in the audit log\* | -| users | array of [user](#DOCS_RESOURCES_USER/user-object) objects | List of users referenced in the audit log | -| webhooks | array of [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) objects | List of webhooks referenced in the audit log | +| application_commands | array of [application commands](/docs/interactions/application-commands#application-command-object) objects | List of application commands referenced in the audit log | +| audit_log_entries | array of [audit log entry](/docs/resources/audit-log#audit-log-entry-object) objects | List of audit log entries, sorted from most to least recent | +| auto_moderation_rules | array of [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) objects | List of auto moderation rules referenced in the audit log | +| guild_scheduled_events | array of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) objects | List of guild scheduled events referenced in the audit log | +| integrations | array of partial [integration](/docs/resources/guild#integration-object) objects | List of partial integration objects | +| threads | array of thread-specific [channel](/docs/resources/channel#channel-object) objects | List of threads referenced in the audit log\* | +| users | array of [user](/docs/resources/user#user-object) objects | List of users referenced in the audit log | +| webhooks | array of [webhook](/docs/resources/webhook#webhook-object) objects | List of webhooks referenced in the audit log | \* Threads referenced in `THREAD_CREATE` and `THREAD_UPDATE` events are included in the threads map since archived threads might not be kept in memory by clients. @@ -44,9 +44,9 @@ When an app is performing an eligible action using the APIs, it can pass an `X-A ### Audit Log Entry Object -Each audit log entry represents a single administrative action (or [event](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-audit-log-events)), indicated by `action_type`. Most entries contain one to many changes in the `changes` array that affected an entity in Discord—whether that's a user, channel, guild, emoji, or something else. +Each audit log entry represents a single administrative action (or [event](/docs/resources/audit-log#audit-log-entry-object-audit-log-events)), indicated by `action_type`. Most entries contain one to many changes in the `changes` array that affected an entity in Discord—whether that's a user, channel, guild, emoji, or something else. -The information (and structure) of an entry's changes will be different depending on its type. For example, in `MEMBER_ROLE_UPDATE` events there is only one change: a member is either added or removed from a specific role. However, in `CHANNEL_CREATE` events there are many changes, including (but not limited to) the channel's name, type, and permission overwrites added. More details are in the [change object](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object) section. +The information (and structure) of an entry's changes will be different depending on its type. For example, in `MEMBER_ROLE_UPDATE` events there is only one change: a member is either added or removed from a specific role. However, in `CHANNEL_CREATE` events there are many changes, including (but not limited to) the channel's name, type, and permission overwrites added. More details are in the [change object](/docs/resources/audit-log#audit-log-change-object) section. Apps can specify why an administrative action is being taken by passing an `X-Audit-Log-Reason` request header, which will be stored as the audit log entry's `reason` field. The `X-Audit-Log-Reason` header supports 1-512 URL-encoded UTF-8 characters. Reasons are visible to users in the client and to apps when fetching audit log entries with the API. @@ -55,15 +55,15 @@ Apps can specify why an administrative action is being taken by passing an `X-Au | Field | Type | Description | |-------------|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------| | target_id | ?string | ID of the affected entity (webhook, user, role, etc.) | -| changes? | array of [audit log change](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object) objects | Changes made to the target_id | +| changes? | array of [audit log change](/docs/resources/audit-log#audit-log-change-object) objects | Changes made to the target_id | | user_id | ?snowflake | User or app that made the changes | | id | snowflake | ID of the entry | -| action_type | [audit log event](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-audit-log-events) | Type of action that occurred | -| options? | [optional audit entry info](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-optional-audit-entry-info) | Additional info for certain event types | +| action_type | [audit log event](/docs/resources/audit-log#audit-log-entry-object-audit-log-events) | Type of action that occurred | +| options? | [optional audit entry info](/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info) | Additional info for certain event types | | reason? | string | Reason for the change (1-512 characters) | > warn -> For `APPLICATION_COMMAND_PERMISSION_UPDATE` events, the `target_id` is the command ID or the app ID since the `changes` array represents the entire `permissions` property on the [guild permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-guild-application-command-permissions-structure) object. +> For `APPLICATION_COMMAND_PERMISSION_UPDATE` events, the `target_id` is the command ID or the app ID since the `changes` array represents the entire `permissions` property on the [guild permissions](/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure) object. ###### Audit Log Events @@ -71,82 +71,82 @@ The table below lists audit log events and values (the `action_type` field) that The **Object Changed** column notes which object's values may be included in the entry. Though there are exceptions, possible keys in the `changes` array typically correspond to the object's fields. The descriptions and types for those fields can be found in the linked documentation for the object. -If no object is noted, there won't be a `changes` array in the entry, though other fields like the `target_id` still exist and many have fields in the [`options` object](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-optional-audit-entry-info). +If no object is noted, there won't be a `changes` array in the entry, though other fields like the `target_id` still exist and many have fields in the [`options` object](/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info). > info > You should assume that your app may run into any field for the changed object, though none are guaranteed to be present. In most cases only a subset of the object's fields will be in the `changes` array. | Event | Value | Description | Object Changed | |---------------------------------------------|-------|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| GUILD_UPDATE | 1 | Server settings were updated | [Guild](#DOCS_RESOURCES_GUILD/guild-object) | -| CHANNEL_CREATE | 10 | Channel was created | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) | -| CHANNEL_UPDATE | 11 | Channel settings were updated | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) | -| CHANNEL_DELETE | 12 | Channel was deleted | [Channel](#DOCS_RESOURCES_CHANNEL/channel-object) | -| CHANNEL_OVERWRITE_CREATE | 13 | Permission overwrite was added to a channel | [Channel Overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) | -| CHANNEL_OVERWRITE_UPDATE | 14 | Permission overwrite was updated for a channel | [Channel Overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) | -| CHANNEL_OVERWRITE_DELETE | 15 | Permission overwrite was deleted from a channel | [Channel Overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) | +| GUILD_UPDATE | 1 | Server settings were updated | [Guild](/docs/resources/guild#guild-object) | +| CHANNEL_CREATE | 10 | Channel was created | [Channel](/docs/resources/channel#channel-object) | +| CHANNEL_UPDATE | 11 | Channel settings were updated | [Channel](/docs/resources/channel#channel-object) | +| CHANNEL_DELETE | 12 | Channel was deleted | [Channel](/docs/resources/channel#channel-object) | +| CHANNEL_OVERWRITE_CREATE | 13 | Permission overwrite was added to a channel | [Channel Overwrite](/docs/resources/channel#overwrite-object) | +| CHANNEL_OVERWRITE_UPDATE | 14 | Permission overwrite was updated for a channel | [Channel Overwrite](/docs/resources/channel#overwrite-object) | +| CHANNEL_OVERWRITE_DELETE | 15 | Permission overwrite was deleted from a channel | [Channel Overwrite](/docs/resources/channel#overwrite-object) | | MEMBER_KICK | 20 | Member was removed from server | | | MEMBER_PRUNE | 21 | Members were pruned from server | | | MEMBER_BAN_ADD | 22 | Member was banned from server | | | MEMBER_BAN_REMOVE | 23 | Server ban was lifted for a member | | -| MEMBER_UPDATE | 24 | Member was updated in server | [Member](#DOCS_RESOURCES_GUILD/guild-member-object) | -| MEMBER_ROLE_UPDATE | 25 | Member was added or removed from a role | [Partial Role](#DOCS_TOPICS_PERMISSIONS/role-object)\* | +| MEMBER_UPDATE | 24 | Member was updated in server | [Member](/docs/resources/guild#guild-member-object) | +| MEMBER_ROLE_UPDATE | 25 | Member was added or removed from a role | [Partial Role](/docs/topics/permissions#role-object)\* | | MEMBER_MOVE | 26 | Member was moved to a different voice channel | | | MEMBER_DISCONNECT | 27 | Member was disconnected from a voice channel | | | BOT_ADD | 28 | Bot user was added to server | | -| ROLE_CREATE | 30 | Role was created | [Role](#DOCS_TOPICS_PERMISSIONS/role-object) | -| ROLE_UPDATE | 31 | Role was edited | [Role](#DOCS_TOPICS_PERMISSIONS/role-object) | -| ROLE_DELETE | 32 | Role was deleted | [Role](#DOCS_TOPICS_PERMISSIONS/role-object) | -| INVITE_CREATE | 40 | Server invite was created | [Invite](#DOCS_RESOURCES_INVITE/invite-object) and [Invite Metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object)* | -| INVITE_UPDATE | 41 | Server invite was updated | [Invite](#DOCS_RESOURCES_INVITE/invite-object) and [Invite Metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object)* | -| INVITE_DELETE | 42 | Server invite was deleted | [Invite](#DOCS_RESOURCES_INVITE/invite-object) and [Invite Metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object)* | -| WEBHOOK_CREATE | 50 | Webhook was created | [Webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object)\* | -| WEBHOOK_UPDATE | 51 | Webhook properties or channel were updated | [Webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object)\* | -| WEBHOOK_DELETE | 52 | Webhook was deleted | [Webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object)\* | -| EMOJI_CREATE | 60 | Emoji was created | [Emoji](#DOCS_RESOURCES_EMOJI/emoji-object) | -| EMOJI_UPDATE | 61 | Emoji name was updated | [Emoji](#DOCS_RESOURCES_EMOJI/emoji-object) | -| EMOJI_DELETE | 62 | Emoji was deleted | [Emoji](#DOCS_RESOURCES_EMOJI/emoji-object) | +| ROLE_CREATE | 30 | Role was created | [Role](/docs/topics/permissions#role-object) | +| ROLE_UPDATE | 31 | Role was edited | [Role](/docs/topics/permissions#role-object) | +| ROLE_DELETE | 32 | Role was deleted | [Role](/docs/topics/permissions#role-object) | +| INVITE_CREATE | 40 | Server invite was created | [Invite](/docs/resources/invite#invite-object) and [Invite Metadata](/docs/resources/invite#invite-metadata-object)* | +| INVITE_UPDATE | 41 | Server invite was updated | [Invite](/docs/resources/invite#invite-object) and [Invite Metadata](/docs/resources/invite#invite-metadata-object)* | +| INVITE_DELETE | 42 | Server invite was deleted | [Invite](/docs/resources/invite#invite-object) and [Invite Metadata](/docs/resources/invite#invite-metadata-object)* | +| WEBHOOK_CREATE | 50 | Webhook was created | [Webhook](/docs/resources/webhook#webhook-object)\* | +| WEBHOOK_UPDATE | 51 | Webhook properties or channel were updated | [Webhook](/docs/resources/webhook#webhook-object)\* | +| WEBHOOK_DELETE | 52 | Webhook was deleted | [Webhook](/docs/resources/webhook#webhook-object)\* | +| EMOJI_CREATE | 60 | Emoji was created | [Emoji](/docs/resources/emoji#emoji-object) | +| EMOJI_UPDATE | 61 | Emoji name was updated | [Emoji](/docs/resources/emoji#emoji-object) | +| EMOJI_DELETE | 62 | Emoji was deleted | [Emoji](/docs/resources/emoji#emoji-object) | | MESSAGE_DELETE | 72 | Single message was deleted | | | MESSAGE_BULK_DELETE | 73 | Multiple messages were deleted | | | MESSAGE_PIN | 74 | Message was pinned to a channel | | | MESSAGE_UNPIN | 75 | Message was unpinned from a channel | | -| INTEGRATION_CREATE | 80 | App was added to server | [Integration](#DOCS_RESOURCES_GUILD/integration-object) | -| INTEGRATION_UPDATE | 81 | App was updated (as an example, its scopes were updated) | [Integration](#DOCS_RESOURCES_GUILD/integration-object) | -| INTEGRATION_DELETE | 82 | App was removed from server | [Integration](#DOCS_RESOURCES_GUILD/integration-object) | -| STAGE_INSTANCE_CREATE | 83 | Stage instance was created (stage channel becomes live) | [Stage Instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | -| STAGE_INSTANCE_UPDATE | 84 | Stage instance details were updated | [Stage Instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | -| STAGE_INSTANCE_DELETE | 85 | Stage instance was deleted (stage channel no longer live) | [Stage Instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) | -| STICKER_CREATE | 90 | Sticker was created | [Sticker](#DOCS_RESOURCES_STICKER/sticker-object) | -| STICKER_UPDATE | 91 | Sticker details were updated | [Sticker](#DOCS_RESOURCES_STICKER/sticker-object) | -| STICKER_DELETE | 92 | Sticker was deleted | [Sticker](#DOCS_RESOURCES_STICKER/sticker-object) | -| GUILD_SCHEDULED_EVENT_CREATE | 100 | Event was created | [Guild Scheduled Event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) | -| GUILD_SCHEDULED_EVENT_UPDATE | 101 | Event was updated | [Guild Scheduled Event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) | -| GUILD_SCHEDULED_EVENT_DELETE | 102 | Event was cancelled | [Guild Scheduled Event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) | -| THREAD_CREATE | 110 | Thread was created in a channel | [Thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | -| THREAD_UPDATE | 111 | Thread was updated | [Thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | -| THREAD_DELETE | 112 | Thread was deleted | [Thread](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) | -| APPLICATION_COMMAND_PERMISSION_UPDATE | 121 | Permissions were updated for a command | [Command Permission](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-structure)\* | -| SOUNDBOARD_SOUND_CREATE | 130 | Soundboard sound was created | [Soundboard Sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) | -| SOUNDBOARD_SOUND_UPDATE | 131 | Soundboard sound was updated | [Soundboard Sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) | -| SOUNDBOARD_SOUND_DELETE | 132 | Soundboard sound was deleted | [Soundboard Sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) | -| AUTO_MODERATION_RULE_CREATE | 140 | Auto Moderation rule was created | [Auto Moderation Rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) | -| AUTO_MODERATION_RULE_UPDATE | 141 | Auto Moderation rule was updated | [Auto Moderation Rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) | -| AUTO_MODERATION_RULE_DELETE | 142 | Auto Moderation rule was deleted | [Auto Moderation Rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) | +| INTEGRATION_CREATE | 80 | App was added to server | [Integration](/docs/resources/guild#integration-object) | +| INTEGRATION_UPDATE | 81 | App was updated (as an example, its scopes were updated) | [Integration](/docs/resources/guild#integration-object) | +| INTEGRATION_DELETE | 82 | App was removed from server | [Integration](/docs/resources/guild#integration-object) | +| STAGE_INSTANCE_CREATE | 83 | Stage instance was created (stage channel becomes live) | [Stage Instance](/docs/resources/stage-instance#stage-instance-object) | +| STAGE_INSTANCE_UPDATE | 84 | Stage instance details were updated | [Stage Instance](/docs/resources/stage-instance#stage-instance-object) | +| STAGE_INSTANCE_DELETE | 85 | Stage instance was deleted (stage channel no longer live) | [Stage Instance](/docs/resources/stage-instance#stage-instance-object) | +| STICKER_CREATE | 90 | Sticker was created | [Sticker](/docs/resources/sticker#sticker-object) | +| STICKER_UPDATE | 91 | Sticker details were updated | [Sticker](/docs/resources/sticker#sticker-object) | +| STICKER_DELETE | 92 | Sticker was deleted | [Sticker](/docs/resources/sticker#sticker-object) | +| GUILD_SCHEDULED_EVENT_CREATE | 100 | Event was created | [Guild Scheduled Event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) | +| GUILD_SCHEDULED_EVENT_UPDATE | 101 | Event was updated | [Guild Scheduled Event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) | +| GUILD_SCHEDULED_EVENT_DELETE | 102 | Event was cancelled | [Guild Scheduled Event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) | +| THREAD_CREATE | 110 | Thread was created in a channel | [Thread](/docs/resources/channel#thread-metadata-object) | +| THREAD_UPDATE | 111 | Thread was updated | [Thread](/docs/resources/channel#thread-metadata-object) | +| THREAD_DELETE | 112 | Thread was deleted | [Thread](/docs/resources/channel#thread-metadata-object) | +| APPLICATION_COMMAND_PERMISSION_UPDATE | 121 | Permissions were updated for a command | [Command Permission](/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure)\* | +| SOUNDBOARD_SOUND_CREATE | 130 | Soundboard sound was created | [Soundboard Sound](/docs/resources/soundboard#soundboard-sound-object) | +| SOUNDBOARD_SOUND_UPDATE | 131 | Soundboard sound was updated | [Soundboard Sound](/docs/resources/soundboard#soundboard-sound-object) | +| SOUNDBOARD_SOUND_DELETE | 132 | Soundboard sound was deleted | [Soundboard Sound](/docs/resources/soundboard#soundboard-sound-object) | +| AUTO_MODERATION_RULE_CREATE | 140 | Auto Moderation rule was created | [Auto Moderation Rule](/docs/resources/auto-moderation#auto-moderation-rule-object) | +| AUTO_MODERATION_RULE_UPDATE | 141 | Auto Moderation rule was updated | [Auto Moderation Rule](/docs/resources/auto-moderation#auto-moderation-rule-object) | +| AUTO_MODERATION_RULE_DELETE | 142 | Auto Moderation rule was deleted | [Auto Moderation Rule](/docs/resources/auto-moderation#auto-moderation-rule-object) | | AUTO_MODERATION_BLOCK_MESSAGE | 143 | Message was blocked by Auto Moderation | | | AUTO_MODERATION_FLAG_TO_CHANNEL | 144 | Message was flagged by Auto Moderation | | | AUTO_MODERATION_USER_COMMUNICATION_DISABLED | 145 | Member was timed out by Auto Moderation | | | CREATOR_MONETIZATION_REQUEST_CREATED | 150 | Creator monetization request was created | | | CREATOR_MONETIZATION_TERMS_ACCEPTED | 151 | Creator monetization terms were accepted | | -| ONBOARDING_PROMPT_CREATE | 163 | Guild Onboarding Question was created | [Onboarding Prompt Structure](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-prompt-structure) | -| ONBOARDING_PROMPT_UPDATE | 164 | Guild Onboarding Question was updated | [Onboarding Prompt Structure](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-prompt-structure) | -| ONBOARDING_PROMPT_DELETE | 165 | Guild Onboarding Question was deleted | [Onboarding Prompt Structure](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-prompt-structure) | -| ONBOARDING_CREATE | 166 | Guild Onboarding was created | [Guild Onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) | -| ONBOARDING_UPDATE | 167 | Guild Onboarding was updated | [Guild Onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) | +| ONBOARDING_PROMPT_CREATE | 163 | Guild Onboarding Question was created | [Onboarding Prompt Structure](/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure) | +| ONBOARDING_PROMPT_UPDATE | 164 | Guild Onboarding Question was updated | [Onboarding Prompt Structure](/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure) | +| ONBOARDING_PROMPT_DELETE | 165 | Guild Onboarding Question was deleted | [Onboarding Prompt Structure](/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure) | +| ONBOARDING_CREATE | 166 | Guild Onboarding was created | [Guild Onboarding](/docs/resources/guild#guild-onboarding-object) | +| ONBOARDING_UPDATE | 167 | Guild Onboarding was updated | [Guild Onboarding](/docs/resources/guild#guild-onboarding-object) | | HOME_SETTINGS_CREATE | 190 | Guild Server Guide was created | | | HOME_SETTINGS_UPDATE | 191 | Guild Server Guide was updated | | -\* Object has exception(s) to available keys. See the [exceptions](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-exceptions) section below for details. +\* Object has exception(s) to available keys. See the [exceptions](/docs/resources/audit-log#audit-log-change-object-audit-log-change-exceptions) section below for details. ###### Optional Audit Entry Info @@ -167,11 +167,11 @@ If no object is noted, there won't be a `changes` array in the entry, though oth ### Audit Log Change Object -Many audit log events include a `changes` array in their [entry object](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-audit-log-entry-structure). The [structure for the individual changes](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-structure) varies based on the event type and its changed objects, so apps shouldn't depend on a single pattern of handling audit log events. +Many audit log events include a `changes` array in their [entry object](/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure). The [structure for the individual changes](/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure) varies based on the event type and its changed objects, so apps shouldn't depend on a single pattern of handling audit log events. ###### Audit Log Change Structure -Some events don't follow the same pattern as other audit log events. Details about these exceptions are explained in [the next section](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-exceptions). +Some events don't follow the same pattern as other audit log events. Details about these exceptions are explained in [the next section](/docs/resources/audit-log#audit-log-change-object-audit-log-change-exceptions). > info > If `new_value` is not present in the change object while `old_value` is, it indicates that the property has been reset or set to `null`. If `old_value` isn't included, it indicated that the property was previously `null`. @@ -181,7 +181,7 @@ Some events don't follow the same pattern as other audit log events. Details abo |------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------| | new_value? | mixed (matches object field's type) | New value of the key | | old_value? | mixed (matches object field's type) | Old value of the key | -| key | string | Name of the changed entity, with a few [exceptions](#DOCS_RESOURCES_AUDIT_LOG/audit-log-change-object-audit-log-change-exceptions) | +| key | string | Name of the changed entity, with a few [exceptions](/docs/resources/audit-log#audit-log-change-object-audit-log-change-exceptions) | ###### Audit Log Change Exceptions @@ -189,14 +189,14 @@ For most objects, the change keys may be any field on the changed object. The fo | Object Changed | Change Key Exceptions | Change Object Exceptions | |------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Command Permission](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permissions-structure) | snowflake as key | The `changes` array contains objects with a `key` field representing the entity whose command was affected (role, channel, or user ID), a previous permissions object (with an `old_value` key), and an updated permissions object (with a `new_value` key) | -| [Invite](#DOCS_RESOURCES_INVITE/invite-object) and [Invite Metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object) | Additional `channel_id` key (instead of object's `channel.id`) | | -| [Partial Role](#DOCS_TOPICS_PERMISSIONS/role-object) | `$add` and `$remove` as keys | `new_value` is an array of objects that contain the role `id` and `name` | -| [Webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) | `avatar_hash` key (instead of `avatar`) | | +| [Command Permission](/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure) | snowflake as key | The `changes` array contains objects with a `key` field representing the entity whose command was affected (role, channel, or user ID), a previous permissions object (with an `old_value` key), and an updated permissions object (with a `new_value` key) | +| [Invite](/docs/resources/invite#invite-object) and [Invite Metadata](/docs/resources/invite#invite-metadata-object) | Additional `channel_id` key (instead of object's `channel.id`) | | +| [Partial Role](/docs/topics/permissions#role-object) | `$add` and `$remove` as keys | `new_value` is an array of objects that contain the role `id` and `name` | +| [Webhook](/docs/resources/webhook#webhook-object) | `avatar_hash` key (instead of `avatar`) | | -## Get Guild Audit Log % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/audit-logs +## Get Guild Audit Log % GET /guilds/{guild.id/docs/resources/guild#guild-object}/audit-logs -Returns an [audit log](#DOCS_RESOURCES_AUDIT_LOG/audit-log-object) object for the guild. Requires the [`VIEW_AUDIT_LOG`](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) permission. +Returns an [audit log](/docs/resources/audit-log#audit-log-object) object for the guild. Requires the [`VIEW_AUDIT_LOG`](/docs/topics/permissions#permissions-bitwise-permission-flags) permission. The returned list of audit log entries is ordered based on whether you use `before` or `after`. When using `before`, the list is ordered by the audit log entry ID **descending** (newer entries first). If `after` is used, the list is reversed and appears in **ascending** order (older entries first). Omitting both `before` and `after` defaults to `before` the current timestamp and will show the most recent entries in descending order by ID, the opposite can be achieved using `after=0` (showing oldest entries). @@ -207,7 +207,7 @@ The following parameters can be used to filter which and how many audit log entr | Field | Type | Description | |--------------|-----------|-------------------------------------------------------------------------------------------------------------| | user_id? | snowflake | Entries from a specific user ID | -| action_type? | integer | Entries for a specific [audit log event](#DOCS_RESOURCES_AUDIT_LOG/audit-log-entry-object-audit-log-events) | +| action_type? | integer | Entries for a specific [audit log event](/docs/resources/audit-log#audit-log-entry-object-audit-log-events) | | before? | snowflake | Entries with ID less than a specific audit log entry ID | | after? | snowflake | Entries with ID greater than a specific audit log entry ID | | limit? | integer | Maximum number of entries (between 1-100) to return, defaults to 50 | diff --git a/docs/resources/auto-moderation.md b/docs/resources/auto-moderation.md index 35352cc54c..0436d6c9e1 100644 --- a/docs/resources/auto-moderation.md +++ b/docs/resources/auto-moderation.md @@ -1,6 +1,6 @@ # Auto Moderation -Auto Moderation is a feature which allows each [guild](#DOCS_RESOURCES_GUILD/) to set up rules that trigger based on some criteria. For example, a rule can trigger whenever a message contains a specific keyword. +Auto Moderation is a feature which allows each [guild](/docs/resources/guild#) to set up rules that trigger based on some criteria. For example, a rule can trigger whenever a message contains a specific keyword. Rules can be configured to automatically execute actions whenever they trigger. For example, if a user tries to send a message which contains a certain keyword, a rule can trigger and block the message before it is sent. @@ -14,10 +14,10 @@ Rules can be configured to automatically execute actions whenever they trigger. | guild_id | snowflake | the id of the guild which this rule belongs to | | name | string | the rule name | | creator_id | snowflake | the user which first created this rule | -| event_type | integer | the rule [event type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-event-types) | -| trigger_type | integer | the rule [trigger type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) | -| trigger_metadata | object | the rule [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) | -| actions | array of [action](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object) objects | the actions which will execute when the rule is triggered | +| event_type | integer | the rule [event type](/docs/resources/auto-moderation#auto-moderation-rule-object-event-types) | +| trigger_type | integer | the rule [trigger type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) | +| trigger_metadata | object | the rule [trigger metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) | +| actions | array of [action](/docs/resources/auto-moderation#auto-moderation-action-object) objects | the actions which will execute when the rule is triggered | | enabled | boolean | whether the rule is enabled | | exempt_roles | array of snowflakes | the role ids that should not be affected by the rule (Maximum of 20) | | exempt_channels | array of snowflakes | the channel ids that should not be affected by the rule (Maximum of 50) | @@ -70,22 +70,22 @@ Characterizes the type of content which can trigger the rule. ###### Trigger Metadata Additional data used to determine whether a rule should be triggered. Different fields are relevant based on the -value of [trigger_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types). +value of [trigger_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types). | Field | Type | Associated Trigger Types | Description | |---------------------------------|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------|-----------------------------------------------------------------------------------| | keyword_filter | array of strings * | KEYWORD, MEMBER_PROFILE | substrings which will be searched for in content (Maximum of 1000) | | regex_patterns | array of strings ** | KEYWORD, MEMBER_PROFILE | regular expression patterns which will be matched against content (Maximum of 10) | -| presets | array of [keyword preset types](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-preset-types) | KEYWORD_PRESET | the internally pre-defined wordsets which will be searched for in content | +| presets | array of [keyword preset types](/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types) | KEYWORD_PRESET | the internally pre-defined wordsets which will be searched for in content | | allow_list | array of strings *** | KEYWORD, KEYWORD_PRESET, MEMBER_PROFILE | substrings which should not trigger the rule (Maximum of 100 or 1000) | | mention_total_limit | integer | MENTION_SPAM | total number of unique role and user mentions allowed per message (Maximum of 50) | | mention_raid_protection_enabled | boolean | MENTION_SPAM | whether to automatically detect mention raids | -\* A keyword can be a phrase which contains multiple words. [Wildcard symbols](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-matching-strategies) can be used to customize how each keyword will be matched. Each keyword must be 60 characters or less. +\* A keyword can be a phrase which contains multiple words. [Wildcard symbols](/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) can be used to customize how each keyword will be matched. Each keyword must be 60 characters or less. \** Only Rust flavored regex is currently supported, which can be tested in online editors such as [Rustexp](https://rustexp.lpil.uk/). Each regex pattern must be 260 characters or less. -\*** Each `allow_list` keyword can be a phrase which contains multiple words. [Wildcard symbols](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-matching-strategies) can be used to customize how each keyword will be matched. Rules with `KEYWORD` [trigger_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) accept a maximum of 100 keywords. Rules with `KEYWORD_PRESET` [trigger_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) accept a maximum of 1000 keywords. +\*** Each `allow_list` keyword can be a phrase which contains multiple words. [Wildcard symbols](/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) can be used to customize how each keyword will be matched. Rules with `KEYWORD` [trigger_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) accept a maximum of 100 keywords. Rules with `KEYWORD_PRESET` [trigger_type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) accept a maximum of 1000 keywords. ###### Trigger Metadata Field Limits @@ -164,10 +164,10 @@ An action which will execute whenever a rule is triggered. | Field | Type | Description | |-------------|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------| -| type | [action type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-types) | the type of action | -| metadata? * | [action metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-metadata) | additional metadata needed during execution for this specific action type | +| type | [action type](/docs/resources/auto-moderation#auto-moderation-action-object-action-types) | the type of action | +| metadata? * | [action metadata](/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata) | additional metadata needed during execution for this specific action type | -\* Can be omitted based on `type`. See the `Associated Action Types` column in [action metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-metadata) to understand which `type` values require `metadata` to be set. +\* Can be omitted based on `type`. See the `Associated Action Types` column in [action metadata](/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata) to understand which `type` values require `metadata` to be set. ###### Action Types @@ -184,7 +184,7 @@ An action which will execute whenever a rule is triggered. ###### Action Metadata Additional data used when an action is executed. Different fields are relevant based on the -value of [action type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-types). +value of [action type](/docs/resources/auto-moderation#auto-moderation-action-object-action-types). | Field | Type | Associated Action Types | Description | Constraints | |------------------|-----------|-------------------------|----------------------------------------------------------------------------------------|--------------------------------------| @@ -196,28 +196,28 @@ value of [action type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-ob ### Auto Moderation Permission Requirements Users are required to have the `MANAGE_GUILD` permission to access all Auto Moderation resources. -Some [action types](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object-action-types) require additional permissions, e.g. the `TIMEOUT` action type requires an additional `MODERATE_MEMBERS` permission. +Some [action types](/docs/resources/auto-moderation#auto-moderation-action-object-action-types) require additional permissions, e.g. the `TIMEOUT` action type requires an additional `MODERATE_MEMBERS` permission. -## List Auto Moderation Rules for Guild % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/auto-moderation/rules +## List Auto Moderation Rules for Guild % GET /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules -Get a list of all rules currently configured for the guild. Returns a list of [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) objects for the given guild. +Get a list of all rules currently configured for the guild. Returns a list of [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) objects for the given guild. > info -> This endpoint requires the `MANAGE_GUILD` [permission](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-permission-requirements). +> This endpoint requires the `MANAGE_GUILD` [permission](/docs/resources/auto-moderation#auto-moderation-permission-requirements). -## Get Auto Moderation Rule % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/auto-moderation/rules/{auto_moderation_rule.id#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object} +## Get Auto Moderation Rule % GET /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules/{auto_moderation_rule.id/docs/resources/auto-moderation#auto-moderation-rule-object} -Get a single rule. Returns an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) object. +Get a single rule. Returns an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) object. > info -> This endpoint requires the `MANAGE_GUILD` [permission](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-permission-requirements). +> This endpoint requires the `MANAGE_GUILD` [permission](/docs/resources/auto-moderation#auto-moderation-permission-requirements). -## Create Auto Moderation Rule % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/auto-moderation/rules +## Create Auto Moderation Rule % POST /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules -Create a new rule. Returns an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) on success. Fires an [Auto Moderation Rule Create](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-create) Gateway event. +Create a new rule. Returns an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) on success. Fires an [Auto Moderation Rule Create](/docs/events/gateway-events#auto-moderation-rule-create) Gateway event. > info -> This endpoint requires the `MANAGE_GUILD` [permission](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-permission-requirements). +> This endpoint requires the `MANAGE_GUILD` [permission](/docs/resources/auto-moderation#auto-moderation-permission-requirements). > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -227,26 +227,26 @@ Create a new rule. Returns an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERA | Field | Type | Description | |---------------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| | name | string | the rule name | -| event_type | integer | the [event type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-event-types) | -| trigger_type | integer | the [trigger type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) | -| trigger_metadata? * | object | the [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) | -| actions | array of [action](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object) objects | the actions which will execute when the rule is triggered | +| event_type | integer | the [event type](/docs/resources/auto-moderation#auto-moderation-rule-object-event-types) | +| trigger_type | integer | the [trigger type](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) | +| trigger_metadata? * | object | the [trigger metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) | +| actions | array of [action](/docs/resources/auto-moderation#auto-moderation-action-object) objects | the actions which will execute when the rule is triggered | | enabled? | boolean | whether the rule is enabled (False by default) | | exempt_roles? | array of snowflakes | the role ids that should not be affected by the rule (Maximum of 20) | | exempt_channels? | array of snowflakes | the channel ids that should not be affected by the rule (Maximum of 50) | -\* Can be omitted based on `trigger_type`. See the `Associated Trigger Types` column in [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) to understand which `trigger_type` values require `trigger_metadata` to be set. +\* Can be omitted based on `trigger_type`. See the `Associated Trigger Types` column in [trigger metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) to understand which `trigger_type` values require `trigger_metadata` to be set. > info -> See [Trigger Types](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types) for limits on how many rules of each trigger type can be created per guild. +> See [Trigger Types](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types) for limits on how many rules of each trigger type can be created per guild. -## Modify Auto Moderation Rule % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/auto-moderation/rules/{auto_moderation_rule.id#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object} +## Modify Auto Moderation Rule % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules/{auto_moderation_rule.id/docs/resources/auto-moderation#auto-moderation-rule-object} -Modify an existing rule. Returns an [auto moderation rule](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object) on success. Fires an [Auto Moderation Rule Update](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-update) Gateway event. +Modify an existing rule. Returns an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) on success. Fires an [Auto Moderation Rule Update](/docs/events/gateway-events#auto-moderation-rule-update) Gateway event. > info -> Requires `MANAGE_GUILD` [permissions](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-permission-requirements). +> Requires `MANAGE_GUILD` [permissions](/docs/resources/auto-moderation#auto-moderation-permission-requirements). > info > All parameters for this endpoint are optional. @@ -259,21 +259,21 @@ Modify an existing rule. Returns an [auto moderation rule](#DOCS_RESOURCES_AUTO_ | Field | Type | Description | |---------------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| | name | string | the rule name | -| event_type | integer | the [event type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-event-types) | -| trigger_metadata? * | object | the [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) | -| actions | array of [action](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-action-object) objects | the actions which will execute when the rule is triggered | +| event_type | integer | the [event type](/docs/resources/auto-moderation#auto-moderation-rule-object-event-types) | +| trigger_metadata? * | object | the [trigger metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) | +| actions | array of [action](/docs/resources/auto-moderation#auto-moderation-action-object) objects | the actions which will execute when the rule is triggered | | enabled | boolean | whether the rule is enabled | | exempt_roles | array of snowflakes | the role ids that should not be affected by the rule (Maximum of 20) | | exempt_channels | array of snowflakes | the channel ids that should not be affected by the rule (Maximum of 50) | -\* Can be omitted based on `trigger_type`. See the `Associated Trigger Types` column in [trigger metadata](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-metadata) to understand which `trigger_type` values require `trigger_metadata` to be set. +\* Can be omitted based on `trigger_type`. See the `Associated Trigger Types` column in [trigger metadata](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) to understand which `trigger_type` values require `trigger_metadata` to be set. -## Delete Auto Moderation Rule % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/auto-moderation/rules/{auto_moderation_rule.id#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object} +## Delete Auto Moderation Rule % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules/{auto_moderation_rule.id/docs/resources/auto-moderation#auto-moderation-rule-object} -Delete a rule. Returns a `204` on success. Fires an [Auto Moderation Rule Delete](#DOCS_EVENTS_GATEWAY_EVENTS/auto-moderation-rule-delete) Gateway event. +Delete a rule. Returns a `204` on success. Fires an [Auto Moderation Rule Delete](/docs/events/gateway-events#auto-moderation-rule-delete) Gateway event. > info -> This endpoint requires the `MANAGE_GUILD` [permission](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-permission-requirements). +> This endpoint requires the `MANAGE_GUILD` [permission](/docs/resources/auto-moderation#auto-moderation-permission-requirements). > info > This endpoint supports the `X-Audit-Log-Reason` header. diff --git a/docs/resources/channel.md b/docs/resources/channel.md index cb5d6f6caa..9174426f82 100644 --- a/docs/resources/channel.md +++ b/docs/resources/channel.md @@ -13,10 +13,10 @@ Represents a guild or DM channel within Discord. | Field | Type | Description | |-------------------------------------|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | the id of this channel | -| type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) | +| type | integer | the [type of channel](/docs/resources/channel#channel-object-channel-types) | | guild_id? | snowflake | the id of the guild (may be missing for some channel objects received over gateway guild dispatches) | | position? | integer | sorting position of the channel (channels with the same position are sorted by id) | -| permission_overwrites? | array of [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | explicit permission overwrites for members and roles | +| permission_overwrites? | array of [overwrite](/docs/resources/channel#overwrite-object) objects | explicit permission overwrites for members and roles | | name? | ?string | the name of the channel (1-100 characters) | | topic? | ?string | the channel topic (0-4096 characters for `GUILD_FORUM` and `GUILD_MEDIA` channels, 0-1024 characters for all others) | | nsfw? | boolean | whether the channel is nsfw | @@ -24,29 +24,29 @@ Represents a guild or DM channel within Discord. | bitrate? | integer | the bitrate (in bits) of the voice channel | | user_limit? | integer | the user limit of the voice channel | | rate_limit_per_user?\* | integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected | -| recipients? | array of [user](#DOCS_RESOURCES_USER/user-object) objects | the recipients of the DM | +| recipients? | array of [user](/docs/resources/user#user-object) objects | the recipients of the DM | | icon? | ?string | icon hash of the group DM | | owner_id? | snowflake | id of the creator of the group DM or thread | | application_id? | snowflake | application id of the group DM creator if it is bot-created | | managed? | boolean | for group DM channels: whether the channel is managed by an application via the `gdm.join` OAuth2 scope | | parent_id? | ?snowflake | for guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created | | last_pin_timestamp? | ?ISO8601 timestamp | when the last pinned message was pinned. This may be `null` in events such as `GUILD_CREATE` when a message is not pinned. | -| rtc_region? | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the voice channel, automatic when set to null | -| video_quality_mode? | integer | the camera [video quality mode](#DOCS_RESOURCES_CHANNEL/channel-object-video-quality-modes) of the voice channel, 1 when not present | +| rtc_region? | ?string | [voice region](/docs/resources/voice#voice-region-object) id for the voice channel, automatic when set to null | +| video_quality_mode? | integer | the camera [video quality mode](/docs/resources/channel#channel-object-video-quality-modes) of the voice channel, 1 when not present | | message_count?\*\* | integer | number of messages (not including the initial message or deleted messages) in a thread. | | member_count? | integer | an approximate count of users in a thread, stops counting at 50 | -| thread_metadata? | a [thread metadata](#DOCS_RESOURCES_CHANNEL/thread-metadata-object) object | thread-specific fields not needed by other channels | -| member? | a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object | thread member object for the current user, if they have joined the thread, only included on certain API endpoints | +| thread_metadata? | a [thread metadata](/docs/resources/channel#thread-metadata-object) object | thread-specific fields not needed by other channels | +| member? | a [thread member](/docs/resources/channel#thread-member-object) object | thread member object for the current user, if they have joined the thread, only included on certain API endpoints | | default_auto_archive_duration? | integer | default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080 | -| permissions? | string | computed permissions for the invoking user in the channel, including overwrites, only included when part of the `resolved` data received on a slash command interaction. This does not include [implicit permissions](#DOCS_TOPICS_PERMISSIONS/implicit-permissions), which may need to be checked separately | -| flags? | integer | [channel flags](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| permissions? | string | computed permissions for the invoking user in the channel, including overwrites, only included when part of the `resolved` data received on a slash command interaction. This does not include [implicit permissions](/docs/topics/permissions#implicit-permissions), which may need to be checked separately | +| flags? | integer | [channel flags](/docs/resources/channel#channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | | total_message_sent? | integer | number of messages ever sent in a thread, it's similar to `message_count` on message creation, but will not decrement the number when a message is deleted | -| available_tags? | array of [tag](#DOCS_RESOURCES_CHANNEL/forum-tag-object) objects | the set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | +| available_tags? | array of [tag](/docs/resources/channel#forum-tag-object) objects | the set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | | applied_tags? | array of snowflakes | the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | -| default_reaction_emoji? | ?[default reaction](#DOCS_RESOURCES_CHANNEL/default-reaction-object) object | the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | +| default_reaction_emoji? | ?[default reaction](/docs/resources/channel#default-reaction-object) object | the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | | default_thread_rate_limit_per_user? | integer | the initial `rate_limit_per_user` to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. | -| default_sort_order? | ?integer | the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels. Defaults to `null`, which indicates a preferred sort order hasn't been set by a channel admin | -| default_forum_layout? | integer | the [default forum layout view](#DOCS_RESOURCES_CHANNEL/channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin | +| default_sort_order? | ?integer | the [default sort order type](/docs/resources/channel#channel-object-sort-order-types) used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels. Defaults to `null`, which indicates a preferred sort order hasn't been set by a channel admin | +| default_forum_layout? | integer | the [default forum layout view](/docs/resources/channel#channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin | \* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval. @@ -226,15 +226,15 @@ Bots can post or publish messages in this type of channel if they have the prope ###### Example Thread Channel -[Threads](#DOCS_TOPICS_THREADS) can be either `archived` or `active`. Archived threads are generally immutable. To send a message or add a reaction, a thread must first be unarchived. The API will helpfully automatically unarchive a thread when sending a message in that thread. +[Threads](/docs/topics/threads) can be either `archived` or `active`. Archived threads are generally immutable. To send a message or add a reaction, a thread must first be unarchived. The API will helpfully automatically unarchive a thread when sending a message in that thread. -Unlike with channels, the API will only sync updates to users about threads the current user can view. When receiving a [guild create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) payload, the API will only include active threads the current user can view. Threads inside of private channels are completely private to the members of that private channel. As such, when _gaining_ access to a channel the API sends a [thread list sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync), which includes all active threads in that channel. +Unlike with channels, the API will only sync updates to users about threads the current user can view. When receiving a [guild create](/docs/events/gateway-events#guild-create) payload, the API will only include active threads the current user can view. Threads inside of private channels are completely private to the members of that private channel. As such, when _gaining_ access to a channel the API sends a [thread list sync](/docs/events/gateway-events#thread-list-sync), which includes all active threads in that channel. Threads also track membership. Users must be added to a thread before sending messages in them. The API will helpfully automatically add users to a thread when sending a message in that thread. Guilds have limits on the number of active threads and members per thread. Once these are reached additional threads cannot be created or unarchived, and users cannot be added. Threads do not count against the per-guild channel limit. -The [threads](#DOCS_TOPICS_THREADS) topic has some more information. +The [threads](/docs/topics/threads) topic has some more information. ```json { @@ -269,7 +269,7 @@ The [threads](#DOCS_TOPICS_THREADS) topic has some more information. ### Overwrite Object -See [permissions](#DOCS_TOPICS_PERMISSIONS/permissions) for more information about the `allow` and `deny` fields. +See [permissions](/docs/topics/permissions#permissions) for more information about the `allow` and `deny` fields. ###### Overwrite Structure @@ -307,11 +307,11 @@ A thread member object contains information about a user that has joined a threa | user_id? \* | snowflake | ID of the user | | join_timestamp | ISO8601 timestamp | Time the user last joined the thread | | flags | integer | Any user-thread settings, currently only used for notifications | -| member? \* \*\* | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Additional information about the user | +| member? \* \*\* | [guild member](/docs/resources/guild#guild-member-object) object | Additional information about the user | -\* These fields are omitted on the member sent within each thread in the [GUILD_CREATE](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) event. +\* These fields are omitted on the member sent within each thread in the [GUILD_CREATE](/docs/events/gateway-events#guild-create) event. -\*\* The `member` field is only present when `with_member` is set to `true` when calling [List Thread Members](#DOCS_RESOURCES_CHANNEL/list-thread-members) or [Get Thread Member](#DOCS_RESOURCES_CHANNEL/get-thread-member). +\*\* The `member` field is only present when `with_member` is set to `true` when calling [List Thread Members](/docs/resources/channel#list-thread-members) or [Get Thread Member](/docs/resources/channel#get-thread-member). ### Default Reaction Object @@ -343,13 +343,13 @@ An object that represents a tag that is able to be applied to a thread in a `GUI \* At most one of `emoji_id` and `emoji_name` may be set to a non-null value. -## Get Channel % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object} +## Get Channel % GET /channels/{channel.id/docs/resources/channel#channel-object} -Get a channel by ID. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. If the channel is a thread, a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object is included in the returned result. +Get a channel by ID. Returns a [channel](/docs/resources/channel#channel-object) object. If the channel is a thread, a [thread member](/docs/resources/channel#thread-member-object) object is included in the returned result. -## Modify Channel % PATCH /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object} +## Modify Channel % PATCH /channels/{channel.id/docs/resources/channel#channel-object} -Update a channel's settings. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) on success, and a 400 BAD REQUEST on invalid parameters. +Update a channel's settings. Returns a [channel](/docs/resources/channel#channel-object) on success, and a 400 BAD REQUEST on invalid parameters. > info > All parameters to this endpoint are optional @@ -359,7 +359,7 @@ Update a channel's settings. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel ###### JSON Params (Group DM) -Fires a [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway event. +Fires a [Channel Update](/docs/events/gateway-events#channel-update) Gateway event. | Field | Type | Description | |-------|--------|------------------------------| @@ -368,31 +368,31 @@ Fires a [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway eve ###### JSON Params (Guild channel) -Requires the `MANAGE_CHANNELS` permission for the guild. Fires a [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway event. If modifying a category, individual [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) events will fire for each child channel that also changes. If modifying permission overwrites, the `MANAGE_ROLES` permission is required. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). +Requires the `MANAGE_CHANNELS` permission for the guild. Fires a [Channel Update](/docs/events/gateway-events#channel-update) Gateway event. If modifying a category, individual [Channel Update](/docs/events/gateway-events#channel-update) events will fire for each child channel that also changes. If modifying permission overwrites, the `MANAGE_ROLES` permission is required. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). | Field | Type | Description | Channel Type | |------------------------------------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------| | name | string | 1-100 character channel name | All | -| type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types); only conversion between text and announcement is supported and only in guilds with the "NEWS" feature | Text, Announcement | +| type | integer | the [type of channel](/docs/resources/channel#channel-object-channel-types); only conversion between text and announcement is supported and only in guilds with the "NEWS" feature | Text, Announcement | | position | ?integer | the position of the channel in the left-hand listing (channels with the same position are sorted by id) | All | | topic | ?string | 0-1024 character channel topic (0-4096 characters for `GUILD_FORUM` and `GUILD_MEDIA` channels) | Text, Announcement, Forum, Media | | nsfw | ?boolean | whether the channel is nsfw | Text, Voice, Announcement, Stage, Forum, Media | | rate_limit_per_user | ?integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected | Text, Voice, Stage, Forum, Media | | bitrate\* | ?integer | the bitrate (in bits) of the voice or stage channel; min 8000 | Voice, Stage | | user_limit | ?integer | the user limit of the voice or stage channel, max 99 for voice channels and 10,000 for stage channels (0 refers to no limit) | Voice, Stage | -| permission_overwrites\*\* | ?array of partial [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | channel or category-specific permissions | All | +| permission_overwrites\*\* | ?array of partial [overwrite](/docs/resources/channel#overwrite-object) objects | channel or category-specific permissions | All | | parent_id | ?snowflake | id of the new parent category for a channel | Text, Voice, Announcement, Stage, Forum, Media | -| rtc_region | ?string | channel [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id, automatic when set to null | Voice, Stage | -| video_quality_mode | ?integer | the camera [video quality mode](#DOCS_RESOURCES_CHANNEL/channel-object-video-quality-modes) of the voice channel | Voice, Stage | +| rtc_region | ?string | channel [voice region](/docs/resources/voice#voice-region-object) id, automatic when set to null | Voice, Stage | +| video_quality_mode | ?integer | the camera [video quality mode](/docs/resources/channel#channel-object-video-quality-modes) of the voice channel | Voice, Stage | | default_auto_archive_duration | ?integer | the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity | Text, Announcement, Forum, Media | -| flags | integer | [channel flags](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field). Currently only `REQUIRE_TAG` (`1 << 4`) is supported by `GUILD_FORUM` and `GUILD_MEDIA` channels. `HIDE_MEDIA_DOWNLOAD_OPTIONS` (`1 << 15`) is supported only by `GUILD_MEDIA` channels | Forum, Media | -| available_tags | array of [tag](#DOCS_RESOURCES_CHANNEL/forum-tag-object) objects | the set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel; limited to 20 | Forum, Media | -| default_reaction_emoji | ?[default reaction](#DOCS_RESOURCES_CHANNEL/default-reaction-object) object | the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | Forum, Media | +| flags | integer | [channel flags](/docs/resources/channel#channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field). Currently only `REQUIRE_TAG` (`1 << 4`) is supported by `GUILD_FORUM` and `GUILD_MEDIA` channels. `HIDE_MEDIA_DOWNLOAD_OPTIONS` (`1 << 15`) is supported only by `GUILD_MEDIA` channels | Forum, Media | +| available_tags | array of [tag](/docs/resources/channel#forum-tag-object) objects | the set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel; limited to 20 | Forum, Media | +| default_reaction_emoji | ?[default reaction](/docs/resources/channel#default-reaction-object) object | the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | Forum, Media | | default_thread_rate_limit_per_user | integer | the initial `rate_limit_per_user` to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. | Text, Forum, Media | -| default_sort_order | ?integer | the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels | Forum, Media | -| default_forum_layout | integer | the [default forum layout type](#DOCS_RESOURCES_CHANNEL/channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels | Forum | +| default_sort_order | ?integer | the [default sort order type](/docs/resources/channel#channel-object-sort-order-types) used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels | Forum, Media | +| default_forum_layout | integer | the [default forum layout type](/docs/resources/channel#channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels | Forum | -\* For voice channels, normal servers can set bitrate up to 96000, servers with Boost level 1 can set up to 128000, servers with Boost level 2 can set up to 256000, and servers with Boost level 3 or the `VIP_REGIONS` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) can set up to 384000. For stage channels, bitrate can be set up to 64000. +\* For voice channels, normal servers can set bitrate up to 96000, servers with Boost level 1 can set up to 128000, servers with Boost level 2 can set up to 256000, and servers with Boost level 3 or the `VIP_REGIONS` [guild feature](/docs/resources/guild#guild-object-guild-features) can set up to 384000. For stage channels, bitrate can be set up to 64000. \*\* In each overwrite object, the `allow` and `deny` keys can be omitted or set to `null`, which both default to `"0"`. @@ -400,7 +400,7 @@ Requires the `MANAGE_CHANNELS` permission for the guild. Fires a [Channel Update When setting `archived` to `false`, when `locked` is also `false`, only the `SEND_MESSAGES` permission is required. -Otherwise, requires the `MANAGE_THREADS` permission. Fires a [Thread Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-update) Gateway event. Requires the thread to have `archived` set to `false` or be set to `false` in the request. +Otherwise, requires the `MANAGE_THREADS` permission. Fires a [Thread Update](/docs/events/gateway-events#thread-update) Gateway event. Requires the thread to have `archived` set to `false` or be set to `false` in the request. | Field | Type | Description | |-----------------------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -410,12 +410,12 @@ Otherwise, requires the `MANAGE_THREADS` permission. Fires a [Thread Update](#DO | locked | boolean | whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it | | invitable | boolean | whether non-moderators can add other non-moderators to a thread; only available on private threads | | rate_limit_per_user | ?integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages`, `manage_thread`, or `manage_channel`, are unaffected | -| flags? | integer | [channel flags](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field); `PINNED` can only be set for threads in forum and media channels | +| flags? | integer | [channel flags](/docs/resources/channel#channel-object-channel-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field); `PINNED` can only be set for threads in forum and media channels | | applied_tags? | array of snowflakes | the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel; limited to 5 | -## Delete/Close Channel % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object} +## Delete/Close Channel % DELETE /channels/{channel.id/docs/resources/channel#channel-object} -Delete a channel, or close a private message. Requires the `MANAGE_CHANNELS` permission for the guild, or `MANAGE_THREADS` if the channel is a thread. Deleting a category does not delete its child channels; they will have their `parent_id` removed and a [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway event will fire for each of them. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object on success. Fires a [Channel Delete](#DOCS_EVENTS_GATEWAY_EVENTS/channel-delete) Gateway event (or [Thread Delete](#DOCS_EVENTS_GATEWAY_EVENTS/thread-delete) if the channel was a thread). +Delete a channel, or close a private message. Requires the `MANAGE_CHANNELS` permission for the guild, or `MANAGE_THREADS` if the channel is a thread. Deleting a category does not delete its child channels; they will have their `parent_id` removed and a [Channel Update](/docs/events/gateway-events#channel-update) Gateway event will fire for each of them. Returns a [channel](/docs/resources/channel#channel-object) object on success. Fires a [Channel Delete](/docs/events/gateway-events#channel-delete) Gateway event (or [Thread Delete](/docs/events/gateway-events#thread-delete) if the channel was a thread). > warn > Deleting a guild channel cannot be undone. Use this with caution, as it is impossible to undo this action when performed on a guild channel. In contrast, when used with a private message, it is possible to undo the action by opening a private message with the recipient again. @@ -426,9 +426,9 @@ Delete a channel, or close a private message. Requires the `MANAGE_CHANNELS` per > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Edit Channel Permissions % PUT /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/permissions/{overwrite.id#DOCS_RESOURCES_CHANNEL/overwrite-object} +## Edit Channel Permissions % PUT /channels/{channel.id/docs/resources/channel#channel-object}/permissions/{overwrite.id/docs/resources/channel#overwrite-object} -Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). Returns a 204 empty response on success. Fires a [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway event. For more information about permissions, see [permissions](#DOCS_TOPICS_PERMISSIONS/permissions). +Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). Returns a 204 empty response on success. Fires a [Channel Update](/docs/events/gateway-events#channel-update) Gateway event. For more information about permissions, see [permissions](/docs/topics/permissions#permissions). > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -441,13 +441,13 @@ Edit the channel permission overwrites for a user or role in a channel. Only usa | deny? | string? | the bitwise value of all disallowed permissions (default `"0"`) | | type | integer | 0 for a role or 1 for a member | -## Get Channel Invites % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/invites +## Get Channel Invites % GET /channels/{channel.id/docs/resources/channel#channel-object}/invites -Returns a list of [invite](#DOCS_RESOURCES_INVITE/invite-object) objects (with [invite metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object)) for the channel. Only usable for guild channels. Requires the `MANAGE_CHANNELS` permission. +Returns a list of [invite](/docs/resources/invite#invite-object) objects (with [invite metadata](/docs/resources/invite#invite-metadata-object)) for the channel. Only usable for guild channels. Requires the `MANAGE_CHANNELS` permission. -## Create Channel Invite % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/invites +## Create Channel Invite % POST /channels/{channel.id/docs/resources/channel#channel-object}/invites -Create a new [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the channel. Only usable for guild channels. Requires the `CREATE_INSTANT_INVITE` permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object (`{}`). Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object. Fires an [Invite Create](#DOCS_EVENTS_GATEWAY_EVENTS/invite-create) Gateway event. +Create a new [invite](/docs/resources/invite#invite-object) object for the channel. Only usable for guild channels. Requires the `CREATE_INSTANT_INVITE` permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object (`{}`). Returns an [invite](/docs/resources/invite#invite-object) object. Fires an [Invite Create](/docs/events/gateway-events#invite-create) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -460,20 +460,20 @@ Create a new [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the chann | max_uses | integer | max number of uses or 0 for unlimited. between 0 and 100 | 0 | | temporary | boolean | whether this invite only grants temporary membership | false | | unique | boolean | if true, don't try to reuse a similar invite (useful for creating many unique one time use invites) | false | -| target_type | integer | the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite | | +| target_type | integer | the [type of target](/docs/resources/invite#invite-object-invite-target-types) for this voice channel invite | | | target_user_id | snowflake | the id of the user whose stream to display for this invite, required if `target_type` is 1, the user must be streaming in the channel | | | target_application_id | snowflake | the id of the embedded application to open for this invite, required if `target_type` is 2, the application must have the `EMBEDDED` flag | | -## Delete Channel Permission % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/permissions/{overwrite.id#DOCS_RESOURCES_CHANNEL/overwrite-object} +## Delete Channel Permission % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/permissions/{overwrite.id/docs/resources/channel#overwrite-object} -Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway event. For more information about permissions, see [permissions](#DOCS_TOPICS_PERMISSIONS/permissions) +Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Channel Update](/docs/events/gateway-events#channel-update) Gateway event. For more information about permissions, see [permissions](/docs/topics/permissions#permissions) > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Follow Announcement Channel % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/followers +## Follow Announcement Channel % POST /channels/{channel.id/docs/resources/channel#channel-object}/followers -Follow an Announcement Channel to send messages to a target channel. Requires the `MANAGE_WEBHOOKS` permission in the target channel. Returns a [followed channel](#DOCS_RESOURCES_CHANNEL/followed-channel-object) object. Fires a [Webhooks Update](#DOCS_EVENTS_GATEWAY_EVENTS/webhooks-update) Gateway event for the target channel. +Follow an Announcement Channel to send messages to a target channel. Requires the `MANAGE_WEBHOOKS` permission in the target channel. Returns a [followed channel](/docs/resources/channel#followed-channel-object) object. Fires a [Webhooks Update](/docs/events/gateway-events#webhooks-update) Gateway event for the target channel. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -484,19 +484,19 @@ Follow an Announcement Channel to send messages to a target channel. Requires th |--------------------|-----------|----------------------| | webhook_channel_id | snowflake | id of target channel | -## Trigger Typing Indicator % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/typing +## Trigger Typing Indicator % POST /channels/{channel.id/docs/resources/channel#channel-object}/typing -Post a typing indicator for the specified channel, which expires after 10 seconds. Returns a 204 empty response on success. Fires a [Typing Start](#DOCS_EVENTS_GATEWAY_EVENTS/typing-start) Gateway event. +Post a typing indicator for the specified channel, which expires after 10 seconds. Returns a 204 empty response on success. Fires a [Typing Start](/docs/events/gateway-events#typing-start) Gateway event. Generally bots should **not** use this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. -## Get Pinned Messages % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/pins +## Get Pinned Messages % GET /channels/{channel.id/docs/resources/channel#channel-object}/pins -Returns all pinned messages in the channel as an array of [message](#DOCS_RESOURCES_MESSAGE/message-object) objects. +Returns all pinned messages in the channel as an array of [message](/docs/resources/message#message-object) objects. -## Pin Message % PUT /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/pins/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Pin Message % PUT /channels/{channel.id/docs/resources/channel#channel-object}/pins/{message.id/docs/resources/message#message-object} -Pin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Channel Pins Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-pins-update) Gateway event. +Pin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Channel Pins Update](/docs/events/gateway-events#channel-pins-update) Gateway event. > warn > The max pinned messages is 50. @@ -504,14 +504,14 @@ Pin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns a > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Unpin Message % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/pins/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Unpin Message % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/pins/{message.id/docs/resources/message#message-object} -Unpin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Channel Pins Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-pins-update) Gateway event. +Unpin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Channel Pins Update](/docs/events/gateway-events#channel-pins-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Group DM Add Recipient % PUT /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/recipients/{user.id#DOCS_RESOURCES_USER/user-object} +## Group DM Add Recipient % PUT /channels/{channel.id/docs/resources/channel#channel-object}/recipients/{user.id/docs/resources/user#user-object} Adds a recipient to a Group DM using their access token. @@ -522,15 +522,15 @@ Adds a recipient to a Group DM using their access token. | access_token | string | access token of a user that has granted your app the `gdm.join` scope | | nick | string | nickname of the user being added | -## Group DM Remove Recipient % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/recipients/{user.id#DOCS_RESOURCES_USER/user-object} +## Group DM Remove Recipient % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/recipients/{user.id/docs/resources/user#user-object} Removes a recipient from a Group DM. -## Start Thread from Message % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/threads +## Start Thread from Message % POST /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/threads -Creates a new thread from an existing message. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) and a [Message Update](#DOCS_EVENTS_GATEWAY_EVENTS/message-update) Gateway event. +Creates a new thread from an existing message. Returns a [channel](/docs/resources/channel#channel-object) on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](/docs/events/gateway-events#thread-create) and a [Message Update](/docs/events/gateway-events#message-update) Gateway event. -When called on a `GUILD_TEXT` channel, creates a `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel, creates a `ANNOUNCEMENT_THREAD`. Does not work on a [`GUILD_FORUM`](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-or-media-channel) or a `GUILD_MEDIA` channel. The id of the created thread will be the same as the id of the source message, and as such a message can only have a single thread created from it. +When called on a `GUILD_TEXT` channel, creates a `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel, creates a `ANNOUNCEMENT_THREAD`. Does not work on a [`GUILD_FORUM`](/docs/resources/channel#start-thread-in-forum-or-media-channel) or a `GUILD_MEDIA` channel. The id of the created thread will be the same as the id of the source message, and as such a message can only have a single thread created from it. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -543,9 +543,9 @@ When called on a `GUILD_TEXT` channel, creates a `PUBLIC_THREAD`. When called on | auto_archive_duration? | integer | the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080 | | rate_limit_per_user? | ?integer | amount of seconds a user has to wait before sending another message (0-21600) | -## Start Thread without Message % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/threads +## Start Thread without Message % POST /channels/{channel.id/docs/resources/channel#channel-object}/threads -Creates a new thread that is not connected to an existing message. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object) on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) Gateway event. +Creates a new thread that is not connected to an existing message. Returns a [channel](/docs/resources/channel#channel-object) on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](/docs/events/gateway-events#thread-create) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -556,23 +556,23 @@ Creates a new thread that is not connected to an existing message. Returns a [ch |------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------| | name | string | 1-100 character channel name | | auto_archive_duration? | integer | the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080 | -| type?\* | integer | the [type of thread](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) to create | +| type?\* | integer | the [type of thread](/docs/resources/channel#channel-object-channel-types) to create | | invitable? | boolean | whether non-moderators can add other non-moderators to a thread; only available when creating a private thread | | rate_limit_per_user? | ?integer | amount of seconds a user has to wait before sending another message (0-21600) | \* `type` currently defaults to `PRIVATE_THREAD` in order to match the behavior when thread documentation was first published. In a future API version this will be changed to be a required field, with no default. -## Start Thread in Forum or Media Channel % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/threads +## Start Thread in Forum or Media Channel % POST /channels/{channel.id/docs/resources/channel#channel-object}/threads -Creates a new thread in a forum or a media channel, and sends a message within the created thread. Returns a [channel](#DOCS_RESOURCES_CHANNEL/channel-object), with a nested [message](#DOCS_RESOURCES_MESSAGE/message-object) object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) and [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) Gateway event. +Creates a new thread in a forum or a media channel, and sends a message within the created thread. Returns a [channel](/docs/resources/channel#channel-object), with a nested [message](/docs/resources/message#message-object) object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a [Thread Create](/docs/events/gateway-events#thread-create) and [Message Create](/docs/events/gateway-events#message-create) Gateway event. - The type of the created thread is `PUBLIC_THREAD`. -- See [message formatting](#DOCS_REFERENCE/message-formatting) for more information on how to properly format messages. +- See [message formatting](/docs/reference#message-formatting) for more information on how to properly format messages. - The current user must have the `SEND_MESSAGES` permission (`CREATE_PUBLIC_THREADS` is ignored). - The maximum request size when sending a message is **25 MiB**. - For the embed object, you can set every field except `type` (it will be `rich` regardless of if you try to set it), `provider`, `video`, and any `height`, `width`, or `proxy_url` values for images. -- Examples for file uploads are available in [Uploading Files](#DOCS_REFERENCE/uploading-files). -- Files must be attached using a `multipart/form-data` body as described in [Uploading Files](#DOCS_REFERENCE/uploading-files). +- Examples for file uploads are available in [Uploading Files](/docs/reference#uploading-files). +- Files must be attached using a `multipart/form-data` body as described in [Uploading Files](/docs/reference#uploading-files). - Note that when sending a message, you must provide a value for at **least one of** `content`, `embeds`, `sticker_ids`, `components`, or `files[n]`. > warn @@ -588,10 +588,10 @@ Creates a new thread in a forum or a media channel, and sends a message within t | name | string | 1-100 character channel name | | auto_archive_duration?\* | integer | duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 | | rate_limit_per_user? | ?integer | amount of seconds a user has to wait before sending another message (0-21600) | -| message | a [forum thread message params](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object) object | contents of the first message in the forum/media thread | +| message | a [forum thread message params](/docs/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object) object | contents of the first message in the forum/media thread | | applied_tags? | array of snowflakes | the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | -| files[n]?\* | file contents | Contents of the file being sent. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| payload_json? | string | JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | +| files[n]?\* | file contents | Contents of the file being sent. See [Uploading Files](/docs/reference#uploading-files) | +| payload_json? | string | JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](/docs/reference#uploading-files) | ###### Forum and Media Thread Message Params Object @@ -602,66 +602,66 @@ Creates a new thread in a forum or a media channel, and sends a message within t | Field | Type | Description | |-------------------|----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | content?\* | string | Message contents (up to 2000 characters) | -| embeds?\* | array of [embed](#DOCS_RESOURCES_MESSAGE/embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) | -| allowed_mentions? | [allowed mention object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) | Allowed mentions for the message | -| components?\* | array of [message component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) objects | Components to include with the message | -| sticker_ids?\* | array of snowflakes | IDs of up to 3 [stickers](#DOCS_RESOURCES_STICKER/sticker-object) in the server to send in the message | -| attachments? | array of partial [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | Attachment objects with `filename` and `description`. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| flags? | integer | [Message flags](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) | +| embeds?\* | array of [embed](/docs/resources/message#embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) | +| allowed_mentions? | [allowed mention object](/docs/resources/message#allowed-mentions-object) | Allowed mentions for the message | +| components?\* | array of [message component](/docs/interactions/message-components#component-object) objects | Components to include with the message | +| sticker_ids?\* | array of snowflakes | IDs of up to 3 [stickers](/docs/resources/sticker#sticker-object) in the server to send in the message | +| attachments? | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with `filename` and `description`. See [Uploading Files](/docs/reference#uploading-files) | +| flags? | integer | [Message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) | \* At least one of `content`, `embeds`, `sticker_ids`, `components`, or `files[n]` is required. -## Join Thread % PUT /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/thread-members/@me +## Join Thread % PUT /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/@me -Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) and a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) Gateway event. +Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a [Thread Members Update](/docs/events/gateway-events#thread-members-update) and a [Thread Create](/docs/events/gateway-events#thread-create) Gateway event. -## Add Thread Member % PUT /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/thread-members/{user.id#DOCS_RESOURCES_USER/user-object} +## Add Thread Member % PUT /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/{user.id/docs/resources/user#user-object} -Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) Gateway event. +Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a [Thread Members Update](/docs/events/gateway-events#thread-members-update) Gateway event. -## Leave Thread % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/thread-members/@me +## Leave Thread % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/@me -Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) Gateway event. +Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a [Thread Members Update](/docs/events/gateway-events#thread-members-update) Gateway event. -## Remove Thread Member % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/thread-members/{user.id#DOCS_RESOURCES_USER/user-object} +## Remove Thread Member % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/{user.id/docs/resources/user#user-object} -Removes another member from a thread. Requires the `MANAGE_THREADS` permission, or the creator of the thread if it is a `PRIVATE_THREAD`. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) Gateway event. +Removes another member from a thread. Requires the `MANAGE_THREADS` permission, or the creator of the thread if it is a `PRIVATE_THREAD`. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a [Thread Members Update](/docs/events/gateway-events#thread-members-update) Gateway event. -## Get Thread Member % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/thread-members/{user.id#DOCS_RESOURCES_USER/user-object} +## Get Thread Member % GET /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/{user.id/docs/resources/user#user-object} -Returns a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object for the specified user if they are a member of the thread, returns a 404 response otherwise. +Returns a [thread member](/docs/resources/channel#thread-member-object) object for the specified user if they are a member of the thread, returns a 404 response otherwise. -When `with_member` is set to `true`, the thread member object will include a `member` field containing a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object. +When `with_member` is set to `true`, the thread member object will include a `member` field containing a [guild member](/docs/resources/guild#guild-member-object) object. ###### Query String Params | Field | Type | Description | |--------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------| -| with_member? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether to include a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object for the thread member | +| with_member? | [boolean](/docs/reference#boolean-query-strings) | Whether to include a [guild member](/docs/resources/guild#guild-member-object) object for the thread member | -## List Thread Members % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/thread-members +## List Thread Members % GET /channels/{channel.id/docs/resources/channel#channel-object}/thread-members > warn -> Starting in API v11, this endpoint will always return paginated results. Paginated results can be enabled before API v11 by setting `with_member` to `true`. Read [the changelog](#DOCS_CHANGE_LOG/thread-member-details-and-pagination) for details. +> Starting in API v11, this endpoint will always return paginated results. Paginated results can be enabled before API v11 by setting `with_member` to `true`. Read [the changelog](/docs/change-log#thread-member-details-and-pagination) for details. -Returns array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects that are members of the thread. +Returns array of [thread members](/docs/resources/channel#thread-member-object) objects that are members of the thread. -When `with_member` is set to `true`, the results will be paginated and each thread member object will include a `member` field containing a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object. +When `with_member` is set to `true`, the results will be paginated and each thread member object will include a `member` field containing a [guild member](/docs/resources/guild#guild-member-object) object. > warn -> This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](#DOCS_EVENTS_GATEWAY/privileged-intents) is enabled for your application. +> This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](/docs/events/gateway#privileged-intents) is enabled for your application. ###### Query String Params | Field | Type | Description | |--------------|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------| -| with_member? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether to include a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object for each thread member | +| with_member? | [boolean](/docs/reference#boolean-query-strings) | Whether to include a [guild member](/docs/resources/guild#guild-member-object) object for each thread member | | after? | snowflake | Get thread members after this user ID | | limit? | integer | Max number of thread members to return (1-100). Defaults to 100. | -## List Public Archived Threads % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/threads/archived/public +## List Public Archived Threads % GET /channels/{channel.id/docs/resources/channel#channel-object}/threads/archived/public -Returns archived threads in the channel that are public. When called on a `GUILD_TEXT` channel, returns threads of [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel returns threads of [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) `ANNOUNCEMENT_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission. +Returns archived threads in the channel that are public. When called on a `GUILD_TEXT` channel, returns threads of [type](/docs/resources/channel#channel-object-channel-types) `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel returns threads of [type](/docs/resources/channel#channel-object-channel-types) `ANNOUNCEMENT_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission. ###### Query String Params @@ -674,13 +674,13 @@ Returns archived threads in the channel that are public. When called on a `GUILD | Field | Type | Description | |----------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------| -| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | the public, archived threads | -| members | array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | a thread member object for each returned thread the current user has joined | +| threads | array of [channel](/docs/resources/channel#channel-object) objects | the public, archived threads | +| members | array of [thread members](/docs/resources/channel#thread-member-object) objects | a thread member object for each returned thread the current user has joined | | has_more | boolean | whether there are potentially additional threads that could be returned on a subsequent call | -## List Private Archived Threads % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/threads/archived/private +## List Private Archived Threads % GET /channels/{channel.id/docs/resources/channel#channel-object}/threads/archived/private -Returns archived threads in the channel that are of [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) `PRIVATE_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires both the `READ_MESSAGE_HISTORY` and `MANAGE_THREADS` permissions. +Returns archived threads in the channel that are of [type](/docs/resources/channel#channel-object-channel-types) `PRIVATE_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires both the `READ_MESSAGE_HISTORY` and `MANAGE_THREADS` permissions. ###### Query String Params @@ -693,13 +693,13 @@ Returns archived threads in the channel that are of [type](#DOCS_RESOURCES_CHANN | Field | Type | Description | |----------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------| -| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | the private, archived threads | -| members | array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | a thread member object for each returned thread the current user has joined | +| threads | array of [channel](/docs/resources/channel#channel-object) objects | the private, archived threads | +| members | array of [thread members](/docs/resources/channel#thread-member-object) objects | a thread member object for each returned thread the current user has joined | | has_more | boolean | whether there are potentially additional threads that could be returned on a subsequent call | -## List Joined Private Archived Threads % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/users/@me/threads/archived/private +## List Joined Private Archived Threads % GET /channels/{channel.id/docs/resources/channel#channel-object}/users/@me/threads/archived/private -Returns archived threads in the channel that are of [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) `PRIVATE_THREAD`, and the user has joined. Threads are ordered by their `id`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission. +Returns archived threads in the channel that are of [type](/docs/resources/channel#channel-object-channel-types) `PRIVATE_THREAD`, and the user has joined. Threads are ordered by their `id`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission. ###### Query String Params @@ -712,6 +712,6 @@ Returns archived threads in the channel that are of [type](#DOCS_RESOURCES_CHANN | Field | Type | Description | |----------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------| -| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | the private, archived threads the current user has joined | -| members | array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | a thread member object for each returned thread the current user has joined | +| threads | array of [channel](/docs/resources/channel#channel-object) objects | the private, archived threads the current user has joined | +| members | array of [thread members](/docs/resources/channel#thread-member-object) objects | a thread member object for each returned thread the current user has joined | | has_more | boolean | whether there are potentially additional threads that could be returned on a subsequent call | diff --git a/docs/resources/emoji.md b/docs/resources/emoji.md index 94f50d4d94..c38fc345bf 100644 --- a/docs/resources/emoji.md +++ b/docs/resources/emoji.md @@ -13,10 +13,10 @@ sidebar_label: Emoji | Field | Type | Description | |-----------------|------------------------------------------------------------------|---------------------------------------------------------------------------| -| id | ?snowflake | [emoji id](#DOCS_REFERENCE/image-formatting) | +| id | ?snowflake | [emoji id](/docs/reference#image-formatting) | | name | ?string (can be null only in reaction emoji objects) | emoji name | -| roles? | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids | roles allowed to use this emoji | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | user that created this emoji | +| roles? | array of [role](/docs/topics/permissions#role-object) object ids | roles allowed to use this emoji | +| user? | [user](/docs/resources/user#user-object) object | user that created this emoji | | require_colons? | boolean | whether this emoji must be wrapped in colons | | managed? | boolean | whether this emoji is managed | | animated? | boolean | whether this emoji is animated | @@ -88,20 +88,20 @@ The `user` field of an app emoji object represents the team member that uploaded } ``` -## List Guild Emojis % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis +## List Guild Emojis % GET /guilds/{guild.id/docs/resources/guild#guild-object}/emojis -Returns a list of [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) objects for the given guild. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. +Returns a list of [emoji](/docs/resources/emoji#emoji-object) objects for the given guild. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. -## Get Guild Emoji % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object} +## Get Guild Emoji % GET /guilds/{guild.id/docs/resources/guild#guild-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} -Returns an [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object for the given guild and emoji IDs. Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission, or if the bot created the emoji and has the the `CREATE_GUILD_EXPRESSIONS` permission. +Returns an [emoji](/docs/resources/emoji#emoji-object) object for the given guild and emoji IDs. Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission, or if the bot created the emoji and has the the `CREATE_GUILD_EXPRESSIONS` permission. -## Create Guild Emoji % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis +## Create Guild Emoji % POST /guilds/{guild.id/docs/resources/guild#guild-object}/emojis -Create a new emoji for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. Fires a [Guild Emojis Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-emojis-update) Gateway event. +Create a new emoji for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new [emoji](/docs/resources/emoji#emoji-object) object on success. Fires a [Guild Emojis Update](/docs/events/gateway-events#guild-emojis-update) Gateway event. > warn -> Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/json). +> Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](/docs/topics/opcodes-and-status-codes#json). > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -111,12 +111,12 @@ Create a new emoji for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permis | Field | Type | Description | |-------|------------------------------------------|---------------------------------| | name | string | name of the emoji | -| image | [image data](#DOCS_REFERENCE/image-data) | the 128x128 emoji image | +| image | [image data](/docs/reference#image-data) | the 128x128 emoji image | | roles | array of snowflakes | roles allowed to use this emoji | -## Modify Guild Emoji % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object} +## Modify Guild Emoji % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} -Modify the given emoji. For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. Fires a [Guild Emojis Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-emojis-update) Gateway event. +Modify the given emoji. For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated [emoji](/docs/resources/emoji#emoji-object) object on success. Fires a [Guild Emojis Update](/docs/events/gateway-events#guild-emojis-update) Gateway event. > info > All parameters to this endpoint are optional. @@ -131,16 +131,16 @@ Modify the given emoji. For emojis created by the current user, requires either | name | string | name of the emoji | | roles | ?array of snowflakes | roles allowed to use this emoji | -## Delete Guild Emoji % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object} +## Delete Guild Emoji % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} -Delete the given emoji. For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a [Guild Emojis Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-emojis-update) Gateway event. +Delete the given emoji. For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a [Guild Emojis Update](/docs/events/gateway-events#guild-emojis-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## List Application Emojis % GET /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/emojis +## List Application Emojis % GET /applications/{application.id/docs/resources/application#application-object}/emojis -Returns an object containing a list of [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) objects for the given application under the `items` key. Includes a `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API. +Returns an object containing a list of [emoji](/docs/resources/emoji#emoji-object) objects for the given application under the `items` key. Includes a `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API. ```json { @@ -164,27 +164,27 @@ Returns an object containing a list of [emoji](#DOCS_RESOURCES_EMOJI/emoji-objec } ``` -## Get Application Emoji % GET /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object} +## Get Application Emoji % GET /applications/{application.id/docs/resources/application#application-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} -Returns an [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object for the given application and emoji IDs. Includes the `user` field. +Returns an [emoji](/docs/resources/emoji#emoji-object) object for the given application and emoji IDs. Includes the `user` field. -## Create Application Emoji % POST /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/emojis +## Create Application Emoji % POST /applications/{application.id/docs/resources/application#application-object}/emojis -Create a new emoji for the application. Returns the new [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. +Create a new emoji for the application. Returns the new [emoji](/docs/resources/emoji#emoji-object) object on success. > warn -> Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/json). +> Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](/docs/topics/opcodes-and-status-codes#json). ###### JSON Params | Field | Type | Description | |-------|------------------------------------------|-------------------------| | name | string | name of the emoji | -| image | [image data](#DOCS_REFERENCE/image-data) | the 128x128 emoji image | +| image | [image data](/docs/reference#image-data) | the 128x128 emoji image | -## Modify Application Emoji % PATCH /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object} +## Modify Application Emoji % PATCH /applications/{application.id/docs/resources/application#application-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} -Modify the given emoji. Returns the updated [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. +Modify the given emoji. Returns the updated [emoji](/docs/resources/emoji#emoji-object) object on success. ###### JSON Params @@ -192,6 +192,6 @@ Modify the given emoji. Returns the updated [emoji](#DOCS_RESOURCES_EMOJI/emoji- |-------|--------|-------------------| | name | string | name of the emoji | -## Delete Application Emoji % DELETE /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object} +## Delete Application Emoji % DELETE /applications/{application.id/docs/resources/application#application-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} Delete the given emoji. Returns `204 No Content` on success. diff --git a/docs/resources/entitlement.md b/docs/resources/entitlement.md index 547ed710d6..7e2ff0a84e 100644 --- a/docs/resources/entitlement.md +++ b/docs/resources/entitlement.md @@ -6,7 +6,7 @@ sidebar_label: Entitlement Entitlements in Discord represent that a user or guild has access to a premium offering in your application. -Refer to the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW) for more information on how to use Entitlements in your app. +Refer to the [Monetization Overview](/docs/monetization/overview) for more information on how to use Entitlements in your app. ### Entitlement Object @@ -18,7 +18,7 @@ Refer to the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW) for more infor | sku_id | snowflake | ID of the SKU | | application_id | snowflake | ID of the parent application | | user_id? | snowflake | ID of the user that is granted access to the entitlement's sku | -| type | integer | [Type of entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object-entitlement-types) | +| type | integer | [Type of entitlement](/docs/resources/entitlement#entitlement-object-entitlement-types) | | deleted | boolean | Entitlement was deleted | | starts_at | ?ISO8601 timestamp | Start date at which the entitlement is valid. | | ends_at | ?ISO8601 timestamp | Date at which the entitlement is no longer valid. | @@ -58,7 +58,7 @@ Refer to the [Monetization Overview](#DOCS_MONETIZATION_OVERVIEW) for more infor | PREMIUM_PURCHASE | 7 | Entitlement was claimed by user for free as a Nitro Subscriber | | APPLICATION_SUBSCRIPTION | 8 | Entitlement was purchased as an app subscription | -## List Entitlements % GET /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements +## List Entitlements % GET /applications/{application.id/docs/resources/application#application-object}/entitlements Returns all entitlements for a given app, active and expired. @@ -72,8 +72,8 @@ Returns all entitlements for a given app, active and expired. | after? | snowflake | Retrieve entitlements after this entitlement ID | | limit? | integer | Number of entitlements to return, 1-100, default 100 | | guild_id? | snowflake | Guild ID to look up entitlements for | -| exclude_ended? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not ended entitlements should be omitted. Defaults to false, ended entitlements are included by default. | -| exclude_deleted? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | Whether or not deleted entitlements should be omitted. Defaults to true, deleted entitlements are not included by default. | +| exclude_ended? | [boolean](/docs/reference#boolean-query-strings) | Whether or not ended entitlements should be omitted. Defaults to false, ended entitlements are included by default. | +| exclude_deleted? | [boolean](/docs/reference#boolean-query-strings) | Whether or not deleted entitlements should be omitted. Defaults to true, deleted entitlements are not included by default. | ```json [ @@ -95,7 +95,7 @@ Returns all entitlements for a given app, active and expired. ] ``` -## Get Entitlement % GET /applications/{application.id#DOS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object} +## Get Entitlement % GET /applications/{application.id#DOS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id/docs/resources/entitlement#entitlement-object} Returns an entitlement. @@ -117,13 +117,13 @@ Returns an entitlement. } ``` -## Consume an Entitlement % POST /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object}/consume +## Consume an Entitlement % POST /applications/{application.id/docs/resources/application#application-object}/entitlements/{entitlement.id/docs/resources/entitlement#entitlement-object}/consume -For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using [List Entitlements](#DOCS_RESOURCES_ENTITLEMENT/list-entitlements). +For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using [List Entitlements](/docs/resources/entitlement#list-entitlements). Returns a `204 No Content` on success. -## Create Test Entitlement % POST /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements +## Create Test Entitlement % POST /applications/{application.id/docs/resources/application#application-object}/entitlements Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering. @@ -147,7 +147,7 @@ After creating a test entitlement, you'll need to reload your Discord client. Af } ``` -## Delete Test Entitlement % DELETE /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_RESOURCES_ENTITLEMENT/entitlement-object} +## Delete Test Entitlement % DELETE /applications/{application.id/docs/resources/application#application-object}/entitlements/{entitlement.id/docs/resources/entitlement#entitlement-object} Deletes a currently-active test entitlement. Discord will act as though that user or guild _no longer has_ entitlement to your premium offering. diff --git a/docs/resources/guild-scheduled-event.mdx b/docs/resources/guild-scheduled-event.mdx index 6b12501b33..cee08dd6cc 100644 --- a/docs/resources/guild-scheduled-event.mdx +++ b/docs/resources/guild-scheduled-event.mdx @@ -1,6 +1,6 @@ # Guild Scheduled Event -A representation of a scheduled event in a [guild](#DOCS_RESOURCES_GUILD/). +A representation of a scheduled event in a [guild](/docs/resources/guild#). ### Guild Scheduled Event Object @@ -10,26 +10,26 @@ A representation of a scheduled event in a [guild](#DOCS_RESOURCES_GUILD/). |-----------------------|--------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | the id of the scheduled event | | guild_id | snowflake | the guild id which the scheduled event belongs to | -| channel_id ** | ?snowflake | the channel id in which the scheduled event will be hosted, or `null` if [scheduled entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) is `EXTERNAL` | +| channel_id ** | ?snowflake | the channel id in which the scheduled event will be hosted, or `null` if [scheduled entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) is `EXTERNAL` | | creator_id? * | ?snowflake | the id of the user that created the scheduled event * | | name | string | the name of the scheduled event (1-100 characters) | | description? | ?string | the description of the scheduled event (1-1000 characters) | | scheduled_start_time | ISO8601 timestamp | the time the scheduled event will start | | scheduled_end_time ** | ?ISO8601 timestamp | the time the scheduled event will end, required if entity_type is `EXTERNAL` | -| privacy_level | [privacy level](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | -| status | [event status](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | -| entity_type | [scheduled entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the type of the scheduled event | +| privacy_level | [privacy level](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | +| status | [event status](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | +| entity_type | [scheduled entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the type of the scheduled event | | entity_id | ?snowflake | the id of an entity associated with a guild scheduled event | -| entity_metadata ** | ?[entity metadata](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | additional metadata for the guild scheduled event | -| creator? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that created the scheduled event | +| entity_metadata ** | ?[entity metadata](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | additional metadata for the guild scheduled event | +| creator? | [user](/docs/resources/user#user-object) object | the user that created the scheduled event | | user_count? | integer | the number of users subscribed to the scheduled event | -| image? | ?string | the [cover image hash](#DOCS_REFERENCE/image-formatting) of the scheduled event | -| recurrence_rule | ?[recurrence rule](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | +| image? | ?string | the [cover image hash](/docs/reference#image-formatting) of the scheduled event | +| recurrence_rule | ?[recurrence rule](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | \* `creator_id` will be null and `creator` will not be included for events created before October 25th, 2021, when the concept of `creator_id` was introduced and tracked. -\** See [field requirements by entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) to understand the relationship between `entity_type` and the following fields: `channel_id`, `entity_metadata`, and `scheduled_end_time` +\** See [field requirements by entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) to understand the relationship between `entity_type` and the following fields: `channel_id`, `entity_metadata`, and `scheduled_end_time` ###### Guild Scheduled Event Privacy Level @@ -90,7 +90,7 @@ SCHEDULED --> CANCELED |-------------|--------|------------------------------------------| | location? * | string | location of the event (1-100 characters) | -\* [required](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) for events with `'entity_type': EXTERNAL` +\* [required](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) for events with `'entity_type': EXTERNAL` ### Guild Scheduled Event User Object @@ -99,8 +99,8 @@ SCHEDULED --> CANCELED | Field | Type | Description | |--------------------------|-----------------------------------------------------------|-----------------------------------------------------------------------------------| | guild_scheduled_event_id | snowflake | the scheduled event id which the user subscribed to | -| user | [user](#DOCS_RESOURCES_USER/user-object) | user which subscribed to an event | -| member? | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) | guild member data for this user for the guild which this event belongs to, if any | +| user | [user](/docs/resources/user#user-object) | user which subscribed to an event | +| member? | [guild member](/docs/resources/guild#guild-member-object) | guild member data for this user for the guild which this event belongs to, if any | ### Guild Scheduled Event Recurrence Rule Object Discord's recurrence rule is a subset of the behaviors [defined in the iCalendar RFC](https://datatracker.ietf.org/doc/html/rfc5545) and implemented by [python's dateutil rrule](https://dateutil.readthedocs.io/en/stable/rrule.html) @@ -113,11 +113,11 @@ Discord's recurrence rule is a subset of the behaviors [defined in the iCalendar |-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | start | ISO8601 timestamp | Starting time of the recurrence interval | | end \[1\] | ?ISO8601 timestamp | Ending time of the recurrence interval | -| frequency | [recurrence rule - frequency](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency) object | How often the event occurs | +| frequency | [recurrence rule - frequency](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency) object | How often the event occurs | | interval | int | The spacing between the events, defined by `frequency`. For example, `frequency` of `WEEKLY` and an `interval` of `2` would be "every-other week" | -| by_weekday | ?array of [recurrence rule - weekday](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | Set of specific days within a week for the event to recur on | -| by_n_weekday | ?array of [recurrence rule - n_weekday](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure) objects | List of specific days within a specific week (1-5) to recur on | -| by_month | ?array of [recurrence rule - month](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month) | Set of specific months to recur on | +| by_weekday | ?array of [recurrence rule - weekday](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | Set of specific days within a week for the event to recur on | +| by_n_weekday | ?array of [recurrence rule - n_weekday](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure) objects | List of specific days within a specific week (1-5) to recur on | +| by_month | ?array of [recurrence rule - month](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month) | Set of specific months to recur on | | by_month_day | ?array of int | Set of specific dates within a month to recur on | | by_year_day \[1\] | ?array of int | Set of days within a year to recur on (1-364) | | count \[1\] | ?int | The total amount of times that the event is allowed to recur before stopping | @@ -240,7 +240,7 @@ by_month_day = [24] | Field | Type | Description | |-------|------|-------------------------------| | n | int | The week to reoccur on. 1 - 5 | -| day | [recurrence rule - weekday](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | The day within the week to reoccur on | | guild member data for this user for the guild which this event belongs to, if any | +| day | [recurrence rule - weekday](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | The day within the week to reoccur on | | guild member data for this user for the guild which this event belongs to, if any | ###### Guild Scheduled Event Recurrence Rule - Month @@ -259,19 +259,19 @@ by_month_day = [24] | NOVEMBER | 11 | | DECEMBER | 12 | -## List Scheduled Events for Guild % GET /guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/scheduled-events +## List Scheduled Events for Guild % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events -Returns a list of [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) objects for the given guild. +Returns a list of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) objects for the given guild. ###### Query String Params | Field | Type | Description | |------------------|--------------------------------------------------|--------------------------------------------------| -| with_user_count? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | include number of users subscribed to each event | +| with_user_count? | [boolean](/docs/reference#boolean-query-strings) | include number of users subscribed to each event | -## Create Guild Scheduled Event % POST /guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/scheduled-events +## Create Guild Scheduled Event % POST /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events -Create a guild scheduled event in the guild. Returns a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-create) Gateway event. +Create a guild scheduled event in the guild. Returns a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Create](/docs/events/gateway-events#guild-scheduled-event-create) Gateway event. > info > A guild can have a maximum of 100 events with `SCHEDULED` or `ACTIVE` status at any time. @@ -284,37 +284,37 @@ Create a guild scheduled event in the guild. Returns a [guild scheduled event](# | Field | Type | Description | |------------------------|-----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------| | channel_id? * | snowflake * | the channel id of the scheduled event. | -| entity_metadata? ** | [entity metadata](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | +| entity_metadata? ** | [entity metadata](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | | name | string | the name of the scheduled event | -| privacy_level | [privacy level](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | +| privacy_level | [privacy level](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | | scheduled_start_time | ISO8601 timestamp | the time to schedule the scheduled event | | scheduled_end_time? ** | ISO8601 timestamp | the time when the scheduled event is scheduled to end | | description? | string | the description of the scheduled event | -| entity_type | [entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | -| image? | [image data](#DOCS_REFERENCE/image-data) | the cover image of the scheduled event | -| recurrence_rule? | [recurrence rule](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | +| entity_type | [entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | +| image? | [image data](/docs/reference#image-data) | the cover image of the scheduled event | +| recurrence_rule? | [recurrence rule](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | \* Optional for events with `'entity_type': EXTERNAL` \*\* Required for events with `'entity_type': EXTERNAL` -## Get Guild Scheduled Event % GET /guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/scheduled-events/\{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object\} +## Get Guild Scheduled Event % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\} -Get a guild scheduled event. Returns a [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. +Get a guild scheduled event. Returns a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. ###### Query String Params | Field | Type | Description | |------------------|--------------------------------------------------|--------------------------------------------------| -| with_user_count? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | include number of users subscribed to this event | +| with_user_count? | [boolean](/docs/reference#boolean-query-strings) | include number of users subscribed to this event | -## Modify Guild Scheduled Event % PATCH /guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/scheduled-events/\{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object\} +## Modify Guild Scheduled Event % PATCH /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\} -Modify a guild scheduled event. Returns the modified [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-update) Gateway event. +Modify a guild scheduled event. Returns the modified [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Update](/docs/events/gateway-events#guild-scheduled-event-update) Gateway event. > info -> To start or end an event, use this endpoint to modify the event's [status](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) field. +> To start or end an event, use this endpoint to modify the event's [status](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) field. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -330,38 +330,38 @@ Modify a guild scheduled event. Returns the modified [guild scheduled event](#DO | Field | Type | Description | |-----------------------|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | channel_id? * | ?snowflake | the channel id of the scheduled event, set to `null` if changing entity type to `EXTERNAL` | -| entity_metadata? | ?[entity metadata](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | +| entity_metadata? | ?[entity metadata](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | | name? | string | the name of the scheduled event | -| privacy_level? | [privacy level](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | +| privacy_level? | [privacy level](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | | scheduled_start_time? | ISO8601 timestamp | the time to schedule the scheduled event | | scheduled_end_time? * | ISO8601 timestamp | the time when the scheduled event is scheduled to end | | description? | ?string | the description of the scheduled event | -| entity_type? * | [event entity type](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | -| status? | [event status](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | -| image? | [image data](#DOCS_REFERENCE/image-data) | the cover image of the scheduled event | -| recurrence_rule? | ?[recurrence rule](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | +| entity_type? * | [event entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | +| status? | [event status](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | +| image? | [image data](/docs/reference#image-data) | the cover image of the scheduled event | +| recurrence_rule? | ?[recurrence rule](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | \* If updating `entity_type` to `EXTERNAL`: -- `channel_id` is required and [must be set to null](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) +- `channel_id` is required and [must be set to null](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) - `entity_metadata` with a `location` field must be provided - `scheduled_end_time` must be provided -## Delete Guild Scheduled Event % DELETE /guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/scheduled-events/\{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object\} +## Delete Guild Scheduled Event % DELETE /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\} -Delete a guild scheduled event. Returns a `204` on success. Fires a [Guild Scheduled Event Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-scheduled-event-delete) Gateway event. +Delete a guild scheduled event. Returns a `204` on success. Fires a [Guild Scheduled Event Delete](/docs/events/gateway-events#guild-scheduled-event-delete) Gateway event. -## Get Guild Scheduled Event Users % GET /guilds/\{guild.id#DOCS_RESOURCES_GUILD/guild-object\}/scheduled-events/\{guild_scheduled_event.id#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object\}/users +## Get Guild Scheduled Event Users % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\}/users -Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of [guild scheduled event user](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-user-object) objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set. +Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of [guild scheduled event user](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-user-object) objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set. ###### Query String Params | Field | Type | Description | Default | |--------------|--------------------------------------------------|-----------------------------------------------|---------| | limit? | number | number of users to return (up to maximum 100) | 100 | -| with_member? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | include guild member data if it exists | false | +| with_member? | [boolean](/docs/reference#boolean-query-strings) | include guild member data if it exists | false | | before? * | snowflake | consider only users before given user id | null | | after? * | snowflake | consider only users after given user id | null | diff --git a/docs/resources/guild-template.md b/docs/resources/guild-template.md index 4f7eff26db..c66b44cbe3 100644 --- a/docs/resources/guild-template.md +++ b/docs/resources/guild-template.md @@ -17,11 +17,11 @@ Represents a code that when used, creates a guild based on a snapshot of an exis | description | ?string | the description for the template | | usage_count | integer | number of times this template has been used | | creator_id | snowflake | the ID of the user who created the template | -| creator | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created the template | +| creator | [user](/docs/resources/user#user-object) object | the user who created the template | | created_at | ISO8601 timestamp | when this template was created | | updated_at | ISO8601 timestamp | when this template was last synced to the source guild | | source_guild_id | snowflake | the ID of the guild this template is based on | -| serialized_source_guild | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild snapshot this template contains; placeholder IDs are given as integers | +| serialized_source_guild | partial [guild](/docs/resources/guild#guild-object) object | the guild snapshot this template contains; placeholder IDs are given as integers | | is_dirty | ?boolean | whether the template has unsynced changes | ###### Example Guild Template Object @@ -99,13 +99,13 @@ Represents a code that when used, creates a guild based on a snapshot of an exis } ``` -## Get Guild Template % GET /guilds/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object} +## Get Guild Template % GET /guilds/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} -Returns a [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object for the given code. +Returns a [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object for the given code. -## Create Guild from Guild Template % POST /guilds/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object} +## Create Guild from Guild Template % POST /guilds/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} -Create a new guild based on a template. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) Gateway event. +Create a new guild based on a template. Returns a [guild](/docs/resources/guild#guild-object) object on success. Fires a [Guild Create](/docs/events/gateway-events#guild-create) Gateway event. > warn > This endpoint can be used only by bots in less than 10 guilds. @@ -115,15 +115,15 @@ Create a new guild based on a template. Returns a [guild](#DOCS_RESOURCES_GUILD/ | Field | Type | Description | |-------|------------------------------------------|-----------------------------------------| | name | string | name of the guild (2-100 characters) | -| icon? | [image data](#DOCS_REFERENCE/image-data) | base64 128x128 image for the guild icon | +| icon? | [image data](/docs/reference#image-data) | base64 128x128 image for the guild icon | -## Get Guild Templates % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates +## Get Guild Templates % GET /guilds/{guild.id/docs/resources/guild#guild-object}/templates -Returns an array of [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) objects. Requires the `MANAGE_GUILD` permission. +Returns an array of [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) objects. Requires the `MANAGE_GUILD` permission. -## Create Guild Template % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates +## Create Guild Template % POST /guilds/{guild.id/docs/resources/guild#guild-object}/templates -Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success. +Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. ###### JSON Params @@ -132,13 +132,13 @@ Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Return | name | string | name of the template (1-100 characters) | | description? | ?string | description for the template (0-120 characters) | -## Sync Guild Template % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object} +## Sync Guild Template % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} -Syncs the template to the guild's current state. Requires the `MANAGE_GUILD` permission. Returns the [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success. +Syncs the template to the guild's current state. Requires the `MANAGE_GUILD` permission. Returns the [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. -## Modify Guild Template % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object} +## Modify Guild Template % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} -Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success. +Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. ###### JSON Params @@ -147,6 +147,6 @@ Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Return | name? | string | name of the template (1-100 characters) | | description? | ?string | description for the template (0-120 characters) | -## Delete Guild Template % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/templates/{template.code#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object} +## Delete Guild Template % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} -Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted [guild template](#DOCS_RESOURCES_GUILD_TEMPLATE/guild-template-object) object on success. +Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. diff --git a/docs/resources/guild.md b/docs/resources/guild.md index b98f575cd0..fc84f33d22 100644 --- a/docs/resources/guild.md +++ b/docs/resources/guild.md @@ -11,58 +11,58 @@ Guilds in Discord represent an isolated collection of users and channels, and ar ###### Guild Structure > info -> Fields specific to the `GUILD_CREATE` event are listed in the [Gateway Events documentation](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create). +> Fields specific to the `GUILD_CREATE` event are listed in the [Gateway Events documentation](/docs/events/gateway-events#guild-create). | Field | Type | Description | |--------------------------------|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | guild id | | name | string | guild name (2-100 characters, excluding trailing and leading whitespace) | -| icon | ?string | [icon hash](#DOCS_REFERENCE/image-formatting) | -| icon_hash? | ?string | [icon hash](#DOCS_REFERENCE/image-formatting), returned when in the template object | -| splash | ?string | [splash hash](#DOCS_REFERENCE/image-formatting) | -| discovery_splash | ?string | [discovery splash hash](#DOCS_REFERENCE/image-formatting); only present for guilds with the "DISCOVERABLE" feature | -| owner? \* | boolean | true if [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) is the owner of the guild | +| icon | ?string | [icon hash](/docs/reference#image-formatting) | +| icon_hash? | ?string | [icon hash](/docs/reference#image-formatting), returned when in the template object | +| splash | ?string | [splash hash](/docs/reference#image-formatting) | +| discovery_splash | ?string | [discovery splash hash](/docs/reference#image-formatting); only present for guilds with the "DISCOVERABLE" feature | +| owner? \* | boolean | true if [the user](/docs/resources/user#get-current-user-guilds) is the owner of the guild | | owner_id | snowflake | id of owner | -| permissions? \* | string | total permissions for [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) in the guild (excludes overwrites and [implicit permissions](#DOCS_TOPICS_PERMISSIONS/implicit-permissions)) | -| region? \*\* | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the guild (deprecated) | +| permissions? \* | string | total permissions for [the user](/docs/resources/user#get-current-user-guilds) in the guild (excludes overwrites and [implicit permissions](/docs/topics/permissions#implicit-permissions)) | +| region? \*\* | ?string | [voice region](/docs/resources/voice#voice-region-object) id for the guild (deprecated) | | afk_channel_id | ?snowflake | id of afk channel | | afk_timeout | integer | afk timeout in seconds | | widget_enabled? | boolean | true if the server widget is enabled | | widget_channel_id? | ?snowflake | the channel id that the widget will generate an invite to, or `null` if set to no invite | -| verification_level | integer | [verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) required for the guild | -| default_message_notifications | integer | default [message notifications level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) | -| explicit_content_filter | integer | [explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) | -| roles | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | roles in the guild | -| emojis | array of [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) objects | custom guild emojis | -| features | array of [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) strings | enabled guild features | -| mfa_level | integer | required [MFA level](#DOCS_RESOURCES_GUILD/guild-object-mfa-level) for the guild | +| verification_level | integer | [verification level](/docs/resources/guild#guild-object-verification-level) required for the guild | +| default_message_notifications | integer | default [message notifications level](/docs/resources/guild#guild-object-default-message-notification-level) | +| explicit_content_filter | integer | [explicit content filter level](/docs/resources/guild#guild-object-explicit-content-filter-level) | +| roles | array of [role](/docs/topics/permissions#role-object) objects | roles in the guild | +| emojis | array of [emoji](/docs/resources/emoji#emoji-object) objects | custom guild emojis | +| features | array of [guild feature](/docs/resources/guild#guild-object-guild-features) strings | enabled guild features | +| mfa_level | integer | required [MFA level](/docs/resources/guild#guild-object-mfa-level) for the guild | | application_id | ?snowflake | application id of the guild creator if it is bot-created | | system_channel_id | ?snowflake | the id of the channel where guild notices such as welcome messages and boost events are posted | -| system_channel_flags | integer | [system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags) | +| system_channel_flags | integer | [system channel flags](/docs/resources/guild#guild-object-system-channel-flags) | | rules_channel_id | ?snowflake | the id of the channel where Community guilds can display rules and/or guidelines | | max_presences? | ?integer | the maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) | | max_members? | integer | the maximum number of members for the guild | | vanity_url_code | ?string | the vanity url code for the guild | | description | ?string | the description of a guild | -| banner | ?string | [banner hash](#DOCS_REFERENCE/image-formatting) | -| premium_tier | integer | [premium tier](#DOCS_RESOURCES_GUILD/guild-object-premium-tier) (Server Boost level) | +| banner | ?string | [banner hash](/docs/reference#image-formatting) | +| premium_tier | integer | [premium tier](/docs/resources/guild#guild-object-premium-tier) (Server Boost level) | | premium_subscription_count? | integer | the number of boosts this guild currently has | -| preferred_locale | string | the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" | +| preferred_locale | string | the preferred [locale](/docs/reference#locales) of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" | | public_updates_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive notices from Discord | | max_video_channel_users? | integer | the maximum amount of users in a video channel | | max_stage_video_channel_users? | integer | the maximum amount of users in a stage video channel | | approximate_member_count? | integer | approximate number of members in this guild, returned from the `GET /guilds/` and `/users/@me/guilds` endpoints when `with_counts` is `true` | | approximate_presence_count? | integer | approximate number of non-offline members in this guild, returned from the `GET /guilds/` and `/users/@me/guilds` endpoints when `with_counts` is `true` | -| welcome_screen? | [welcome screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object | the welcome screen of a Community guild, shown to new members, returned in an [Invite](#DOCS_RESOURCES_INVITE/invite-object)'s guild object | -| nsfw_level | integer | [guild NSFW level](#DOCS_RESOURCES_GUILD/guild-object-guild-nsfw-level) | -| stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers | +| welcome_screen? | [welcome screen](/docs/resources/guild#welcome-screen-object) object | the welcome screen of a Community guild, shown to new members, returned in an [Invite](/docs/resources/invite#invite-object)'s guild object | +| nsfw_level | integer | [guild NSFW level](/docs/resources/guild#guild-object-guild-nsfw-level) | +| stickers? | array of [sticker](/docs/resources/sticker#sticker-object) objects | custom guild stickers | | premium_progress_bar_enabled | boolean | whether the guild has the boost progress bar enabled | | safety_alerts_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord | -| incidents_data | ?[incidents data](#DOCS_RESOURCES_GUILD/incidents-data-object) object | the incidents data for this guild | +| incidents_data | ?[incidents data](/docs/resources/guild#incidents-data-object) object | the incidents data for this guild | -\* These fields are only sent when using the [GET Current User Guilds](#DOCS_RESOURCES_USER/get-current-user-guilds) endpoint and are relative to the requested user +\* These fields are only sent when using the [GET Current User Guilds](/docs/resources/user#get-current-user-guilds) endpoint and are relative to the requested user -\*\* This field is deprecated and is replaced by [channel.rtc_region](#DOCS_RESOURCES_CHANNEL/channel-object-channel-structure) +\*\* This field is deprecated and is replaced by [channel.rtc_region](/docs/resources/channel#channel-object-channel-structure) ###### Default Message Notification Level @@ -131,7 +131,7 @@ Guilds in Discord represent an isolated collection of users and channels, and ar |-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | ANIMATED_BANNER | guild has access to set an animated guild banner image | | ANIMATED_ICON | guild has access to set an animated guild icon | -| APPLICATION_COMMAND_PERMISSIONS_V2 | guild is using the [old permissions configuration behavior](#DOCS_CHANGE_LOG/upcoming-application-command-permission-changes) | +| APPLICATION_COMMAND_PERMISSIONS_V2 | guild is using the [old permissions configuration behavior](/docs/change-log#upcoming-application-command-permission-changes) | | AUTO_MODERATION | guild has set up auto moderation rules | | BANNER | guild has access to set a guild banner image | | COMMUNITY | guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates | @@ -142,7 +142,7 @@ Guilds in Discord represent an isolated collection of users and channels, and ar | FEATURABLE | guild is able to be featured in the directory | | INVITES_DISABLED | guild has paused invites, preventing new users from joining | | INVITE_SPLASH | guild has access to set an invite splash background | -| MEMBER_VERIFICATION_GATE_ENABLED | guild has enabled [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) | +| MEMBER_VERIFICATION_GATE_ENABLED | guild has enabled [Membership Screening](/docs/resources/guild#membership-screening-object) | | MORE_SOUNDBOARD | guild has increased custom soundboard sound slots | | MORE_STICKERS | guild has increased custom sticker slots | | NEWS | guild has access to create announcement channels | @@ -221,7 +221,7 @@ Guilds in Discord represent an isolated collection of users and channels, and ar ### Unavailable Guild Object -A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offline Guild, or a Guild whose information has not been provided through [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) events during the Gateway connect. +A partial [guild](/docs/resources/guild#guild-object) object. Represents an Offline Guild, or a Guild whose information has not been provided through [Guild Create](/docs/events/gateway-events#guild-create) events during the Gateway connect. ###### Example Unavailable Guild @@ -240,15 +240,15 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl |----------------------------|-------------------------------------------------------------------------------------|-----------------------------------------------------------| | id | snowflake | guild id | | name | string | guild name (2-100 characters) | -| icon | ?string | [icon hash](#DOCS_REFERENCE/image-formatting) | -| splash | ?string | [splash hash](#DOCS_REFERENCE/image-formatting) | -| discovery_splash | ?string | [discovery splash hash](#DOCS_REFERENCE/image-formatting) | -| emojis | array of [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) objects | custom guild emojis | -| features | array of [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) strings | enabled guild features | +| icon | ?string | [icon hash](/docs/reference#image-formatting) | +| splash | ?string | [splash hash](/docs/reference#image-formatting) | +| discovery_splash | ?string | [discovery splash hash](/docs/reference#image-formatting) | +| emojis | array of [emoji](/docs/resources/emoji#emoji-object) objects | custom guild emojis | +| features | array of [guild feature](/docs/resources/guild#guild-object-guild-features) strings | enabled guild features | | approximate_member_count | integer | approximate number of members in this guild | | approximate_presence_count | integer | approximate number of online members in this guild | | description | ?string | the description for the guild | -| stickers | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers | +| stickers | array of [sticker](/docs/resources/sticker#sticker-object) objects | custom guild stickers | ###### Example Guild Preview @@ -305,8 +305,8 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl | id | snowflake | guild id | | name | string | guild name (2-100 characters) | | instant_invite | ?string | instant invite for the guilds specified widget invite channel | -| channels | array of partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | voice and stage channels which are accessible by @everyone | -| members | array of partial [user](#DOCS_RESOURCES_USER/user-object) objects | special widget user objects that includes users presence (Limit 100) | +| channels | array of partial [channel](/docs/resources/channel#channel-object) objects | voice and stage channels which are accessible by @everyone | +| members | array of partial [user](/docs/resources/user#user-object) objects | special widget user objects that includes users presence (Limit 100) | | presence_count | integer | number of online members in this guild | > warn @@ -351,20 +351,20 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl | Field | Type | Description | |-------------------------------|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user this guild member represents | +| user? | [user](/docs/resources/user#user-object) object | the user this guild member represents | | nick? | ?string | this user's guild nickname | -| avatar? | ?string | the member's [guild avatar hash](#DOCS_REFERENCE/image-formatting) | -| banner? | ?string | the member's [guild banner hash](#DOCS_REFERENCE/image-formatting) | -| roles | array of snowflakes | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids | +| avatar? | ?string | the member's [guild avatar hash](/docs/reference#image-formatting) | +| banner? | ?string | the member's [guild banner hash](/docs/reference#image-formatting) | +| roles | array of snowflakes | array of [role](/docs/topics/permissions#role-object) object ids | | joined_at | ISO8601 timestamp | when the user joined the guild | | premium_since? | ?ISO8601 timestamp | when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild | | deaf | boolean | whether the user is deafened in voice channels | | mute | boolean | whether the user is muted in voice channels | -| flags | integer | [guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags) represented as a bit set, defaults to `0` | -| pending? | boolean | whether the user has not yet passed the guild's [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) requirements | +| flags | integer | [guild member flags](/docs/resources/guild#guild-member-object-guild-member-flags) represented as a bit set, defaults to `0` | +| pending? | boolean | whether the user has not yet passed the guild's [Membership Screening](/docs/resources/guild#membership-screening-object) requirements | | permissions? | string | total permissions of the member in the channel, including overwrites, returned when in the interaction object | | communication_disabled_until? | ?ISO8601 timestamp | when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out | -| avatar_decoration_data? | ?[avatar decoration data](#DOCS_RESOURCES_USER/avatar-decoration-data-object) object | data for the member's guild avatar decoration | +| avatar_decoration_data? | ?[avatar decoration data](/docs/resources/user#avatar-decoration-data-object) object | data for the member's guild avatar decoration | > info > The field `user` won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events. @@ -417,15 +417,15 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl | syncing? \* | boolean | is this integration syncing | | role_id? \* | snowflake | id that this integration uses for "subscribers" | | enable_emoticons? \* | boolean | whether emoticons should be synced for this integration (twitch only currently) | -| expire_behavior? \* | [integration expire behavior](#DOCS_RESOURCES_GUILD/integration-object-integration-expire-behaviors) | the behavior of expiring subscribers | +| expire_behavior? \* | [integration expire behavior](/docs/resources/guild#integration-object-integration-expire-behaviors) | the behavior of expiring subscribers | | expire_grace_period? \* | integer | the grace period (in days) before expiring subscribers | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | user for this integration | -| account | [account](#DOCS_RESOURCES_GUILD/integration-account-object) object | integration account information | +| user? | [user](/docs/resources/user#user-object) object | user for this integration | +| account | [account](/docs/resources/guild#integration-account-object) object | integration account information | | synced_at? \* | ISO8601 timestamp | when this integration was last synced | | subscriber_count? \* | integer | how many subscribers this integration has | | revoked? \* | boolean | has this integration been revoked | -| application? | [application](#DOCS_RESOURCES_GUILD/integration-application-object) object | The bot/OAuth2 application for discord integrations | -| scopes? | array of [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) | the scopes the application has been authorized for | +| application? | [application](/docs/resources/guild#integration-application-object) object | The bot/OAuth2 application for discord integrations | +| scopes? | array of [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) | the scopes the application has been authorized for | \* These fields are not provided for discord bot integrations. > warn @@ -455,9 +455,9 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl |-------------|-------------------------------------------------|--------------------------------------------------------------| | id | snowflake | the id of the app | | name | string | the name of the app | -| icon | ?string | the [icon hash](#DOCS_REFERENCE/image-formatting) of the app | +| icon | ?string | the [icon hash](/docs/reference#image-formatting) of the app | | description | string | the description of the app | -| bot? | [user](#DOCS_RESOURCES_USER/user-object) object | the bot associated with this application | +| bot? | [user](/docs/resources/user#user-object) object | the bot associated with this application | ### Ban Object @@ -466,7 +466,7 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl | Field | Type | Description | |--------|-------------------------------------------------|------------------------| | reason | ?string | the reason for the ban | -| user | [user](#DOCS_RESOURCES_USER/user-object) object | the banned user | +| user | [user](/docs/resources/user#user-object) object | the banned user | ###### Example Ban @@ -490,7 +490,7 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl | Field | Type | Description | |------------------|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| | description | ?string | the server description shown in the welcome screen | -| welcome_channels | array of [welcome screen channel](#DOCS_RESOURCES_GUILD/welcome-screen-object-welcome-screen-channel-structure) objects | the channels shown in the welcome screen, up to 5 | +| welcome_channels | array of [welcome screen channel](/docs/resources/guild#welcome-screen-object-welcome-screen-channel-structure) objects | the channels shown in the welcome screen, up to 5 | ###### Welcome Screen Channel Structure @@ -498,7 +498,7 @@ A partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object. Represents an Offl |-------------|------------|-------------------------------------------------------------------------------------------| | channel_id | snowflake | the channel's id | | description | string | the description shown for the channel | -| emoji_id | ?snowflake | the [emoji id](#DOCS_REFERENCE/image-formatting), if the emoji is custom | +| emoji_id | ?snowflake | the [emoji id](/docs/reference#image-formatting), if the emoji is custom | | emoji_name | ?string | the emoji name if custom, the unicode character if standard, or `null` if no emoji is set | ###### Example Welcome Screen @@ -550,18 +550,18 @@ Represents the [onboarding](https://support.discord.com/hc/en-us/articles/110749 | Field | Type | Description | |---------------------|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------| | guild_id | snowflake | ID of the guild this onboarding is part of | -| prompts | array of [onboarding prompt](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-prompt-structure) objects | Prompts shown during onboarding and in customize community | +| prompts | array of [onboarding prompt](/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure) objects | Prompts shown during onboarding and in customize community | | default_channel_ids | array of snowflakes | Channel IDs that members get opted into automatically | | enabled | boolean | Whether onboarding is enabled in the guild | -| mode | [onboarding mode](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-mode) | Current mode of onboarding | +| mode | [onboarding mode](/docs/resources/guild#guild-onboarding-object-onboarding-mode) | Current mode of onboarding | ###### Onboarding Prompt Structure | Field | Type | Description | |---------------|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the prompt | -| type | [prompt type](#DOCS_RESOURCES_GUILD/guild-onboarding-object-prompt-types) | Type of prompt | -| options | array of [prompt option](#DOCS_RESOURCES_GUILD/guild-onboarding-object-prompt-option-structure) objects | Options available within the prompt | +| type | [prompt type](/docs/resources/guild#guild-onboarding-object-prompt-types) | Type of prompt | +| options | array of [prompt option](/docs/resources/guild#guild-onboarding-object-prompt-option-structure) objects | Options available within the prompt | | title | string | Title of the prompt | | single_select | boolean | Indicates whether users are limited to selecting one option for the prompt | | required | boolean | Indicates whether the prompt is required before a user completes the onboarding flow | @@ -574,7 +574,7 @@ Represents the [onboarding](https://support.discord.com/hc/en-us/articles/110749 | id | snowflake | ID of the prompt option | | channel_ids | array of snowflakes | IDs for channels a member is added to when the option is selected | | role_ids | array of snowflakes | IDs for roles assigned to a member when the option is selected | -| emoji? | [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | Emoji of the option (see below) | +| emoji? | [emoji](/docs/resources/emoji#emoji-object) object | Emoji of the option (see below) | | emoji_id? | snowflake | Emoji ID of the option (see below) | | emoji_name? | string | Emoji name of the option (see below) | | emoji_animated? | boolean | Whether the emoji is animated (see below) | @@ -660,7 +660,7 @@ Defines the criteria used to satisfy Onboarding constraints that are required fo ### Membership Screening Object -In guilds with [Membership Screening](https://support.discord.com/hc/en-us/articles/1500000466882) enabled, when a member joins, [Guild Member Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-add) will be emitted but they will initially be restricted from doing any actions in the guild, and `pending` will be true in the [member object](#DOCS_RESOURCES_GUILD/guild-member-object). When the member completes the screening, [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) will be emitted and `pending` will be false. +In guilds with [Membership Screening](https://support.discord.com/hc/en-us/articles/1500000466882) enabled, when a member joins, [Guild Member Add](/docs/events/gateway-events#guild-member-add) will be emitted but they will initially be restricted from doing any actions in the guild, and `pending` will be true in the [member object](/docs/resources/guild#guild-member-object). When the member completes the screening, [Guild Member Update](/docs/events/gateway-events#guild-member-update) will be emitted and `pending` will be false. > warn > We are making significant changes to the Membership Screening API specifically related to getting and editing the Membership Screening object. Long story short is that it can be improved. As such, we have removed those documentation. There will **not be** any changes to how pending members work, as outlined above. That behavior will stay the same. @@ -687,7 +687,7 @@ In guilds with [Membership Screening](https://support.discord.com/hc/en-us/artic ## Create Guild % POST /guilds -Create a new guild. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) Gateway event. +Create a new guild. Returns a [guild](/docs/resources/guild#guild-object) object on success. Fires a [Guild Create](/docs/events/gateway-events#guild-create) Gateway event. > warn > This endpoint can be used only by bots in less than 10 guilds. @@ -697,23 +697,23 @@ Create a new guild. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object | Field | Type | Description | |--------------------------------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | name | string | name of the guild (2-100 characters) | -| region? | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id (deprecated) | -| icon? | [image data](#DOCS_REFERENCE/image-data) | base64 128x128 image for the guild icon | -| verification_level? | integer | [verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) | -| default_message_notifications? | integer | default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) | -| explicit_content_filter? | integer | [explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) | -| roles? | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects | new guild roles | -| channels? | array of partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | new guild's channels | +| region? | ?string | [voice region](/docs/resources/voice#voice-region-object) id (deprecated) | +| icon? | [image data](/docs/reference#image-data) | base64 128x128 image for the guild icon | +| verification_level? | integer | [verification level](/docs/resources/guild#guild-object-verification-level) | +| default_message_notifications? | integer | default [message notification level](/docs/resources/guild#guild-object-default-message-notification-level) | +| explicit_content_filter? | integer | [explicit content filter level](/docs/resources/guild#guild-object-explicit-content-filter-level) | +| roles? | array of [role](/docs/topics/permissions#role-object) objects | new guild roles | +| channels? | array of partial [channel](/docs/resources/channel#channel-object) objects | new guild's channels | | afk_channel_id? | snowflake | id for afk channel | | afk_timeout? | integer | afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 | | system_channel_id? | snowflake | the id of the channel where guild notices such as welcome messages and boost events are posted | -| system_channel_flags? | integer | [system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags) | +| system_channel_flags? | integer | [system channel flags](/docs/resources/guild#guild-object-system-channel-flags) | > warn > When using the `roles` parameter, the first member of the array is used to change properties of the guild's `@everyone` role. If you are trying to bootstrap a guild with additional roles, keep this in mind. > info -> When using the `roles` parameter, the required `id` field within each role object is an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) a role's permissions in a channel when also passing in channels with the channels array. +> When using the `roles` parameter, the required `id` field within each role object is an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to [overwrite](/docs/resources/channel#overwrite-object) a role's permissions in a channel when also passing in channels with the channels array. > warn > When using the `channels` parameter, the `position` field is ignored, and none of the default channels are created. @@ -722,7 +722,7 @@ Create a new guild. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object > When using the `channels` parameter, the `id` field within each channel object may be set to an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels by setting the `parent_id` field on any children to the category's `id` field. Category channels must be listed before any children. > warn -> The `region` field is deprecated and is replaced by [channel.rtc_region](#DOCS_RESOURCES_CHANNEL/channel-object-channel-structure). +> The `region` field is deprecated and is replaced by [channel.rtc_region](/docs/resources/channel#channel-object-channel-structure). ###### Example Partial Channel Object @@ -749,15 +749,15 @@ Create a new guild. Returns a [guild](#DOCS_RESOURCES_GUILD/guild-object) object } ``` -## Get Guild % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object} +## Get Guild % GET /guilds/{guild.id/docs/resources/guild#guild-object} -Returns the [guild](#DOCS_RESOURCES_GUILD/guild-object) object for the given id. If `with_counts` is set to `true`, this endpoint will also return `approximate_member_count` and `approximate_presence_count` for the guild. +Returns the [guild](/docs/resources/guild#guild-object) object for the given id. If `with_counts` is set to `true`, this endpoint will also return `approximate_member_count` and `approximate_presence_count` for the guild. ###### Query String Params | Field | Type | Description | Required | Default | |--------------|--------------------------------------------------|-------------------------------------------------------------------------------|----------|---------| -| with_counts? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | when `true`, will return approximate member and presence counts for the guild | false | false | +| with_counts? | [boolean](/docs/reference#boolean-query-strings) | when `true`, will return approximate member and presence counts for the guild | false | false | ###### Example Response @@ -830,14 +830,14 @@ Returns the [guild](#DOCS_RESOURCES_GUILD/guild-object) object for the given id. } ``` -## Get Guild Preview % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/preview +## Get Guild Preview % GET /guilds/{guild.id/docs/resources/guild#guild-object}/preview -Returns the [guild preview](#DOCS_RESOURCES_GUILD/guild-preview-object) object for the given id. -If the user is not in the guild, then the guild must be [discoverable](#DOCS_RESOURCES_GUILD/guild-object-guild-features). +Returns the [guild preview](/docs/resources/guild#guild-preview-object) object for the given id. +If the user is not in the guild, then the guild must be [discoverable](/docs/resources/guild#guild-object-guild-features). -## Modify Guild % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object} +## Modify Guild % PATCH /guilds/{guild.id/docs/resources/guild#guild-object} -Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the updated [guild](#DOCS_RESOURCES_GUILD/guild-object) object on success. Fires a [Guild Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-update) Gateway event. +Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the updated [guild](/docs/resources/guild#guild-object) object on success. Fires a [Guild Update](/docs/events/gateway-events#guild-update) Gateway event. > info > All parameters to this endpoint are optional @@ -846,45 +846,45 @@ Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the u > This endpoint supports the `X-Audit-Log-Reason` header. > warn -> Attempting to add or remove the `COMMUNITY` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) requires the `ADMINISTRATOR` permission. +> Attempting to add or remove the `COMMUNITY` [guild feature](/docs/resources/guild#guild-object-guild-features) requires the `ADMINISTRATOR` permission. ###### JSON Params | Field | Type | Description | |-------------------------------|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| | name | string | guild name | -| region | ?string | guild [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id (deprecated) | -| verification_level | ?integer | [verification level](#DOCS_RESOURCES_GUILD/guild-object-verification-level) | -| default_message_notifications | ?integer | default [message notification level](#DOCS_RESOURCES_GUILD/guild-object-default-message-notification-level) | -| explicit_content_filter | ?integer | [explicit content filter level](#DOCS_RESOURCES_GUILD/guild-object-explicit-content-filter-level) | +| region | ?string | guild [voice region](/docs/resources/voice#voice-region-object) id (deprecated) | +| verification_level | ?integer | [verification level](/docs/resources/guild#guild-object-verification-level) | +| default_message_notifications | ?integer | default [message notification level](/docs/resources/guild#guild-object-default-message-notification-level) | +| explicit_content_filter | ?integer | [explicit content filter level](/docs/resources/guild#guild-object-explicit-content-filter-level) | | afk_channel_id | ?snowflake | id for afk channel | | afk_timeout | integer | afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 | -| icon | ?[image data](#DOCS_REFERENCE/image-data) | base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the `ANIMATED_ICON` feature) | +| icon | ?[image data](/docs/reference#image-data) | base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the `ANIMATED_ICON` feature) | | owner_id | snowflake | user id to transfer guild ownership to (must be owner) | -| splash | ?[image data](#DOCS_REFERENCE/image-data) | base64 16:9 png/jpeg image for the guild splash (when the server has the `INVITE_SPLASH` feature) | -| discovery_splash | ?[image data](#DOCS_REFERENCE/image-data) | base64 16:9 png/jpeg image for the guild discovery splash (when the server has the `DISCOVERABLE` feature) | -| banner | ?[image data](#DOCS_REFERENCE/image-data) | base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature) | +| splash | ?[image data](/docs/reference#image-data) | base64 16:9 png/jpeg image for the guild splash (when the server has the `INVITE_SPLASH` feature) | +| discovery_splash | ?[image data](/docs/reference#image-data) | base64 16:9 png/jpeg image for the guild discovery splash (when the server has the `DISCOVERABLE` feature) | +| banner | ?[image data](/docs/reference#image-data) | base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature) | | system_channel_id | ?snowflake | the id of the channel where guild notices such as welcome messages and boost events are posted | -| system_channel_flags | integer | [system channel flags](#DOCS_RESOURCES_GUILD/guild-object-system-channel-flags) | +| system_channel_flags | integer | [system channel flags](/docs/resources/guild#guild-object-system-channel-flags) | | rules_channel_id | ?snowflake | the id of the channel where Community guilds display rules and/or guidelines | | public_updates_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive notices from Discord | -| preferred_locale | ?string | the preferred [locale](#DOCS_REFERENCE/locales) of a Community guild used in server discovery and notices from Discord; defaults to "en-US" | -| features | array of [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) strings | enabled guild features | +| preferred_locale | ?string | the preferred [locale](/docs/reference#locales) of a Community guild used in server discovery and notices from Discord; defaults to "en-US" | +| features | array of [guild feature](/docs/resources/guild#guild-object-guild-features) strings | enabled guild features | | description | ?string | the description for the guild | | premium_progress_bar_enabled | boolean | whether the guild's boost progress bar should be enabled | | safety_alerts_channel_id | ?snowflake | the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord | -## Delete Guild % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object} +## Delete Guild % DELETE /guilds/{guild.id/docs/resources/guild#guild-object} -Delete a guild permanently. User must be owner. Returns `204 No Content` on success. Fires a [Guild Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-delete) Gateway event. +Delete a guild permanently. User must be owner. Returns `204 No Content` on success. Fires a [Guild Delete](/docs/events/gateway-events#guild-delete) Gateway event. -## Get Guild Channels % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/channels +## Get Guild Channels % GET /guilds/{guild.id/docs/resources/guild#guild-object}/channels -Returns a list of guild [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects. Does not include threads. +Returns a list of guild [channel](/docs/resources/channel#channel-object) objects. Does not include threads. -## Create Guild Channel % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/channels +## Create Guild Channel % POST /guilds/{guild.id/docs/resources/guild#guild-object}/channels -Create a new [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object for the guild. Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. Returns the new [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object on success. Fires a [Channel Create](#DOCS_EVENTS_GATEWAY_EVENTS/channel-create) Gateway event. +Create a new [channel](/docs/resources/channel#channel-object) object for the guild. Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. Returns the new [channel](/docs/resources/channel#channel-object) object on success. Fires a [Channel Create](/docs/events/gateway-events#channel-create) Gateway event. > info > All parameters to this endpoint are optional and nullable excluding `name` @@ -897,31 +897,31 @@ Create a new [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object for the gu | Field | Type | Description | Channel Type | |------------------------------------|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------| | name | string | channel name (1-100 characters) | All | -| type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) | All | +| type | integer | the [type of channel](/docs/resources/channel#channel-object-channel-types) | All | | topic | string | channel topic (0-1024 characters) | Text, Announcement, Forum, Media | | bitrate\* | integer | the bitrate (in bits) of the voice or stage channel; min 8000 | Voice, Stage | | user_limit | integer | the user limit of the voice channel | Voice, Stage | | rate_limit_per_user | integer | amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected | Text, Voice, Stage, Forum, Media | | position | integer | sorting position of the channel (channels with the same position are sorted by id) | All | -| permission_overwrites\*\* | array of partial [overwrite](#DOCS_RESOURCES_CHANNEL/overwrite-object) objects | the channel's permission overwrites | All | +| permission_overwrites\*\* | array of partial [overwrite](/docs/resources/channel#overwrite-object) objects | the channel's permission overwrites | All | | parent_id | snowflake | id of the parent category for a channel | Text, Voice, Announcement, Stage, Forum, Media | | nsfw | boolean | whether the channel is nsfw | Text, Voice, Announcement, Stage, Forum | -| rtc_region | string | channel [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id of the voice or stage channel, automatic when set to null | Voice, Stage | -| video_quality_mode | integer | the camera [video quality mode](#DOCS_RESOURCES_CHANNEL/channel-object-video-quality-modes) of the voice channel | Voice, Stage | +| rtc_region | string | channel [voice region](/docs/resources/voice#voice-region-object) id of the voice or stage channel, automatic when set to null | Voice, Stage | +| video_quality_mode | integer | the camera [video quality mode](/docs/resources/channel#channel-object-video-quality-modes) of the voice channel | Voice, Stage | | default_auto_archive_duration | integer | the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity | Text, Announcement, Forum, Media | -| default_reaction_emoji | [default reaction](#DOCS_RESOURCES_CHANNEL/default-reaction-object) object | emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | Forum, Media | -| available_tags | array of [tag](#DOCS_RESOURCES_CHANNEL/forum-tag-object) objects | set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | Forum, Media | -| default_sort_order | integer | the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels | Forum, Media | -| default_forum_layout | integer | the [default forum layout view](#DOCS_RESOURCES_CHANNEL/channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels | Forum | +| default_reaction_emoji | [default reaction](/docs/resources/channel#default-reaction-object) object | emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | Forum, Media | +| available_tags | array of [tag](/docs/resources/channel#forum-tag-object) objects | set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel | Forum, Media | +| default_sort_order | integer | the [default sort order type](/docs/resources/channel#channel-object-sort-order-types) used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels | Forum, Media | +| default_forum_layout | integer | the [default forum layout view](/docs/resources/channel#channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels | Forum | | default_thread_rate_limit_per_user | integer | the initial `rate_limit_per_user` to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. | Text, Announcement, Forum, Media | -\* For voice channels, normal servers can set bitrate up to 96000, servers with Boost level 1 can set up to 128000, servers with Boost level 2 can set up to 256000, and servers with Boost level 3 or the `VIP_REGIONS` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) can set up to 384000. For stage channels, bitrate can be set up to 64000. +\* For voice channels, normal servers can set bitrate up to 96000, servers with Boost level 1 can set up to 128000, servers with Boost level 2 can set up to 256000, and servers with Boost level 3 or the `VIP_REGIONS` [guild feature](/docs/resources/guild#guild-object-guild-features) can set up to 384000. For stage channels, bitrate can be set up to 64000. \*\* In each overwrite object, the `allow` and `deny` keys can be omitted or set to `null`, which both default to `"0"`. -## Modify Guild Channel Positions % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/channels +## Modify Guild Channel Positions % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/channels -Modify the positions of a set of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects for the guild. Requires `MANAGE_CHANNELS` permission. Returns a 204 empty response on success. Fires multiple [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) Gateway events. +Modify the positions of a set of [channel](/docs/resources/channel#channel-object) objects for the guild. Requires `MANAGE_CHANNELS` permission. Returns a 204 empty response on success. Fires multiple [Channel Update](/docs/events/gateway-events#channel-update) Gateway events. > info > Only channels to be modified are required. @@ -937,7 +937,7 @@ This endpoint takes a JSON array of parameters in the following format: | lock_permissions? | ?boolean | syncs the permission overwrites with the new parent, if moving to a new category | | parent_id? | ?snowflake | the new parent ID for the channel that is moved | -## List Active Guild Threads % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/threads/active +## List Active Guild Threads % GET /guilds/{guild.id/docs/resources/guild#guild-object}/threads/active Returns all active threads in the guild, including public and private threads. Threads are ordered by their `id`, in descending order. @@ -945,19 +945,19 @@ Returns all active threads in the guild, including public and private threads. T | Field | Type | Description | |---------|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------| -| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | the active threads | -| members | array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | a thread member object for each returned thread the current user has joined | +| threads | array of [channel](/docs/resources/channel#channel-object) objects | the active threads | +| members | array of [thread members](/docs/resources/channel#thread-member-object) objects | a thread member object for each returned thread the current user has joined | -## Get Guild Member % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object} +## Get Guild Member % GET /guilds/{guild.id/docs/resources/guild#guild-object}/members/{user.id/docs/resources/user#user-object} -Returns a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object for the specified user. +Returns a [guild member](/docs/resources/guild#guild-member-object) object for the specified user. -## List Guild Members % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members +## List Guild Members % GET /guilds/{guild.id/docs/resources/guild#guild-object}/members -Returns a list of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects that are members of the guild. +Returns a list of [guild member](/docs/resources/guild#guild-member-object) objects that are members of the guild. > warn -> This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](#DOCS_EVENTS_GATEWAY/privileged-intents) is enabled for your application. +> This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged Intent](/docs/events/gateway#privileged-intents) is enabled for your application. > info > All parameters to this endpoint are optional @@ -969,9 +969,9 @@ Returns a list of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) obje | limit | integer | max number of members to return (1-1000) | 1 | | after | snowflake | the highest user id in the previous page | 0 | -## Search Guild Members % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/search +## Search Guild Members % GET /guilds/{guild.id/docs/resources/guild#guild-object}/members/search -Returns a list of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects whose username or nickname starts with a provided string. +Returns a list of [guild member](/docs/resources/guild#guild-member-object) objects whose username or nickname starts with a provided string. > info > All parameters to this endpoint except for `query` are optional @@ -983,11 +983,11 @@ Returns a list of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) obje | query | string | Query string to match username(s) and nickname(s) against. | | | limit | integer | max number of members to return (1-1000) | 1 | -## Add Guild Member % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object} +## Add Guild Member % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/members/{user.id/docs/resources/user#user-object} -Adds a user to the guild, provided you have a valid oauth2 access token for the user with the `guilds.join` scope. Returns a 201 Created with the [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) as the body, or 204 No Content if the user is already a member of the guild. Fires a [Guild Member Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-add) Gateway event. +Adds a user to the guild, provided you have a valid oauth2 access token for the user with the `guilds.join` scope. Returns a 201 Created with the [guild member](/docs/resources/guild#guild-member-object) as the body, or 204 No Content if the user is already a member of the guild. Fires a [Guild Member Add](/docs/events/gateway-events#guild-member-add) Gateway event. -For guilds with [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screening-object) enabled, this endpoint will default to adding new members as `pending` in the [guild member object](#DOCS_RESOURCES_GUILD/guild-member-object). Members that are `pending` will have to complete membership screening before they become full members that can talk. +For guilds with [Membership Screening](/docs/resources/guild#membership-screening-object) enabled, this endpoint will default to adding new members as `pending` in the [guild member object](/docs/resources/guild#guild-member-object). Members that are `pending` will have to complete membership screening before they become full members that can talk. > info > All parameters to this endpoint except for `access_token` are optional. @@ -1006,9 +1006,9 @@ For guilds with [Membership Screening](#DOCS_RESOURCES_GUILD/membership-screenin | deaf | boolean | whether the user is deafened in voice channels | DEAFEN_MEMBERS | -## Modify Guild Member % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object} +## Modify Guild Member % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/members/{user.id/docs/resources/user#user-object} -Modify attributes of a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Returns a 200 OK with the [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) as the body. Fires a [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) Gateway event. If the `channel_id` is set to null, this will force the target user to be disconnected from voice. +Modify attributes of a [guild member](/docs/resources/guild#guild-member-object). Returns a 200 OK with the [guild member](/docs/resources/guild#guild-member-object) as the body. Fires a [Guild Member Update](/docs/events/gateway-events#guild-member-update) Gateway event. If the `channel_id` is set to null, this will force the target user to be disconnected from voice. > info > All parameters to this endpoint are optional and nullable. When moving members to channels, the API user _must_ have permissions to both connect to the channel and have the `MOVE_MEMBERS` permission. @@ -1026,11 +1026,11 @@ Modify attributes of a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) | deaf | boolean | whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel | DEAFEN_MEMBERS | | channel_id | snowflake | id of channel to move user to (if they are connected to voice) | MOVE_MEMBERS | | communication_disabled_until | ISO8601 timestamp | when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild | MODERATE_MEMBERS | -| flags | integer | [guild member flags](#DOCS_RESOURCES_GUILD/guild-member-object-guild-member-flags) | MANAGE_GUILD or MANAGE_ROLES or (MODERATE_MEMBERS and KICK_MEMBERS and BAN_MEMBERS) | +| flags | integer | [guild member flags](/docs/resources/guild#guild-member-object-guild-member-flags) | MANAGE_GUILD or MANAGE_ROLES or (MODERATE_MEMBERS and KICK_MEMBERS and BAN_MEMBERS) | -## Modify Current Member % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/@me +## Modify Current Member % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/members/@me -Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) Gateway event. +Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a [Guild Member Update](/docs/events/gateway-events#guild-member-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -1041,12 +1041,12 @@ Modifies the current member in a guild. Returns a 200 with the updated member ob |-------|---------|---------------------------------|-----------------| | nick? | ?string | value to set user's nickname to | CHANGE_NICKNAME | -## Modify Current User Nick % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/@me/nick +## Modify Current User Nick % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/members/@me/nick > danger -> Deprecated in favor of [Modify Current Member](#DOCS_RESOURCES_GUILD/modify-current-member). +> Deprecated in favor of [Modify Current Member](/docs/resources/guild#modify-current-member). -Modifies the nickname of the current user in a guild. Returns a 200 with the nickname on success. Fires a [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) Gateway event. +Modifies the nickname of the current user in a guild. Returns a 200 with the nickname on success. Fires a [Guild Member Update](/docs/events/gateway-events#guild-member-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -1057,30 +1057,30 @@ Modifies the nickname of the current user in a guild. Returns a 200 with the nic |-------|---------|---------------------------------|-----------------| | nick? | ?string | value to set user's nickname to | CHANGE_NICKNAME | -## Add Guild Member Role % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object} +## Add Guild Member Role % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/members/{user.id/docs/resources/user#user-object}/roles/{role.id/docs/topics/permissions#role-object} -Adds a role to a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) Gateway event. +Adds a role to a [guild member](/docs/resources/guild#guild-member-object). Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Member Update](/docs/events/gateway-events#guild-member-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Remove Guild Member Role % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object} +## Remove Guild Member Role % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/members/{user.id/docs/resources/user#user-object}/roles/{role.id/docs/topics/permissions#role-object} -Removes a role from a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object). Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) Gateway event. +Removes a role from a [guild member](/docs/resources/guild#guild-member-object). Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Member Update](/docs/events/gateway-events#guild-member-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Remove Guild Member % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/members/{user.id#DOCS_RESOURCES_USER/user-object} +## Remove Guild Member % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/members/{user.id/docs/resources/user#user-object} -Remove a member from a guild. Requires `KICK_MEMBERS` permission. Returns a 204 empty response on success. Fires a [Guild Member Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-remove) Gateway event. +Remove a member from a guild. Requires `KICK_MEMBERS` permission. Returns a 204 empty response on success. Fires a [Guild Member Remove](/docs/events/gateway-events#guild-member-remove) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Get Guild Bans % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans +## Get Guild Bans % GET /guilds/{guild.id/docs/resources/guild#guild-object}/bans -Returns a list of [ban](#DOCS_RESOURCES_GUILD/ban-object) objects for the users banned from this guild. Requires the `BAN_MEMBERS` permission. +Returns a list of [ban](/docs/resources/guild#ban-object) objects for the users banned from this guild. Requires the `BAN_MEMBERS` permission. ###### Query String Params @@ -1092,13 +1092,13 @@ Returns a list of [ban](#DOCS_RESOURCES_GUILD/ban-object) objects for the users \* Provide a user id to `before` and `after` for pagination. Users will always be returned in ascending order by `user.id`. If both `before` and `after` are provided, only `before` is respected. -## Get Guild Ban % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans/{user.id#DOCS_RESOURCES_USER/user-object} +## Get Guild Ban % GET /guilds/{guild.id/docs/resources/guild#guild-object}/bans/{user.id/docs/resources/user#user-object} -Returns a [ban](#DOCS_RESOURCES_GUILD/ban-object) object for the given user or a 404 not found if the ban cannot be found. Requires the `BAN_MEMBERS` permission. +Returns a [ban](/docs/resources/guild#ban-object) object for the given user or a 404 not found if the ban cannot be found. Requires the `BAN_MEMBERS` permission. -## Create Guild Ban % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans/{user.id#DOCS_RESOURCES_USER/user-object} +## Create Guild Ban % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/bans/{user.id/docs/resources/user#user-object} -Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the `BAN_MEMBERS` permission. Returns a 204 empty response on success. Fires a [Guild Ban Add](#DOCS_EVENTS_GATEWAY_EVENTS/guild-ban-add) Gateway event. +Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the `BAN_MEMBERS` permission. Returns a 204 empty response on success. Fires a [Guild Ban Add](/docs/events/gateway-events#guild-ban-add) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -1110,14 +1110,14 @@ Create a guild ban, and optionally delete previous messages sent by the banned u | delete_message_days? | integer | number of days to delete messages for (0-7) (deprecated) | 0 | | delete_message_seconds? | integer | number of seconds to delete messages for, between 0 and 604800 (7 days) | 0 | -## Remove Guild Ban % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bans/{user.id#DOCS_RESOURCES_USER/user-object} +## Remove Guild Ban % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/bans/{user.id/docs/resources/user#user-object} -Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Returns a 204 empty response on success. Fires a [Guild Ban Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-ban-remove) Gateway event. +Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Returns a 204 empty response on success. Fires a [Guild Ban Remove](/docs/events/gateway-events#guild-ban-remove) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Bulk Guild Ban % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/bulk-ban +## Bulk Guild Ban % POST /guilds/{guild.id/docs/resources/guild#guild-object}/bulk-ban Ban up to 200 users from a guild, and optionally delete previous messages sent by the banned users. Requires both the `BAN_MEMBERS` and `MANAGE_GUILD` permissions. Returns a 200 response on success, including the fields `banned_users` with the IDs of the banned users and `failed_users` with IDs that could not be banned or were already banned. @@ -1143,17 +1143,17 @@ On success, this endpoint returns a 200 success response with the following body > info > If none of the users could be banned, an error response code `500000: Failed to ban users` is returned instead. -## Get Guild Roles % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles +## Get Guild Roles % GET /guilds/{guild.id/docs/resources/guild#guild-object}/roles -Returns a list of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects for the guild. +Returns a list of [role](/docs/topics/permissions#role-object) objects for the guild. -## Get Guild Role % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object} +## Get Guild Role % GET /guilds/{guild.id/docs/resources/guild#guild-object}/roles/{role.id/docs/topics/permissions#role-object} -Returns a [role](#DOCS_TOPICS_PERMISSIONS/role-object) object for the specified role. +Returns a [role](/docs/topics/permissions#role-object) object for the specified role. -## Create Guild Role % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles +## Create Guild Role % POST /guilds/{guild.id/docs/resources/guild#guild-object}/roles -Create a new [role](#DOCS_TOPICS_PERMISSIONS/role-object) for the guild. Requires the `MANAGE_ROLES` permission. Returns the new [role](#DOCS_TOPICS_PERMISSIONS/role-object) object on success. Fires a [Guild Role Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-create) Gateway event. All JSON params are optional. +Create a new [role](/docs/topics/permissions#role-object) for the guild. Requires the `MANAGE_ROLES` permission. Returns the new [role](/docs/topics/permissions#role-object) object on success. Fires a [Guild Role Create](/docs/events/gateway-events#guild-role-create) Gateway event. All JSON params are optional. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -1166,13 +1166,13 @@ Create a new [role](#DOCS_TOPICS_PERMISSIONS/role-object) for the guild. Require | permissions | string | bitwise value of the enabled/disabled permissions | @everyone permissions in guild | | color | integer | RGB color value | 0 | | hoist | boolean | whether the role should be displayed separately in the sidebar | false | -| icon | ?[image data](#DOCS_REFERENCE/image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | null | -| unicode_emoji | ?string | the role's unicode emoji as a [standard emoji](#DOCS_REFERENCE/message-formatting) (if the guild has the `ROLE_ICONS` feature) | null | +| icon | ?[image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | null | +| unicode_emoji | ?string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) | null | | mentionable | boolean | whether the role should be mentionable | false | -## Modify Guild Role Positions % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles +## Modify Guild Role Positions % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/roles -Modify the positions of a set of [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects for the guild. Requires the `MANAGE_ROLES` permission. Returns a list of all of the guild's [role](#DOCS_TOPICS_PERMISSIONS/role-object) objects on success. Fires multiple [Guild Role Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-update) Gateway events. +Modify the positions of a set of [role](/docs/topics/permissions#role-object) objects for the guild. Requires the `MANAGE_ROLES` permission. Returns a list of all of the guild's [role](/docs/topics/permissions#role-object) objects on success. Fires multiple [Guild Role Update](/docs/events/gateway-events#guild-role-update) Gateway events. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -1186,9 +1186,9 @@ This endpoint takes a JSON array of parameters in the following format: | id | snowflake | role | | position? | ?integer | sorting position of the role (roles with the same position are sorted by id) | -## Modify Guild Role % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object} +## Modify Guild Role % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/roles/{role.id/docs/topics/permissions#role-object} -Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated [role](#DOCS_TOPICS_PERMISSIONS/role-object) on success. Fires a [Guild Role Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-update) Gateway event. +Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated [role](/docs/topics/permissions#role-object) on success. Fires a [Guild Role Update](/docs/events/gateway-events#guild-role-update) Gateway event. > info > All parameters to this endpoint are optional and nullable. @@ -1204,13 +1204,13 @@ Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated | permissions | string | bitwise value of the enabled/disabled permissions | | color | integer | RGB color value | | hoist | boolean | whether the role should be displayed separately in the sidebar | -| icon | [image data](#DOCS_REFERENCE/image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | -| unicode_emoji | string | the role's unicode emoji as a [standard emoji](#DOCS_REFERENCE/message-formatting) (if the guild has the `ROLE_ICONS` feature) | +| icon | [image data](/docs/reference#image-data) | the role's icon image (if the guild has the `ROLE_ICONS` feature) | +| unicode_emoji | string | the role's unicode emoji as a [standard emoji](/docs/reference#message-formatting) (if the guild has the `ROLE_ICONS` feature) | | mentionable | boolean | whether the role should be mentionable | -## Modify Guild MFA Level % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/mfa +## Modify Guild MFA Level % POST /guilds/{guild.id/docs/resources/guild#guild-object}/mfa -Modify a guild's MFA level. Requires guild ownership. Returns the updated [level](#DOCS_RESOURCES_GUILD/guild-object-mfa-level) on success. Fires a [Guild Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-update) Gateway event. +Modify a guild's MFA level. Requires guild ownership. Returns the updated [level](/docs/resources/guild#guild-object-mfa-level) on success. Fires a [Guild Update](/docs/events/gateway-events#guild-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -1219,16 +1219,16 @@ Modify a guild's MFA level. Requires guild ownership. Returns the updated [level | Field | Type | Description | |-------|---------|-----------------------------------------------------------| -| level | integer | [MFA level](#DOCS_RESOURCES_GUILD/guild-object-mfa-level) | +| level | integer | [MFA level](/docs/resources/guild#guild-object-mfa-level) | -## Delete Guild Role % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/roles/{role.id#DOCS_TOPICS_PERMISSIONS/role-object} +## Delete Guild Role % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/roles/{role.id/docs/topics/permissions#role-object} -Delete a guild role. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Role Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-delete) Gateway event. +Delete a guild role. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a [Guild Role Delete](/docs/events/gateway-events#guild-role-delete) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Get Guild Prune Count % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/prune +## Get Guild Prune Count % GET /guilds/{guild.id/docs/resources/guild#guild-object}/prune Returns an object with one `pruned` key indicating the number of members that would be removed in a prune operation. Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions. @@ -1241,9 +1241,9 @@ By default, prune will not remove users with roles. You can optionally include s | days | integer | number of days to count prune for (1-30) | 7 | | include_roles | string; comma-delimited array of snowflakes | role(s) to include | none | -## Begin Guild Prune % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/prune +## Begin Guild Prune % POST /guilds/{guild.id/docs/resources/guild#guild-object}/prune -Begin a prune operation. Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions. Returns an object with one `pruned` key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the `compute_prune_count` option to `false`, forcing `pruned` to `null`. Fires multiple [Guild Member Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-remove) Gateway events. +Begin a prune operation. Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions. Returns an object with one `pruned` key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the `compute_prune_count` option to `false`, forcing `pruned` to `null`. Fires multiple [Guild Member Remove](/docs/events/gateway-events#guild-member-remove) Gateway events. By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the `include_roles` parameter. Any inactive user that has a subset of the provided role(s) will be included in the prune and users with additional roles will not. @@ -1259,49 +1259,49 @@ By default, prune will not remove users with roles. You can optionally include s | include_roles | array of snowflakes | role(s) to include | none | | reason? | string | reason for the prune (deprecated) | | -## Get Guild Voice Regions % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/regions +## Get Guild Voice Regions % GET /guilds/{guild.id/docs/resources/guild#guild-object}/regions -Returns a list of [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) objects for the guild. Unlike the similar `/voice` route, this returns VIP servers when the guild is VIP-enabled. +Returns a list of [voice region](/docs/resources/voice#voice-region-object) objects for the guild. Unlike the similar `/voice` route, this returns VIP servers when the guild is VIP-enabled. -## Get Guild Invites % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/invites +## Get Guild Invites % GET /guilds/{guild.id/docs/resources/guild#guild-object}/invites -Returns a list of [invite](#DOCS_RESOURCES_INVITE/invite-object) objects (with [invite metadata](#DOCS_RESOURCES_INVITE/invite-metadata-object)) for the guild. Requires the `MANAGE_GUILD` permission. +Returns a list of [invite](/docs/resources/invite#invite-object) objects (with [invite metadata](/docs/resources/invite#invite-metadata-object)) for the guild. Requires the `MANAGE_GUILD` permission. -## Get Guild Integrations % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/integrations +## Get Guild Integrations % GET /guilds/{guild.id/docs/resources/guild#guild-object}/integrations -Returns a list of [integration](#DOCS_RESOURCES_GUILD/integration-object) objects for the guild. Requires the `MANAGE_GUILD` permission. +Returns a list of [integration](/docs/resources/guild#integration-object) objects for the guild. Requires the `MANAGE_GUILD` permission. > info > This endpoint returns a maximum of 50 integrations. If a guild has more integrations, they cannot be accessed. -## Delete Guild Integration % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/integrations/{integration.id#DOCS_RESOURCES_GUILD/integration-object} +## Delete Guild Integration % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/integrations/{integration.id/docs/resources/guild#integration-object} -Delete the attached [integration](#DOCS_RESOURCES_GUILD/integration-object) object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the `MANAGE_GUILD` permission. Returns a 204 empty response on success. Fires [Guild Integrations Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-integrations-update) and [Integration Delete](#DOCS_EVENTS_GATEWAY_EVENTS/integration-delete) Gateway events. +Delete the attached [integration](/docs/resources/guild#integration-object) object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the `MANAGE_GUILD` permission. Returns a 204 empty response on success. Fires [Guild Integrations Update](/docs/events/gateway-events#guild-integrations-update) and [Integration Delete](/docs/events/gateway-events#integration-delete) Gateway events. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Get Guild Widget Settings % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget +## Get Guild Widget Settings % GET /guilds/{guild.id/docs/resources/guild#guild-object}/widget -Returns a [guild widget settings](#DOCS_RESOURCES_GUILD/guild-widget-settings-object) object. Requires the `MANAGE_GUILD` permission. +Returns a [guild widget settings](/docs/resources/guild#guild-widget-settings-object) object. Requires the `MANAGE_GUILD` permission. -## Modify Guild Widget % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget +## Modify Guild Widget % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/widget -Modify a [guild widget settings](#DOCS_RESOURCES_GUILD/guild-widget-settings-object) object for the guild. All attributes may be passed in with JSON and modified. Requires the `MANAGE_GUILD` permission. Returns the updated [guild widget settings](#DOCS_RESOURCES_GUILD/guild-widget-settings-object) object. Fires a [Guild Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-update) Gateway event. +Modify a [guild widget settings](/docs/resources/guild#guild-widget-settings-object) object for the guild. All attributes may be passed in with JSON and modified. Requires the `MANAGE_GUILD` permission. Returns the updated [guild widget settings](/docs/resources/guild#guild-widget-settings-object) object. Fires a [Guild Update](/docs/events/gateway-events#guild-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Get Guild Widget % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget.json +## Get Guild Widget % GET /guilds/{guild.id/docs/resources/guild#guild-object}/widget.json -Returns the [widget](#DOCS_RESOURCES_GUILD/guild-widget-object) for the guild. Fires an [Invite Create](#DOCS_EVENTS_GATEWAY_EVENTS/invite-create) Gateway event when an invite channel is defined and a new [Invite](#DOCS_RESOURCES_INVITE/invite-object) is generated. +Returns the [widget](/docs/resources/guild#guild-widget-object) for the guild. Fires an [Invite Create](/docs/events/gateway-events#invite-create) Gateway event when an invite channel is defined and a new [Invite](/docs/resources/invite#invite-object) is generated. -## Get Guild Vanity URL % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/vanity-url +## Get Guild Vanity URL % GET /guilds/{guild.id/docs/resources/guild#guild-object}/vanity-url -Returns a partial [invite](#DOCS_RESOURCES_INVITE/invite-object) object for guilds with that feature enabled. Requires the `MANAGE_GUILD` permission. `code` will be null if a vanity url for the guild is not set. +Returns a partial [invite](/docs/resources/invite#invite-object) object for guilds with that feature enabled. Requires the `MANAGE_GUILD` permission. `code` will be null if a vanity url for the guild is not set. > info -> This endpoint is required to get the usage count of the vanity invite, but the invite code can be accessed as `vanity_url_code` in the [guild object](#DOCS_RESOURCES_GUILD/guild-object) without having the `MANAGE_GUILD` permission. +> This endpoint is required to get the usage count of the vanity invite, but the invite code can be accessed as `vanity_url_code` in the [guild object](/docs/resources/guild#guild-object) without having the `MANAGE_GUILD` permission. ###### Example Partial Invite Object @@ -1312,7 +1312,7 @@ Returns a partial [invite](#DOCS_RESOURCES_INVITE/invite-object) object for guil } ``` -## Get Guild Widget Image % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/widget.png +## Get Guild Widget Image % GET /guilds/{guild.id/docs/resources/guild#guild-object}/widget.png Returns a PNG image widget for the guild. Requires no permissions or authentication. @@ -1335,13 +1335,13 @@ Returns a PNG image widget for the guild. Requires no permissions or authenticat | banner3 | large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner3) | | banner4 | large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner4) | -## Get Guild Welcome Screen % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/welcome-screen +## Get Guild Welcome Screen % GET /guilds/{guild.id/docs/resources/guild#guild-object}/welcome-screen -Returns the [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object for the guild. If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required. +Returns the [Welcome Screen](/docs/resources/guild#welcome-screen-object) object for the guild. If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required. -## Modify Guild Welcome Screen % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/welcome-screen +## Modify Guild Welcome Screen % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/welcome-screen -Modify the guild's [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object). Requires the `MANAGE_GUILD` permission. Returns the updated [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object. May fire a [Guild Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-update) Gateway event. +Modify the guild's [Welcome Screen](/docs/resources/guild#welcome-screen-object). Requires the `MANAGE_GUILD` permission. Returns the updated [Welcome Screen](/docs/resources/guild#welcome-screen-object) object. May fire a [Guild Update](/docs/events/gateway-events#guild-update) Gateway event. > info > All parameters to this endpoint are optional and nullable @@ -1354,16 +1354,16 @@ Modify the guild's [Welcome Screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) | Field | Type | Description | |------------------|-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------| | enabled | boolean | whether the welcome screen is enabled | -| welcome_channels | array of [welcome screen channel](#DOCS_RESOURCES_GUILD/welcome-screen-object-welcome-screen-channel-structure) objects | channels linked in the welcome screen and their display options | +| welcome_channels | array of [welcome screen channel](/docs/resources/guild#welcome-screen-object-welcome-screen-channel-structure) objects | channels linked in the welcome screen and their display options | | description | string | the server description to show in the welcome screen | -## Get Guild Onboarding % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/onboarding +## Get Guild Onboarding % GET /guilds/{guild.id/docs/resources/guild#guild-object}/onboarding -Returns the [Onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) object for the guild. +Returns the [Onboarding](/docs/resources/guild#guild-onboarding-object) object for the guild. -## Modify Guild Onboarding % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/onboarding +## Modify Guild Onboarding % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/onboarding -Modifies the onboarding configuration of the guild. Returns a 200 with the [Onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) object for the guild. Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions. +Modifies the onboarding configuration of the guild. Returns a 200 with the [Onboarding](/docs/resources/guild#guild-onboarding-object) object for the guild. Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions. > info > Onboarding enforces constraints when enabled. These constraints are that there must be at least 7 Default Channels and at least 5 of them must allow sending messages to the @everyone role. The `mode` field modifies what is considered when enforcing these constraints. @@ -1375,14 +1375,14 @@ Modifies the onboarding configuration of the guild. Returns a 200 with the [Onbo | Field | Type | Description | |---------------------|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------| -| prompts | array of [onboarding prompt](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-prompt-structure) objects | Prompts shown during onboarding and in customize community | +| prompts | array of [onboarding prompt](/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure) objects | Prompts shown during onboarding and in customize community | | default_channel_ids | array of snowflakes | Channel IDs that members get opted into automatically | | enabled | boolean | Whether onboarding is enabled in the guild | -| mode | [onboarding mode](#DOCS_RESOURCES_GUILD/guild-onboarding-object-onboarding-mode) | Current mode of onboarding | +| mode | [onboarding mode](/docs/resources/guild#guild-onboarding-object-onboarding-mode) | Current mode of onboarding | -## Modify Guild Incident Actions % PUT /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/incident-actions +## Modify Guild Incident Actions % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/incident-actions -Modifies the incident actions of the guild. Returns a 200 with the [Incidents Data](#DOCS_RESOURCES_GUILD/incidents-data-object) object for the guild. Requires the `MANAGE_GUILD` permission. +Modifies the incident actions of the guild. Returns a 200 with the [Incidents Data](/docs/resources/guild#incidents-data-object) object for the guild. Requires the `MANAGE_GUILD` permission. ###### JSON Params diff --git a/docs/resources/invite.md b/docs/resources/invite.md index 9649395850..82b735fb20 100644 --- a/docs/resources/invite.md +++ b/docs/resources/invite.md @@ -12,19 +12,19 @@ Represents a code that when used, adds a user to a guild or group DM channel. | Field | Type | Description | |-----------------------------|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| -| type | integer | the [type of invite](#DOCS_RESOURCES_INVITE/invite-object-invite-types) | +| type | integer | the [type of invite](/docs/resources/invite#invite-object-invite-types) | | code | string | the invite code (unique ID) | -| guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild this invite is for | -| channel | ?partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | the channel this invite is for | -| inviter? | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created the invite | -| target_type? | integer | the [type of target](#DOCS_RESOURCES_INVITE/invite-object-invite-target-types) for this voice channel invite | -| target_user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user whose stream to display for this voice channel stream invite | -| target_application? | partial [application](#DOCS_RESOURCES_APPLICATION/application-object) object | the embedded application to open for this voice channel embedded application invite | +| guild? | partial [guild](/docs/resources/guild#guild-object) object | the guild this invite is for | +| channel | ?partial [channel](/docs/resources/channel#channel-object) object | the channel this invite is for | +| inviter? | [user](/docs/resources/user#user-object) object | the user who created the invite | +| target_type? | integer | the [type of target](/docs/resources/invite#invite-object-invite-target-types) for this voice channel invite | +| target_user? | [user](/docs/resources/user#user-object) object | the user whose stream to display for this voice channel stream invite | +| target_application? | partial [application](/docs/resources/application#application-object) object | the embedded application to open for this voice channel embedded application invite | | approximate_presence_count? | integer | approximate count of online members, returned from the `GET /invites/` endpoint when `with_counts` is `true` | | approximate_member_count? | integer | approximate count of total members, returned from the `GET /invites/` endpoint when `with_counts` is `true` | | expires_at? | ?ISO8601 timestamp | the expiration date of this invite, returned from the `GET /invites/` endpoint when `with_expiration` is `true` | -| stage_instance? | [invite stage instance](#DOCS_RESOURCES_INVITE/invite-stage-instance-object) object | stage instance data if there is a [public Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE) in the Stage channel this invite is for (deprecated) | -| guild_scheduled_event? | [guild scheduled event](#DOCS_RESOURCES_GUILD_SCHEDULED_EVENT/guild-scheduled-event-object) object | guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id | +| stage_instance? | [invite stage instance](/docs/resources/invite#invite-stage-instance-object) object | stage instance data if there is a [public Stage instance](/docs/resources/stage-instance) in the Stage channel this invite is for (deprecated) | +| guild_scheduled_event? | [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object | guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id | ###### Invite Types @@ -85,7 +85,7 @@ Represents a code that when used, adds a user to a guild or group DM channel. ### Invite Metadata Object -Extra information about an invite, will extend the [invite](#DOCS_RESOURCES_INVITE/invite-object) object. +Extra information about an invite, will extend the [invite](/docs/resources/invite#invite-object) object. ###### Invite Metadata Structure @@ -118,7 +118,7 @@ Extra information about an invite, will extend the [invite](#DOCS_RESOURCES_INVI | Field | Type | Description | |-------------------|------------------------------------------------------------------------------------|----------------------------------------------------| -| members | array of partial [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | the members speaking in the Stage | +| members | array of partial [guild member](/docs/resources/guild#guild-member-object) objects | the members speaking in the Stage | | participant_count | integer | the number of users in the Stage | | speaker_count | integer | the number of users speaking in the Stage | | topic | string | the topic of the Stage instance (1-120 characters) | @@ -144,21 +144,21 @@ Extra information about an invite, will extend the [invite](#DOCS_RESOURCES_INVI } ``` -## Get Invite % GET /invites/{invite.code#DOCS_RESOURCES_INVITE/invite-object} +## Get Invite % GET /invites/{invite.code/docs/resources/invite#invite-object} -Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object for the given code. +Returns an [invite](/docs/resources/invite#invite-object) object for the given code. ###### Query String Params | Field | Type | Description | |---------------------------|--------------------------------------------------|-------------------------------------------------------------| -| with_counts? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | whether the invite should contain approximate member counts | -| with_expiration? | [boolean](#DOCS_REFERENCE/boolean-query-strings) | whether the invite should contain the expiration date | +| with_counts? | [boolean](/docs/reference#boolean-query-strings) | whether the invite should contain approximate member counts | +| with_expiration? | [boolean](/docs/reference#boolean-query-strings) | whether the invite should contain the expiration date | | guild_scheduled_event_id? | snowflake | the guild scheduled event to include with the invite | -## Delete Invite % DELETE /invites/{invite.code#DOCS_RESOURCES_INVITE/invite-object} +## Delete Invite % DELETE /invites/{invite.code/docs/resources/invite#invite-object} -Delete an invite. Requires the `MANAGE_CHANNELS` permission on the channel this invite belongs to, or `MANAGE_GUILD` to remove any invite across the guild. Returns an [invite](#DOCS_RESOURCES_INVITE/invite-object) object on success. Fires an [Invite Delete](#DOCS_EVENTS_GATEWAY_EVENTS/invite-delete) Gateway event. +Delete an invite. Requires the `MANAGE_CHANNELS` permission on the channel this invite belongs to, or `MANAGE_GUILD` to remove any invite across the guild. Returns an [invite](/docs/resources/invite#invite-object) object on success. Fires an [Invite Delete](/docs/events/gateway-events#invite-delete) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. diff --git a/docs/resources/lobby.md b/docs/resources/lobby.md index ca63c5973c..51b067e134 100644 --- a/docs/resources/lobby.md +++ b/docs/resources/lobby.md @@ -6,7 +6,7 @@ sidebar_label: Lobby ### Lobby Object -Represents a lobby within Discord. See [Managing Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES) for more information. +Represents a lobby within Discord. See [Managing Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) for more information. ###### Lobby Structure @@ -15,10 +15,10 @@ Represents a lobby within Discord. See [Managing Lobbies](#DOCS_DISCORD_SOCIAL_S | id | snowflake | the id of this channel | | application_id | snowflake | application that created the lobby | | metadata | ?dict | dictionary of string key/value pairs. The max total length is 1000. | -| members | array of [lobby member](#DOCS_RESOURCES_LOBBY/lobby-member-object) objects | members of the lobby | +| members | array of [lobby member](/docs/resources/lobby#lobby-member-object) objects | members of the lobby | | linked_channel? | channel object | the guild channel linked to the lobby | -### Lobby Member Object +### Lobby Member Object Represents a member of a lobby, including optional metadata and flags. @@ -28,7 +28,7 @@ Represents a member of a lobby, including optional metadata and flags. |-----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | the id of the user | | metadata? | ?dict | dictionary of string key/value pairs. The max total length is 1000. | -| flags? | integer | [lobby member flags](#DOCS_RESOURCES_LOBBY/lobby-member-object-lobby-member-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| flags? | integer | [lobby member flags](/docs/resources/lobby#lobby-member-object-lobby-member-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | ###### Lobby Member Flags @@ -60,17 +60,17 @@ Represents a member of a lobby, including optional metadata and flags. Creates a new lobby, adding any of the specified members to it, if provided. -Returns a [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object. +Returns a [lobby](/docs/resources/lobby#lobby-object) object. > info -> [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) clients will not be able to join or leave a lobby created using this API, such as [`Client::CreateOrJoinLobby`]. See [Managing Lobbies](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_MANAGING_LOBBIES) for more information. +> [Discord Social SDK](/docs/discord-social-sdk/overview) clients will not be able to join or leave a lobby created using this API, such as [`Client::CreateOrJoinLobby`]. See [Managing Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) for more information. ### JSON Params | Field | Type | Description | |-----------------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | metadata? | ?dict | optional dictionary of string key/value pairs. The max total length is 1000. | -| members? | array of [lobby member](#DOCS_RESOURCES_LOBBY/lobby-member-object) objects | optional array of up to 25 users to be added to the lobby | +| members? | array of [lobby member](/docs/resources/lobby#lobby-member-object) objects | optional array of up to 25 users to be added to the lobby | | idle_timeout_seconds? | integer | seconds to wait before shutting down a lobby after it becomes idle. Value can be between 5 and 604800 (7 days). See [`LobbyHandle`] for more details on this behavior. | #### Lobby Member JSON Params @@ -79,27 +79,27 @@ Returns a [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object. |-----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | Discord user id of the user to add to the lobby | | metadata? | ?dict | optional dictionary of string key/value pairs. The max total length is 1000. | -| flags? | integer | [lobby member flags](#DOCS_RESOURCES_LOBBY/lobby-member-object-lobby-member-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| flags? | integer | [lobby member flags](/docs/resources/lobby#lobby-member-object-lobby-member-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | -## Get Lobby % GET /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object} +## Get Lobby % GET /lobbies/{lobby.id/docs/resources/lobby#lobby-object} -Returns a [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object for the specified lobby id, if it exists. +Returns a [lobby](/docs/resources/lobby#lobby-object) object for the specified lobby id, if it exists. -## Modify Lobby % PATCH /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object} +## Modify Lobby % PATCH /lobbies/{lobby.id/docs/resources/lobby#lobby-object} Modifies the specified lobby with new values, if provided. -Returns the updated [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object. +Returns the updated [lobby](/docs/resources/lobby#lobby-object) object. ### JSON Params | Field | Type | Description | |-----------------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | metadata? | ?dict | optional dictionary of string key/value pairs. The max total length is 1000. Overwrites any existing metadata. | -| members? | array of [lobby member](#DOCS_RESOURCES_LOBBY/lobby-member-object) objects | optional array of up to 25 users to replace the lobby members with. If provided, lobby members not in this list will be removed from the lobby. | +| members? | array of [lobby member](/docs/resources/lobby#lobby-member-object) objects | optional array of up to 25 users to replace the lobby members with. If provided, lobby members not in this list will be removed from the lobby. | | idle_timeout_seconds? | integer | seconds to wait before shutting down a lobby after it becomes idle. Value can be between 5 and 604800 (7 days). See [`LobbyHandle`] for more details on this behavior. | -## Delete Lobby % DELETE /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object} +## Delete Lobby % DELETE /lobbies/{lobby.id/docs/resources/lobby#lobby-object} Deletes the specified lobby if it exists. @@ -107,26 +107,26 @@ It is safe to call even if the lobby is already deleted as well. Returns nothing. -## Add a Member to a Lobby % PUT /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object}/members/{user.id#DOCS_RESOURCES_USER/user-object} +## Add a Member to a Lobby % PUT /lobbies/{lobby.id/docs/resources/lobby#lobby-object}/members/{user.id/docs/resources/user#user-object} Adds the provided user to the specified lobby. If called when the user is already a member of the lobby will update fields such as metadata on that user instead. -Returns the [lobby member](#DOCS_RESOURCES_LOBBY/lobby-member-object) object. +Returns the [lobby member](/docs/resources/lobby#lobby-member-object) object. ### JSON Params | Field | Type | Description | |-----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| | metadata? | ?dict | optional dictionary of string key/value pairs. The max total length is 1000. | -| flags? | integer | [lobby member flags](#DOCS_RESOURCES_LOBBY/lobby-member-object-lobby-member-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| flags? | integer | [lobby member flags](/docs/resources/lobby#lobby-member-object-lobby-member-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | -## Remove a Member from a Lobby % DELETE /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object}/members/{user.id#DOCS_RESOURCES_USER/user-object} +## Remove a Member from a Lobby % DELETE /lobbies/{lobby.id/docs/resources/lobby#lobby-object}/members/{user.id/docs/resources/user#user-object} Removes the provided user from the specified lobby. It is safe to call this even if the user is no longer a member of the lobby, but will fail if the lobby does not exist. Returns nothing. -## Leave Lobby % DELETE /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object}/members/@me +## Leave Lobby % DELETE /lobbies/{lobby.id/docs/resources/lobby#lobby-object}/members/@me Removes the current user from the specified lobby. It is safe to call this even if the user is no longer a member of the lobby, but will fail if the lobby does not exist. @@ -134,13 +134,13 @@ Uses `Bearer` token for authorization. Returns nothing. -## Link Channel to Lobby % PATCH /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object}/channel-linking +## Link Channel to Lobby % PATCH /lobbies/{lobby.id/docs/resources/lobby#lobby-object}/channel-linking -Links an existing text channel to a lobby. See [Linked Channels](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_LINKED_CHANNELS) for more information. +Links an existing text channel to a lobby. See [Linked Channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) for more information. -Uses `Bearer` token for authorization and user must be a lobby member with `CanLinkLobby` [lobby member flag](#DOCS_RESOURCES_LOBBY/lobby-member-object-lobby-member-flags). +Uses `Bearer` token for authorization and user must be a lobby member with `CanLinkLobby` [lobby member flag](/docs/resources/lobby#lobby-member-object-lobby-member-flags). -Returns a [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object with a linked channel. +Returns a [lobby](/docs/resources/lobby#lobby-object) object with a linked channel. ### JSON Params @@ -148,15 +148,15 @@ Returns a [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object with a linked chann |-------------|-----------|------------------------------------------------------------------------------------------------------------------------| | channel_id? | snowflake | the id of the channel to link to the lobby. If not provided, will unlink any currently linked channels from the lobby. | -## Unlink Channel from Lobby % PATCH /lobbies/{lobby.id#DOCS_RESOURCES_LOBBY/lobby-object}/channel-linking +## Unlink Channel from Lobby % PATCH /lobbies/{lobby.id/docs/resources/lobby#lobby-object}/channel-linking Unlinks any currently linked channels from the specified lobby. Send a request to this endpoint with an empty body to unlink any currently linked channels from the specified lobby. -Uses `Bearer` token for authorization and user must be a lobby member with `CanLinkLobby` [lobby member flag](#DOCS_RESOURCES_LOBBY/lobby-member-object-lobby-member-flags). +Uses `Bearer` token for authorization and user must be a lobby member with `CanLinkLobby` [lobby member flag](/docs/resources/lobby#lobby-member-object-lobby-member-flags). -Returns a [lobby](#DOCS_RESOURCES_LOBBY/lobby-object) object without a linked channel. +Returns a [lobby](/docs/resources/lobby#lobby-object) object without a linked channel. [`Client::CreateOrJoinLobby`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a8b4e195555ecaa89ccdfc0acd28d3512 diff --git a/docs/resources/message.md b/docs/resources/message.md index a6c94fc184..d2472deec6 100644 --- a/docs/resources/message.md +++ b/docs/resources/message.md @@ -11,59 +11,59 @@ Represents a message sent in a channel within Discord. ###### Message Structure > info -> Fields specific to the `MESSAGE_CREATE` and `MESSAGE_UPDATE` events are listed in the [Gateway documentation](#DOCS_EVENTS_GATEWAY_EVENTS/message-create). +> Fields specific to the `MESSAGE_CREATE` and `MESSAGE_UPDATE` events are listed in the [Gateway documentation](/docs/events/gateway-events#message-create). > warn -> An app will receive empty values in the `content`, `embeds`, `attachments`, and `components` fields while `poll` will be omitted if they have not configured (or been approved for) the [`MESSAGE_CONTENT` privileged intent (`1 << 15`)](#DOCS_EVENTS_GATEWAY/message-content-intent). +> An app will receive empty values in the `content`, `embeds`, `attachments`, and `components` fields while `poll` will be omitted if they have not configured (or been approved for) the [`MESSAGE_CONTENT` privileged intent (`1 << 15`)](/docs/events/gateway#message-content-intent). | Field | Type | Description | |---------------------------|------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | id of the message | | channel_id | snowflake | id of the channel the message was sent in | -| author \[1\] | [user](#DOCS_RESOURCES_USER/user-object) object | the author of this message (not guaranteed to be a valid user, see below) | +| author \[1\] | [user](/docs/resources/user#user-object) object | the author of this message (not guaranteed to be a valid user, see below) | | content \[2\] | string | contents of the message | | timestamp | ISO8601 timestamp | when this message was sent | | edited_timestamp | ?ISO8601 timestamp | when this message was edited (or null if never) | | tts | boolean | whether this was a TTS message | | mention_everyone | boolean | whether this message mentions everyone | -| mentions | array of [user](#DOCS_RESOURCES_USER/user-object) objects | users specifically mentioned in the message | -| mention_roles | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids | roles specifically mentioned in this message | -| mention_channels? \[3\] | array of [channel mention](#DOCS_RESOURCES_MESSAGE/channel-mention-object) objects | channels specifically mentioned in this message | -| attachments \[2\] | array of [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | any attached files | -| embeds \[2\] | array of [embed](#DOCS_RESOURCES_MESSAGE/embed-object) objects | any embedded content | -| reactions? | array of [reaction](#DOCS_RESOURCES_MESSAGE/reaction-object) objects | reactions to the message | +| mentions | array of [user](/docs/resources/user#user-object) objects | users specifically mentioned in the message | +| mention_roles | array of [role](/docs/topics/permissions#role-object) object ids | roles specifically mentioned in this message | +| mention_channels? \[3\] | array of [channel mention](/docs/resources/message#channel-mention-object) objects | channels specifically mentioned in this message | +| attachments \[2\] | array of [attachment](/docs/resources/message#attachment-object) objects | any attached files | +| embeds \[2\] | array of [embed](/docs/resources/message#embed-object) objects | any embedded content | +| reactions? | array of [reaction](/docs/resources/message#reaction-object) objects | reactions to the message | | nonce? | integer or string | used for validating a message was sent | | pinned | boolean | whether this message is pinned | | webhook_id? | snowflake | if the message is generated by a webhook, this is the webhook's id | -| type | integer | [type of message](#DOCS_RESOURCES_MESSAGE/message-object-message-types) | -| activity? | [message activity](#DOCS_RESOURCES_MESSAGE/message-object-message-activity-structure) object | sent with Rich Presence-related chat embeds | -| application? | partial [application](#DOCS_RESOURCES_APPLICATION/application-object) object | sent with Rich Presence-related chat embeds | -| application_id? | snowflake | if the message is an [Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) or application-owned webhook, this is the id of the application | -| flags? | integer | [message flags](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | -| message_reference? | [message reference](#DOCS_RESOURCES_MESSAGE/message-reference-structure) object | data showing the source of a crosspost, channel follow add, pin, or reply message | -| message_snapshots? \[5\] | array of [message snapshot](#DOCS_RESOURCES_MESSAGE/message-snapshot-object) objects | the message associated with the `message_reference`. This is a minimal subset of fields in a message (e.g. `author` is excluded.) | -| referenced_message? \[4\] | ?[message object](#DOCS_RESOURCES_MESSAGE/message-object) | the message associated with the message_reference | -| interaction_metadata? | [message interaction metadata object](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object) | Sent if the message is sent as a result of an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) | -| interaction? | [message interaction object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/message-interaction-object-message-interaction-structure) | **Deprecated in favor of `interaction_metadata`**; sent if the message is a response to an [interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) | -| thread? | [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | the thread that was started from this message, includes [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object | -| components? \[2\] | array of [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) | sent if the message contains components like buttons, action rows, or other interactive components | -| sticker_items? | array of [message sticker item objects](#DOCS_RESOURCES_STICKER/sticker-item-object) | sent if the message contains stickers | -| stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | **Deprecated** the stickers sent with the message | +| type | integer | [type of message](/docs/resources/message#message-object-message-types) | +| activity? | [message activity](/docs/resources/message#message-object-message-activity-structure) object | sent with Rich Presence-related chat embeds | +| application? | partial [application](/docs/resources/application#application-object) object | sent with Rich Presence-related chat embeds | +| application_id? | snowflake | if the message is an [Interaction](/docs/interactions/receiving-and-responding#) or application-owned webhook, this is the id of the application | +| flags? | integer | [message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| message_reference? | [message reference](/docs/resources/message#message-reference-structure) object | data showing the source of a crosspost, channel follow add, pin, or reply message | +| message_snapshots? \[5\] | array of [message snapshot](/docs/resources/message#message-snapshot-object) objects | the message associated with the `message_reference`. This is a minimal subset of fields in a message (e.g. `author` is excluded.) | +| referenced_message? \[4\] | ?[message object](/docs/resources/message#message-object) | the message associated with the message_reference | +| interaction_metadata? | [message interaction metadata object](/docs/resources/message#message-interaction-metadata-object) | Sent if the message is sent as a result of an [interaction](/docs/interactions/receiving-and-responding#) | +| interaction? | [message interaction object](/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure) | **Deprecated in favor of `interaction_metadata`**; sent if the message is a response to an [interaction](/docs/interactions/receiving-and-responding#) | +| thread? | [channel](/docs/resources/channel#channel-object) object | the thread that was started from this message, includes [thread member](/docs/resources/channel#thread-member-object) object | +| components? \[2\] | array of [message components](/docs/interactions/message-components#component-object) | sent if the message contains components like buttons, action rows, or other interactive components | +| sticker_items? | array of [message sticker item objects](/docs/resources/sticker#sticker-item-object) | sent if the message contains stickers | +| stickers? | array of [sticker](/docs/resources/sticker#sticker-object) objects | **Deprecated** the stickers sent with the message | | position? | integer | A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread | -| role_subscription_data? | [role subscription data](#DOCS_RESOURCES_MESSAGE/role-subscription-data-object) object | data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message | -| resolved? | [resolved](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-resolved-data-structure) data | data for users, members, channels, and roles in the message's [auto-populated select menus](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus) | -| poll? \[2\] | [poll](#DOCS_RESOURCES_POLL/poll-object) object | A poll! | -| call? | [message call](#DOCS_RESOURCES_MESSAGE/message-call-object) object | the call associated with the message | +| role_subscription_data? | [role subscription data](/docs/resources/message#role-subscription-data-object) object | data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message | +| resolved? | [resolved](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) data | data for users, members, channels, and roles in the message's [auto-populated select menus](/docs/interactions/message-components#select-menus) | +| poll? \[2\] | [poll](/docs/resources/poll#poll-object) object | A poll! | +| call? | [message call](/docs/resources/message#message-call-object) object | the call associated with the message | \[1\] The author object follows the structure of the user object, but is only a valid user in the case where the message is generated by a user or bot user. If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` on the message object. -\[2\] An app will receive empty values in the `content`, `embeds`, `attachments`, and `components` fields while `poll` will be omitted if they have not configured (or been approved for) the [`MESSAGE_CONTENT` privileged intent (`1 << 15`)](#DOCS_EVENTS_GATEWAY/message-content-intent). +\[2\] An app will receive empty values in the `content`, `embeds`, `attachments`, and `components` fields while `poll` will be omitted if they have not configured (or been approved for) the [`MESSAGE_CONTENT` privileged intent (`1 << 15`)](/docs/events/gateway#message-content-intent). \[3\] Not all channel mentions in a message will appear in `mention_channels`. Only textual channels that are visible to everyone in a lurkable guild will ever be included. Only crossposted messages (via Channel Following) currently include `mention_channels` at all. If no mentions in the message meet these requirements, this field will not be sent. \[4\] This field is only returned for messages with a `type` of `19` (REPLY), `21` (THREAD_STARTER_MESSAGE), or `23` (CONTEXT_MENU_COMMAND). If the message is one of these but the `referenced_message` field is not present, the backend did not attempt to fetch the message that was being replied to, so its state is unknown. If the field exists but is null, the referenced message was deleted. -\[5\] See [message reference types](#DOCS_RESOURCES_MESSAGE/message-reference-types) +\[5\] See [message reference types](/docs/resources/message#message-reference-types) ###### Message Types @@ -116,7 +116,7 @@ Represents a message sent in a channel within Discord. | Field | Type | Description | |-----------|---------|-------------------------------------------------------------------------------------------| -| type | integer | [type of message activity](#DOCS_RESOURCES_MESSAGE/message-object-message-activity-types) | +| type | integer | [type of message activity](/docs/resources/message#message-object-message-activity-types) | | party_id? | string | party_id from a Rich Presence event | ###### Message Activity Types @@ -248,19 +248,19 @@ Represents a message sent in a channel within Discord. Metadata about the interaction, including the source of the interaction and relevant server and user IDs. -One of [Application Command Interaction Metadata](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object-application-command-interaction-metadata-structure), [Message Component Interaction Metadata](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object-message-component-interaction-metadata-structure), or [Modal Submit Interaction Metadata](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object-modal-submit-interaction-metadata-structure). +One of [Application Command Interaction Metadata](/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure), [Message Component Interaction Metadata](/docs/resources/message#message-interaction-metadata-object-message-component-interaction-metadata-structure), or [Modal Submit Interaction Metadata](/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure). ###### Application Command Interaction Metadata Structure | Field | Type | Description | |--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the interaction | -| type | [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | Type of interaction | -| user | [user](#DOCS_RESOURCES_USER/user-object) object | User who triggered the interaction | -| authorizing_integration_owners | dictionary with keys of [application integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | IDs for installation context(s) related to an interaction. Details in [Authorizing Integration Owners Object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) | -| original_response_message_id? | snowflake | ID of the original response message, present only on [follow-up messages](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) | -| target_user? | [user](#DOCS_RESOURCES_USER/user-object) object | The user the command was run on, present only on [user command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) interactions | -| target_message_id? | snowflake | The ID of the message the command was run on, present only on [message command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) interactions. The original response message will also have `message_reference` and `referenced_message` pointing to this message. | +| type | [interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) | Type of interaction | +| user | [user](/docs/resources/user#user-object) object | User who triggered the interaction | +| authorizing_integration_owners | dictionary with keys of [application integration types](/docs/resources/application#application-object-application-integration-types) | IDs for installation context(s) related to an interaction. Details in [Authorizing Integration Owners Object](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) | +| original_response_message_id? | snowflake | ID of the original response message, present only on [follow-up messages](/docs/interactions/receiving-and-responding#) | +| target_user? | [user](/docs/resources/user#user-object) object | The user the command was run on, present only on [user command](/docs/interactions/application-commands#user-commands) interactions | +| target_message_id? | snowflake | The ID of the message the command was run on, present only on [message command](/docs/interactions/application-commands#message-commands) interactions. The original response message will also have `message_reference` and `referenced_message` pointing to this message. | ###### Message Component Interaction Metadata Structure @@ -268,10 +268,10 @@ One of [Application Command Interaction Metadata](#DOCS_RESOURCES_MESSAGE/messag | Field | Type | Description | |--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the interaction | -| type | [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | Type of interaction | -| user | [user](#DOCS_RESOURCES_USER/user-object) object | User who triggered the interaction | -| authorizing_integration_owners | dictionary with keys of [application integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | IDs for installation context(s) related to an interaction. Details in [Authorizing Integration Owners Object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) | -| original_response_message_id? | snowflake | ID of the original response message, present only on [follow-up messages](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) | +| type | [interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) | Type of interaction | +| user | [user](/docs/resources/user#user-object) object | User who triggered the interaction | +| authorizing_integration_owners | dictionary with keys of [application integration types](/docs/resources/application#application-object-application-integration-types) | IDs for installation context(s) related to an interaction. Details in [Authorizing Integration Owners Object](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) | +| original_response_message_id? | snowflake | ID of the original response message, present only on [follow-up messages](/docs/interactions/receiving-and-responding#) | | interacted_message_id | snowflake | ID of the message that contained the interactive component | @@ -280,11 +280,11 @@ One of [Application Command Interaction Metadata](#DOCS_RESOURCES_MESSAGE/messag | Field | Type | Description | |---------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of the interaction | -| type | [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | Type of interaction | -| user | [user](#DOCS_RESOURCES_USER/user-object) object | User who triggered the interaction | -| authorizing_integration_owners | dictionary with keys of [application integration types](#DOCS_RESOURCES_APPLICATION/application-object-application-integration-types) | IDs for installation context(s) related to an interaction. Details in [Authorizing Integration Owners Object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) | -| original_response_message_id? | snowflake | ID of the original response message, present only on [follow-up messages](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/) | -| triggering_interaction_metadata | [Application Command Interaction Metadata](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object-application-command-interaction-metadata-structure) or [Message Component Interaction Metadata](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object-message-component-interaction-metadata-structure) object | Metadata for the interaction that was used to open the modal | +| type | [interaction type](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) | Type of interaction | +| user | [user](/docs/resources/user#user-object) object | User who triggered the interaction | +| authorizing_integration_owners | dictionary with keys of [application integration types](/docs/resources/application#application-object-application-integration-types) | IDs for installation context(s) related to an interaction. Details in [Authorizing Integration Owners Object](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) | +| original_response_message_id? | snowflake | ID of the original response message, present only on [follow-up messages](/docs/interactions/receiving-and-responding#) | +| triggering_interaction_metadata | [Application Command Interaction Metadata](/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure) or [Message Component Interaction Metadata](/docs/resources/message#message-interaction-metadata-object-message-component-interaction-metadata-structure) object | Metadata for the interaction that was used to open the modal | ### Message Call Object @@ -295,7 +295,7 @@ Information about the call in a private channel. | Field | Type | Description | |------------------|---------------------|--------------------------------------------------------------------------------------------| -| participants | array of snowflakes | array of [user](#DOCS_RESOURCES_USER/user-object) object ids that participated in the call | +| participants | array of snowflakes | array of [user](/docs/resources/user#user-object) object ids that participated in the call | | ended_timestamp? | ?ISO8601 timestamp | time when call ended | ### Message Reference Object @@ -304,7 +304,7 @@ Information about the call in a private channel. | Field | Type | Description | |---------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------| -| type? \* | integer | [type of reference](#DOCS_RESOURCES_MESSAGE/message-reference-types). | +| type? \* | integer | [type of reference](/docs/resources/message#message-reference-types). | | message_id? | snowflake | id of the originating message | | channel_id? \*\* | snowflake | id of the originating message's channel | | guild_id? | snowflake | id of the originating message's guild | @@ -351,7 +351,7 @@ There are multiple message types that have a `message_reference` object. ###### Forwards - These are messages which capture a snapshot of a message. -- These messages have an array of [`message_snapshot`](#DOCS_RESOURCES_MESSAGE/message-snapshot-object) objects containing a copy of the original message. This copy follows the same structure as a message, but has only the minimal set of fields returned required for context/rendering. +- These messages have an array of [`message_snapshot`](/docs/resources/message#message-snapshot-object) objects containing a copy of the original message. This copy follows the same structure as a message, but has only the minimal set of fields returned required for context/rendering. - of note: `author` will be excluded - A forwarded message can be identified by looking at its `message_reference.type` field - `message_snapshots` will be the message data associated with the forward. Currently we support only 1 snapshot. @@ -385,12 +385,12 @@ There are multiple message types that have a `message_reference` object. - These are automatic messages sent after a poll has ended and the results have been finalized. (type 46) - These messages have `message_id` and `channel_id`, which point to the original poll message. The `channel_id` will be the same as that of the poll. - The author will be the same as the author of the poll and will be mentioned. -- These messages contain a [`poll_result` embed](#DOCS_RESOURCES_MESSAGE/embed-fields-by-embed-type-poll-result-embed-fields) +- These messages contain a [`poll_result` embed](/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields) ###### Context Menu Command messages - These are messages sent when a user uses a context menu Application Command. (type 23) -- If the command was a [message command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands), the message will have have `message_id` and `channel_id`, and `guild_id` if it is in a guild, which point to the message that the command was used on. The channel_id and guild_id will be the same as the new message. +- If the command was a [message command](/docs/interactions/application-commands#message-commands), the message will have have `message_id` and `channel_id`, and `guild_id` if it is in a guild, which point to the message that the command was used on. The channel_id and guild_id will be the same as the new message. - These messages can have the referenced message resolved in the `referenced_message` field. #### Voice Messages @@ -399,7 +399,7 @@ Voice messages are messages with the `IS_VOICE_MESSAGE` flag. They have the foll - They cannot be edited. - Only a single audio attachment is allowed. No content, stickers, etc... -- The [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) has additional fields: `duration_secs` and `waveform`. The `Content-Type` of the attachment must begin with `audio/` to respect these fields. +- The [attachment](/docs/resources/message#attachment-object) has additional fields: `duration_secs` and `waveform`. The `Content-Type` of the attachment must begin with `audio/` to respect these fields. The `waveform` is intended to be a preview of the entire voice message, with 1 byte per datapoint encoded in base64. Clients sample the recording at most once per 100 milliseconds, but will downsample so that no more than 256 datapoints are in the waveform. @@ -414,7 +414,7 @@ The encoding, and the waveform details, are an implementation detail and may cha | Field | Type | Description | |-----------|------------------------------------------------------------------|---------------------------------------------------| -| message\* | partial [message](#DOCS_RESOURCES_MESSAGE/message-object) object | minimal subset of fields in the forwarded message | +| message\* | partial [message](/docs/resources/message#message-object) object | minimal subset of fields in the forwarded message | \* The current subset of message fields consists of: `type`, `content`, `embeds`, `attachments`, `timestamp`, `edited_timestamp`, `flags`, `mentions`, `mention_roles`, `stickers`, `sticker_items`, and `components`. @@ -429,10 +429,10 @@ The encoding, and the waveform details, are an implementation detail and may cha | Field | Type | Description | |---------------|------------------------------------------------------------|----------------------------------------------------------------------------------------| | count | integer | Total number of times this emoji has been used to react (including super reacts) | -| count_details | object | [Reaction count details object](#DOCS_RESOURCES_MESSAGE/reaction-count-details-object) | +| count_details | object | [Reaction count details object](/docs/resources/message#reaction-count-details-object) | | me | boolean | Whether the current user reacted using this emoji | | me_burst | boolean | Whether the current user super-reacted using this emoji | -| emoji | partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object | emoji information | +| emoji | partial [emoji](/docs/resources/emoji#emoji-object) object | emoji information | | burst_colors | array | HEX colors used for super reaction | ### Reaction Count Details Object @@ -453,18 +453,18 @@ The reaction count details object contains a breakdown of normal and super react | Field | Type | Description | |--------------|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| | title? | string | title of embed | -| type? | string | [type of embed](#DOCS_RESOURCES_MESSAGE/embed-object-embed-types) (always "rich" for webhook embeds) | +| type? | string | [type of embed](/docs/resources/message#embed-object-embed-types) (always "rich" for webhook embeds) | | description? | string | description of embed | | url? | string | url of embed | | timestamp? | ISO8601 timestamp | timestamp of embed content | | color? | integer | color code of the embed | -| footer? | [embed footer](#DOCS_RESOURCES_MESSAGE/embed-object-embed-footer-structure) object | footer information | -| image? | [embed image](#DOCS_RESOURCES_MESSAGE/embed-object-embed-image-structure) object | image information | -| thumbnail? | [embed thumbnail](#DOCS_RESOURCES_MESSAGE/embed-object-embed-thumbnail-structure) object | thumbnail information | -| video? | [embed video](#DOCS_RESOURCES_MESSAGE/embed-object-embed-video-structure) object | video information | -| provider? | [embed provider](#DOCS_RESOURCES_MESSAGE/embed-object-embed-provider-structure) object | provider information | -| author? | [embed author](#DOCS_RESOURCES_MESSAGE/embed-object-embed-author-structure) object | author information | -| fields? | array of [embed field](#DOCS_RESOURCES_MESSAGE/embed-object-embed-field-structure) objects | fields information, max of 25 | +| footer? | [embed footer](/docs/resources/message#embed-object-embed-footer-structure) object | footer information | +| image? | [embed image](/docs/resources/message#embed-object-embed-image-structure) object | image information | +| thumbnail? | [embed thumbnail](/docs/resources/message#embed-object-embed-thumbnail-structure) object | thumbnail information | +| video? | [embed video](/docs/resources/message#embed-object-embed-video-structure) object | video information | +| provider? | [embed provider](/docs/resources/message#embed-object-embed-provider-structure) object | provider information | +| author? | [embed author](/docs/resources/message#embed-object-embed-author-structure) object | author information | +| fields? | array of [embed field](/docs/resources/message#embed-object-embed-field-structure) objects | fields information, max of 25 | ###### Embed Types @@ -476,7 +476,7 @@ The reaction count details object contains a breakdown of normal and super react | gifv | animated gif image embed rendered as a video embed | | article | article embed | | link | link embed | -| poll_result | [poll result embed](#DOCS_RESOURCES_MESSAGE/embed-fields-by-embed-type-poll-result-embed-fields) | +| poll_result | [poll result embed](/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields) | ###### Embed Thumbnail Structure @@ -547,11 +547,11 @@ All of the following limits are measured inclusively. Leading and trailing white |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------| | title | 256 characters | | description | 4096 characters | -| fields | Up to 25 [field](#DOCS_RESOURCES_MESSAGE/embed-object-embed-field-structure) objects | -| [field.name](#DOCS_RESOURCES_MESSAGE/embed-object-embed-field-structure) | 256 characters | -| [field.value](#DOCS_RESOURCES_MESSAGE/embed-object-embed-field-structure) | 1024 characters | -| [footer.text](#DOCS_RESOURCES_MESSAGE/embed-object-embed-footer-structure) | 2048 characters | -| [author.name](#DOCS_RESOURCES_MESSAGE/embed-object-embed-author-structure) | 256 characters | +| fields | Up to 25 [field](/docs/resources/message#embed-object-embed-field-structure) objects | +| [field.name](/docs/resources/message#embed-object-embed-field-structure) | 256 characters | +| [field.value](/docs/resources/message#embed-object-embed-field-structure) | 1024 characters | +| [footer.text](/docs/resources/message#embed-object-embed-footer-structure) | 2048 characters | +| [author.name](/docs/resources/message#embed-object-embed-author-structure) | 256 characters | Additionally, the combined sum of characters in all `title`, `description`, `field.name`, `field.value`, `footer.text`, and `author.name` fields across all embeds attached to a message must not exceed 6000 characters. Violating any of these constraints will result in a `Bad Request` response. @@ -559,7 +559,7 @@ Embeds are deduplicated by URL. If a message contains multiple embeds with the #### Embed Fields by Embed Type -Certain embed types are used to power special UIs. These embeds use [fields](#DOCS_RESOURCES_MESSAGE/embed-object-embed-field-structure) to include additional data in key-value pairs. Below is a reference of possible embed fields for each of the following embed types. +Certain embed types are used to power special UIs. These embeds use [fields](/docs/resources/message#embed-object-embed-field-structure) to include additional data in key-value pairs. Below is a reference of possible embed fields for each of the following embed types. ###### Poll Result Embed Fields @@ -596,7 +596,7 @@ Certain embed types are used to power special UIs. These embeds use [fields](#DO | ephemeral? \* | boolean | whether this attachment is ephemeral | | duration_secs? | float | the duration of the audio file (currently for voice messages) | | waveform? | string | base64 encoded bytearray representing a sampled waveform (currently for voice messages) | -| flags? | integer | [attachment flags](#DOCS_RESOURCES_MESSAGE/attachment-object-attachment-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| flags? | integer | [attachment flags](/docs/resources/message#attachment-object-attachment-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | \* Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists. @@ -614,7 +614,7 @@ Certain embed types are used to power special UIs. These embeds use [fields](#DO |----------|-----------|-----------------------------------------------------------------------------| | id | snowflake | id of the channel | | guild_id | snowflake | id of the guild containing the channel | -| type | integer | the [type of channel](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) | +| type | integer | the [type of channel](/docs/resources/channel#channel-object-channel-types) | | name | string | the name of the channel | ### Allowed Mentions Object @@ -633,7 +633,7 @@ The allowed mention field allows for more granular control over mentions without | Field | Type | Description | |---------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| -| parse? | array of allowed mention types | An array of [allowed mention types](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object-allowed-mention-types) to parse from the content. | +| parse? | array of allowed mention types | An array of [allowed mention types](/docs/resources/message#allowed-mentions-object-allowed-mention-types) to parse from the content. | | roles? | list of snowflakes | Array of role_ids to mention (Max size of 100) | | users? | list of snowflakes | Array of user_ids to mention (Max size of 100) | | replied_user? | boolean | For replies, whether to mention the author of the message being replied to (default false) | @@ -729,9 +729,9 @@ user 125 in the content. | total_months_subscribed | integer | the cumulative number of months that the user has been subscribed for | | is_renewal | boolean | whether this notification is for a renewal rather than a new purchase | -## Get Channel Messages % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages +## Get Channel Messages % GET /channels/{channel.id/docs/resources/channel#channel-object}/messages -Retrieves the messages in a channel. Returns an array of [message](#DOCS_RESOURCES_MESSAGE/message-object) objects on success. +Retrieves the messages in a channel. Returns an array of [message](/docs/resources/message#message-object) objects on success. If operating on a guild channel, this endpoint requires the current user to have the `VIEW_CHANNEL` permission. If the channel is a voice channel, they must _also_ have the `CONNECT` permission. @@ -749,23 +749,23 @@ If the current user is missing the `READ_MESSAGE_HISTORY` permission in the chan | after? | snowflake | Get messages after this message ID | absent | | limit? | integer | Max number of messages to return (1-100) | 50 | -## Get Channel Message % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Get Channel Message % GET /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object} -Retrieves a specific message in the channel. Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object on success. +Retrieves a specific message in the channel. Returns a [message](/docs/resources/message#message-object) object on success. If operating on a guild channel, this endpoint requires the current user to have the `VIEW_CHANNEL` and `READ_MESSAGE_HISTORY` permissions. If the channel is a voice channel, they must _also_ have the `CONNECT` permission. -## Create Message % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages +## Create Message % POST /channels/{channel.id/docs/resources/channel#channel-object}/messages > warn > Discord may strip certain characters from message content, like invalid unicode characters or characters which cause unexpected message formatting. If you are passing user-generated strings into message content, consider sanitizing the data to prevent unexpected behavior and using `allowed_mentions` to prevent unexpected mentions. -Post a message to a guild text or DM channel. Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object. Fires a [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create) Gateway event. See [message formatting](#DOCS_REFERENCE/message-formatting) for more information on how to properly format messages. +Post a message to a guild text or DM channel. Returns a [message](/docs/resources/message#message-object) object. Fires a [Message Create](/docs/events/gateway-events#message-create) Gateway event. See [message formatting](/docs/reference#message-formatting) for more information on how to properly format messages. -To create a message as a reply or forward of another message, apps can include a [`message_reference`](#DOCS_RESOURCES_MESSAGE/message-reference-structure). +To create a message as a reply or forward of another message, apps can include a [`message_reference`](/docs/resources/message#message-reference-structure). Refer to the documentation for required fields. -Files must be attached using a `multipart/form-data` body as described in [Uploading Files](#DOCS_REFERENCE/uploading-files). +Files must be attached using a `multipart/form-data` body as described in [Uploading Files](/docs/reference#uploading-files). ###### Limitations @@ -784,19 +784,19 @@ Files must be attached using a `multipart/form-data` body as described in [Uploa | Field | Type | Description | |--------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | content?\* | string | Message contents (up to 2000 characters) | -| nonce? | integer or string | Can be used to verify a message was sent (up to 25 characters). Value will appear in the [Message Create event](#DOCS_EVENTS_GATEWAY_EVENTS/message-create). | +| nonce? | integer or string | Can be used to verify a message was sent (up to 25 characters). Value will appear in the [Message Create event](/docs/events/gateway-events#message-create). | | tts? | boolean | `true` if this is a TTS message | -| embeds?\* | array of [embed](#DOCS_RESOURCES_MESSAGE/embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) | -| allowed_mentions? | [allowed mention object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) | Allowed mentions for the message | -| message_reference? | [message reference](#DOCS_RESOURCES_MESSAGE/message-reference-structure) | Include to make your message a reply or a forward | -| components?\* | array of [message component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) objects | Components to include with the message | -| sticker_ids?\* | array of snowflakes | IDs of up to 3 [stickers](#DOCS_RESOURCES_STICKER/sticker-object) in the server to send in the message | -| files[n]?\* | file contents | Contents of the file being sent. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| payload_json? | string | JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| attachments? | array of partial [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | Attachment objects with filename and description. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| flags? | integer | [Message flags](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) | +| embeds?\* | array of [embed](/docs/resources/message#embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) | +| allowed_mentions? | [allowed mention object](/docs/resources/message#allowed-mentions-object) | Allowed mentions for the message | +| message_reference? | [message reference](/docs/resources/message#message-reference-structure) | Include to make your message a reply or a forward | +| components?\* | array of [message component](/docs/interactions/message-components#component-object) objects | Components to include with the message | +| sticker_ids?\* | array of snowflakes | IDs of up to 3 [stickers](/docs/resources/sticker#sticker-object) in the server to send in the message | +| files[n]?\* | file contents | Contents of the file being sent. See [Uploading Files](/docs/reference#uploading-files) | +| payload_json? | string | JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](/docs/reference#uploading-files) | +| attachments? | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with filename and description. See [Uploading Files](/docs/reference#uploading-files) | +| flags? | integer | [Message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) | | enforce_nonce? | boolean | If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. | -| poll? | [poll](#DOCS_RESOURCES_POLL/poll-create-request-object) request object | A poll! | +| poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | \* At least one of `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, or `poll` is required. @@ -813,39 +813,39 @@ Files must be attached using a `multipart/form-data` body as described in [Uploa } ``` -Examples for file uploads are available in [Uploading Files](#DOCS_REFERENCE/uploading-files). +Examples for file uploads are available in [Uploading Files](/docs/reference#uploading-files). -## Crosspost Message % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/crosspost +## Crosspost Message % POST /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/crosspost Crosspost a message in an Announcement Channel to following channels. This endpoint requires the `SEND_MESSAGES` permission, if the current user sent the message, or additionally the `MANAGE_MESSAGES` permission, for all other messages, to be present for the current user. -Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object. Fires a [Message Update](#DOCS_EVENTS_GATEWAY_EVENTS/message-update) Gateway event. +Returns a [message](/docs/resources/message#message-object) object. Fires a [Message Update](/docs/events/gateway-events#message-update) Gateway event. -## Create Reaction % PUT /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/reactions/{emoji#DOCS_RESOURCES_EMOJI/emoji-object}/@me +## Create Reaction % PUT /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/reactions/{emoji/docs/resources/emoji#emoji-object}/@me -Create a reaction for the message. This endpoint requires the `READ_MESSAGE_HISTORY` permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the `ADD_REACTIONS` permission to be present on the current user. Returns a 204 empty response on success. Fires a [Message Reaction Add](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-add) Gateway event. +Create a reaction for the message. This endpoint requires the `READ_MESSAGE_HISTORY` permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the `ADD_REACTIONS` permission to be present on the current user. Returns a 204 empty response on success. Fires a [Message Reaction Add](/docs/events/gateway-events#message-reaction-add) Gateway event. The `emoji` must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding) or the request will fail with `10014: Unknown Emoji`. To use custom emoji, you must encode it in the format `name:id` with the emoji name and emoji id. -## Delete Own Reaction % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/reactions/{emoji#DOCS_RESOURCES_EMOJI/emoji-object}/@me +## Delete Own Reaction % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/reactions/{emoji/docs/resources/emoji#emoji-object}/@me -Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a [Message Reaction Remove](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove) Gateway event. +Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a [Message Reaction Remove](/docs/events/gateway-events#message-reaction-remove) Gateway event. The `emoji` must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding) or the request will fail with `10014: Unknown Emoji`. To use custom emoji, you must encode it in the format `name:id` with the emoji name and emoji id. -## Delete User Reaction % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/reactions/{emoji#DOCS_RESOURCES_EMOJI/emoji-object}/{user.id#DOCS_RESOURCES_USER/user-object} +## Delete User Reaction % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/reactions/{emoji/docs/resources/emoji#emoji-object}/{user.id/docs/resources/user#user-object} -Deletes another user's reaction. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Returns a 204 empty response on success. Fires a [Message Reaction Remove](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove) Gateway event. +Deletes another user's reaction. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Returns a 204 empty response on success. Fires a [Message Reaction Remove](/docs/events/gateway-events#message-reaction-remove) Gateway event. The `emoji` must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding) or the request will fail with `10014: Unknown Emoji`. To use custom emoji, you must encode it in the format `name:id` with the emoji name and emoji id. -## Get Reactions % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/reactions/{emoji#DOCS_RESOURCES_EMOJI/emoji-object} +## Get Reactions % GET /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/reactions/{emoji/docs/resources/emoji#emoji-object} -Get a list of users that reacted with this emoji. Returns an array of [user](#DOCS_RESOURCES_USER/user-object) objects on success. +Get a list of users that reacted with this emoji. Returns an array of [user](/docs/resources/user#user-object) objects on success. The `emoji` must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding) or the request will fail with `10014: Unknown Emoji`. To use custom emoji, you must encode it in the format `name:id` with the emoji name and emoji id. ###### Query String Params | Field | Type | Description | Default | |--------|-----------|------------------------------------------------------------------------------|---------| -| type? | integer | The [type of reaction](#DOCS_RESOURCES_MESSAGE/get-reactions-reaction-types) | 0 | +| type? | integer | The [type of reaction](/docs/resources/message#get-reactions-reaction-types) | 0 | | after? | snowflake | Get users after this user ID | absent | | limit? | integer | Max number of users to return (1-100) | 25 | @@ -856,24 +856,24 @@ The `emoji` must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding | NORMAL | 0 | | BURST | 1 | -## Delete All Reactions % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/reactions +## Delete All Reactions % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/reactions -Deletes all reactions on a message. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Fires a [Message Reaction Remove All](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove-all) Gateway event. +Deletes all reactions on a message. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Fires a [Message Reaction Remove All](/docs/events/gateway-events#message-reaction-remove-all) Gateway event. -## Delete All Reactions for Emoji % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/reactions/{emoji#DOCS_RESOURCES_EMOJI/emoji-object} +## Delete All Reactions for Emoji % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object}/reactions/{emoji/docs/resources/emoji#emoji-object} -Deletes all the reactions for a given emoji on a message. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Fires a [Message Reaction Remove Emoji](#DOCS_EVENTS_GATEWAY_EVENTS/message-reaction-remove-emoji) Gateway event. +Deletes all the reactions for a given emoji on a message. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Fires a [Message Reaction Remove Emoji](/docs/events/gateway-events#message-reaction-remove-emoji) Gateway event. The `emoji` must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding) or the request will fail with `10014: Unknown Emoji`. To use custom emoji, you must encode it in the format `name:id` with the emoji name and emoji id. -## Edit Message % PATCH /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Edit Message % PATCH /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object} Edit a previously sent message. The fields `content`, `embeds`, and `flags` can be edited by the original message author. Other users can only edit `flags` and only if they have the `MANAGE_MESSAGES` permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only `flags` documented in the table below may be modified by users (unsupported flag changes are currently ignored without error). When the `content` field is edited, the `mentions` array in the message object will be reconstructed from scratch based on the new content. The `allowed_mentions` field of the edit request controls how this happens. If there is no explicit `allowed_mentions` in the edit request, the content will be parsed with _default_ allowances, that is, without regard to whether or not an `allowed_mentions` was present in the request that originally created the message. -Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object. Fires a [Message Update](#DOCS_EVENTS_GATEWAY_EVENTS/message-update) Gateway event. +Returns a [message](/docs/resources/message#message-object) object. Fires a [Message Update](/docs/events/gateway-events#message-update) Gateway event. -Refer to [Uploading Files](#DOCS_REFERENCE/uploading-files) for details on attachments and `multipart/form-data` requests. +Refer to [Uploading Files](/docs/reference#uploading-files) for details on attachments and `multipart/form-data` requests. Any provided files will be **appended** to the message. To remove or replace files you will have to supply the `attachments` field which specifies the files to retain on the message after edit. > warn @@ -887,24 +887,24 @@ Any provided files will be **appended** to the message. To remove or replace fil | Field | Type | Description | |------------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| | content | string | Message contents (up to 2000 characters) | -| embeds | array of [embed](#DOCS_RESOURCES_MESSAGE/embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) | -| flags | integer | Edit the [flags](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) of a message (only `SUPPRESS_EMBEDS` can currently be set/unset) | -| allowed_mentions | [allowed mention object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) | Allowed mentions for the message | -| components | array of [message component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) | Components to include with the message | -| files[n] | file contents | Contents of the file being sent/edited. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| payload_json | string | JSON-encoded body of non-file params (multipart/form-data only). See [Uploading Files](#DOCS_REFERENCE/uploading-files) | -| attachments | array of [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | Attached files to keep and possible descriptions for new files. See [Uploading Files](#DOCS_REFERENCE/uploading-files) | +| embeds | array of [embed](/docs/resources/message#embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) | +| flags | integer | Edit the [flags](/docs/resources/message#message-object-message-flags) of a message (only `SUPPRESS_EMBEDS` can currently be set/unset) | +| allowed_mentions | [allowed mention object](/docs/resources/message#allowed-mentions-object) | Allowed mentions for the message | +| components | array of [message component](/docs/interactions/message-components#component-object) | Components to include with the message | +| files[n] | file contents | Contents of the file being sent/edited. See [Uploading Files](/docs/reference#uploading-files) | +| payload_json | string | JSON-encoded body of non-file params (multipart/form-data only). See [Uploading Files](/docs/reference#uploading-files) | +| attachments | array of [attachment](/docs/resources/message#attachment-object) objects | Attached files to keep and possible descriptions for new files. See [Uploading Files](/docs/reference#uploading-files) | -## Delete Message % DELETE /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Delete Message % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/messages/{message.id/docs/resources/message#message-object} -Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Message Delete](#DOCS_EVENTS_GATEWAY_EVENTS/message-delete) Gateway event. +Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Message Delete](/docs/events/gateway-events#message-delete) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Bulk Delete Messages % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/messages/bulk-delete +## Bulk Delete Messages % POST /channels/{channel.id/docs/resources/channel#channel-object}/messages/bulk-delete -Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Message Delete Bulk](#DOCS_EVENTS_GATEWAY_EVENTS/message-delete-bulk) Gateway event. +Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a [Message Delete Bulk](/docs/events/gateway-events#message-delete-bulk) Gateway event. Any message IDs given that do not exist or are invalid will count towards the minimum and maximum message count (currently 2 and 100 respectively). diff --git a/docs/resources/poll.md b/docs/resources/poll.md index 29bd1e42f2..ac6580d244 100644 --- a/docs/resources/poll.md +++ b/docs/resources/poll.md @@ -18,30 +18,30 @@ necessary. | Field | Type | Description | |-------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------| -| question | [Poll Media Object](#DOCS_RESOURCES_POLL/poll-media-object-poll-media-object-structure) | The question of the poll. Only `text` is supported. | -| answers | List of [Poll Answer Objects](#DOCS_RESOURCES_POLL/poll-answer-object-poll-answer-object-structure) | Each of the answers available in the poll. | +| question | [Poll Media Object](/docs/resources/poll#poll-media-object-poll-media-object-structure) | The question of the poll. Only `text` is supported. | +| answers | List of [Poll Answer Objects](/docs/resources/poll#poll-answer-object-poll-answer-object-structure) | Each of the answers available in the poll. | | expiry | ?IS08601 timestamp | The time when the poll ends. | | allow_multiselect | boolean | Whether a user can select multiple answers | -| layout_type | integer | The [layout type](#DOCS_RESOURCES_POLL/layout-type) of the poll | -| results? | [Poll Results Object](#DOCS_RESOURCES_POLL/poll-results-object-poll-results-object-structure) | The results of the poll | +| layout_type | integer | The [layout type](/docs/resources/poll#layout-type) of the poll | +| results? | [Poll Results Object](/docs/resources/poll#poll-results-object-poll-results-object-structure) | The results of the poll | `expiry` is marked as nullable to support non-expiring polls in the future, but all polls have an expiry currently. ### Poll Create Request Object This is the request object used when creating a poll across the different endpoints. -It is similar but not exactly identical to the main [poll object](#DOCS_RESOURCES_POLL/poll-object-poll-object-structure). +It is similar but not exactly identical to the main [poll object](/docs/resources/poll#poll-object-poll-object-structure). The main difference is that the request has `duration` which eventually becomes `expiry`. ###### Poll Create Request Object Structure | Field | Type | Description | |--------------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| -| question | [Poll Media Object](#DOCS_RESOURCES_POLL/poll-media-object-poll-media-object-structure) | The question of the poll. Only `text` is supported. | -| answers | List of [Poll Answer Objects](#DOCS_RESOURCES_POLL/poll-answer-object-poll-answer-object-structure) | Each of the answers available in the poll, up to 10 | +| question | [Poll Media Object](/docs/resources/poll#poll-media-object-poll-media-object-structure) | The question of the poll. Only `text` is supported. | +| answers | List of [Poll Answer Objects](/docs/resources/poll#poll-answer-object-poll-answer-object-structure) | Each of the answers available in the poll, up to 10 | | duration? | integer | Number of hours the poll should be open for, up to 32 days. Defaults to 24 | | allow_multiselect? | boolean | Whether a user can select multiple answers. Defaults to false | -| layout_type? | integer | The [layout type](#DOCS_RESOURCES_POLL/layout-type) of the poll. Defaults to... DEFAULT! | +| layout_type? | integer | The [layout type](/docs/resources/poll#layout-type) of the poll. Defaults to... DEFAULT! | ### Layout Type @@ -63,7 +63,7 @@ For now, `question` only supports `text`, while answers can have an optional `em | Field | Type | Description | |--------|-----------------------------------------------------|------------------------| | text? | string | The text of the field | -| emoji? | partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) | The emoji of the field | +| emoji? | partial [emoji](/docs/resources/emoji#emoji-object) | The emoji of the field | `text` should always be non-null for both questions and answers, but please do not depend on that in the future. The maximum length of `text` is 300 for the question, and 55 for any answer. @@ -83,7 +83,7 @@ Currently, there is a maximum of 10 answers per poll. | Field | Type | Description | |-------------|-----------------------------------------------------------------------------------------|------------------------| | answer_id\* | integer | The ID of the answer | -| poll_media | [Poll Media Object](#DOCS_RESOURCES_POLL/poll-media-object-poll-media-object-structure) | The data of the answer | +| poll_media | [Poll Media Object](/docs/resources/poll#poll-media-object-poll-media-object-structure) | The data of the answer | \* Only sent as part of responses from Discord's API/Gateway. @@ -107,7 +107,7 @@ If `answer_counts` does not contain an entry for a particular answer, then there | Field | Type | Description | |---------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------| | is_finalized | boolean | Whether the votes have been precisely counted | -| answer_counts | List of [Poll Answer Count Object](#DOCS_RESOURCES_POLL/poll-results-object-poll-answer-count-object-structure) | The counts for each answer | +| answer_counts | List of [Poll Answer Count Object](/docs/resources/poll#poll-results-object-poll-answer-count-object-structure) | The counts for each answer | ###### Poll Answer Count Object Structure @@ -119,11 +119,11 @@ If `answer_counts` does not contain an entry for a particular answer, then there # Poll Endpoints -For creating a poll, see [Create Message](#DOCS_RESOURCES_MESSAGE/create-message). After creation, the poll message cannot be edited. +For creating a poll, see [Create Message](/docs/resources/message#create-message). After creation, the poll message cannot be edited. Apps are not allowed to vote on polls. No rights! :) -## Get Answer Voters % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/polls/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/answers/{answer_id#DOCS_RESOURCES_POLL/poll-answer-object} +## Get Answer Voters % GET /channels/{channel.id/docs/resources/channel#channel-object}/polls/{message.id/docs/resources/message#message-object}/answers/{answer_id/docs/resources/poll#poll-answer-object} Get a list of users that voted for this specific answer. @@ -138,10 +138,10 @@ Get a list of users that voted for this specific answer. | Field | Type | Description | |-------|---------------------------------------------------|---------------------------------| -| users | array of [user](#DOCS_RESOURCES_USER/user-object) | Users who voted for this answer | +| users | array of [user](/docs/resources/user#user-object) | Users who voted for this answer | -## End Poll % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/polls/{message.id#DOCS_RESOURCES_MESSAGE/message-object}/expire +## End Poll % POST /channels/{channel.id/docs/resources/channel#channel-object}/polls/{message.id/docs/resources/message#message-object}/expire Immediately ends the poll. You cannot end polls from other users. -Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object. Fires a [Message Update](#DOCS_EVENTS_GATEWAY_EVENTS/message-update) Gateway event. +Returns a [message](/docs/resources/message#message-object) object. Fires a [Message Update](/docs/events/gateway-events#message-update) Gateway event. diff --git a/docs/resources/sku.md b/docs/resources/sku.md index 52e36ac26b..376d7f157c 100644 --- a/docs/resources/sku.md +++ b/docs/resources/sku.md @@ -13,11 +13,11 @@ SKUs (stock-keeping units) in Discord represent premium offerings that can be ma | Field | Type | Description | |----------------|-----------|-------------------------------------------------------------------------------------------------------------------------| | id | snowflake | ID of SKU | -| type | integer | [Type of SKU](#DOCS_RESOURCES_SKU/sku-object-sku-types) | +| type | integer | [Type of SKU](/docs/resources/sku#sku-object-sku-types) | | application_id | snowflake | ID of the parent application | | name | string | Customer-facing name of your premium offering | | slug | string | System-generated URL slug based on the SKU's name | -| flags | integer | [SKU flags](#DOCS_RESOURCES_SKU/sku-object-sku-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| flags | integer | [SKU flags](/docs/resources/sku#sku-object-sku-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | ###### SKU Example @@ -65,7 +65,7 @@ The `flags` field can be used to differentiate user and server subscriptions wit | GUILD_SUBSCRIPTION | `1 << 7` | Recurring SKU that can be purchased by a user and applied to a single server. Grants access to every user in that server. | | USER_SUBSCRIPTION | `1 << 8` | Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server. | -## List SKUs % GET /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/skus +## List SKUs % GET /applications/{application.id/docs/resources/application#application-object}/skus Returns all SKUs for a given application. diff --git a/docs/resources/soundboard.md b/docs/resources/soundboard.md index 72ec7910ec..9ba06d792b 100644 --- a/docs/resources/soundboard.md +++ b/docs/resources/soundboard.md @@ -4,11 +4,11 @@ sidebar_label: Soundboard # Soundboard Resource -Users can play soundboard sounds in voice channels, triggering a [Voice Channel Effect Send](#DOCS_EVENTS_GATEWAY_EVENTS/voice-channel-effect-send) Gateway event for users connected to the voice channel. +Users can play soundboard sounds in voice channels, triggering a [Voice Channel Effect Send](/docs/events/gateway-events#voice-channel-effect-send) Gateway event for users connected to the voice channel. -There is a set of [default sounds](#DOCS_RESOURCES_SOUNDBOARD/list-default-soundboard-sounds) available to all users. Soundboard sounds can also be [created in a guild](#DOCS_RESOURCES_SOUNDBOARD/create-guild-soundboard-sound); users will be able to use the sounds in the guild, and Nitro subscribers can use them in all guilds. +There is a set of [default sounds](/docs/resources/soundboard#list-default-soundboard-sounds) available to all users. Soundboard sounds can also be [created in a guild](/docs/resources/soundboard#create-guild-soundboard-sound); users will be able to use the sounds in the guild, and Nitro subscribers can use them in all guilds. -Soundboard sounds in a set of guilds can be retrieved over the Gateway using [Request Soundboard Sounds](#DOCS_EVENTS_GATEWAY_EVENTS/request-soundboard-sounds). +Soundboard sounds in a set of guilds can be retrieved over the Gateway using [Request Soundboard Sounds](/docs/events/gateway-events#request-soundboard-sounds). ### Soundboard Sound Object @@ -23,7 +23,7 @@ Soundboard sounds in a set of guilds can be retrieved over the Gateway using [Re | emoji_name | ?string | the unicode character of this sound's standard emoji | | guild_id? | snowflake | the id of the guild this sound is in | | available | boolean | whether this sound can be used, may be false due to loss of Server Boosts | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user who created this sound | +| user? | [user](/docs/resources/user#user-object) object | the user who created this sound | ###### Example Default Soundboard Sound @@ -60,11 +60,11 @@ A soundboard sound can be retrieved in MP3 or Ogg format at the URL: https://cdn.discordapp.com/soundboard-sounds/{sound_id} ``` -## Send Soundboard Sound % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/send-soundboard-sound +## Send Soundboard Sound % POST /channels/{channel.id/docs/resources/channel#channel-object}/send-soundboard-sound -Send a soundboard sound to a voice channel the user is connected to. Fires a [Voice Channel Effect Send](#DOCS_EVENTS_GATEWAY_EVENTS/voice-channel-effect-send) Gateway event. +Send a soundboard sound to a voice channel the user is connected to. Fires a [Voice Channel Effect Send](/docs/events/gateway-events#voice-channel-effect-send) Gateway event. -Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNAL_SOUNDS` permission if the sound is from a different server. Additionally, requires the user to be connected to the voice channel, having a [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) without `deaf`, `self_deaf`, `mute`, or `suppress` enabled. +Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNAL_SOUNDS` permission if the sound is from a different server. Additionally, requires the user to be connected to the voice channel, having a [voice state](/docs/resources/voice#voice-state-object) without `deaf`, `self_deaf`, `mute`, or `suppress` enabled. ###### JSON Params @@ -75,9 +75,9 @@ Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNA ## List Default Soundboard Sounds % GET /soundboard-default-sounds -Returns an array of [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) objects that can be used by all users. +Returns an array of [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) objects that can be used by all users. -## List Guild Soundboard Sounds % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/soundboard-sounds +## List Guild Soundboard Sounds % GET /guilds/{guild.id/docs/resources/guild#guild-object}/soundboard-sounds Returns a list of the guild's soundboard sounds. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. @@ -85,15 +85,15 @@ Returns a list of the guild's soundboard sounds. Includes `user` fields if the b | Field | Type | |-------|-----------------------------------------------------------------------------------------| -| items | array of [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) objects | +| items | array of [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) objects | -## Get Guild Soundboard Sound % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/soundboard-sounds/{sound.id#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object} +## Get Guild Soundboard Sound % GET /guilds/{guild.id/docs/resources/guild#guild-object}/soundboard-sounds/{sound.id/docs/resources/soundboard#soundboard-sound-object} -Returns a [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) object for the given sound id. Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. +Returns a [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) object for the given sound id. Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. -## Create Guild Soundboard Sound % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/soundboard-sounds +## Create Guild Soundboard Sound % POST /guilds/{guild.id/docs/resources/guild#guild-object}/soundboard-sounds -Create a new soundboard sound for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) object on success. Fires a [Guild Soundboard Sound Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sound-create) Gateway event. +Create a new soundboard sound for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) object on success. Fires a [Guild Soundboard Sound Create](/docs/events/gateway-events#guild-soundboard-sound-create) Gateway event. > info > Soundboard sounds have a max file size of 512kb and a max duration of 5.2 seconds. @@ -106,14 +106,14 @@ Create a new soundboard sound for the guild. Requires the `CREATE_GUILD_EXPRESSI | Field | Type | Description | |-------------|------------|------------------------------------------------------------------------------------------------| | name | string | name of the soundboard sound (2-32 characters) | -| sound | data uri | the mp3 or ogg sound data, base64 encoded, similar to [image data](#DOCS_REFERENCE/image-data) | +| sound | data uri | the mp3 or ogg sound data, base64 encoded, similar to [image data](/docs/reference#image-data) | | volume? | ?double | the volume of the soundboard sound, from 0 to 1, defaults to 1 | | emoji_id? | ?snowflake | the id of the custom emoji for the soundboard sound | | emoji_name? | ?string | the unicode character of a standard emoji for the soundboard sound | -## Modify Guild Soundboard Sound % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/soundboard-sounds/{sound.id#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object} +## Modify Guild Soundboard Sound % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/soundboard-sounds/{sound.id/docs/resources/soundboard#soundboard-sound-object} -Modify the given soundboard sound. For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated [soundboard sound](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) object on success. Fires a [Guild Soundboard Sound Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sound-update) Gateway event. +Modify the given soundboard sound. For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) object on success. Fires a [Guild Soundboard Sound Update](/docs/events/gateway-events#guild-soundboard-sound-update) Gateway event. > warn > All parameters to this endpoint are optional. @@ -130,9 +130,9 @@ Modify the given soundboard sound. For sounds created by the current user, requi | emoji_id | ?snowflake | the id of the custom emoji for the soundboard sound | | emoji_name | ?string | the unicode character of a standard emoji for the soundboard sound | -## Delete Guild Soundboard Sound % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/soundboard-sounds/{sound.id#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object} +## Delete Guild Soundboard Sound % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/soundboard-sounds/{sound.id/docs/resources/soundboard#soundboard-sound-object} -Delete the given soundboard sound. For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a [Guild Soundboard Sound Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-soundboard-sound-delete) Gateway event. +Delete the given soundboard sound. For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a [Guild Soundboard Sound Delete](/docs/events/gateway-events#guild-soundboard-sound-delete) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. diff --git a/docs/resources/stage-instance.md b/docs/resources/stage-instance.md index 8f4fab64e9..0b19c99001 100644 --- a/docs/resources/stage-instance.md +++ b/docs/resources/stage-instance.md @@ -16,7 +16,7 @@ A _Stage Instance_ holds information about a live stage. | guild_id | snowflake | The guild id of the associated Stage channel | | channel_id | snowflake | The id of the associated Stage channel | | topic | string | The topic of the Stage instance (1-120 characters) | -| privacy_level | integer | The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance | +| privacy_level | integer | The [privacy level](/docs/resources/stage-instance#stage-instance-object-privacy-level) of the Stage instance | | discoverable_disabled | boolean | Whether or not Stage Discovery is disabled (deprecated) | | guild_scheduled_event_id | ?snowflake | The id of the scheduled event for this Stage instance | @@ -46,16 +46,16 @@ A _Stage Instance_ holds information about a live stage. Below are some definitions related to stages. - **Liveness:** A Stage channel is considered _live_ when there is an associated stage instance. Conversely, a Stage channel is _not live_ when there is no associated stage instance. -- **Speakers:** A participant of a Stage channel is a _speaker_ when their [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) +- **Speakers:** A participant of a Stage channel is a _speaker_ when their [voice state](/docs/resources/voice#voice-state-object) is not `suppress`ed, and has no `request_to_speak_timestamp`. -- **Moderators**: A member of the guild is a _moderator_ of a Stage channel if they have all of the following [permissions](#DOCS_TOPICS_PERMISSIONS/permissions): +- **Moderators**: A member of the guild is a _moderator_ of a Stage channel if they have all of the following [permissions](/docs/topics/permissions#permissions): - `MANAGE_CHANNELS` - `MUTE_MEMBERS` - `MOVE_MEMBERS` - **Topic**: This is the blurb that gets shown below the channel's name, among other places. - **Public**: A Stage instance is public when it has a `privacy_level` of `PUBLIC`. While a guild has a public Stage instance: - - Users in the Stage can have the Stage show in their [activities](#DOCS_EVENTS_GATEWAY_EVENTS/presence). - - [Invites](#DOCS_RESOURCES_INVITE/invite-object) to the Stage channel will have the `stage_instance` field. + - Users in the Stage can have the Stage show in their [activities](/docs/events/gateway-events#presence). + - [Invites](/docs/resources/invite#invite-object) to the Stage channel will have the `stage_instance` field. ## Auto Closing @@ -63,7 +63,7 @@ When a Stage channel has no speakers for a certain period of time (on the order ## Create Stage Instance % POST /stage-instances -Creates a new Stage instance associated to a Stage channel. Returns that [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-stage-instance-structure). Fires a [Stage Instance Create](#DOCS_EVENTS_GATEWAY_EVENTS/stage-instance-create) Gateway event. +Creates a new Stage instance associated to a Stage channel. Returns that [Stage instance](/docs/resources/stage-instance#stage-instance-object-stage-instance-structure). Fires a [Stage Instance Create](/docs/events/gateway-events#stage-instance-create) Gateway event. Requires the user to be a moderator of the Stage channel. @@ -76,19 +76,19 @@ Requires the user to be a moderator of the Stage channel. |-----------------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------| | channel_id | snowflake | The id of the Stage channel | | topic | string | The topic of the Stage instance (1-120 characters) | -| privacy_level? | integer | The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance (default GUILD_ONLY) | +| privacy_level? | integer | The [privacy level](/docs/resources/stage-instance#stage-instance-object-privacy-level) of the Stage instance (default GUILD_ONLY) | | send_start_notification? \* | boolean | Notify @everyone that a Stage instance has started | | guild_scheduled_event_id? | snowflake | The guild scheduled event associated with this Stage instance | \* The stage moderator must have the `MENTION_EVERYONE` permission for this notification to be sent. -## Get Stage Instance % GET /stage-instances/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object} +## Get Stage Instance % GET /stage-instances/{channel.id/docs/resources/channel#channel-object} Gets the stage instance associated with the Stage channel, if it exists. -## Modify Stage Instance % PATCH /stage-instances/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object} +## Modify Stage Instance % PATCH /stage-instances/{channel.id/docs/resources/channel#channel-object} -Updates fields of an existing Stage instance. Returns the updated [Stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-stage-instance-structure). Fires a [Stage Instance Update](#DOCS_EVENTS_GATEWAY_EVENTS/stage-instance-update) Gateway event. +Updates fields of an existing Stage instance. Returns the updated [Stage instance](/docs/resources/stage-instance#stage-instance-object-stage-instance-structure). Fires a [Stage Instance Update](/docs/events/gateway-events#stage-instance-update) Gateway event. Requires the user to be a moderator of the Stage channel. @@ -100,11 +100,11 @@ Requires the user to be a moderator of the Stage channel. | Field | Type | Description | |----------------|---------|---------------------------------------------------------------------------------------------------------------| | topic? | string | The topic of the Stage instance (1-120 characters) | -| privacy_level? | integer | The [privacy level](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object-privacy-level) of the Stage instance | +| privacy_level? | integer | The [privacy level](/docs/resources/stage-instance#stage-instance-object-privacy-level) of the Stage instance | -## Delete Stage Instance % DELETE /stage-instances/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object} +## Delete Stage Instance % DELETE /stage-instances/{channel.id/docs/resources/channel#channel-object} -Deletes the Stage instance. Returns `204 No Content`. Fires a [Stage Instance Delete](#DOCS_EVENTS_GATEWAY_EVENTS/stage-instance-delete) Gateway event. +Deletes the Stage instance. Returns `204 No Content`. Fires a [Stage Instance Delete](/docs/events/gateway-events#stage-instance-delete) Gateway event. Requires the user to be a moderator of the Stage channel. diff --git a/docs/resources/sticker.md b/docs/resources/sticker.md index 1bfdc338d7..eba6d9ab53 100644 --- a/docs/resources/sticker.md +++ b/docs/resources/sticker.md @@ -12,16 +12,16 @@ Represents a sticker that can be sent in messages. | Field | Type | Description | |-------------|-------------------------------------------------|---------------------------------------------------------------------------------------| -| id | snowflake | [id of the sticker](#DOCS_REFERENCE/image-formatting) | +| id | snowflake | [id of the sticker](/docs/reference#image-formatting) | | pack_id? | snowflake | for standard stickers, id of the pack the sticker is from | | name | string | name of the sticker | | description | ?string | description of the sticker | | tags\* | string | autocomplete/suggestion tags for the sticker (max 200 characters) | -| type | integer | [type of sticker](#DOCS_RESOURCES_STICKER/sticker-object-sticker-types) | -| format_type | integer | [type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types) | +| type | integer | [type of sticker](/docs/resources/sticker#sticker-object-sticker-types) | +| format_type | integer | [type of sticker format](/docs/resources/sticker#sticker-object-sticker-format-types) | | available? | boolean | whether this guild sticker can be used, may be false due to loss of Server Boosts | | guild_id? | snowflake | id of the guild that owns this sticker | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that uploaded the guild sticker | +| user? | [user](/docs/resources/user#user-object) object | the user that uploaded the guild sticker | | sort_value? | integer | the standard sticker's sort order within its pack | \* A comma separated list of keywords is the format used in this field by standard stickers, but this is just a convention. @@ -68,7 +68,7 @@ The smallest amount of data required to render a sticker. A partial sticker obje |-------------|-----------|---------------------------------------------------------------------------------------| | id | snowflake | id of the sticker | | name | string | name of the sticker | -| format_type | integer | [type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types) | +| format_type | integer | [type of sticker format](/docs/resources/sticker#sticker-object-sticker-format-types) | ### Sticker Pack Object @@ -79,12 +79,12 @@ Represents a pack of standard stickers. | Field | Type | Description | |-------------------|--------------------------------------------------------------------|---------------------------------------------------------------------------| | id | snowflake | id of the sticker pack | -| stickers | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | the stickers in the pack | +| stickers | array of [sticker](/docs/resources/sticker#sticker-object) objects | the stickers in the pack | | name | string | name of the sticker pack | | sku_id | snowflake | id of the pack's SKU | | cover_sticker_id? | snowflake | id of a sticker in the pack which is shown as the pack's icon | | description | string | description of the sticker pack | -| banner_asset_id? | snowflake | id of the sticker pack's [banner image](#DOCS_REFERENCE/image-formatting) | +| banner_asset_id? | snowflake | id of the sticker pack's [banner image](/docs/reference#image-formatting) | ###### Example Sticker Pack @@ -100,9 +100,9 @@ Represents a pack of standard stickers. } ``` -## Get Sticker % GET /stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object} +## Get Sticker % GET /stickers/{sticker.id/docs/resources/sticker#sticker-object} -Returns a [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object for the given sticker ID. +Returns a [sticker](/docs/resources/sticker#sticker-object) object for the given sticker ID. ## List Sticker Packs % GET /sticker-packs @@ -112,23 +112,23 @@ Returns a list of available sticker packs. | Field | Type | |---------------|------------------------------------------------------------------------------| -| sticker_packs | array of [sticker pack](#DOCS_RESOURCES_STICKER/sticker-pack-object) objects | +| sticker_packs | array of [sticker pack](/docs/resources/sticker#sticker-pack-object) objects | -## Get Sticker Pack % GET /sticker-packs/{pack.id#DOCS_RESOURCES_STICKER/sticker-pack-object} +## Get Sticker Pack % GET /sticker-packs/{pack.id/docs/resources/sticker#sticker-pack-object} -Returns a [sticker pack](#DOCS_RESOURCES_STICKER/sticker-pack-object) object for the given sticker pack ID. +Returns a [sticker pack](/docs/resources/sticker#sticker-pack-object) object for the given sticker pack ID. -## List Guild Stickers % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers +## List Guild Stickers % GET /guilds/{guild.id/docs/resources/guild#guild-object}/stickers -Returns an array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects for the given guild. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. +Returns an array of [sticker](/docs/resources/sticker#sticker-object) objects for the given guild. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. -## Get Guild Sticker % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object} +## Get Guild Sticker % GET /guilds/{guild.id/docs/resources/guild#guild-object}/stickers/{sticker.id/docs/resources/sticker#sticker-object} -Returns a [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object for the given guild and sticker IDs. Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. +Returns a [sticker](/docs/resources/sticker#sticker-object) object for the given guild and sticker IDs. Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. -## Create Guild Sticker % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers +## Create Guild Sticker % POST /guilds/{guild.id/docs/resources/guild#guild-object}/stickers -Create a new sticker for the guild. Send a `multipart/form-data` body. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object on success. Fires a [Guild Stickers Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-stickers-update) Gateway event. +Create a new sticker for the guild. Send a `multipart/form-data` body. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new [sticker](/docs/resources/sticker#sticker-object) object on success. Fires a [Guild Stickers Update](/docs/events/gateway-events#guild-stickers-update) Gateway event. Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots. @@ -136,7 +136,7 @@ Every guilds has five free sticker slots by default, and each Boost level will g > This endpoint supports the `X-Audit-Log-Reason` header. > warn -> Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features). +> Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` [guild feature](/docs/resources/guild#guild-object-guild-features). > warn > Uploaded stickers are constrained to 5 seconds in length for animated stickers, and 320 x 320 pixels. @@ -150,9 +150,9 @@ Every guilds has five free sticker slots by default, and each Boost level will g | tags | string | autocomplete/suggestion tags for the sticker (max 200 characters) | | file | file contents | the sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KiB | -## Modify Guild Sticker % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object} +## Modify Guild Sticker % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/stickers/{sticker.id/docs/resources/sticker#sticker-object} -Modify the given sticker. For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object on success. Fires a [Guild Stickers Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-stickers-update) Gateway event. +Modify the given sticker. For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated [sticker](/docs/resources/sticker#sticker-object) object on success. Fires a [Guild Stickers Update](/docs/events/gateway-events#guild-stickers-update) Gateway event. > info > All parameters to this endpoint are optional. @@ -168,9 +168,9 @@ Modify the given sticker. For stickers created by the current user, requires eit | description | ?string | description of the sticker (2-100 characters) | | tags | string | autocomplete/suggestion tags for the sticker (max 200 characters) | -## Delete Guild Sticker % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object} +## Delete Guild Sticker % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/stickers/{sticker.id/docs/resources/sticker#sticker-object} -Delete the given sticker. For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a [Guild Stickers Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-stickers-update) Gateway event. +Delete the given sticker. For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a [Guild Stickers Update](/docs/events/gateway-events#guild-stickers-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. diff --git a/docs/resources/subscription.md b/docs/resources/subscription.md index e0b7a83215..6e7f233866 100644 --- a/docs/resources/subscription.md +++ b/docs/resources/subscription.md @@ -50,17 +50,18 @@ If the user cancels the subscription, the subscription will enter the `ENDING` s | INACTIVE | 2 | Subscription is inactive and not being charged. | > info -> Subscription status should not be used to grant perks. Use [entitlements](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) as an indication of whether a user should have access to a specific SKU. See our guide on [Implementing App Subscriptions](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS) for more information. +> Subscription status should not be used to grant perks. Use [entitlements](/docs/resources/entitlement#entitlement-object) as an indication of whether a user should have access to a specific SKU. See our guide on [Implementing App Subscriptions](/docs/monetization/implementing-app-subscriptions) for more information. -Subscriptions can start and change between any of these statuses within the current period. A subscription can be `ACTIVE` outside its current period or `INACTIVE` within its current period. +Subscriptions can start and change between any of these statuses within the current period. A subscription can be `ACTIVE` outside its current period or `INACTIVE` within its current period. Some examples of this behavior include: + - While a failed payment is being retried, the subscription would remain `ACTIVE` until it succeeds or our system determines the payment is not recoverable. - A refund or chargeback during the current period would make the subscription `INACTIVE`. -## List SKU Subscriptions % GET /skus/{sku.id#DOCS_RESOURCES_SKU/sku-object}/subscriptions +## List SKU Subscriptions % GET /skus/{sku.id/docs/resources/sku#sku-object}/subscriptions -Returns all subscriptions containing the SKU, filtered by user. Returns a list of [subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object) objects. +Returns all subscriptions containing the SKU, filtered by user. Returns a list of [subscription](/docs/resources/subscription#subscription-object) objects. ### Query String Params @@ -71,6 +72,6 @@ Returns all subscriptions containing the SKU, filtered by user. Returns a list o | limit? | integer | Number of results to return (1-100) | 50 | | user_id? | snowflake | User ID for which to return subscriptions. Required except for OAuth queries. | absent | -## Get SKU Subscription % GET /skus/{sku.id#DOCS_RESOURCES_SKU/sku-object}/subscriptions/{subscription.id#DOCS_MONETIZATION_SUBSCRIPTIONS/subscription-object} +## Get SKU Subscription % GET /skus/{sku.id/docs/resources/sku#sku-object}/subscriptions/{subscription.id#DOCS_MONETIZATION_SUBSCRIPTIONS/subscription-object} -Get a subscription by its ID. Returns a [subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object) object. \ No newline at end of file +Get a subscription by its ID. Returns a [subscription](/docs/resources/subscription#subscription-object) object. \ No newline at end of file diff --git a/docs/resources/user.md b/docs/resources/user.md index b2a235b155..9574757c3c 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -34,19 +34,19 @@ There are other rules and restrictions not shared here for the sake of spam and | username | string | the user's username, not unique across the platform | identify | | discriminator | string | the user's Discord-tag | identify | | global_name | ?string | the user's display name, if it is set. For bots, this is the application name | identify | -| avatar | ?string | the user's [avatar hash](#DOCS_REFERENCE/image-formatting) | identify | +| avatar | ?string | the user's [avatar hash](/docs/reference#image-formatting) | identify | | bot? | boolean | whether the user belongs to an OAuth2 application | identify | | system? | boolean | whether the user is an Official Discord System user (part of the urgent message system) | identify | | mfa_enabled? | boolean | whether the user has two factor enabled on their account | identify | -| banner? | ?string | the user's [banner hash](#DOCS_REFERENCE/image-formatting) | identify | +| banner? | ?string | the user's [banner hash](/docs/reference#image-formatting) | identify | | accent_color? | ?integer | the user's banner color encoded as an integer representation of hexadecimal color code | identify | -| locale? | string | the user's chosen [language option](#DOCS_REFERENCE/locales) | identify | +| locale? | string | the user's chosen [language option](/docs/reference#locales) | identify | | verified? | boolean | whether the email on this account has been verified | email | | email? | ?string | the user's email | email | -| flags? | integer | the [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify | -| premium_type? | integer | the [type of Nitro subscription](#DOCS_RESOURCES_USER/user-object-premium-types) on a user's account | identify | -| public_flags? | integer | the public [flags](#DOCS_RESOURCES_USER/user-object-user-flags) on a user's account | identify | -| avatar_decoration_data? | ?[avatar decoration data](#DOCS_RESOURCES_USER/avatar-decoration-data-object) object | data for the user's avatar decoration | identify | +| flags? | integer | the [flags](/docs/resources/user#user-object-user-flags) on a user's account | identify | +| premium_type? | integer | the [type of Nitro subscription](/docs/resources/user#user-object-premium-types) on a user's account | identify | +| public_flags? | integer | the public [flags](/docs/resources/user#user-object-user-flags) on a user's account | identify | +| avatar_decoration_data? | ?[avatar decoration data](/docs/resources/user#avatar-decoration-data-object) object | data for the user's avatar decoration | identify | ###### Example User @@ -82,12 +82,12 @@ There are other rules and restrictions not shared here for the sake of spam and | `1 << 7` | HYPESQUAD_ONLINE_HOUSE_2 | House Brilliance Member | | `1 << 8` | HYPESQUAD_ONLINE_HOUSE_3 | House Balance Member | | `1 << 9` | PREMIUM_EARLY_SUPPORTER | Early Nitro Supporter | -| `1 << 10` | TEAM_PSEUDO_USER | User is a [team](#DOCS_TOPICS_TEAMS/) | +| `1 << 10` | TEAM_PSEUDO_USER | User is a [team](/docs/topics/teams#) | | `1 << 14` | BUG_HUNTER_LEVEL_2 | Bug Hunter Level 2 | | `1 << 16` | VERIFIED_BOT | Verified Bot | | `1 << 17` | VERIFIED_DEVELOPER | Early Verified Bot Developer | | `1 << 18` | CERTIFIED_MODERATOR | Moderator Programs Alumni | -| `1 << 19` | BOT_HTTP_INTERACTIONS | Bot uses only [HTTP interactions](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) and is shown in the online member list | +| `1 << 19` | BOT_HTTP_INTERACTIONS | Bot uses only [HTTP interactions](/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list | | `1 << 22` | ACTIVE_DEVELOPER | User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447) | ###### Premium Types @@ -109,7 +109,7 @@ The data for the user's [avatar decoration](https://support.discord.com/hc/en-us | Field | Type | Description | |--------|-----------|----------------------------------------------------------------| -| asset | string | the [avatar decoration hash](#DOCS_REFERENCE/image-formatting) | +| asset | string | the [avatar decoration hash](/docs/reference#image-formatting) | | sku_id | snowflake | id of the avatar decoration's SKU | ### Connection Object @@ -122,14 +122,14 @@ The connection object that the user has attached. |---------------|---------|------------------------------------------------------------------------------------------| | id | string | id of the connection account | | name | string | the username of the connection account | -| type | string | the [service](#DOCS_RESOURCES_USER/connection-object-services) of this connection | +| type | string | the [service](/docs/resources/user#connection-object-services) of this connection | | revoked? | boolean | whether the connection is revoked | -| integrations? | array | an array of partial [server integrations](#DOCS_RESOURCES_GUILD/integration-object) | +| integrations? | array | an array of partial [server integrations](/docs/resources/guild#integration-object) | | verified | boolean | whether the connection is verified | | friend_sync | boolean | whether friend sync is enabled for this connection | | show_activity | boolean | whether activities related to this connection will be shown in presence updates | | two_way_link | boolean | whether this connection has a corresponding third party OAuth2 token | -| visibility | integer | [visibility](#DOCS_RESOURCES_USER/connection-object-visibility-types) of this connection | +| visibility | integer | [visibility](/docs/resources/user#connection-object-visibility-types) of this connection | ###### Services @@ -181,19 +181,19 @@ The role connection object that an application has attached to a user. |-------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | platform_name | ?string | the vanity name of the platform a bot has connected (max 50 characters) | | platform_username | ?string | the username on the platform a bot has connected (max 100 characters) | -| metadata | object | object mapping [application role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | +| metadata | object | object mapping [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | ## Get Current User % GET /users/@me -Returns the [user](#DOCS_RESOURCES_USER/user-object) object of the requester's account. For OAuth2, this requires the `identify` scope, which will return the object _without_ an email, and optionally the `email` scope, which returns the object _with_ an email if the user has one. +Returns the [user](/docs/resources/user#user-object) object of the requester's account. For OAuth2, this requires the `identify` scope, which will return the object _without_ an email, and optionally the `email` scope, which returns the object _with_ an email if the user has one. -## Get User % GET /users/{user.id#DOCS_RESOURCES_USER/user-object} +## Get User % GET /users/{user.id/docs/resources/user#user-object} -Returns a [user](#DOCS_RESOURCES_USER/user-object) object for a given user ID. +Returns a [user](/docs/resources/user#user-object) object for a given user ID. ## Modify Current User % PATCH /users/@me -Modify the requester's user account settings. Returns a [user](#DOCS_RESOURCES_USER/user-object) object on success. Fires a [User Update](#DOCS_EVENTS_GATEWAY_EVENTS/user-update) Gateway event. +Modify the requester's user account settings. Returns a [user](/docs/resources/user#user-object) object on success. Fires a [User Update](/docs/events/gateway-events#user-update) Gateway event. > info > All parameters to this endpoint are optional. @@ -203,12 +203,12 @@ Modify the requester's user account settings. Returns a [user](#DOCS_RESOURCES_U | Field | Type | Description | |----------|-------------------------------------------|----------------------------------------------------------------------------------| | username | string | user's username, if changed may cause the user's discriminator to be randomized. | -| avatar | ?[image data](#DOCS_REFERENCE/image-data) | if passed, modifies the user's avatar | -| banner | ?[image data](#DOCS_REFERENCE/image-data) | if passed, modifies the user's banner | +| avatar | ?[image data](/docs/reference#image-data) | if passed, modifies the user's avatar | +| banner | ?[image data](/docs/reference#image-data) | if passed, modifies the user's banner | ## Get Current User Guilds % GET /users/@me/guilds -Returns a list of partial [guild](#DOCS_RESOURCES_GUILD/guild-object) objects the current user is a member of. For OAuth2, requires the `guilds` scope. +Returns a list of partial [guild](/docs/resources/guild#guild-object) objects the current user is a member of. For OAuth2, requires the `guilds` scope. ###### Example Partial Guild @@ -236,19 +236,19 @@ Returns a list of partial [guild](#DOCS_RESOURCES_GUILD/guild-object) objects th | before | snowflake | get guilds before this guild ID | false | absent | | after | snowflake | get guilds after this guild ID | false | absent | | limit | integer | max number of guilds to return (1-200) | false | 200 | -| with_counts | [boolean](#DOCS_REFERENCE/boolean-query-strings) | include approximate member and presence counts in response | false | false | +| with_counts | [boolean](/docs/reference#boolean-query-strings) | include approximate member and presence counts in response | false | false | -## Get Current User Guild Member % GET /users/@me/guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/member +## Get Current User Guild Member % GET /users/@me/guilds/{guild.id/docs/resources/guild#guild-object}/member -Returns a [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object for the current user. Requires the `guilds.members.read` OAuth2 scope. +Returns a [guild member](/docs/resources/guild#guild-member-object) object for the current user. Requires the `guilds.members.read` OAuth2 scope. -## Leave Guild % DELETE /users/@me/guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object} +## Leave Guild % DELETE /users/@me/guilds/{guild.id/docs/resources/guild#guild-object} -Leave a guild. Returns a 204 empty response on success. Fires a [Guild Delete](#DOCS_EVENTS_GATEWAY_EVENTS/guild-delete) Gateway event and a [Guild Member Remove](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-remove) Gateway event. +Leave a guild. Returns a 204 empty response on success. Fires a [Guild Delete](/docs/events/gateway-events#guild-delete) Gateway event and a [Guild Member Remove](/docs/events/gateway-events#guild-member-remove) Gateway event. ## Create DM % POST /users/@me/channels -Create a new DM channel with a user. Returns a [DM channel](#DOCS_RESOURCES_CHANNEL/channel-object) object (if one already exists, it will be returned instead). +Create a new DM channel with a user. Returns a [DM channel](/docs/resources/channel#channel-object) object (if one already exists, it will be returned instead). > warn > You should not use this endpoint to DM everyone in a server about something. DMs should generally be initiated by a user action. If you open a significant amount of DMs too quickly, your bot may be rate limited or blocked from opening new ones. @@ -261,7 +261,7 @@ Create a new DM channel with a user. Returns a [DM channel](#DOCS_RESOURCES_CHAN ## Create Group DM % POST /users/@me/channels -Create a new group DM channel with multiple users. Returns a [DM channel](#DOCS_RESOURCES_CHANNEL/channel-object) object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a [Channel Create](#DOCS_EVENTS_GATEWAY_EVENTS/channel-create) Gateway event. +Create a new group DM channel with multiple users. Returns a [DM channel](/docs/resources/channel#channel-object) object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a [Channel Create](/docs/events/gateway-events#channel-create) Gateway event. > warn > This endpoint is limited to 10 active group DMs. @@ -275,15 +275,15 @@ Create a new group DM channel with multiple users. Returns a [DM channel](#DOCS_ ## Get Current User Connections % GET /users/@me/connections -Returns a list of [connection](#DOCS_RESOURCES_USER/connection-object) objects. Requires the `connections` OAuth2 scope. +Returns a list of [connection](/docs/resources/user#connection-object) objects. Requires the `connections` OAuth2 scope. -## Get Current User Application Role Connection % GET /users/@me/applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/role-connection +## Get Current User Application Role Connection % GET /users/@me/applications/{application.id/docs/resources/application#application-object}/role-connection -Returns the [application role connection](#DOCS_RESOURCES_USER/application-role-connection-object) for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path. +Returns the [application role connection](/docs/resources/user#application-role-connection-object) for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path. -## Update Current User Application Role Connection % PUT /users/@me/applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/role-connection +## Update Current User Application Role Connection % PUT /users/@me/applications/{application.id/docs/resources/application#application-object}/role-connection -Updates and returns the [application role connection](#DOCS_RESOURCES_USER/application-role-connection-object) for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path. +Updates and returns the [application role connection](/docs/resources/user#application-role-connection-object) for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path. ###### JSON Params @@ -291,4 +291,4 @@ Updates and returns the [application role connection](#DOCS_RESOURCES_USER/appli |--------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | platform_name? | string | the vanity name of the platform a bot has connected (max 50 characters) | | platform_username? | string | the username on the platform a bot has connected (max 100 characters) | -| metadata? | object | object mapping [application role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | +| metadata? | object | object mapping [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | diff --git a/docs/resources/voice.md b/docs/resources/voice.md index cddebc402a..1e392f6d4c 100644 --- a/docs/resources/voice.md +++ b/docs/resources/voice.md @@ -15,7 +15,7 @@ Used to represent a user's voice connection status. | guild_id? | snowflake | the guild id this voice state is for | | channel_id | ?snowflake | the channel id this user is connected to | | user_id | snowflake | the user id this voice state is for | -| member? | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object | the guild member this voice state is for | +| member? | [guild member](/docs/resources/guild#guild-member-object) object | the guild member this voice state is for | | session_id | string | the session id for this voice state | | deaf | boolean | whether this user is deafened by the server | | mute | boolean | whether this user is muted by the server | @@ -56,19 +56,19 @@ Used to represent a user's voice connection status. ## List Voice Regions % GET /voice/regions -Returns an array of [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) objects that can be used when setting a voice or stage channel's [`rtc_region`](#DOCS_RESOURCES_CHANNEL/channel-object-channel-structure). +Returns an array of [voice region](/docs/resources/voice#voice-region-object) objects that can be used when setting a voice or stage channel's [`rtc_region`](/docs/resources/channel#channel-object-channel-structure). -## Get Current User Voice State % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me +## Get Current User Voice State % GET /guilds/{guild.id/docs/resources/guild#guild-object}/voice-states/@me -Returns the current user's [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) in the guild. +Returns the current user's [voice state](/docs/resources/voice#voice-state-object) in the guild. -## Get User Voice State % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/{user.id#DOCS_RESOURCES_USER/user-object} +## Get User Voice State % GET /guilds/{guild.id/docs/resources/guild#guild-object}/voice-states/{user.id/docs/resources/user#user-object} -Returns the specified user's [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) in the guild. +Returns the specified user's [voice state](/docs/resources/voice#voice-state-object) in the guild. -## Modify Current User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me +## Modify Current User Voice State % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/voice-states/@me -Updates the current user's voice state. Returns `204 No Content` on success. Fires a [Voice State Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-state-update) Gateway event. +Updates the current user's voice state. Returns `204 No Content` on success. Fires a [Voice State Update](/docs/events/gateway-events#voice-state-update) Gateway event. ###### JSON Params @@ -88,9 +88,9 @@ There are currently several caveats for this endpoint: - You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak. - You are able to set `request_to_speak_timestamp` to any present or future time. -## Modify User Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/{user.id#DOCS_RESOURCES_USER/user-object} +## Modify User Voice State % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/voice-states/{user.id/docs/resources/user#user-object} -Updates another user's voice state. Fires a [Voice State Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-state-update) Gateway event. +Updates another user's voice state. Fires a [Voice State Update](/docs/events/gateway-events#voice-state-update) Gateway event. ###### JSON Params diff --git a/docs/resources/webhook.md b/docs/resources/webhook.md index e029514e77..379037f609 100644 --- a/docs/resources/webhook.md +++ b/docs/resources/webhook.md @@ -6,7 +6,7 @@ sidebar_label: Webhook Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use. -Apps can also subscribe to webhook events (i.e. outgoing webhooks) when events happen *in* Discord, which is detailed in the [Webhook Events](#DOCS_EVENTS_WEBHOOK_EVENTS) documentation. +Apps can also subscribe to webhook events (i.e. outgoing webhooks) when events happen *in* Discord, which is detailed in the [Webhook Events](/docs/events/webhook-events) documentation. ### Webhook Object @@ -17,24 +17,24 @@ Used to represent a webhook. | Field | Type | Description | |-------------------|------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| | id | snowflake | the id of the webhook | -| type | integer | the [type](#DOCS_RESOURCES_WEBHOOK/webhook-object-webhook-types) of the webhook | +| type | integer | the [type](/docs/resources/webhook#webhook-object-webhook-types) of the webhook | | guild_id? | ?snowflake | the guild id this webhook is for, if any | | channel_id | ?snowflake | the channel id this webhook is for, if any | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user this webhook was created by (not returned when getting a webhook with its token) | +| user? | [user](/docs/resources/user#user-object) object | the user this webhook was created by (not returned when getting a webhook with its token) | | name | ?string | the default name of the webhook | -| avatar | ?string | the default user avatar [hash](#DOCS_REFERENCE/image-formatting) of the webhook | +| avatar | ?string | the default user avatar [hash](/docs/reference#image-formatting) of the webhook | | token? | string | the secure token of the webhook (returned for Incoming Webhooks) | | application_id | ?snowflake | the bot/OAuth2 application that created this webhook | -| source_guild? * | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | the guild of the channel that this webhook is following (returned for Channel Follower Webhooks) | -| source_channel? * | partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | the channel that this webhook is following (returned for Channel Follower Webhooks) | -| url? | string | the url used for executing the webhook (returned by the [webhooks](#DOCS_TOPICS_OAUTH2/webhooks) OAuth2 flow) | +| source_guild? * | partial [guild](/docs/resources/guild#guild-object) object | the guild of the channel that this webhook is following (returned for Channel Follower Webhooks) | +| source_channel? * | partial [channel](/docs/resources/channel#channel-object) object | the channel that this webhook is following (returned for Channel Follower Webhooks) | +| url? | string | the url used for executing the webhook (returned by the [webhooks](/docs/topics/oauth2#webhooks) OAuth2 flow) | \* These fields will be absent if the webhook creator has since lost access to the guild where the followed channel resides ###### Webhook Types > info -> These types don't include [webhook events](#DOCS_EVENTS_WEBHOOK_EVENTS), which are outgoing webhooks sent to your app by Discord. See [Webhook Events](#DOCS_EVENTS_WEBHOOK_EVENTS) for details. +> These types don't include [webhook events](/docs/events/webhook-events), which are outgoing webhooks sent to your app by Discord. See [Webhook Events](/docs/events/webhook-events) for details. | Value | Name | Description | |-------|------------------|----------------------------------------------------------------------------------------------------------------| @@ -108,14 +108,14 @@ Used to represent a webhook. } ``` -## Create Webhook % POST /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/webhooks +## Create Webhook % POST /channels/{channel.id/docs/resources/channel#channel-object}/webhooks -Creates a new webhook and returns a [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) object on success. Requires the `MANAGE_WEBHOOKS` permission. Fires a [Webhooks Update](#DOCS_EVENTS_GATEWAY_EVENTS/webhooks-update) Gateway event. +Creates a new webhook and returns a [webhook](/docs/resources/webhook#webhook-object) object on success. Requires the `MANAGE_WEBHOOKS` permission. Fires a [Webhooks Update](/docs/events/gateway-events#webhooks-update) Gateway event. An error will be returned if a webhook name (`name`) is not valid. A webhook name is valid if: - It does not contain the substrings `clyde` or `discord` (case-insensitive) -- It follows the nickname guidelines in the [Usernames and Nicknames](#DOCS_RESOURCES_USER/usernames-and-nicknames) documentation, with an exception that webhook names can be up to 80 characters +- It follows the nickname guidelines in the [Usernames and Nicknames](/docs/resources/user#usernames-and-nicknames) documentation, with an exception that webhook names can be up to 80 characters > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -125,30 +125,30 @@ An error will be returned if a webhook name (`name`) is not valid. A webhook nam | Field | Type | Description | |---------|-------------------------------------------|---------------------------------------| | name | string | name of the webhook (1-80 characters) | -| avatar? | ?[image data](#DOCS_REFERENCE/image-data) | image for the default webhook avatar | +| avatar? | ?[image data](/docs/reference#image-data) | image for the default webhook avatar | -## Get Channel Webhooks % GET /channels/{channel.id#DOCS_RESOURCES_CHANNEL/channel-object}/webhooks +## Get Channel Webhooks % GET /channels/{channel.id/docs/resources/channel#channel-object}/webhooks -Returns a list of channel [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) objects. Requires the `MANAGE_WEBHOOKS` permission. +Returns a list of channel [webhook](/docs/resources/webhook#webhook-object) objects. Requires the `MANAGE_WEBHOOKS` permission. -## Get Guild Webhooks % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/webhooks +## Get Guild Webhooks % GET /guilds/{guild.id/docs/resources/guild#guild-object}/webhooks -Returns a list of guild [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) objects. Requires the `MANAGE_WEBHOOKS` permission. +Returns a list of guild [webhook](/docs/resources/webhook#webhook-object) objects. Requires the `MANAGE_WEBHOOKS` permission. -## Get Webhook % GET /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Get Webhook % GET /webhooks/{webhook.id/docs/resources/webhook#webhook-object} -Returns the new [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) object for the given id. +Returns the new [webhook](/docs/resources/webhook#webhook-object) object for the given id. This request requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the -webhook. [(see: webhook.application_id)](#DOCS_RESOURCES_WEBHOOK/webhook-object) +webhook. [(see: webhook.application_id)](/docs/resources/webhook#webhook-object) -## Get Webhook with Token % GET /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Get Webhook with Token % GET /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object} Same as above, except this call does not require authentication and returns no user in the webhook object. -## Modify Webhook % PATCH /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Modify Webhook % PATCH /webhooks/{webhook.id/docs/resources/webhook#webhook-object} -Modify a webhook. Requires the `MANAGE_WEBHOOKS` permission. Returns the updated [webhook](#DOCS_RESOURCES_WEBHOOK/webhook-object) object on success. Fires a [Webhooks Update](#DOCS_EVENTS_GATEWAY_EVENTS/webhooks-update) Gateway event. +Modify a webhook. Requires the `MANAGE_WEBHOOKS` permission. Returns the updated [webhook](/docs/resources/webhook#webhook-object) object on success. Fires a [Webhooks Update](/docs/events/gateway-events#webhooks-update) Gateway event. > info > All parameters to this endpoint are optional @@ -161,27 +161,27 @@ Modify a webhook. Requires the `MANAGE_WEBHOOKS` permission. Returns the updated | Field | Type | Description | |------------|-------------------------------------------|----------------------------------------------------| | name | string | the default name of the webhook | -| avatar | ?[image data](#DOCS_REFERENCE/image-data) | image for the default webhook avatar | +| avatar | ?[image data](/docs/reference#image-data) | image for the default webhook avatar | | channel_id | snowflake | the new channel id this webhook should be moved to | -## Modify Webhook with Token % PATCH /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Modify Webhook with Token % PATCH /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object} Same as above, except this call does not require authentication, does not accept a `channel_id` parameter in the body, and does not return a user in the webhook object. -## Delete Webhook % DELETE /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Delete Webhook % DELETE /webhooks/{webhook.id/docs/resources/webhook#webhook-object} -Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a `204 No Content` response on success. Fires a [Webhooks Update](#DOCS_EVENTS_GATEWAY_EVENTS/webhooks-update) Gateway event. +Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a `204 No Content` response on success. Fires a [Webhooks Update](/docs/events/gateway-events#webhooks-update) Gateway event. > info > This endpoint supports the `X-Audit-Log-Reason` header. -## Delete Webhook with Token % DELETE /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Delete Webhook with Token % DELETE /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object} Same as above, except this call does not require authentication. -## Execute Webhook % POST /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object} +## Execute Webhook % POST /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object} -Refer to [Uploading Files](#DOCS_REFERENCE/uploading-files) for details on attachments and `multipart/form-data` requests. Returns a message or `204 No Content` depending on the `wait` query parameter. +Refer to [Uploading Files](/docs/reference#uploading-files) for details on attachments and `multipart/form-data` requests. Returns a message or `204 No Content` depending on the `wait` query parameter. > info > Note that when sending a message, you must provide a value for at **least one of** `content`, `embeds`, `components`, `file`, or `poll`. @@ -196,9 +196,9 @@ Refer to [Uploading Files](#DOCS_REFERENCE/uploading-files) for details on attac | Field | Type | Description | Required | |-----------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| -| wait | [boolean](#DOCS_REFERENCE/boolean-query-strings) | waits for server confirmation of message send before response, and returns the created message body (defaults to `false`; when `false` a message that is not saved does not return an error) | false | +| wait | [boolean](/docs/reference#boolean-query-strings) | waits for server confirmation of message send before response, and returns the created message body (defaults to `false`; when `false` a message that is not saved does not return an error) | false | | thread_id | snowflake | Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. | false | -| with_components | [boolean](#DOCS_REFERENCE/boolean-query-strings) | whether to allow sending (non-interactive) components for non-application-owned webhooks (defaults to `false`; ignored for application-owned webhooks) | false | +| with_components | [boolean](/docs/reference#boolean-query-strings) | whether to allow sending (non-interactive) components for non-application-owned webhooks (defaults to `false`; ignored for application-owned webhooks) | false | ###### JSON/Form Params @@ -208,25 +208,25 @@ Refer to [Uploading Files](#DOCS_REFERENCE/uploading-files) for details on attac | username | string | override the default username of the webhook | false | | avatar_url | string | override the default avatar of the webhook | false | | tts | boolean | true if this is a TTS message | false | -| embeds | array of up to 10 [embed](#DOCS_RESOURCES_MESSAGE/embed-object) objects | embedded `rich` content | one of content, file, embeds, poll | -| allowed_mentions | [allowed mention object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) | allowed mentions for the message | false | -| components \* | array of [message component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) | the components to include with the message | false | +| embeds | array of up to 10 [embed](/docs/resources/message#embed-object) objects | embedded `rich` content | one of content, file, embeds, poll | +| allowed_mentions | [allowed mention object](/docs/resources/message#allowed-mentions-object) | allowed mentions for the message | false | +| components \* | array of [message component](/docs/interactions/message-components#component-object) | the components to include with the message | false | | files[n] \*\* | file contents | the contents of the file being sent | one of content, file, embeds, poll | | payload_json \*\* | string | JSON encoded body of non-file params | `multipart/form-data` only | -| attachments \*\* | array of partial [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | attachment objects with filename and description | false | -| flags | integer | [message flags](#DOCS_RESOURCES_MESSAGE/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) | false | +| attachments \*\* | array of partial [attachment](/docs/resources/message#attachment-object) objects | attachment objects with filename and description | false | +| flags | integer | [message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) | false | | thread_name | string | name of thread to create (requires the webhook channel to be a forum or media channel) | false | | applied_tags | array of snowflakes | array of tag ids to apply to the thread (requires the webhook channel to be a forum or media channel) | false | -| poll | [poll](#DOCS_RESOURCES_POLL/poll-create-request-object) request object | A poll! | one of content, file, embeds, poll | +| poll | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | one of content, file, embeds, poll | \* Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the field will be ignored unless they set the `with_components` query param. -\*\* See [Uploading Files](#DOCS_REFERENCE/uploading-files) for details. +\*\* See [Uploading Files](/docs/reference#uploading-files) for details. > info > For the webhook embed objects, you can set every field except `type` (it will be `rich` regardless of if you try to set it), `provider`, `video`, and any `height`, `width`, or `proxy_url` values for images. -## Execute Slack-Compatible Webhook % POST /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object}/slack +## Execute Slack-Compatible Webhook % POST /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object}/slack Refer to [Slack's documentation](https://api.slack.com/incoming-webhooks) for more information. We do not support Slack's `channel`, `icon_emoji`, `mrkdwn`, or `mrkdwn_in` properties. @@ -235,9 +235,9 @@ Refer to [Slack's documentation](https://api.slack.com/incoming-webhooks) for mo | Field | Type | Description | Required | |-----------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------| | thread_id | snowflake | id of the thread to send the message in | false | -| wait | [boolean](#DOCS_REFERENCE/boolean-query-strings) | waits for server confirmation of message send before response (defaults to `true`; when `false` a message that is not saved does not return an error) | false | +| wait | [boolean](/docs/reference#boolean-query-strings) | waits for server confirmation of message send before response (defaults to `true`; when `false` a message that is not saved does not return an error) | false | -## Execute GitHub-Compatible Webhook % POST /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object}/github +## Execute GitHub-Compatible Webhook % POST /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object}/github [Add a new webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring. The supported [events](https://docs.github.com/en/webhooks/webhook-events-and-payloads) are `commit_comment`, `create`, `delete`, `fork`, `issue_comment`, `issues`, `member`, `public`, `pull_request`, `pull_request_review`, `pull_request_review_comment`, `push`, `release`, `watch`, `check_run`, `check_suite`, `discussion`, and `discussion_comment`. @@ -246,11 +246,11 @@ Refer to [Slack's documentation](https://api.slack.com/incoming-webhooks) for mo | Field | Type | Description | Required | |-----------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------| | thread_id | snowflake | id of the thread to send the message in | false | -| wait | [boolean](#DOCS_REFERENCE/boolean-query-strings) | waits for server confirmation of message send before response (defaults to `true`; when `false` a message that is not saved does not return an error) | false | +| wait | [boolean](/docs/reference#boolean-query-strings) | waits for server confirmation of message send before response (defaults to `true`; when `false` a message that is not saved does not return an error) | false | -## Get Webhook Message % GET /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Get Webhook Message % GET /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object}/messages/{message.id/docs/resources/message#message-object} -Returns a previously-sent webhook message from the same token. Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object on success. +Returns a previously-sent webhook message from the same token. Returns a [message](/docs/resources/message#message-object) object on success. ###### Query String Params @@ -258,13 +258,13 @@ Returns a previously-sent webhook message from the same token. Returns a [messag |-----------|-----------|------------------------------------|----------| | thread_id | snowflake | id of the thread the message is in | false | -## Edit Webhook Message % PATCH /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Edit Webhook Message % PATCH /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object}/messages/{message.id/docs/resources/message#message-object} -Edits a previously-sent webhook message from the same token. Returns a [message](#DOCS_RESOURCES_MESSAGE/message-object) object on success. +Edits a previously-sent webhook message from the same token. Returns a [message](/docs/resources/message#message-object) object on success. When the `content` field is edited, the `mentions` array in the message object will be reconstructed from scratch based on the new content. The `allowed_mentions` field of the edit request controls how this happens. If there is no explicit `allowed_mentions` in the edit request, the content will be parsed with _default_ allowances, that is, without regard to whether or not an `allowed_mentions` was present in the request that originally created the message. -Refer to [Uploading Files](#DOCS_REFERENCE/uploading-files) for details on attachments and `multipart/form-data` requests. +Refer to [Uploading Files](/docs/reference#uploading-files) for details on attachments and `multipart/form-data` requests. Any provided files will be **appended** to the message. To remove or replace files you will have to supply the `attachments` field which specifies the files to retain on the message after edit. > warn @@ -278,28 +278,28 @@ Any provided files will be **appended** to the message. To remove or replace fil | Field | Type | Description | Required | |-----------------|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|----------| | thread_id | snowflake | id of the thread the message is in | false | -| with_components | [boolean](#DOCS_REFERENCE/boolean-query-strings) | whether to allow sending (non-interactive) components for non-application-owned webhooks (defaults to `false`; ignored for application-owned webhooks) | false | +| with_components | [boolean](/docs/reference#boolean-query-strings) | whether to allow sending (non-interactive) components for non-application-owned webhooks (defaults to `false`; ignored for application-owned webhooks) | false | ###### JSON/Form Params | Field | Type | Description | |-------------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------| | content | string | the message contents (up to 2000 characters) | -| embeds | array of up to 10 [embed](#DOCS_RESOURCES_MESSAGE/embed-object) objects | embedded `rich` content | -| allowed_mentions | [allowed mention object](#DOCS_RESOURCES_MESSAGE/allowed-mentions-object) | allowed mentions for the message | -| components \* | array of [message component](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) | the components to include with the message | +| embeds | array of up to 10 [embed](/docs/resources/message#embed-object) objects | embedded `rich` content | +| allowed_mentions | [allowed mention object](/docs/resources/message#allowed-mentions-object) | allowed mentions for the message | +| components \* | array of [message component](/docs/interactions/message-components#component-object) | the components to include with the message | | files[n] \*\* | file contents | the contents of the file being sent/edited | | payload_json \*\* | string | JSON encoded body of non-file params (multipart/form-data only) | -| attachments \*\* | array of partial [attachment](#DOCS_RESOURCES_MESSAGE/attachment-object) objects | attached files to keep and possible descriptions for new files | -| poll \*\*\* | [poll](#DOCS_RESOURCES_POLL/poll-create-request-object) request object | A poll! | +| attachments \*\* | array of partial [attachment](/docs/resources/message#attachment-object) objects | attached files to keep and possible descriptions for new files | +| poll \*\*\* | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | \* Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the field will be ignored unless they set the `with_components` query param. -\*\* See [Uploading Files](#DOCS_REFERENCE/uploading-files) for details. +\*\* See [Uploading Files](/docs/reference#uploading-files) for details. \*\*\* Polls can only be added when editing a deferred interaction response. -## Delete Webhook Message % DELETE /webhooks/{webhook.id#DOCS_RESOURCES_WEBHOOK/webhook-object}/{webhook.token#DOCS_RESOURCES_WEBHOOK/webhook-object}/messages/{message.id#DOCS_RESOURCES_MESSAGE/message-object} +## Delete Webhook Message % DELETE /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object}/messages/{message.id/docs/resources/message#message-object} Deletes a message that was created by the webhook. Returns a `204 No Content` response on success. diff --git a/docs/rich-presence/best-practices.md b/docs/rich-presence/best-practices.md index 3d37ebf195..8e818164c5 100644 --- a/docs/rich-presence/best-practices.md +++ b/docs/rich-presence/best-practices.md @@ -6,7 +6,7 @@ sidebar_label: Best Practices Rich Presence lets you display actionable data in a Discord user's profile about what they're up to in your game or app. This guide is intended to show some best practices on how to make that data the best it can be. -If you don't already know about Rich Presence, read [the overview](#DOCS_RICH_PRESENCE_OVERVIEW) first. +If you don't already know about Rich Presence, read [the overview](/docs/rich-presence/overview) first. ## How should you think about the data you show? @@ -84,7 +84,7 @@ Ready to launch a Rich Presence integration for your game? If so, we recommend l #### Joining > info -> Since all Activities presence data has an **Ask to Join** button, Join Invites are only applicable when building with the [Game SDK](#DOCS_RICH_PRESENCE_USING_WITH_THE_GAME_SDK) +> Since all Activities presence data has an **Ask to Join** button, Join Invites are only applicable when building with the [Game SDK](/docs/rich-presence/using-with-the-game-sdk) - Have you successfully implemented join invites for your game if applicable? - Does the state of the invite properly represent the party/group in-game with regards to: diff --git a/docs/rich-presence/overview.mdx b/docs/rich-presence/overview.mdx index daffc3f65c..9b6f37828f 100644 --- a/docs/rich-presence/overview.mdx +++ b/docs/rich-presence/overview.mdx @@ -14,41 +14,41 @@ Rich Presence lets you display actionable data in a Discord user's profile about There are three options when integrating Rich Presence. Depending on what you're building, you'll want to choose the right SDK for your project: -- The **[Discord Social SDK](#DOCS_RICH_PRESENCE_OVERVIEW/discord-social-sdk)** allows you to build social features into your game or app, including friends lists, game invites, and more. -- The **[Embedded App SDK](#DOCS_RICH_PRESENCE_OVERVIEW/embedded-app-sdk)** should be used if you're building an [Activity](#DOCS_ACTIVITIES_OVERVIEW) in Discord. -- The **[Game SDK (legacy)](#DOCS_RICH_PRESENCE_OVERVIEW/game-sdk)** can be used if you're building an off-platform game or app and you want to integrate it into Discord. +- The **[Discord Social SDK](/docs/rich-presence/overview#discord-social-sdk)** allows you to build social features into your game or app, including friends lists, game invites, and more. +- The **[Embedded App SDK](/docs/rich-presence/overview#embedded-app-sdk)** should be used if you're building an [Activity](/docs/activities/overview) in Discord. +- The **[Game SDK (legacy)](/docs/rich-presence/overview#game-sdk)** can be used if you're building an off-platform game or app and you want to integrate it into Discord. -All SDKs use similar underlying primitives (like the [`SET_ACTIVITY` RPC command](#DOCS_TOPICS_RPC/setactivity)), so a lot is the same between them. But there are a few differences, like feature compatibility, which is covered in the sections below. +All SDKs use similar underlying primitives (like the [`SET_ACTIVITY` RPC command](/docs/topics/rpc#setactivity)), so a lot is the same between them. But there are a few differences, like feature compatibility, which is covered in the sections below. > info > Rich Presence data appears publicly on your Discord profile, so during development you should use a test account that only belongs to your private development server(s). ### Discord Social SDK -The [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) is used for building social features directly into your game. When a user is playing your game, you can show what they're up to in their Discord profile and even prompt their friends to join in with game invites. +The [Discord Social SDK](/docs/discord-social-sdk/overview) is used for building social features directly into your game. When a user is playing your game, you can show what they're up to in their Discord profile and even prompt their friends to join in with game invites. When integrating Rich Presence with an off-platform game, data can be shown about what a user is up to in your game. A "Join" button can also be configured to allow a user's friends to jump into their game and enable sending game invites. -[Read about using Rich Presence with the Discord Social SDK](#DOCS_RICH_PRESENCE_USING_WITH_THE_DISCORD_SOCIAL_SDK) +[Read about using Rich Presence with the Discord Social SDK](/docs/rich-presence/using-with-the-discord-social-sdk) ### Embedded App SDK -The [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) is used to build Activities, which are multiplayer games and social experiences hosted in an iframe within Discord. The SDK handles communication between Discord and the Activity and helps integrate platform features (like Rich Presence!). +The [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) is used to build Activities, which are multiplayer games and social experiences hosted in an iframe within Discord. The SDK handles communication between Discord and the Activity and helps integrate platform features (like Rich Presence!). After a user joins an Activity, Rich Presence can be used to dynamically show data about what that user is doing or playing, as well as prompt others to join in and play along. -[Read about using Rich Presence with the Embedded App SDK](#DOCS_RICH_PRESENCE_USING_WITH_THE_EMBEDDED_APP_SDK) +[Read about using Rich Presence with the Embedded App SDK](/docs/rich-presence/using-with-the-embedded-app-sdk) ### Game SDK > warn -> **The Game SDK has been archived.**
We recommend using the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) for new projects.
Existing projects using the Game SDK will continue to work, but we encourage you to migrate to the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) for new features and updates. +> **The Game SDK has been archived.**
We recommend using the [Discord Social SDK](/docs/discord-social-sdk/overview) for new projects.
Existing projects using the Game SDK will continue to work, but we encourage you to migrate to the [Discord Social SDK](/docs/discord-social-sdk/overview) for new features and updates. -The [Game SDK](#DOCS_DEVELOPER_TOOLS_GAME_SDK) makes it easier to build 3rd party games and integrate them with Discord. While many features of the Game SDK are deprecated, it can still be used for a few use cases (like integrating Rich Presence!). +The [Game SDK](/docs/developer-tools/game-sdk) makes it easier to build 3rd party games and integrate them with Discord. While many features of the Game SDK are deprecated, it can still be used for a few use cases (like integrating Rich Presence!). When integrating Rich Presence with an off-platform game, data can be shown about what a user is up to in your game. A "Join" button can also be configured to allow a user's friends to jump into their game. -[Read about using Rich Presence with the Game SDK](#DOCS_RICH_PRESENCE_USING_WITH_THE_GAME_SDK) +[Read about using Rich Presence with the Game SDK](/docs/rich-presence/using-with-the-game-sdk) ## Adding Custom Art Assets @@ -58,10 +58,10 @@ To add custom assets for Rich Presence, navigate to your [app's settings](https: ### Invite Image -The Rich Presence invite image appears when [invites](#DOCS_DEVELOPER_TOOLS_GAME_SDK/sendinvite) are sent for a 3rd party game or app using the [Game SDK](#DOCS_RICH_PRESENCE_OVERVIEW/game-sdk). After uploading an invite image for your app, you can see a preview of it to the right (under "IRL Invite Image Example"). +The Rich Presence invite image appears when [invites](/docs/developer-tools/game-sdk#sendinvite) are sent for a 3rd party game or app using the [Game SDK](/docs/rich-presence/overview#game-sdk). After uploading an invite image for your app, you can see a preview of it to the right (under "IRL Invite Image Example"). > info -> The invite image can be ignored if you're building using the [Embedded App SDK](#DOCS_RICH_PRESENCE_OVERVIEW/embedded-app-sdk). Invites sent using the Embedded App SDK's[`openInviteDialog()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/openinvitedialog) use the Activity's cover art. +> The invite image can be ignored if you're building using the [Embedded App SDK](/docs/rich-presence/overview#embedded-app-sdk). Invites sent using the Embedded App SDK's[`openInviteDialog()`](/docs/developer-tools/embedded-app-sdk#openinvitedialog) use the Activity's cover art. ![Rich Presence invite image in app settings](images/rich-presence-invite-image.png) @@ -69,10 +69,10 @@ The Rich Presence invite image appears when [invites](#DOCS_DEVELOPER_TOOLS_GAME Up to 300 custom assets can be added for your app to use when setting Rich Presence for a Discord user. These assets can be anything that help orient others to what a user is doing inside of your Activity or 3rd party game. -If you need more than 300 custom assets or want to use images stored somewhere else, you can also [specify an external URL](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image) as long it still has the proper dimensions and size. +If you need more than 300 custom assets or want to use images stored somewhere else, you can also [specify an external URL](/docs/events/gateway-events#activity-object-activity-asset-image) as long it still has the proper dimensions and size. > info -> For tips on choosing assets, take a look at the [Rich Presence best practices guide](#DOCS_RICH_PRESENCE_BEST_PRACTICES/have-interesting-expressive-art). +> For tips on choosing assets, take a look at the [Rich Presence best practices guide](/docs/rich-presence/best-practices#have-interesting-expressive-art). When uploading Rich Presence assets, **the asset keys will automatically be changed to lowercase**. You can see this reflected in your app's settings after saving a newly-uploaded asset, and should keep it in mind when referencing any asset keys in your code. @@ -83,18 +83,18 @@ When uploading Rich Presence assets, **the asset keys will automatically be chan > warn > The Rich Presence visualizer currently uses an outdated Discord UI, but can still be helpful as a quick-and-dirty reference for what your Rich Presence data will look like in Discord. -In your app's settings, there's a Rich Presence visualizer to make it easier to see what your uploaded [assets](#DOCS_RICH_PRESENCE_OVERVIEW/assets) will look like in the context of a Discord profile. To access the visualizer, navigate to your [app's settings](https://discord.com/developers/applications) and click **Rich Presence** on the left-hand sidebar. On the **Visualizer** page, you can fill out some custom strings, party information, and select your uploaded assets to see a preview. +In your app's settings, there's a Rich Presence visualizer to make it easier to see what your uploaded [assets](/docs/rich-presence/overview#assets) will look like in the context of a Discord profile. To access the visualizer, navigate to your [app's settings](https://discord.com/developers/applications) and click **Rich Presence** on the left-hand sidebar. On the **Visualizer** page, you can fill out some custom strings, party information, and select your uploaded assets to see a preview. ## Start Building - + Guide on using Rich Presence in the Embedded App SDK while you're building an Activity - + Guide on using Rich Presence in the Game SDK - + Best practices and launch checklist for when you're integrating Rich Presence with your game or app \ No newline at end of file diff --git a/docs/rich-presence/using-with-the-discord-social-sdk.mdx b/docs/rich-presence/using-with-the-discord-social-sdk.mdx index 84d2d24167..dbf43158df 100644 --- a/docs/rich-presence/using-with-the-discord-social-sdk.mdx +++ b/docs/rich-presence/using-with-the-discord-social-sdk.mdx @@ -5,10 +5,10 @@ sidebar_label: Using with the Discord Social SDK # Using Rich Presence with the Discord Social SDK -When developing a game, the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) makes it easy to integrate Rich Presence to display details about what a user is up to inside of your game or social experience. +When developing a game, the [Discord Social SDK](/docs/discord-social-sdk/overview) makes it easy to integrate Rich Presence to display details about what a user is up to inside of your game or social experience. > info -> Not sure if you should be building with the Discord Social SDK? Read through [Choosing an SDK](#DOCS_RICH_PRESENCE_OVERVIEW/choosing-an-sdk) to understand your options when integrating Rich Presence with your app. +> Not sure if you should be building with the Discord Social SDK? Read through [Choosing an SDK](/docs/rich-presence/overview#choosing-an-sdk) to understand your options when integrating Rich Presence with your app. ## Understanding Rich Presence Data @@ -18,12 +18,12 @@ Before we dig in, it's helpful to understand what Rich Presence data you can set ![Graphical representation of the legend for rich presence details](images/rp-legend.png) > info -> For tips on designing Rich Presence, take a look at the [Rich Presence best practices guide](#DOCS_RICH_PRESENCE_BEST_PRACTICES). +> For tips on designing Rich Presence, take a look at the [Rich Presence best practices guide](/docs/rich-presence/best-practices). ## Setting Rich Presence Data -Check out our [Setting Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DEVELOPMENT_GUIDES_SETTING_RICH_PRESENCE) guide and our to learn how to set custom presence data for your players using the Discord Social SDK. +Check out our [Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) guide and our to learn how to set custom presence data for your players using the Discord Social SDK. -- [Design Guidelines: Status & Rich Presence](#DOCS_DISCORD_SOCIAL_SDK_DESIGN_GUIDELINES_STATUS_RICH_PRESENCE) +- [Design Guidelines: Status & Rich Presence](/docs/discord-social-sdk/design-guidelines_STATUS_RICH_PRESENCE) ![Rich Presence](images/social-sdk/design-guidelines/StatusPresence-06.png) diff --git a/docs/rich-presence/using-with-the-embedded-app-sdk.mdx b/docs/rich-presence/using-with-the-embedded-app-sdk.mdx index 33255b1cc5..02ce0f58cf 100644 --- a/docs/rich-presence/using-with-the-embedded-app-sdk.mdx +++ b/docs/rich-presence/using-with-the-embedded-app-sdk.mdx @@ -4,14 +4,14 @@ sidebar_label: Using with the Embedded App SDK # Using Rich Presence with the Embedded App SDK -When developing an [Activity](#DOCS_ACTIVITIES_OVERVIEW), the [Embedded App SDK](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK) makes it easy to integrate Rich Presence to display details about what a user is up to inside of your game or social experience. +When developing an [Activity](/docs/activities/overview), the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk) makes it easy to integrate Rich Presence to display details about what a user is up to inside of your game or social experience. Rich Presence data can be thought of as an extension of your Activity—and leveling it up just a *little* makes it more interesting and relevant to the user playing your Activity (and their friends that might want to jump in and play). This guide provides an overview of the platform and technical knowledge you need to integrate Rich Presence with your existing Activity. > info -> Not sure if you should be building with the Embedded App SDK? Read through [Choosing an SDK](#DOCS_RICH_PRESENCE_OVERVIEW/choosing-an-sdk) to understand your options when integrating Rich Presence with your app. +> Not sure if you should be building with the Embedded App SDK? Read through [Choosing an SDK](/docs/rich-presence/overview#choosing-an-sdk) to understand your options when integrating Rich Presence with your app. -The rest of the guide assumes you've already developed an [app](#DOCS_QUICK_START_OVERVIEW_OF_APPS) that can launch an Activity. If you aren't at that point quite yet, you should follow the guide on [building your first Activity](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) before continuing. +The rest of the guide assumes you've already developed an [app](/docs/quick-start/overview-of-apps) that can launch an Activity. If you aren't at that point quite yet, you should follow the guide on [building your first Activity](/docs/activities/building-an-activity) before continuing. ## Understanding Rich Presence Data @@ -25,37 +25,37 @@ While this is okay, it's pretty limited and doesn't provide much context about w ### Custom Rich Presence Data -Now let's see what custom presence data can look like when a user joins your Activity. The [types for these fields](#DOCS_RICH_PRESENCE_USING_WITH_THE_EMBEDDED_APP_SDK/setactivity-fields) and [examples](#DOCS_RICH_PRESENCE_USING_WITH_THE_EMBEDDED_APP_SDK/setactivity-example) are in the sections below, but for now let's just get an idea of what we're working with: +Now let's see what custom presence data can look like when a user joins your Activity. The [types for these fields](/docs/rich-presence/using-with-the-embedded-app-sdk#setactivity-fields) and [examples](/docs/rich-presence/using-with-the-embedded-app-sdk#setactivity-example) are in the sections below, but for now let's just get an idea of what we're working with: ![Image of where Rich Presence data appears in Discord profiles for Activities](images/annotated-presence-data-activities.png) A few small things to note about the above image: -1. `large_image` and `small_image` are both in the `assets` object, which you can see below in the [table below](#DOCS_RICH_PRESENCE_USING_WITH_THE_EMBEDDED_APP_SDK/activity-partial-object). They're labeled with the object's keys to make it more clear how they appear in a Discord profile. +1. `large_image` and `small_image` are both in the `assets` object, which you can see below in the [table below](/docs/rich-presence/using-with-the-embedded-app-sdk#activity-partial-object). They're labeled with the object's keys to make it more clear how they appear in a Discord profile. 2. You can't set App Name when setting presence—it's always the name configured in your [app's settings](https://discord.com/developers/applications). 3. The state `(1 of max_party)` badge will only render when a party field is provided. Otherwise, state will be shown in a line of text below details. ## Updating Presence -When updating Rich Presence data using the Embedded App SDK, the only real command you need to use is **[`setActivity()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setactivity)**. Under the hood, `setActivity()` calls the RPC [`SET_ACTIVITY` command](#DOCS_TOPICS_RPC/setactivity) with the features and fields available when you're building an Activity. +When updating Rich Presence data using the Embedded App SDK, the only real command you need to use is **[`setActivity()`](/docs/developer-tools/embedded-app-sdk#setactivity)**. Under the hood, `setActivity()` calls the RPC [`SET_ACTIVITY` command](/docs/topics/rpc#setactivity) with the features and fields available when you're building an Activity. -As you start exploring the Rich Presence docs, you'll start seeing the word "activity" a *lot*. The "activities" referenced in docs (like the [RPC ones](#DOCS_TOPICS_RPC/setactivity)) aren't related to the Activities you're building with the Embedded App SDK. +As you start exploring the Rich Presence docs, you'll start seeing the word "activity" a *lot*. The "activities" referenced in docs (like the [RPC ones](/docs/topics/rpc#setactivity)) aren't related to the Activities you're building with the Embedded App SDK. -When Rich Presence was introduced, the underlying object that contains presence data was called an "activity" (long before the Embedded App SDK), which is what the RPC [`SET_ACTIVITY` command](#DOCS_TOPICS_RPC/setactivity) is referencing. And that's *also* why the Embedded App SDK's wrapper around the RPC command is called `setActivity()` yet isn't really related to setting the state for the kind of Activity that *you're* building. +When Rich Presence was introduced, the underlying object that contains presence data was called an "activity" (long before the Embedded App SDK), which is what the RPC [`SET_ACTIVITY` command](/docs/topics/rpc#setactivity) is referencing. And that's *also* why the Embedded App SDK's wrapper around the RPC command is called `setActivity()` yet isn't really related to setting the state for the kind of Activity that *you're* building. We know, it's confusing ¯\\\_(⊙︿⊙)\_/¯ — the naming was logical at the time because it was really about the user's activity in a 3rd party game or service, but now it sorta feels like activity-ception. Understanding the nuances here aren't super important, and it's why we have guides like this one. But as they say...the more you (at least sort of) know. ### rpc.activities.write Scope -To display custom Rich Presence data for a user, your app will need to be authorized with the [`rpc.activities.write` scope](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) for that user. +To display custom Rich Presence data for a user, your app will need to be authorized with the [`rpc.activities.write` scope](/docs/topics/oauth2#shared-resources-oauth2-scopes) for that user. -To request the scope, your [`authorize()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/authorize) call might look something like this: +To request the scope, your [`authorize()`](/docs/developer-tools/embedded-app-sdk#authorize) call might look something like this: > info -> The following example only focuses on calling `authorize()`. Follow the [Building an Activity guide](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) for more details on topics like installing and instantiating the Embedded App SDK. +> The following example only focuses on calling `authorize()`. Follow the [Building an Activity guide](/docs/activities/building-an-activity) for more details on topics like installing and instantiating the Embedded App SDK. ```js // Authorize with Discord Client @@ -74,7 +74,7 @@ const { code } = await discordSdk.commands.authorize({ ### setActivity Fields -When calling [`setActivity()`](#DOCS_DEVELOPER_TOOLS_EMBEDDED_APP_SDK/setactivity), you are expected to pass a partial [activity object](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-structure). +When calling [`setActivity()`](/docs/developer-tools/embedded-app-sdk#setactivity), you are expected to pass a partial [activity object](/docs/events/gateway-events#activity-object-activity-structure). Below is a table with many of the available fields for the activity partial. Some were left out since they don't have an effect for Activities. @@ -85,12 +85,12 @@ Below is a table with many of the available fields for the activity partial. Som | field | type | description | |------------|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| -| type | integer | [Activity](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-types) type, which determines the header text for the Rich Presence data | +| type | integer | [Activity](/docs/events/gateway-events#activity-object-activity-types) type, which determines the header text for the Rich Presence data | | state | string | User's current party status | | details | string | What the player is currently doing in your Activity | -| timestamps | [timestamps](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-timestamps) object | Unix timestamps to display start and/or end times | -| assets | [assets](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-assets) object | Images used for the Rich Presence data (and their hover texts) | -| party | [party](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-party) object | Information for the current party of the player | +| timestamps | [timestamps](/docs/events/gateway-events#activity-object-activity-timestamps) object | Unix timestamps to display start and/or end times | +| assets | [assets](/docs/events/gateway-events#activity-object-activity-assets) object | Images used for the Rich Presence data (and their hover texts) | +| party | [party](/docs/events/gateway-events#activity-object-activity-party) object | Information for the current party of the player | ### setActivity Example @@ -103,7 +103,7 @@ To create this sort of Rich Presence, here is what the `setActivity()` code woul > info -> The following example only focuses on using `setActivity()`. Follow the [Building an Activity guide](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) for more details on topics like instantiating the Embedded App SDK and authenticating users. +> The following example only focuses on using `setActivity()`. Follow the [Building an Activity guide](/docs/activities/building-an-activity) for more details on topics like instantiating the Embedded App SDK and authenticating users. ```js await discordSdk.commands.setActivity({ activity: { @@ -129,14 +129,14 @@ await discordSdk.commands.setActivity({ ## Using External Custom Assets -Typically when building an Activity, you need to be aware of the proxy and [how to use external resources](#DOCS_ACTIVITIES_DEVELOPMENT_GUIDES/using-external-resources). However, lucikly for you (and the writer of this guide), image URLs in fields for features like Rich Presence don't need to jump through any extra hoops. +Typically when building an Activity, you need to be aware of the proxy and [how to use external resources](/docs/activities/development-guides#using-external-resources). However, lucikly for you (and the writer of this guide), image URLs in fields for features like Rich Presence don't need to jump through any extra hoops. -As mentioned in the [Rich Presence overview](#DOCS_RICH_PRESENCE_OVERVIEW/assets), you have more than 300 custom assets or if you want to use your stored images from somewhere else, you can specify an external URL for `large_image` or `small_image` within the `assets` object. +As mentioned in the [Rich Presence overview](/docs/rich-presence/overview#assets), you have more than 300 custom assets or if you want to use your stored images from somewhere else, you can specify an external URL for `large_image` or `small_image` within the `assets` object. > info -> The following example only focuses on using `setActivity()`. Follow the [Building an Activity guide](#DOCS_ACTIVITIES_BUILDING_AN_ACTIVITY) for more details on topics like instantiating the Embedded App SDK and authenticating users. +> The following example only focuses on using `setActivity()`. Follow the [Building an Activity guide](/docs/activities/building-an-activity) for more details on topics like instantiating the Embedded App SDK and authenticating users. ```js await discordSdk.commands.setActivity({ activity: { diff --git a/docs/rich-presence/using-with-the-game-sdk.mdx b/docs/rich-presence/using-with-the-game-sdk.mdx index a2b2acc86c..1be5e836c4 100644 --- a/docs/rich-presence/using-with-the-game-sdk.mdx +++ b/docs/rich-presence/using-with-the-game-sdk.mdx @@ -5,14 +5,14 @@ sidebar_label: Using with the Game SDK # Using Rich Presence with the Game SDK > warn -> **The Game SDK has been archived.**
We recommend using the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) for new projects.
Existing projects using the Game SDK will continue to work, but we encourage you to migrate to the [Discord Social SDK](#DOCS_DISCORD_SOCIAL_SDK_OVERVIEW) for new features and updates. +> **The Game SDK has been archived.**
We recommend using the [Discord Social SDK](/docs/discord-social-sdk/overview) for new projects.
Existing projects using the Game SDK will continue to work, but we encourage you to migrate to the [Discord Social SDK](/docs/discord-social-sdk/overview) for new features and updates. -The [Game SDK](#DOCS_DEVELOPER_TOOLS_GAME_SDK) helps you build 3rd party games and integrate them with Discord. One of its specialties is making it easy to bring your game's data to Discord using [Rich Presence](#DOCS_RICH_PRESENCE_OVERVIEW), which this guide will cover. +The [Game SDK](/docs/developer-tools/game-sdk) helps you build 3rd party games and integrate them with Discord. One of its specialties is making it easy to bring your game's data to Discord using [Rich Presence](/docs/rich-presence/overview), which this guide will cover. -Before we dig in, make sure you've gone through the guide on [Getting Started with the Game SDK](#DOCS_DEVELOPER_TOOLS_GAME_SDK/getting-started). This guide expects that you've already [downloaded the SDK](#DOCS_DEVELOPER_TOOLS_GAME_SDK/step-1-get-the-sdk), [configured your app](#DOCS_DEVELOPER_TOOLS_GAME_SDK/step-2-create-your-app), and [gotten up and running with a basic example](#DOCS_DEVELOPER_TOOLS_GAME_SDK/step-3-start-coding). +Before we dig in, make sure you've gone through the guide on [Getting Started with the Game SDK](/docs/developer-tools/game-sdk#getting-started). This guide expects that you've already [downloaded the SDK](/docs/developer-tools/game-sdk#step-1-get-the-sdk), [configured your app](/docs/developer-tools/game-sdk#step-2-create-your-app), and [gotten up and running with a basic example](/docs/developer-tools/game-sdk#step-3-start-coding). > info -> Not sure if you should be building with the Game SDK? Read through [Choosing an SDK](#DOCS_RICH_PRESENCE_OVERVIEW/choosing-an-sdk) to understand your options when integrating Rich Presence. +> Not sure if you should be building with the Game SDK? Read through [Choosing an SDK](/docs/rich-presence/overview#choosing-an-sdk) to understand your options when integrating Rich Presence. ## Understanding Rich Presence Data @@ -38,13 +38,13 @@ impaired eyesight to understand the potential layout of this information in a us
> info -> For tips on designing Rich Presence, take a look at the [Rich Presence best practices guide](#DOCS_RICH_PRESENCE_BEST_PRACTICES). +> For tips on designing Rich Presence, take a look at the [Rich Presence best practices guide](/docs/rich-presence/best-practices). ## Activities Manager -As you likely learned when setting up your app, the Game SDK has a handful of specialized [manager classes](#DOCS_DEVELOPER_TOOLS_GAME_SDK/managers). The **[`ActivitiesManager`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activities)** is responsible for integrating Rich Presence and sending invites, so that's where we'll spend our focus in this guide. +As you likely learned when setting up your app, the Game SDK has a handful of specialized [manager classes](/docs/developer-tools/game-sdk#managers). The **[`ActivitiesManager`](/docs/developer-tools/game-sdk#activities)** is responsible for integrating Rich Presence and sending invites, so that's where we'll spend our focus in this guide. -Like other Game SDK managers, the `ActivitiesManager` class has a handful of [functions](#DOCS_DEVELOPER_TOOLS_GAME_SDK/functions) and [events](#DOCS_DEVELOPER_TOOLS_GAME_SDK/functions) that are used when building Rich Presence support. We'll touch on the ones important to presence below. +Like other Game SDK managers, the `ActivitiesManager` class has a handful of [functions](/docs/developer-tools/game-sdk#functions) and [events](/docs/developer-tools/game-sdk#functions) that are used when building Rich Presence support. We'll touch on the ones important to presence below. ### Fetching Activity Manager @@ -56,11 +56,11 @@ var activityManager = discord.GetActivityManager(); ## Updating Presence -The most important function when integrating Rich Presence using the Game SDK will be [`UpdateActivity()`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/updateactivity). This is how you will send your game data to Discord to update a user's presence data. You should call `UpdateActivity()` any time something important in the presence payload changes. +The most important function when integrating Rich Presence using the Game SDK will be [`UpdateActivity()`](/docs/developer-tools/game-sdk#updateactivity). This is how you will send your game data to Discord to update a user's presence data. You should call `UpdateActivity()` any time something important in the presence payload changes. ### UpdateActivity Fields -When calling `UpdateActivity()`, you'll be expected to pass the [activity](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activity-struct) fields besides your `ApplicationId` and `Name` (which are both read-only). +When calling `UpdateActivity()`, you'll be expected to pass the [activity](/docs/developer-tools/game-sdk#activity-struct) fields besides your `ApplicationId` and `Name` (which are both read-only). #### Partial Activity Struct @@ -73,10 +73,10 @@ Below are the fields we'll be paying attention to as we're passing presence data |------------|--------------------------------------------------------------------------------|-----------------------------------------------------------------| | State | string | the player's current party status | | Details | string | what the player is currently doing | -| Timestamps | [ActivityTimestamps](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitytimestamps-struct) | helps create elapsed/remaining timestamps on a player's profile | -| Assets | [ActivityAssets](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activityassets-struct) | assets to display on the player's profile | -| Party | [ActivityParty](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activityparty-struct) | information about the player's party | -| Secrets | [ActivitySecrets](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitysecrets-struct) | secret passwords for joining the player's game | +| Timestamps | [ActivityTimestamps](/docs/developer-tools/game-sdk#activitytimestamps-struct) | helps create elapsed/remaining timestamps on a player's profile | +| Assets | [ActivityAssets](/docs/developer-tools/game-sdk#activityassets-struct) | assets to display on the player's profile | +| Party | [ActivityParty](/docs/developer-tools/game-sdk#activityparty-struct) | information about the player's party | +| Secrets | [ActivitySecrets](/docs/developer-tools/game-sdk#activitysecrets-struct) | secret passwords for joining the player's game | | Instance | bool | whether this activity is an instanced context, like a match | ### UpdateActivity Example @@ -95,7 +95,7 @@ The **Ask to Join** button will be covered more in the following sections, but i > info -> The following example only focuses on using `UpdateActivity()`. You can read the [Getting Started](#DOCS_DEVELOPER_TOOLS_GAME_SDK/getting-started) and [Using the SDK](#DOCS_DEVELOPER_TOOLS_GAME_SDK/using-the-sdk) sections for more general information about using the Game SDK. +> The following example only focuses on using `UpdateActivity()`. You can read the [Getting Started](/docs/developer-tools/game-sdk#getting-started) and [Using the SDK](/docs/developer-tools/game-sdk#using-the-sdk) sections for more general information about using the Game SDK. ```cs var activity = new Discord.Activity @@ -151,15 +151,15 @@ In the example above, there was an **Ask to Join** button that a user could clic To get the **Ask to Join** button to appear under the presence data for a 3rd party game, you should send along a few fields: `ActivityParty.Id`, `ActivityParty.Size.CurrentSize`, `ActivityParty.Size.MaxSize`, and `ActivitySecrets.Join`. -To see what you need for each Rich Presence feature, you can view the [Activity Action Field Requirements](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activity-action-field-requirements) table. +To see what you need for each Rich Presence feature, you can view the [Activity Action Field Requirements](/docs/developer-tools/game-sdk#activity-action-field-requirements) table. ### Handling Ask to Join -To listen for when someone clicks the button, you'll use the [`OnActivityJoinRequest` event](#DOCS_DEVELOPER_TOOLS_GAME_SDK/onactivityjoinrequest). This will include a [user](#DOCS_DEVELOPER_TOOLS_GAME_SDK/user-struct) for the individual that clicked the button. +To listen for when someone clicks the button, you'll use the [`OnActivityJoinRequest` event](/docs/developer-tools/game-sdk#onactivityjoinrequest). This will include a [user](/docs/developer-tools/game-sdk#user-struct) for the individual that clicked the button. As an example, let's say we updated Player A's presence data, and Player B found the **Ask to Join** button on their profile and proceeded to click it. At that point, your app will receive an `OnActivityJoinRequest`. Your game should surface this to Player A to confirm they wish to play with Player B. -After you confirm that Player A is game, you will call [`SendRequestReply`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/sendrequestreply) with Player B's `userId` and a `reply` field with an [`ActivityJoinRequestReply` value](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activityjoinrequestreply-enum). +After you confirm that Player A is game, you will call [`SendRequestReply`](/docs/developer-tools/game-sdk#sendrequestreply) with Player B's `userId` and a `reply` field with an [`ActivityJoinRequestReply` value](/docs/developer-tools/game-sdk#activityjoinrequestreply-enum). @@ -179,7 +179,7 @@ activityManager.OnActivityJoinRequest += user => The **Ask to Join** request persists for 30 seconds after the request is received. Therefore, keep these two points in mind: -- Ensure you call [`RunCallbacks()`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/runcallbacks) as frequently as possible to ensure your game client is up to date with any data from Discord +- Ensure you call [`RunCallbacks()`](/docs/developer-tools/game-sdk#runcallbacks) as frequently as possible to ensure your game client is up to date with any data from Discord - If the player is in a state in which they cannot interact with an **Ask to Join** request—like in the middle of a match—you should not send `ActivitySecrets.Join` in the presence payload ## Secrets @@ -219,8 +219,8 @@ Currently, the SDK does not support this. Party slot information is determined b #### Q: Can I send images via the payload rather than uploading them to my app's settings? -Yes! In addition to uploading an asset and specifying its name, you can also specify an external image URL for us to proxy. For more information, see [Activity Asset Image](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object-activity-asset-image). +Yes! In addition to uploading an asset and specifying its name, you can also specify an external image URL for us to proxy. For more information, see [Activity Asset Image](/docs/events/gateway-events#activity-object-activity-asset-image). #### Q: OK—I've got it working! Now, how do I make my integration look _awesome_? -I'm happy ~~we preempted your question~~ you asked! Check out our [Rich Presence Best Practices](#DOCS_RICH_PRESENCE_BEST_PRACTICES/) guide for a rundown on how to make your integration the best that it can be! +I'm happy ~~we preempted your question~~ you asked! Check out our [Rich Presence Best Practices](/docs/rich-presence/best-practices#) guide for a rundown on how to make your integration the best that it can be! diff --git a/docs/topics/certified-devices.md b/docs/topics/certified-devices.md index 5c2993aa33..162f255d49 100644 --- a/docs/topics/certified-devices.md +++ b/docs/topics/certified-devices.md @@ -8,7 +8,7 @@ I'm glad you asked! 1. [Create an application](#APPLICATIONS) for your hardware vendor—save the Client ID! 2. Talk to Discord via one simple HTTP or WebSocket call -3. Send us a [`SET_CERTIFIED_DEVICES`](#DOCS_TOPICS_RPC/setcertifieddevices) WebSocket payload or equivalent HTTP POST whenever the state of the device changes +3. Send us a [`SET_CERTIFIED_DEVICES`](/docs/topics/rpc#setcertifieddevices) WebSocket payload or equivalent HTTP POST whenever the state of the device changes Yup, that's it. You give us the real-time info about any connected devices, and we'll handle the rest to make sure that anyone using your device will have an awesome experience. Your device will also have a `CERTIFIED` badge in Discord's audio settings, and really, who doesn't love badges? @@ -165,10 +165,10 @@ The socket will respond with a `200 OK` status code and the following JSON. | Field | Type | Description | |---------------------------|----------------------------------------------------------------------|----------------------------------------------------------| -| type | [device type](#DOCS_TOPICS_CERTIFIED_DEVICES/models-device-type) | the type of device | +| type | [device type](/docs/topics/certified-devices#models-device-type) | the type of device | | id | string | the device's Windows UUID | -| vendor | [vendor](#DOCS_TOPICS_CERTIFIED_DEVICES/models-vendor-object) object | the hardware vendor | -| model | [model](#DOCS_TOPICS_CERTIFIED_DEVICES/models-model-object) object | the model of the product | +| vendor | [vendor](/docs/topics/certified-devices#models-vendor-object) object | the hardware vendor | +| model | [model](/docs/topics/certified-devices#models-model-object) object | the model of the product | | related | array of strings | UUIDs of related devices | | echo_cancellation?\* | boolean | if the device's native echo cancellation is enabled | | noise_suppression?\* | boolean | if the device's native noise suppression is enabled | diff --git a/docs/topics/oauth2.md b/docs/topics/oauth2.md index 17202c34ff..805fd2323e 100644 --- a/docs/topics/oauth2.md +++ b/docs/topics/oauth2.md @@ -24,23 +24,23 @@ These are a list of all the OAuth2 scopes that Discord supports. Some scopes req | Name | Description | |------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | activities.read | allows your app to fetch data from a user's "Now Playing/Recently Played" list — not currently available for apps | -| activities.write | allows your app to update a user's activity - not currently available for apps (NOT REQUIRED FOR [GAMESDK ACTIVITY MANAGER](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activities)) | +| activities.write | allows your app to update a user's activity - not currently available for apps (NOT REQUIRED FOR [GAMESDK ACTIVITY MANAGER](/docs/developer-tools/game-sdk#activities)) | | applications.builds.read | allows your app to read build data for a user's applications | | applications.builds.upload | allows your app to upload/update builds for a user's applications - requires Discord approval | -| applications.commands | allows your app to add [commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/) to a guild - included by default with the `bot` scope | -| applications.commands.update | allows your app to update its [commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/) using a Bearer token - [client credentials grant](#DOCS_TOPICS_OAUTH2/client-credentials-grant) only | -| applications.commands.permissions.update | allows your app to update [permissions for its commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) in a guild a user has permissions to | +| applications.commands | allows your app to add [commands](/docs/interactions/application-commands#) to a guild - included by default with the `bot` scope | +| applications.commands.update | allows your app to update its [commands](/docs/interactions/application-commands#) using a Bearer token - [client credentials grant](/docs/topics/oauth2#client-credentials-grant) only | +| applications.commands.permissions.update | allows your app to update [permissions for its commands](/docs/interactions/application-commands#permissions) in a guild a user has permissions to | | applications.entitlements | allows your app to read entitlements for a user's applications | | applications.store.update | allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications | | bot | for oauth2 bots, this puts the bot in the user's selected guild by default | -| connections | allows [/users/@me/connections](#DOCS_RESOURCES_USER/get-current-user-connections) to return linked third-party accounts | +| connections | allows [/users/@me/connections](/docs/resources/user#get-current-user-connections) to return linked third-party accounts | | dm_channels.read | allows your app to see information about the user's DMs and group DMs - requires Discord approval | -| email | enables [/users/@me](#DOCS_RESOURCES_USER/get-current-user) to return an `email` | -| gdm.join | allows your app to [join users to a group dm](#DOCS_RESOURCES_CHANNEL/group-dm-add-recipient) | -| guilds | allows [/users/@me/guilds](#DOCS_RESOURCES_USER/get-current-user-guilds) to return basic information about all of a user's guilds | -| guilds.join | allows [/guilds/{guild.id}/members/{user.id}](#DOCS_RESOURCES_GUILD/add-guild-member) to be used for joining users to a guild | -| guilds.members.read | allows [/users/@me/guilds/{guild.id}/member](#DOCS_RESOURCES_USER/get-current-user-guild-member) to return a user's member information in a guild | -| identify | allows [/users/@me](#DOCS_RESOURCES_USER/get-current-user) without `email` | +| email | enables [/users/@me](/docs/resources/user#get-current-user) to return an `email` | +| gdm.join | allows your app to [join users to a group dm](/docs/resources/channel#group-dm-add-recipient) | +| guilds | allows [/users/@me/guilds](/docs/resources/user#get-current-user-guilds) to return basic information about all of a user's guilds | +| guilds.join | allows [/guilds/{guild.id}/members/{user.id}](/docs/resources/guild#add-guild-member) to be used for joining users to a guild | +| guilds.members.read | allows [/users/@me/guilds/{guild.id}/member](/docs/resources/user#get-current-user-guild-member) to return a user's member information in a guild | +| identify | allows [/users/@me](/docs/resources/user#get-current-user) without `email` | | messages.read | for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) | | relationships.read | allows your app to know a user's friends and implicit relationships - requires Discord approval | | role_connections.write | allows your app to update a user's connection and metadata for the app | @@ -54,7 +54,7 @@ These are a list of all the OAuth2 scopes that Discord supports. Some scopes req > info > In order to add a user to a guild, your bot has to already belong to that guild. -> `role_connections.write` cannot be used with the [Implicit grant type](#DOCS_TOPICS_OAUTH2/implicit-grant). +> `role_connections.write` cannot be used with the [Implicit grant type](/docs/topics/oauth2#implicit-grant). ## State and Security @@ -76,13 +76,13 @@ All calls to the OAuth2 endpoints require either HTTP Basic authentication or `c https://discord.com/oauth2/authorize?response_type=code&client_id=157730590492196864&scope=identify%20guilds.join&state=15773059ghq9183habn&redirect_uri=https%3A%2F%2Fnicememe.website&prompt=consent&integration_type=0 ``` -`client_id` is your application's `client_id`. `scope` is a list of [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) separated by url encoded spaces (`%20`). `redirect_uri` is whatever URL you registered when creating your application, url-encoded. `state` is the unique string mentioned in [State and Security](#DOCS_TOPICS_OAUTH2/state-and-security). +`client_id` is your application's `client_id`. `scope` is a list of [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) separated by url encoded spaces (`%20`). `redirect_uri` is whatever URL you registered when creating your application, url-encoded. `state` is the unique string mentioned in [State and Security](/docs/topics/oauth2#state-and-security). When someone navigates to this URL, they will be prompted to authorize your application for the requested scopes. On acceptance, they will be redirected to your `redirect_uri`, which will contain an additional querystring parameter, `code`. `state` will also be returned if previously sent, and should be validated at this point. `prompt` controls how the authorization flow handles existing authorizations. If a user has previously authorized your application with the requested scopes and prompt is set to `consent`, it will request them to reapprove their authorization. If set to `none`, it will skip the authorization screen and redirect them back to your redirect URI without requesting their authorization. For passthrough scopes, like `bot` and `webhook.incoming`, authorization is always required. -The `integration_type` parameter specifies the [installation context](#DOCS_RESOURCES_APPLICATION/installation-context) for the authorization. The installation context determines where the application will be installed, and is only relevant when `scope` contains `applications.commands`. When set to 0 (GUILD_INSTALL) the application will be authorized for installation to a server, and when set to 1 (USER_INSTALL) the application will be authorized for installation to a user. The application must be configured in the Developer Portal to support the provided `integration_type`. +The `integration_type` parameter specifies the [installation context](/docs/resources/application#installation-context) for the authorization. The installation context determines where the application will be installed, and is only relevant when `scope` contains `applications.commands`. When set to 0 (GUILD_INSTALL) the application will be authorized for installation to a server, and when set to 1 (USER_INSTALL) the application will be authorized for installation to a user. The application must be configured in the Developer Portal to support the provided `integration_type`. ###### Redirect URL Example @@ -90,7 +90,7 @@ The `integration_type` parameter specifies the [installation context](#DOCS_RESO https://nicememe.website/?code=NhhvTDYsFcdgNLnnLijcl7Ku7bEEeee&state=15773059ghq9183habn ``` -`code` is now exchanged for the user's access token by making a `POST` request to the [token URL](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-urls) with the following parameters: +`code` is now exchanged for the user's access token by making a `POST` request to the [token URL](/docs/topics/oauth2#shared-resources-oauth2-urls) with the following parameters: - `grant_type` - must be set to `authorization_code` - `code` - the code from the querystring @@ -134,7 +134,7 @@ In response, you will receive: } ``` -Having the user's access token allows your application to make certain requests to the API on their behalf, restricted to whatever scopes were requested. `expires_in` is how long, in seconds, until the returned access token expires, allowing you to anticipate the expiration and refresh the token. To refresh, make another `POST` request to the [token URL](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-urls) with the following parameters: +Having the user's access token allows your application to make certain requests to the API on their behalf, restricted to whatever scopes were requested. `expires_in` is how long, in seconds, until the returned access token expires, allowing you to anticipate the expiration and refresh the token. To refresh, make another `POST` request to the [token URL](/docs/topics/oauth2#shared-resources-oauth2-urls) with the following parameters: - `grant_type` - must be set to `refresh_token` - `refresh_token` - the user's refresh token @@ -161,11 +161,11 @@ def refresh_token(refresh_token): return r.json() ``` -Boom; fresh [access token response](#DOCS_TOPICS_OAUTH2/authorization-code-grant-access-token-response)! +Boom; fresh [access token response](/docs/topics/oauth2#authorization-code-grant-access-token-response)! ###### Token Revocation Example -To disable an access or refresh token, you can revoke it by making a `POST` request to the [token revocation URL](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-urls) with the following parameters: +To disable an access or refresh token, you can revoke it by making a `POST` request to the [token revocation URL](/docs/topics/oauth2#shared-resources-oauth2-urls) with the following parameters: - `token` - the access token or refresh token to revoke - `token_type_hint` *(optional)* - the `token` parameter's type—either `access_token` or `refresh_token` @@ -203,7 +203,7 @@ The implicit OAuth2 grant is a simplified flow optimized for in-browser clients. https://discord.com/oauth2/authorize?response_type=token&client_id=290926444748734499&state=15773059ghq9183habn&scope=identify ``` -On redirect, your redirect URI will contain additional **URI fragments**: `access_token`, `token_type`, `expires_in`, `scope`, and [`state`](#DOCS_TOPICS_OAUTH2/state-and-security)(if specified). **These are not querystring parameters.** Be mindful of the "#" character: +On redirect, your redirect URI will contain additional **URI fragments**: `access_token`, `token_type`, `expires_in`, `scope`, and [`state`](/docs/topics/oauth2#state-and-security)(if specified). **These are not querystring parameters.** Be mindful of the "#" character: ###### Redirect URL Example @@ -215,9 +215,9 @@ There are tradeoffs in using the implicit grant flow. It is both quicker and eas ## Client Credentials Grant -The client credential flow is a quick and easy way for bot developers to get their own bearer tokens for testing purposes. By making a `POST` request to the [token URL](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-urls) with a grant type of `client_credentials`, using Basic authentication with your client id as the username and your client secret as the password, you will be returned an access token for the bot owner. Therefore, always be super-extra-very-we-are-not-kidding-like-really-be-secure-make-sure-your-info-is-not-in-your-source-code careful with your `client_id` and `client_secret`. We don't take kindly to imposters around these parts. +The client credential flow is a quick and easy way for bot developers to get their own bearer tokens for testing purposes. By making a `POST` request to the [token URL](/docs/topics/oauth2#shared-resources-oauth2-urls) with a grant type of `client_credentials`, using Basic authentication with your client id as the username and your client secret as the password, you will be returned an access token for the bot owner. Therefore, always be super-extra-very-we-are-not-kidding-like-really-be-secure-make-sure-your-info-is-not-in-your-source-code careful with your `client_id` and `client_secret`. We don't take kindly to imposters around these parts. -You can specify scopes with the `scope` parameter, which is a list of [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) separated by spaces: +You can specify scopes with the `scope` parameter, which is a list of [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) separated by spaces: > info > Team applications are limited to the `identify` and `applications.commands.update` scope, because teams are not bound to a specific user. @@ -259,7 +259,7 @@ In return, you will receive an access token (without a refresh token): ## Bot Users -Discord's API provides bot users, which are a separate type of user dedicated to automation. Bot users are automatically added to all apps, and are authenticated using the bot token found in your [app's settings](https://discord.com/developers/applications). Unlike the normal OAuth2 flow, bot users have full access to most API routes without using bearer tokens, and can connect to the [Real Time Gateway](#DOCS_EVENTS_GATEWAY). +Discord's API provides bot users, which are a separate type of user dedicated to automation. Bot users are automatically added to all apps, and are authenticated using the bot token found in your [app's settings](https://discord.com/developers/applications). Unlike the normal OAuth2 flow, bot users have full access to most API routes without using bearer tokens, and can connect to the [Real Time Gateway](/docs/events/gateway). ### Bot vs User Accounts @@ -272,7 +272,7 @@ Bot users have a few differences compared to standard Discord users: 1. Bots are added to guilds through the OAuth2 API, and cannot accept normal invites. 2. Bots cannot have friends or be added to or join Group DMs. 3. [Verified bots](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified) do not have a maximum number of guilds. -4. Bots have an entirely separate set of [rate limits](#DOCS_TOPICS_RATE_LIMITS/rate-limits). +4. Bots have an entirely separate set of [rate limits](/docs/topics/rate-limits#rate-limits). ### Bot Authorization Flow @@ -284,7 +284,7 @@ Bot authorization is a special server-less and callback-less OAuth2 flow that ma |----------------------|-----------------------------------------------------------------------| | client_id | your app's client id | | scope | needs to include `bot` for the bot flow | -| permissions | the [permissions](#DOCS_TOPICS_PERMISSIONS/) you're requesting | +| permissions | the [permissions](/docs/topics/permissions#) you're requesting | | guild_id | pre-fills the dropdown picker with a guild for the user | | disable_guild_select | `true` or `false`—disallows the user from changing the guild dropdown | @@ -294,7 +294,7 @@ Bot authorization is a special server-less and callback-less OAuth2 flow that ma https://discord.com/oauth2/authorize?client_id=157730590492196864&scope=bot&permissions=1 ``` -In the case of bots, the `scope` parameter should be set to `bot`. There's also a new parameter, `permissions`, which is an integer corresponding to the [permission calculations](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) for the bot. You'll also notice the absence of `response_type` and `redirect_uri`. Bot authorization does not require these parameters because there is no need to retrieve the user's access token. +In the case of bots, the `scope` parameter should be set to `bot`. There's also a new parameter, `permissions`, which is an integer corresponding to the [permission calculations](/docs/topics/permissions#permissions-bitwise-permission-flags) for the bot. You'll also notice the absence of `response_type` and `redirect_uri`. Bot authorization does not require these parameters because there is no need to retrieve the user's access token. When the user navigates to this page, they'll be prompted to add the bot to a guild in which they have proper permissions. On acceptance, the bot will be added. Super easy! @@ -305,9 +305,9 @@ If your bot is super specific to your private clubhouse, or you just don't like ### Advanced Bot Authorization -Devs can extend the bot authorization functionality. You can request additional scopes outside of `bot` and `applications.commands`, which will prompt a continuation into a complete [authorization code grant flow](#DOCS_TOPICS_OAUTH2/authorization-code-grant) and add the ability to request the user's access token. If you request any scopes outside of `bot` and `applications.commands`, `response_type` is again mandatory; we will also automatically redirect the user to the first URI in your application's registered list unless `redirect_uri` is specified. +Devs can extend the bot authorization functionality. You can request additional scopes outside of `bot` and `applications.commands`, which will prompt a continuation into a complete [authorization code grant flow](/docs/topics/oauth2#authorization-code-grant) and add the ability to request the user's access token. If you request any scopes outside of `bot` and `applications.commands`, `response_type` is again mandatory; we will also automatically redirect the user to the first URI in your application's registered list unless `redirect_uri` is specified. -When receiving the access code on redirect, there will be additional querystring parameters of `guild_id` and `permissions`. The `guild_id` parameter should only be used as a hint as to the relationship between your bot and a guild. To be sure of the relationship between your bot and the guild, consider requiring the Oauth2 code grant in your bot's settings. Enabling it requires anyone adding your bot to a server to go through a full OAuth2 [authorization code grant flow](#DOCS_TOPICS_OAUTH2/authorization-code-grant). When you retrieve the user's access token, you'll also receive information about the guild to which your bot was added: +When receiving the access code on redirect, there will be additional querystring parameters of `guild_id` and `permissions`. The `guild_id` parameter should only be used as a hint as to the relationship between your bot and a guild. To be sure of the relationship between your bot and the guild, consider requiring the Oauth2 code grant in your bot's settings. Enabling it requires anyone adding your bot to a server to go through a full OAuth2 [authorization code grant flow](/docs/topics/oauth2#authorization-code-grant). When you retrieve the user's access token, you'll also receive information about the guild to which your bot was added: ###### Extended Bot Authorization Access Token Example @@ -370,11 +370,11 @@ When receiving the access code on redirect, there will be additional querystring ### Two-Factor Authentication Requirement -For bots with [elevated permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) (permissions with a `*` next to them), we enforce two-factor authentication on the owner's account when added to guilds that have server-wide 2FA enabled. +For bots with [elevated permissions](/docs/topics/permissions#permissions-bitwise-permission-flags) (permissions with a `*` next to them), we enforce two-factor authentication on the owner's account when added to guilds that have server-wide 2FA enabled. ## Webhooks -Discord's webhook flow is a specialized version of an [authorization code](#DOCS_TOPICS_OAUTH2/authorization-code-grant) implementation. In this case, the `scope` querystring parameter needs to be set to `webhook.incoming`: +Discord's webhook flow is a specialized version of an [authorization code](/docs/topics/oauth2#authorization-code-grant) implementation. In this case, the `scope` querystring parameter needs to be set to `webhook.incoming`: ###### URL Example @@ -382,7 +382,7 @@ Discord's webhook flow is a specialized version of an [authorization code](#DOCS https://discord.com/oauth2/authorize?response_type=code&client_id=157730590492196864&scope=webhook.incoming&state=15773059ghq9183habn&redirect_uri=https%3A%2F%2Fnicememe.website ``` -When the user navigates to this URL, they will be prompted to select a channel in which to allow the webhook. When the webhook is [executed](#DOCS_RESOURCES_WEBHOOK/execute-webhook), it will post its message into this channel. On acceptance, the user will be redirected to your `redirect_uri`. The URL will contain the `code` querystring parameter which should be [exchanged for an access token](#DOCS_TOPICS_OAUTH2/authorization-code-grant-access-token-exchange-example). In return, you will receive a slightly modified token response: +When the user navigates to this URL, they will be prompted to select a channel in which to allow the webhook. When the webhook is [executed](/docs/resources/webhook#execute-webhook), it will post its message into this channel. On acceptance, the user will be redirected to your `redirect_uri`. The URL will contain the `code` querystring parameter which should be [exchanged for an access token](/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example). In return, you will receive a slightly modified token response: ###### Webhook Token Response Example @@ -407,13 +407,13 @@ When the user navigates to this URL, they will be prompted to select a channel i } ``` -From this object, you should store the `webhook.token` and `webhook.id`. See the [execute webhook](#DOCS_RESOURCES_WEBHOOK/execute-webhook) documentation for how to send messages with the webhook. +From this object, you should store the `webhook.token` and `webhook.id`. See the [execute webhook](/docs/resources/webhook#execute-webhook) documentation for how to send messages with the webhook. -Any user that wishes to add your webhook to their channel will need to go through the full OAuth2 flow. A new webhook is created each time, so you will need to save the token and id. If you wish to send a message to all your webhooks, you'll need to iterate over each stored id:token combination and make `POST` requests to each one. Be mindful of our [Rate Limits](#DOCS_TOPICS_RATE_LIMITS/rate-limits)! +Any user that wishes to add your webhook to their channel will need to go through the full OAuth2 flow. A new webhook is created each time, so you will need to save the token and id. If you wish to send a message to all your webhooks, you'll need to iterate over each stored id:token combination and make `POST` requests to each one. Be mindful of our [Rate Limits](/docs/topics/rate-limits#rate-limits)! ## Get Current Bot Application Information % GET /oauth2/applications/@me -Returns the bot's [application](#DOCS_RESOURCES_APPLICATION/application-object) object. +Returns the bot's [application](/docs/resources/application#application-object) object. ## Get Current Authorization Information % GET /oauth2/@me @@ -423,10 +423,10 @@ Returns info about the current authorization. Requires authentication with a bea | Field | Type | Description | |-------------|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| -| application | partial [application](#DOCS_RESOURCES_APPLICATION/application-object) object | the current application | +| application | partial [application](/docs/resources/application#application-object) object | the current application | | scopes | array of strings | the scopes the user has authorized the application for | | expires | ISO8601 timestamp | when the access token expires | -| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user who has authorized, if the user has authorized with the `identify` scope | +| user? | [user](/docs/resources/user#user-object) object | the user who has authorized, if the user has authorized with the `identify` scope | ###### Example Authorization Information diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index 257a69c581..ef641b3966 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -29,19 +29,19 @@ In order to prevent broken reconnect loops, you should consider some close codes | Code | Description | Explanation | Reconnect | |------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| | 4000 | Unknown error | We're not sure what went wrong. Try reconnecting? | true | -| 4001 | Unknown opcode | You sent an invalid [Gateway opcode](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway-gateway-opcodes) or an invalid payload for an opcode. Don't do that! | true | -| 4002 | Decode error | You sent an invalid [payload](#DOCS_EVENTS_GATEWAY/sending-events) to Discord. Don't do that! | true | -| 4003 | Not authenticated | You sent us a payload prior to [identifying](#DOCS_EVENTS_GATEWAY/identifying), or this session has been invalidated. | true | -| 4004 | Authentication failed | The account token sent with your [identify payload](#DOCS_EVENTS_GATEWAY_EVENTS/identify) is incorrect. | false | +| 4001 | Unknown opcode | You sent an invalid [Gateway opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes) or an invalid payload for an opcode. Don't do that! | true | +| 4002 | Decode error | You sent an invalid [payload](/docs/events/gateway#sending-events) to Discord. Don't do that! | true | +| 4003 | Not authenticated | You sent us a payload prior to [identifying](/docs/events/gateway#identifying), or this session has been invalidated. | true | +| 4004 | Authentication failed | The account token sent with your [identify payload](/docs/events/gateway-events#identify) is incorrect. | false | | 4005 | Already authenticated | You sent more than one identify payload. Don't do that! | true | -| 4007 | Invalid `seq` | The sequence sent when [resuming](#DOCS_EVENTS_GATEWAY_EVENTS/resume) the session was invalid. Reconnect and start a new session. | true | +| 4007 | Invalid `seq` | The sequence sent when [resuming](/docs/events/gateway-events#resume) the session was invalid. Reconnect and start a new session. | true | | 4008 | Rate limited | Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this. | true | | 4009 | Session timed out | Your session timed out. Reconnect and start a new one. | true | -| 4010 | Invalid shard | You sent us an invalid [shard when identifying](#DOCS_EVENTS_GATEWAY/sharding). | false | -| 4011 | Sharding required | The session would have handled too many guilds - you are required to [shard](#DOCS_EVENTS_GATEWAY/sharding) your connection in order to connect. | false | +| 4010 | Invalid shard | You sent us an invalid [shard when identifying](/docs/events/gateway#sharding). | false | +| 4011 | Sharding required | The session would have handled too many guilds - you are required to [shard](/docs/events/gateway#sharding) your connection in order to connect. | false | | 4012 | Invalid API version | You sent an invalid version for the gateway. | false | -| 4013 | Invalid intent(s) | You sent an invalid intent for a [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents). You may have incorrectly calculated the bitwise value. | false | -| 4014 | Disallowed intent(s) | You sent a disallowed intent for a [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents). You may have tried to specify an intent that you [have not enabled or are not approved for](#DOCS_EVENTS_GATEWAY/privileged-intents). | false | +| 4013 | Invalid intent(s) | You sent an invalid intent for a [Gateway Intent](/docs/events/gateway#gateway-intents). You may have incorrectly calculated the bitwise value. | false | +| 4014 | Disallowed intent(s) | You sent a disallowed intent for a [Gateway Intent](/docs/events/gateway#gateway-intents). You may have tried to specify an intent that you [have not enabled or are not approved for](/docs/events/gateway#privileged-intents). | false | ## Voice @@ -79,18 +79,18 @@ Our voice gateways have their own set of opcodes and close codes. | Code | Description | Explanation | |------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| 4001 | Unknown opcode | You sent an invalid [opcode](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice-voice-opcodes). | -| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](#DOCS_EVENTS_GATEWAY_EVENTS/identify) to the Gateway. | -| 4003 | Not authenticated | You sent a payload before [identifying](#DOCS_EVENTS_GATEWAY_EVENTS/identify) with the Gateway. | -| 4004 | Authentication failed | The token you sent in your [identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify) payload is incorrect. | -| 4005 | Already authenticated | You sent more than one [identify](#DOCS_EVENTS_GATEWAY_EVENTS/identify) payload. Stahp. | +| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). | +| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. | +| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. | +| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. | +| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. | | 4006 | Session no longer valid | Your session is no longer valid. | | 4009 | Session timeout | Your session has timed out. | | 4011 | Server not found | We can't find the server you're trying to connect to. | -| 4012 | Unknown protocol | We didn't recognize the [protocol](#DOCS_TOPICS_VOICE_CONNECTIONS/establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. | +| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. | | 4014 | Disconnected | Channel was deleted, you were kicked, voice server changed, or the main gateway session was dropped. Should not reconnect. | -| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](#DOCS_TOPICS_VOICE_CONNECTIONS/resuming-voice-connection). | -| 4016 | Unknown encryption mode | We didn't recognize your [encryption](#DOCS_TOPICS_VOICE_CONNECTIONS/transport-encryption-and-sending-voice). | +| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). | +| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | | 4020 | Bad request | You sent a malformed request | ## HTTP @@ -110,13 +110,13 @@ Our API will return semantically valid HTTP response codes based on the success | 403 (FORBIDDEN) | The `Authorization` token you passed did not have permission to the resource. | | 404 (NOT FOUND) | The resource at the location specified doesn't exist. | | 405 (METHOD NOT ALLOWED) | The HTTP method used is not valid for the location specified. | -| 429 (TOO MANY REQUESTS) | You are being rate limited, see [Rate Limits](#DOCS_TOPICS_RATE_LIMITS). | +| 429 (TOO MANY REQUESTS) | You are being rate limited, see [Rate Limits](/docs/topics/rate-limits). | | 502 (GATEWAY UNAVAILABLE) | There was not a gateway available to process your request. Wait a bit and retry. | | 5xx (SERVER ERROR) | The server had an error processing your request (these are rare). | ## JSON -Along with the HTTP error code, our API can also return more detailed error codes through a `code` key in the JSON error response. The response will also contain a `message` key containing a more friendly error string. Some of these errors may include additional details in the form of [Error Messages](#DOCS_REFERENCE/error-messages) provided by an `errors` object. +Along with the HTTP error code, our API can also return more detailed error codes through a `code` key in the JSON error response. The response will also contain a `message` key containing a more friendly error string. Some of these errors may include additional details in the form of [Error Messages](/docs/reference#error-messages) provided by an `errors` object. ###### JSON Error Codes @@ -236,7 +236,7 @@ Along with the HTTP error code, our API can also return more detailed error code | 40067 | A tag is required to create a forum post in this channel | | 40074 | An entitlement has already been granted for this resource | | 40094 | This interaction has hit the maximum number of follow up messages | -| 40333 | Cloudflare is blocking your request. This can often be resolved by setting a proper [User Agent](#DOCS_REFERENCE/user-agent) | +| 40333 | Cloudflare is blocking your request. This can often be resolved by setting a proper [User Agent](/docs/reference#user-agent) | | 50001 | Missing access | | 50002 | Invalid account type | | 50003 | Cannot execute action on a DM channel | @@ -357,7 +357,7 @@ Along with the HTTP error code, our API can also return more detailed error code ## RPC -RPC is the [local Discord server](#DOCS_TOPICS_RPC/) running on localhost. Access to the RPC server requires approval from Discord. +RPC is the [local Discord server](/docs/topics/rpc#) running on localhost. Access to the RPC server requires approval from Discord. ###### RPC Error Codes diff --git a/docs/topics/permissions.md b/docs/topics/permissions.md index 6aa58c41fc..2593a1978b 100644 --- a/docs/topics/permissions.md +++ b/docs/topics/permissions.md @@ -3,14 +3,14 @@ Permissions are a way to limit and grant certain abilities to users in Discord. A set of base permissions can be configured at the guild level for different roles. When these roles are attached to users, they grant or revoke specific privileges within the guild. Along with the guild-level permissions, Discord also supports permission overwrites that can be assigned to individual roles or members on a per-channel basis. > info -> [Application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) allow you to enable or disable specific commands for entire channels in addition to individual roles or users. +> [Application command permissions](/docs/interactions/application-commands#permissions) allow you to enable or disable specific commands for entire channels in addition to individual roles or users. Permissions are stored in a variable-length integer serialized into a string, and are calculated using bitwise operations. For example, the permission value `123` will be serialized as `"123"`. For long-term stability, it's recommended to deserialize the permissions using your preferred languages' Big Integer libraries. The total permissions integer can be determined by OR-ing (`|`) together each individual value, and flags can be checked using AND (`&`) operations. In API v8 and above, all permissions are serialized as strings, including the `allow` and `deny` fields in overwrites. Any new permissions are rolled back into the base field. > info -> In [API v6 (now deprecated)](#DOCS_REFERENCE), the `permissions`, `allow`, and `deny` fields in roles and overwrites are still serialized as a number; however, these numbers shall not grow beyond 31 bits. During the remaining lifetime of API v6, all new permission bits will only be introduced in `permissions_new`, `allow_new`, and `deny_new`. These `_new` fields are just for response serialization; requests with these fields should continue to use the original `permissions`, `allow`, and `deny` fields, which accept both string or number values. +> In [API v6 (now deprecated)](/docs/reference), the `permissions`, `allow`, and `deny` fields in roles and overwrites are still serialized as a number; however, these numbers shall not grow beyond 31 bits. During the remaining lifetime of API v6, all new permission bits will only be introduced in `permissions_new`, `allow_new`, and `deny_new`. These `_new` fields are just for response serialization; requests with these fields should continue to use the original `permissions`, `allow`, and `deny` fields, which accept both string or number values. ```python # Permissions value that can Send Messages (0x800) and Add Reactions (0x40): @@ -75,8 +75,8 @@ Below is a table of all current permissions, their integer values in hexadecimal | MODERATE_MEMBERS \*\* | `0x0000010000000000` `(1 << 40)` | Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels | | | VIEW_CREATOR_MONETIZATION_ANALYTICS \* | `0x0000020000000000` `(1 << 41)` | Allows for viewing role subscription insights | | | USE_SOUNDBOARD | `0x0000040000000000` `(1 << 42)` | Allows for using soundboard in a voice channel | V | -| CREATE_GUILD_EXPRESSIONS | `0x0000080000000000` `(1 << 43)` | Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user. Not yet available to developers, [see changelog](#DOCS_CHANGE_LOG/clarification-on-permission-splits-for-expressions-and-events). | | -| CREATE_EVENTS | `0x0000100000000000` `(1 << 44)` | Allows for creating scheduled events, and editing and deleting those created by the current user. Not yet available to developers, [see changelog](#DOCS_CHANGE_LOG/clarification-on-permission-splits-for-expressions-and-events). | V, S | +| CREATE_GUILD_EXPRESSIONS | `0x0000080000000000` `(1 << 43)` | Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user. Not yet available to developers, [see changelog](/docs/change-log#clarification-on-permission-splits-for-expressions-and-events). | | +| CREATE_EVENTS | `0x0000100000000000` `(1 << 44)` | Allows for creating scheduled events, and editing and deleting those created by the current user. Not yet available to developers, [see changelog](/docs/change-log#clarification-on-permission-splits-for-expressions-and-events). | V, S | | USE_EXTERNAL_SOUNDS | `0x0000200000000000` `(1 << 45)` | Allows the usage of custom soundboard sounds from other servers | V | | SEND_VOICE_MESSAGES | `0x0000400000000000` `(1 << 46)` | Allows sending voice messages | T, V, S | | SEND_POLLS | `0x0002000000000000` `(1 << 49)` | Allows sending polls | T, V, S | @@ -88,9 +88,9 @@ Below is a table of all current permissions, their integer values in hexadecimal | V | Voice | GUILD_VOICE | | S | Stage | GUILD_STAGE_VOICE | -**\* These permissions require the owner account to use [two-factor authentication](#DOCS_TOPICS_OAUTH2/twofactor-authentication-requirement) when used on a guild that has server-wide 2FA enabled.** +**\* These permissions require the owner account to use [two-factor authentication](/docs/topics/oauth2#twofactor-authentication-requirement) when used on a guild that has server-wide 2FA enabled.** -**\*\* See [Permissions for Timed Out Members](#DOCS_TOPICS_PERMISSIONS/permissions-for-timed-out-members) to understand how permissions are temporarily modified for timed out users.** +**\*\* See [Permissions for Timed Out Members](/docs/topics/permissions#permissions-for-timed-out-members) to understand how permissions are temporarily modified for timed out users.** Note that permission names may be referred to differently in the Discord client. For example, "Manage Permissions" refers to MANAGE_ROLES, "Use Voice Activity" refers to USE_VAD, and "Timeout Members" refers to MODERATE_MEMBERS. @@ -207,14 +207,14 @@ Roles represent a set of permissions attached to a group of users. Roles have na | name | string | role name | | color | integer | integer representation of hexadecimal color code | | hoist | boolean | if this role is pinned in the user listing | -| icon? | ?string | role [icon hash](#DOCS_REFERENCE/image-formatting) | +| icon? | ?string | role [icon hash](/docs/reference#image-formatting) | | unicode_emoji? | ?string | role unicode emoji | | position | integer | position of this role (roles with the same position are sorted by id) | | permissions | string | permission bit set | | managed | boolean | whether this role is managed by an integration | | mentionable | boolean | whether this role is mentionable | -| tags? | [role tags](#DOCS_TOPICS_PERMISSIONS/role-object-role-tags-structure) object | the tags this role has | -| flags | integer | [role flags](#DOCS_TOPICS_PERMISSIONS/role-object-role-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | +| tags? | [role tags](/docs/topics/permissions#role-object-role-tags-structure) object | the tags this role has | +| flags | integer | [role flags](/docs/topics/permissions#role-object-role-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | Roles without colors (`color == 0`) do not count towards the final computed color in the user list. @@ -253,7 +253,7 @@ Tags with type `null` represent booleans. They will be present and set to `null` | Flag | Value | Description | |-----------|----------|----------------------------------------------------------------------------------------------------------| -| IN_PROMPT | `1 << 0` | role can be selected by members in an [onboarding](#DOCS_RESOURCES_GUILD/guild-onboarding-object) prompt | +| IN_PROMPT | `1 << 0` | role can be selected by members in an [onboarding](/docs/resources/guild#guild-onboarding-object) prompt | ## Permissions For Timed Out Members diff --git a/docs/topics/rate-limits.md b/docs/topics/rate-limits.md index 0460c5c45a..6f86965e1b 100644 --- a/docs/topics/rate-limits.md +++ b/docs/topics/rate-limits.md @@ -3,16 +3,16 @@ Rate limits exist across Discord's APIs to prevent spam, abuse, and service overload. Limits are applied to individual bots and users both on a per-route basis and globally. Individuals are determined using a request's authentication—for example, a bot token for a bot. > info -> Because rate limits depend on a variety of factors and are subject to change, **rate limits should not be hard coded into your app**. Instead, your app should parse [response headers](#DOCS_TOPICS_RATE_LIMITS/header-format-rate-limit-header-examples) to prevent hitting the limit, and to respond accordingly in case you do. +> Because rate limits depend on a variety of factors and are subject to change, **rate limits should not be hard coded into your app**. Instead, your app should parse [response headers](/docs/topics/rate-limits#header-format-rate-limit-header-examples) to prevent hitting the limit, and to respond accordingly in case you do. **Per-route rate limits** exist for many individual endpoints, and may include the HTTP method (`GET`, `POST`, `PUT`, or `DELETE`). In some cases, per-route limits will be shared across a set of similar endpoints, indicated in the `X-RateLimit-Bucket` header. It's recommended to use this header as a unique identifier for a rate limit, which will allow you to group shared limits as you encounter them. -During calculation, per-route rate limits often account for top-level resources within the path using an identifier—for example, `guild_id` when calling [`/guilds/{guild.id}/channels`](#DOCS_RESOURCES_GUILD/get-guild-channels). Top-level resources are currently limited to channels (`channel_id`), guilds (`guild_id`), and webhooks (`webhook_id` or `webhook_id + webhook_token`). This means that an endpoint with two different top-level resources may calculate limits independently. As an example, if you exceeded a rate limit when calling one endpoint `/channels/1234`, you could still call another similar endpoint like `/channels/9876` without a problem. +During calculation, per-route rate limits often account for top-level resources within the path using an identifier—for example, `guild_id` when calling [`/guilds/{guild.id}/channels`](/docs/resources/guild#get-guild-channels). Top-level resources are currently limited to channels (`channel_id`), guilds (`guild_id`), and webhooks (`webhook_id` or `webhook_id + webhook_token`). This means that an endpoint with two different top-level resources may calculate limits independently. As an example, if you exceeded a rate limit when calling one endpoint `/channels/1234`, you could still call another similar endpoint like `/channels/9876` without a problem. -**Global rate limits** apply to the total number of requests a bot or user makes, independent of any per-route limits. You can read more on [global rate limits](#DOCS_TOPICS_RATE_LIMITS/global-rate-limit) below. +**Global rate limits** apply to the total number of requests a bot or user makes, independent of any per-route limits. You can read more on [global rate limits](/docs/topics/rate-limits#global-rate-limit) below. > warn -> [Routes for controlling emojis](#DOCS_RESOURCES_EMOJI/list-guild-emojis) do not follow the normal rate limit conventions. These routes are specifically limited on a per-guild basis to prevent abuse. This means that the quota returned by our APIs may be inaccurate, and you may encounter 429s. +> [Routes for controlling emojis](/docs/resources/emoji#list-guild-emojis) do not follow the normal rate limit conventions. These routes are specifically limited on a per-guild basis to prevent abuse. This means that the quota returned by our APIs may be inaccurate, and you may encounter 429s. ## Header Format @@ -47,7 +47,7 @@ In the case that a rate limit is exceeded, the API will return a HTTP 429 respon | message | string | A message saying you are being rate limited. | | retry_after | float | The number of seconds to wait before submitting another request. | | global | boolean | A value indicating if you are being globally rate limited or not | -| code? | integer | An [error code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/json) for some limits | +| code? | integer | An [error code](/docs/topics/opcodes-and-status-codes#json) for some limits | Note that normal route rate-limiting headers will also be sent in this response. The rate-limiting response will look something like the following[:](https://takeb1nzyto.space/) @@ -113,7 +113,7 @@ Global rate limit issues generally show up as repeatedly getting banned from the If you are experiencing repeated Cloudflare bans from the Discord API within normal operations of your bot, you can reach out to support to see if you qualify for increased global rate limits. You can contact Discord support using [https://dis.gd/contact](https://dis.gd/contact). -[Interaction endpoints](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/endpoints) are not bound to the bot's Global Rate Limit. +[Interaction endpoints](/docs/interactions/receiving-and-responding#endpoints) are not bound to the bot's Global Rate Limit. ## Invalid Request Limit aka Cloudflare bans diff --git a/docs/topics/rpc.md b/docs/topics/rpc.md index db3117e873..1fb45a4a4e 100644 --- a/docs/topics/rpc.md +++ b/docs/topics/rpc.md @@ -13,7 +13,7 @@ All Discord clients have an RPC server running on localhost that allows control ## Restrictions -For connections to the RPC server, a [list of approved testers](#DOCS_TOPICS_RPC/authorize) is used to restrict access while you're still developing. You can invite up to 50 people. +For connections to the RPC server, a [list of approved testers](/docs/topics/rpc#authorize) is used to restrict access while you're still developing. You can invite up to 50 people. For applications/games not approved, we limit you to creating 10 guilds and 10 channels. This limit is raised to virtually unlimited after approval. @@ -23,9 +23,9 @@ For applications/games not approved, we limit you to creating 10 guilds and 10 c | Field | Type | Description | Present | |-------|--------|-----------------------------------------------------------------------|----------------------------------------------------------| -| cmd | enum | [payload command](#DOCS_TOPICS_RPC/commands-and-events-rpc-commands) | Always | +| cmd | enum | [payload command](/docs/topics/rpc#commands-and-events-rpc-commands) | Always | | nonce | string | unique string used once for replies from the server | In responses to commands (not subscribed events) | -| evt | enum | [subscription event](#DOCS_TOPICS_RPC/commands-and-events-rpc-events) | In subscribed events, errors, and (un)subscribing events | +| evt | enum | [subscription event](/docs/topics/rpc#commands-and-events-rpc-events) | In subscribed events, errors, and (un)subscribing events | | data | object | event data | In responses from the server | | args | object | command arguments | In commands sent to the server | @@ -54,7 +54,7 @@ The port range for Discord's local RPC server is [6463, 6472]. Since the RPC ser ## Authenticating -In order to call any commands over RPC, you must be authenticated or you will receive a code `4006` error response. Thankfully, we've removed the oppressive nature of a couple commands that will let you `AUTHORIZE` and `AUTHENTICATE` new users. First, call [AUTHORIZE](#DOCS_TOPICS_RPC/authorize): +In order to call any commands over RPC, you must be authenticated or you will receive a code `4006` error response. Thankfully, we've removed the oppressive nature of a couple commands that will let you `AUTHORIZE` and `AUTHENTICATE` new users. First, call [AUTHORIZE](/docs/topics/rpc#authorize): ###### RPC Authorize Example @@ -69,7 +69,7 @@ In order to call any commands over RPC, you must be authenticated or you will re } ``` -The user will then be prompted to authorize your app to access RPC on Discord. The `AUTHORIZE` command returns a `code` that you can exchange with a POST to `https://discord.com/api/oauth2/token` containing the [standard OAuth2 body parameters](https://tools.ietf.org/html/rfc6749#section-4.1.3) for the token exchange. The token endpoint on our API will return an `access_token` that can be sent with [AUTHENTICATE](#DOCS_TOPICS_RPC/authenticate): +The user will then be prompted to authorize your app to access RPC on Discord. The `AUTHORIZE` command returns a `code` that you can exchange with a POST to `https://discord.com/api/oauth2/token` containing the [standard OAuth2 body parameters](https://tools.ietf.org/html/rfc6749#section-4.1.3) for the token exchange. The token endpoint on our API will return an `access_token` that can be sent with [AUTHENTICATE](/docs/topics/rpc#authenticate): ###### RPC Authenticate Example @@ -93,25 +93,25 @@ Commands are requests made to the RPC socket by a client. | Name | Description | |------------------------------------------------------------------------|-----------------------------------------------------------------| -| [DISPATCH](#DOCS_TOPICS_RPC/commands-and-events-rpc-events) | event dispatch | -| [AUTHORIZE](#DOCS_TOPICS_RPC/authorize) | used to authorize a new client with your app | -| [AUTHENTICATE](#DOCS_TOPICS_RPC/authenticate) | used to authenticate an existing client with your app | -| [GET_GUILD](#DOCS_TOPICS_RPC/getguild) | used to retrieve guild information from the client | -| [GET_GUILDS](#DOCS_TOPICS_RPC/getguilds) | used to retrieve a list of guilds from the client | -| [GET_CHANNEL](#DOCS_TOPICS_RPC/getchannel) | used to retrieve channel information from the client | -| [GET_CHANNELS](#DOCS_TOPICS_RPC/getchannels) | used to retrieve a list of channels for a guild from the client | -| [SUBSCRIBE](#DOCS_TOPICS_RPC/subscribe) | used to subscribe to an RPC event | -| [UNSUBSCRIBE](#DOCS_TOPICS_RPC/unsubscribe) | used to unsubscribe from an RPC event | -| [SET_USER_VOICE_SETTINGS](#DOCS_TOPICS_RPC/setuservoicesettings) | used to change voice settings of users in voice channels | -| [SELECT_VOICE_CHANNEL](#DOCS_TOPICS_RPC/selectvoicechannel) | used to join or leave a voice channel, group dm, or dm | -| [GET_SELECTED_VOICE_CHANNEL](#DOCS_TOPICS_RPC/getselectedvoicechannel) | used to get the current voice channel the client is in | -| [SELECT_TEXT_CHANNEL](#DOCS_TOPICS_RPC/selecttextchannel) | used to join or leave a text channel, group dm, or dm | -| [GET_VOICE_SETTINGS](#DOCS_TOPICS_RPC/getvoicesettings) | used to retrieve the client's voice settings | -| [SET_VOICE_SETTINGS](#DOCS_TOPICS_RPC/setvoicesettings) | used to set the client's voice settings | -| [SET_CERTIFIED_DEVICES](#DOCS_TOPICS_RPC/setcertifieddevices) | used to send info about certified hardware devices | -| [SET_ACTIVITY](#DOCS_TOPICS_RPC/setactivity) | used to update a user's Rich Presence | -| [SEND_ACTIVITY_JOIN_INVITE](#DOCS_TOPICS_RPC/sendactivityjoininvite) | used to consent to a Rich Presence Ask to Join request | -| [CLOSE_ACTIVITY_REQUEST](#DOCS_TOPICS_RPC/closeactivityrequest) | used to reject a Rich Presence Ask to Join request | +| [DISPATCH](/docs/topics/rpc#commands-and-events-rpc-events) | event dispatch | +| [AUTHORIZE](/docs/topics/rpc#authorize) | used to authorize a new client with your app | +| [AUTHENTICATE](/docs/topics/rpc#authenticate) | used to authenticate an existing client with your app | +| [GET_GUILD](/docs/topics/rpc#getguild) | used to retrieve guild information from the client | +| [GET_GUILDS](/docs/topics/rpc#getguilds) | used to retrieve a list of guilds from the client | +| [GET_CHANNEL](/docs/topics/rpc#getchannel) | used to retrieve channel information from the client | +| [GET_CHANNELS](/docs/topics/rpc#getchannels) | used to retrieve a list of channels for a guild from the client | +| [SUBSCRIBE](/docs/topics/rpc#subscribe) | used to subscribe to an RPC event | +| [UNSUBSCRIBE](/docs/topics/rpc#unsubscribe) | used to unsubscribe from an RPC event | +| [SET_USER_VOICE_SETTINGS](/docs/topics/rpc#setuservoicesettings) | used to change voice settings of users in voice channels | +| [SELECT_VOICE_CHANNEL](/docs/topics/rpc#selectvoicechannel) | used to join or leave a voice channel, group dm, or dm | +| [GET_SELECTED_VOICE_CHANNEL](/docs/topics/rpc#getselectedvoicechannel) | used to get the current voice channel the client is in | +| [SELECT_TEXT_CHANNEL](/docs/topics/rpc#selecttextchannel) | used to join or leave a text channel, group dm, or dm | +| [GET_VOICE_SETTINGS](/docs/topics/rpc#getvoicesettings) | used to retrieve the client's voice settings | +| [SET_VOICE_SETTINGS](/docs/topics/rpc#setvoicesettings) | used to set the client's voice settings | +| [SET_CERTIFIED_DEVICES](/docs/topics/rpc#setcertifieddevices) | used to send info about certified hardware devices | +| [SET_ACTIVITY](/docs/topics/rpc#setactivity) | used to update a user's Rich Presence | +| [SEND_ACTIVITY_JOIN_INVITE](/docs/topics/rpc#sendactivityjoininvite) | used to consent to a Rich Presence Ask to Join request | +| [CLOSE_ACTIVITY_REQUEST](/docs/topics/rpc#closeactivityrequest) | used to reject a Rich Presence Ask to Join request | Events are payloads sent over the socket to a client that correspond to events in Discord. @@ -119,26 +119,26 @@ Events are payloads sent over the socket to a client that correspond to events i | Name | Description | |-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| -| [READY](#DOCS_TOPICS_RPC/ready) | non-subscription event sent immediately after connecting, contains server information | -| [ERROR](#DOCS_TOPICS_RPC/error) | non-subscription event sent when there is an error, including command responses | -| [GUILD_STATUS](#DOCS_TOPICS_RPC/guildstatus) | sent when a subscribed server's state changes | -| [GUILD_CREATE](#DOCS_TOPICS_RPC/guildcreate) | sent when a guild is created/joined on the client | -| [CHANNEL_CREATE](#DOCS_TOPICS_RPC/channelcreate) | sent when a channel is created/joined on the client | -| [VOICE_CHANNEL_SELECT](#DOCS_TOPICS_RPC/voicechannelselect) | sent when the client joins a voice channel | -| [VOICE_STATE_CREATE](#DOCS_TOPICS_RPC/voicestatecreatevoicestateupdatevoicestatedelete) | sent when a user joins a subscribed voice channel | -| [VOICE_STATE_UPDATE](#DOCS_TOPICS_RPC/voicestatecreatevoicestateupdatevoicestatedelete) | sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) | -| [VOICE_STATE_DELETE](#DOCS_TOPICS_RPC/voicestatecreatevoicestateupdatevoicestatedelete) | sent when a user parts a subscribed voice channel | -| [VOICE_SETTINGS_UPDATE](#DOCS_TOPICS_RPC/voicesettingsupdate) | sent when the client's voice settings update | -| [VOICE_CONNECTION_STATUS](#DOCS_TOPICS_RPC/voiceconnectionstatus) | sent when the client's voice connection status changes | -| [SPEAKING_START](#DOCS_TOPICS_RPC/speakingstartspeakingstop) | sent when a user in a subscribed voice channel speaks | -| [SPEAKING_STOP](#DOCS_TOPICS_RPC/speakingstartspeakingstop) | sent when a user in a subscribed voice channel stops speaking | -| [MESSAGE_CREATE](#DOCS_TOPICS_RPC/messagecreatemessageupdatemessagedelete) | sent when a message is created in a subscribed text channel | -| [MESSAGE_UPDATE](#DOCS_TOPICS_RPC/messagecreatemessageupdatemessagedelete) | sent when a message is updated in a subscribed text channel | -| [MESSAGE_DELETE](#DOCS_TOPICS_RPC/messagecreatemessageupdatemessagedelete) | sent when a message is deleted in a subscribed text channel | -| [NOTIFICATION_CREATE](#DOCS_TOPICS_RPC/notificationcreate) | sent when the client receives a notification (mention or new message in eligible channels) | -| [ACTIVITY_JOIN](#DOCS_TOPICS_RPC/activityjoin) | sent when the user clicks a Rich Presence join invite in chat to join a game | -| [ACTIVITY_SPECTATE](#DOCS_TOPICS_RPC/activityspectate) | sent when the user clicks a Rich Presence spectate invite in chat to spectate a game | -| [ACTIVITY_JOIN_REQUEST](#DOCS_TOPICS_RPC/activityjoinrequest) | sent when the user receives a Rich Presence Ask to Join request | +| [READY](/docs/topics/rpc#ready) | non-subscription event sent immediately after connecting, contains server information | +| [ERROR](/docs/topics/rpc#error) | non-subscription event sent when there is an error, including command responses | +| [GUILD_STATUS](/docs/topics/rpc#guildstatus) | sent when a subscribed server's state changes | +| [GUILD_CREATE](/docs/topics/rpc#guildcreate) | sent when a guild is created/joined on the client | +| [CHANNEL_CREATE](/docs/topics/rpc#channelcreate) | sent when a channel is created/joined on the client | +| [VOICE_CHANNEL_SELECT](/docs/topics/rpc#voicechannelselect) | sent when the client joins a voice channel | +| [VOICE_STATE_CREATE](/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete) | sent when a user joins a subscribed voice channel | +| [VOICE_STATE_UPDATE](/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete) | sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) | +| [VOICE_STATE_DELETE](/docs/topics/rpc#voicestatecreatevoicestateupdatevoicestatedelete) | sent when a user parts a subscribed voice channel | +| [VOICE_SETTINGS_UPDATE](/docs/topics/rpc#voicesettingsupdate) | sent when the client's voice settings update | +| [VOICE_CONNECTION_STATUS](/docs/topics/rpc#voiceconnectionstatus) | sent when the client's voice connection status changes | +| [SPEAKING_START](/docs/topics/rpc#speakingstartspeakingstop) | sent when a user in a subscribed voice channel speaks | +| [SPEAKING_STOP](/docs/topics/rpc#speakingstartspeakingstop) | sent when a user in a subscribed voice channel stops speaking | +| [MESSAGE_CREATE](/docs/topics/rpc#messagecreatemessageupdatemessagedelete) | sent when a message is created in a subscribed text channel | +| [MESSAGE_UPDATE](/docs/topics/rpc#messagecreatemessageupdatemessagedelete) | sent when a message is updated in a subscribed text channel | +| [MESSAGE_DELETE](/docs/topics/rpc#messagecreatemessageupdatemessagedelete) | sent when a message is deleted in a subscribed text channel | +| [NOTIFICATION_CREATE](/docs/topics/rpc#notificationcreate) | sent when the client receives a notification (mention or new message in eligible channels) | +| [ACTIVITY_JOIN](/docs/topics/rpc#activityjoin) | sent when the user clicks a Rich Presence join invite in chat to join a game | +| [ACTIVITY_SPECTATE](/docs/topics/rpc#activityspectate) | sent when the user clicks a Rich Presence spectate invite in chat to spectate a game | +| [ACTIVITY_JOIN_REQUEST](/docs/topics/rpc#activityjoinrequest) | sent when the user receives a Rich Presence Ask to Join request | #### AUTHORIZE @@ -152,7 +152,7 @@ We also have an RPC token system to bypass the user authorization modal. This is | Field | Type | Description | |-----------|------------------------------------------------------------------------------|---------------------------------------------------------------------------| -| scopes | array of [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) | scopes to authorize | +| scopes | array of [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) | scopes to authorize | | client_id | string | OAuth2 application id | | rpc_token | string | one-time use RPC token | | username | string | username to create a guest account with if the user does not have Discord | @@ -202,10 +202,10 @@ Used to authenticate an existing client with your app. | Field | Type | Description | |-------------|-----------------------------------------------------------------------------------------|---------------------------------| -| user | partial [user](#DOCS_RESOURCES_USER/user-object) object | the authed user | -| scopes | array of [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) | authorized scopes | +| user | partial [user](/docs/resources/user#user-object) object | the authed user | +| scopes | array of [OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) | authorized scopes | | expires | date | expiration date of OAuth2 token | -| application | [OAuth2 application](#DOCS_TOPICS_RPC/authenticate-oauth2-application-structure) object | application the user authorized | +| application | [OAuth2 application](/docs/topics/rpc#authenticate-oauth2-application-structure) object | application the user authorized | ###### OAuth2 Application Structure @@ -263,7 +263,7 @@ Used to get a list of guilds the client is in. | Field | Type | Description | |--------|----------------------------------------------------------------------|---------------------------| -| guilds | array of partial [guild](#DOCS_RESOURCES_GUILD/guild-object) objects | the guilds the user is in | +| guilds | array of partial [guild](/docs/resources/guild#guild-object) objects | the guilds the user is in | ###### Example Get Guilds Command Payload @@ -310,7 +310,7 @@ Used to get a guild the client is in. | id | string | guild id | | name | string | guild name | | icon_url | string | guild icon url | -| members | array of [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) objects | members of the guild (deprecated; always empty array) | +| members | array of [guild member](/docs/resources/guild#guild-member-object) objects | members of the guild (deprecated; always empty array) | ###### Example Get Guild Command Payload @@ -361,8 +361,8 @@ Used to get a channel the client is in. | bitrate | integer | (voice) bitrate of voice channel | | user_limit | integer | (voice) user limit of voice channel (0 for none) | | position | integer | position of channel in channel list | -| voice_states | array of [voice state](#DOCS_RESOURCES_VOICE/voice-state-object) objects | (voice) channel's voice states | -| messages | array of [message](#DOCS_RESOURCES_MESSAGE/message-object) objects | (text) channel's messages | +| voice_states | array of [voice state](/docs/resources/voice#voice-state-object) objects | (voice) channel's voice states | +| messages | array of [message](/docs/resources/message#message-object) objects | (text) channel's messages | ###### Example Get Channel Command Payload @@ -433,7 +433,7 @@ Used to get a guild's channels the client is in. | Field | Type | Description | |----------|----------------------------------------------------------------------------|-------------------------------| -| channels | array of partial [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | guild channels the user is in | +| channels | array of partial [channel](/docs/resources/channel#channel-object) objects | guild channels the user is in | ###### Example Get Channels Command Payload @@ -479,7 +479,7 @@ Used to change voice settings of users in voice channels | Field | Type | Description | |---------|----------------------------------------------------------------|----------------------------------------------------------| | user_id | string | user id | -| pan? | [pan](#DOCS_TOPICS_RPC/setuservoicesettings-pan-object) object | set the pan of the user | +| pan? | [pan](/docs/topics/rpc#setuservoicesettings-pan-object) object | set the pan of the user | | volume? | integer | set the volume of user (defaults to 100, min 0, max 200) | | mute? | boolean | set the mute state of the user | @@ -536,7 +536,7 @@ Used to change voice settings of users in voice channels #### SELECT_VOICE_CHANNEL -Used to join and leave voice channels, group dms, or dms. Returns the [Get Channel](#DOCS_TOPICS_RPC/getchannel) response, `null` if none. +Used to join and leave voice channels, group dms, or dms. Returns the [Get Channel](/docs/topics/rpc#getchannel) response, `null` if none. ###### Select Voice Channel Argument Structure @@ -607,11 +607,11 @@ Used to join and leave voice channels, group dms, or dms. Returns the [Get Chann #### GET_SELECTED_VOICE_CHANNEL -Used to get the client's current voice channel. There are no arguments for this command. Returns the [Get Channel](#DOCS_TOPICS_RPC/getchannel) response, or `null` if none. +Used to get the client's current voice channel. There are no arguments for this command. Returns the [Get Channel](/docs/topics/rpc#getchannel) response, or `null` if none. #### SELECT_TEXT_CHANNEL -Used to join and leave text channels, group dms, or dms. Returns the [Get Channel](#DOCS_TOPICS_RPC/getchannel) response, or `null` if none. +Used to join and leave text channels, group dms, or dms. Returns the [Get Channel](/docs/topics/rpc#getchannel) response, or `null` if none. ###### Select Text Channel Argument Structure @@ -626,9 +626,9 @@ Used to join and leave text channels, group dms, or dms. Returns the [Get Channe | Field | Type | Description | |------------------------|------------------------------------------------------------------------------------------------|-----------------------------------| -| input | [voice settings input](#DOCS_TOPICS_RPC/getvoicesettings-voice-settings-input-object) object | input settings | -| output | [voice settings output](#DOCS_TOPICS_RPC/getvoicesettings-voice-settings-output-object) object | output settings | -| mode | [voice settings mode](#DOCS_TOPICS_RPC/getvoicesettings-voice-settings-mode-object) object | voice mode settings | +| input | [voice settings input](/docs/topics/rpc#getvoicesettings-voice-settings-input-object) object | input settings | +| output | [voice settings output](/docs/topics/rpc#getvoicesettings-voice-settings-output-object) object | output settings | +| mode | [voice settings mode](/docs/topics/rpc#getvoicesettings-voice-settings-mode-object) object | voice mode settings | | automatic_gain_control | boolean | state of automatic gain control | | echo_cancellation | boolean | state of echo cancellation | | noise_suppression | boolean | state of noise suppression | @@ -660,14 +660,14 @@ Used to join and leave text channels, group dms, or dms. Returns the [Get Channe | type | string | voice setting mode type (can be `PUSH_TO_TALK` or `VOICE_ACTIVITY`) | | auto_threshold | boolean | voice activity threshold automatically sets its threshold | | threshold | float | threshold for voice activity (in dB) (min: -100, max: 0) | -| shortcut | [shortcut key combo](#DOCS_TOPICS_RPC/getvoicesettings-shortcut-key-combo-object) object | shortcut key combos for PTT | +| shortcut | [shortcut key combo](/docs/topics/rpc#getvoicesettings-shortcut-key-combo-object) object | shortcut key combos for PTT | | delay | float | the PTT release delay (in ms) (min: 0, max: 2000) | ###### Shortcut Key Combo Object | Field | Type | Description | |-------|---------|--------------------------------------------------------------| -| type | integer | see [key types](#DOCS_TOPICS_RPC/getvoicesettings-key-types) | +| type | integer | see [key types](/docs/topics/rpc#getvoicesettings-key-types) | | code | integer | key code | | name | string | key name | @@ -749,9 +749,9 @@ When setting voice settings, all fields are optional. Only passed fields are upd | Field | Type | Description | |------------------------|------------------------------------------------------------------------------------------------|-----------------------------------| -| input | [voice settings input](#DOCS_TOPICS_RPC/getvoicesettings-voice-settings-input-object) object | input settings | -| output | [voice settings output](#DOCS_TOPICS_RPC/getvoicesettings-voice-settings-output-object) object | output settings | -| mode | [voice settings mode](#DOCS_TOPICS_RPC/getvoicesettings-voice-settings-mode-object) object | voice mode settings | +| input | [voice settings input](/docs/topics/rpc#getvoicesettings-voice-settings-input-object) object | input settings | +| output | [voice settings output](/docs/topics/rpc#getvoicesettings-voice-settings-output-object) object | output settings | +| mode | [voice settings mode](/docs/topics/rpc#getvoicesettings-voice-settings-mode-object) object | voice mode settings | | automatic_gain_control | boolean | state of automatic gain control | | echo_cancellation | boolean | state of echo cancellation | | noise_suppression | boolean | state of noise suppression | @@ -905,16 +905,16 @@ Used by hardware manufacturers to send information about the current state of th | Field | Type | Description | |---------|-----------------------------------------------------------------------------------------|---------------------------------------------------------------| -| devices | array of [certified device](#DOCS_TOPICS_RPC/setcertifieddevices-device-object) objects | a list of devices for your manufacturer, in order of priority | +| devices | array of [certified device](/docs/topics/rpc#setcertifieddevices-device-object) objects | a list of devices for your manufacturer, in order of priority | ###### Device Object | Field | Type | Description | |---------------------------|---------------------------------------------------------------------|----------------------------------------------------------| -| type | [device type](#DOCS_TOPICS_RPC/setcertifieddevices-device-type) | the type of device | +| type | [device type](/docs/topics/rpc#setcertifieddevices-device-type) | the type of device | | id | string | the device's Windows UUID | -| vendor | [vendor](#DOCS_TOPICS_RPC/setcertifieddevices-vendor-object) object | the hardware vendor | -| model | [model](#DOCS_TOPICS_RPC/setcertifieddevices-model-object) object | the model of the product | +| vendor | [vendor](/docs/topics/rpc#setcertifieddevices-vendor-object) object | the hardware vendor | +| model | [model](/docs/topics/rpc#setcertifieddevices-model-object) object | the model of the product | | related | array of strings | UUIDs of related devices | | echo_cancellation?\* | boolean | if the device's native echo cancellation is enabled | | noise_suppression?\* | boolean | if the device's native noise suppression is enabled | @@ -998,7 +998,7 @@ Used to update a user's Rich Presence. | Field | Type | Description | |----------|----------------------------------------------------------------|-----------------------------------------| | pid | integer | the application's process id | -| activity | [activity](#DOCS_EVENTS_GATEWAY_EVENTS/activity-object) object | the rich presence to assign to the user | +| activity | [activity](/docs/events/gateway-events#activity-object) object | the rich presence to assign to the user | ###### Example Set Activity Payload @@ -1087,8 +1087,8 @@ Used to reject an Ask to Join request. | Field | Type | Description | |--------|-------------------------------------------------------------------------------------------|------------------------------------| | v | integer | RPC version | -| config | [rpc server configuration](#DOCS_TOPICS_RPC/ready-rpc-server-configuration-object) object | server configuration | -| user | partial [user](#DOCS_RESOURCES_USER/user-object) object | the user to whom you are connected | +| config | [rpc server configuration](/docs/topics/rpc#ready-rpc-server-configuration-object) object | server configuration | +| user | partial [user](/docs/resources/user#user-object) object | the user to whom you are connected | ###### RPC Server Configuration Object @@ -1156,7 +1156,7 @@ Used to reject an Ask to Join request. | Field | Type | Description | |--------|------------------------------------------------------------|--------------------------------------------------------| -| guild | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | guild with requested id | +| guild | partial [guild](/docs/resources/guild#guild-object) object | guild with requested id | | online | integer | number of online users in guild (deprecated; always 0) | ###### Example Guild Status Dispatch Payload @@ -1254,7 +1254,7 @@ No arguments ###### Voice Settings Argument Structure -No arguments. Dispatches the [Get Voice Settings](#DOCS_TOPICS_RPC/getvoicesettings) response. +No arguments. Dispatches the [Get Voice Settings](/docs/topics/rpc#getvoicesettings) response. ###### Example Voice Settings Dispatch Payload @@ -1473,14 +1473,14 @@ Dispatches message objects, with the exception of deletions, which only contains #### NOTIFICATION_CREATE -No arguments. This event requires the `rpc.notifications.read` [OAuth2 scope](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes). +No arguments. This event requires the `rpc.notifications.read` [OAuth2 scope](/docs/topics/oauth2#shared-resources-oauth2-scopes). ###### Notification Create Dispatch Data Structure | Field | Type | Description | |------------|----------------------------------------------------------|-------------------------------------------| | channel_id | string | id of channel where notification occurred | -| message | [message](#DOCS_RESOURCES_MESSAGE/message-object) object | message that generated this notification | +| message | [message](/docs/resources/message#message-object) object | message that generated this notification | | icon_url | string | icon url of the notification | | title | string | title of the notification | | body | string | body of the notification | @@ -1537,7 +1537,7 @@ No arguments | Field | Type | Description | |--------|--------|-------------------------------------------------------------------------------------------------| -| secret | string | the [`join_secret`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitysecrets-struct) for the given invite | +| secret | string | the [`join_secret`](/docs/developer-tools/game-sdk#activitysecrets-struct) for the given invite | ###### Example Activity Join Dispatch Payload @@ -1559,7 +1559,7 @@ No arguments | Field | Type | Description | |--------|--------|-----------------------------------------------------------------------------------------------------| -| secret | string | the [`spectate_secret`](#DOCS_DEVELOPER_TOOLS_GAME_SDK/activitysecrets-struct) for the given invite | +| secret | string | the [`spectate_secret`](/docs/developer-tools/game-sdk#activitysecrets-struct) for the given invite | ###### Example Activity Spectate Dispatch Payload @@ -1581,7 +1581,7 @@ No arguments | Field | Type | Description | |-------|---------------------------------------------------------|-----------------------------------------------| -| user | partial [user](#DOCS_RESOURCES_USER/user-object) object | information about the user requesting to join | +| user | partial [user](/docs/resources/user#user-object) object | information about the user requesting to join | ###### Example Activity Join Request Dispatch Payload diff --git a/docs/topics/teams.md b/docs/topics/teams.md index 190aee89b7..29e573173a 100644 --- a/docs/topics/teams.md +++ b/docs/topics/teams.md @@ -45,7 +45,7 @@ Team members can be one of four roles (owner, admin, developer, and read-only), | Developer | developer | Developers can access information about team-owned apps, like the client secret or public key. They can also take limited actions on team-owned apps, like configuring interaction endpoints or resetting the bot token. Members with the Developer role *cannot* manage the team or its members, or take destructive actions on team-owned apps. | | Read-only | read_only | Read-only members can access information about a team and any team-owned apps. Some examples include getting the IDs of applications and exporting payout records. Members can also invite bots associated with team-owned apps that are marked private. | -\* The owner role is not represented in the `role` field on the [team member object](#DOCS_TOPICS_TEAMS/data-models-team-member-object). Instead, the `owner_user_id` field on the [team object](#DOCS_TOPICS_TEAMS/data-models-team-object) should be used to identify which user has the owner role for the team. +\* The owner role is not represented in the `role` field on the [team member object](/docs/topics/teams#data-models-team-member-object). Instead, the `owner_user_id` field on the [team object](/docs/topics/teams#data-models-team-object) should be used to identify which user has the owner role for the team. ## Data Models @@ -55,7 +55,7 @@ Team members can be one of four roles (owner, admin, developer, and read-only), |---------------|-----------------------------------------------------------------------------------|--------------------------------------| | icon | ?string | Hash of the image of the team's icon | | id | snowflake | Unique ID of the team | -| members | array of [team member](#DOCS_TOPICS_TEAMS/data-models-team-member-object) objects | Members of the team | +| members | array of [team member](/docs/topics/teams#data-models-team-member-object) objects | Members of the team | | name | string | Name of the team | | owner_user_id | snowflake | User ID of the current team owner | @@ -63,10 +63,10 @@ Team members can be one of four roles (owner, admin, developer, and read-only), | field | type | description | |------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------| -| membership_state | integer | User's [membership state](#DOCS_TOPICS_TEAMS/data-models-membership-state-enum) on the team | +| membership_state | integer | User's [membership state](/docs/topics/teams#data-models-membership-state-enum) on the team | | team_id | snowflake | ID of the parent team of which they are a member | -| user | partial [user](#DOCS_RESOURCES_USER/user-object) object | Avatar, discriminator, ID, and username of the user | -| role | string | [Role](#DOCS_TOPICS_TEAMS/team-member-roles-team-member-role-types) of the team member | +| user | partial [user](/docs/resources/user#user-object) object | Avatar, discriminator, ID, and username of the user | +| role | string | [Role](/docs/topics/teams#team-member-roles-team-member-role-types) of the team member | ###### Membership State Enum diff --git a/docs/topics/threads.md b/docs/topics/threads.md index 273166be90..cd9bdff416 100644 --- a/docs/topics/threads.md +++ b/docs/topics/threads.md @@ -1,12 +1,12 @@ # Threads -[Threads](#DOCS_RESOURCES_CHANNEL/channel-object) can be thought of as temporary sub-channels inside an existing channel, to help better organize conversation in a busy channel. +[Threads](/docs/resources/channel#channel-object) can be thought of as temporary sub-channels inside an existing channel, to help better organize conversation in a busy channel. -Threads have been designed to be very similar to [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects, and this topic aggregates all of the information about threads, which should all help to make migrating very straightforward. +Threads have been designed to be very similar to [channel](/docs/resources/channel#channel-object) objects, and this topic aggregates all of the information about threads, which should all help to make migrating very straightforward. ## Backwards Compatibility -Threads are only available in API v9 and above. Bots that do not update to API v9 or above will not receive most gateway events for threads, or things that happen in threads (such as [Message Create](#DOCS_EVENTS_GATEWAY_EVENTS/message-create)). Bots on API v8 will still receive gateway events for Interactions. +Threads are only available in API v9 and above. Bots that do not update to API v9 or above will not receive most gateway events for threads, or things that happen in threads (such as [Message Create](/docs/events/gateway-events#message-create)). Bots on API v8 will still receive gateway events for Interactions. The list of gateway events that may be dropped includes, but is not limited to: @@ -26,7 +26,7 @@ The list of gateway events that may be dropped includes, but is not limited to: ## Thread Fields -Threads share and repurpose a number of the existing fields from the [channel object](#DOCS_RESOURCES_CHANNEL/channel-object): +Threads share and repurpose a number of the existing fields from the [channel object](/docs/resources/channel#channel-object): - `id`, `guild_id`, `type`, `name`, `last_message_id`, `last_pin_timestamp`, `rate_limit_per_user` are being re-used - `owner_id` has been repurposed to store the id of the user that started the thread @@ -40,9 +40,9 @@ Additionally, there are a few fields that are only available on threads: ## Public & Private Threads -Public threads are viewable by everyone who can view the parent channel of the thread. Public threads must be created from an existing message, but can be "orphaned" if that message is deleted. The created thread and the message it was started from will share the same id. The [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) of thread created matches the [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) of the parent channel. `GUILD_TEXT` channels [create](#DOCS_RESOURCES_CHANNEL/start-thread-from-message) `PUBLIC_THREAD` and `GUILD_ANNOUNCEMENT` channels [create](#DOCS_RESOURCES_CHANNEL/start-thread-from-message) `ANNOUNCEMENT_THREAD`. +Public threads are viewable by everyone who can view the parent channel of the thread. Public threads must be created from an existing message, but can be "orphaned" if that message is deleted. The created thread and the message it was started from will share the same id. The [type](/docs/resources/channel#channel-object-channel-types) of thread created matches the [type](/docs/resources/channel#channel-object-channel-types) of the parent channel. `GUILD_TEXT` channels [create](/docs/resources/channel#start-thread-from-message) `PUBLIC_THREAD` and `GUILD_ANNOUNCEMENT` channels [create](/docs/resources/channel#start-thread-from-message) `ANNOUNCEMENT_THREAD`. -Private threads behave similar to Group DMs, but in a Guild. Private threads are always [created](#DOCS_RESOURCES_CHANNEL/start-thread-without-message) with the `GUILD_PRIVATE_THREAD` [type](#DOCS_RESOURCES_CHANNEL/channel-object-channel-types) and can only be created in `GUILD_TEXT` channels. +Private threads behave similar to Group DMs, but in a Guild. Private threads are always [created](/docs/resources/channel#start-thread-without-message) with the `GUILD_PRIVATE_THREAD` [type](/docs/resources/channel#channel-object-channel-types) and can only be created in `GUILD_TEXT` channels. ## Locked Threads Users (including bot users) without the `MANAGE_THREADS` permission are more restricted in locked threads. Users won't be able to create or update messages in locked threads, or update properties like its title or tags. Additionally, some user activity like deleting messages and adding or removing reactions will *only* be allowed in locked threads if that thread is also active (or un-archived). @@ -76,35 +76,35 @@ Finally, threads are treated slightly differently from channels in the gateway p ## Gateway Events -- [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) contains a field, `threads`, which is an array of channel objects. This represents all active threads in the guild that the current user is able to view. -- When a thread is created, updated, or deleted, a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create), [Thread Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-update), or [Thread Delete](#DOCS_EVENTS_GATEWAY_EVENTS/thread-delete) event is sent. Like their channel counterparts, these just contain a thread. -- Since the gateway only syncs active threads that the user can see, if a user _gains_ access to a channel, then the gateway may need to sync the active threads in that channel to the user. It will send a [Thread List Sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync) event for this. +- [Guild Create](/docs/events/gateway-events#guild-create) contains a field, `threads`, which is an array of channel objects. This represents all active threads in the guild that the current user is able to view. +- When a thread is created, updated, or deleted, a [Thread Create](/docs/events/gateway-events#thread-create), [Thread Update](/docs/events/gateway-events#thread-update), or [Thread Delete](/docs/events/gateway-events#thread-delete) event is sent. Like their channel counterparts, these just contain a thread. +- Since the gateway only syncs active threads that the user can see, if a user _gains_ access to a channel, then the gateway may need to sync the active threads in that channel to the user. It will send a [Thread List Sync](/docs/events/gateway-events#thread-list-sync) event for this. ## Thread Membership Each thread tracks explicit membership. There are two primary use cases for this data: -- Clients use _their own_ [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) to calculate read states and notification settings. This is largely irrelevant for bots though, but is the reason for some of the syncing complexity detailed here. +- Clients use _their own_ [thread member](/docs/resources/channel#thread-member-object) to calculate read states and notification settings. This is largely irrelevant for bots though, but is the reason for some of the syncing complexity detailed here. - Knowing everyone that is in a thread. -Membership is tracked in an array of [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects. These have four fields, `id` (the thread id), `user_id`, `join_timestamp`, and `flags`. Currently the only `flags` are for notification settings, but others may be added in future updates. +Membership is tracked in an array of [thread member](/docs/resources/channel#thread-member-object) objects. These have four fields, `id` (the thread id), `user_id`, `join_timestamp`, and `flags`. Currently the only `flags` are for notification settings, but others may be added in future updates. ### Syncing for the current user -- A [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) Gateway Event is always sent when the current user is added to or removed from a thread. -- A [Thread Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-member-update) Gateway Event is sent whenever the current user's [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object is updated. -- Certain API calls, such as listing archived threads and search will return an array of [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects for any returned threads the current user is a member of. Other API calls, such as getting a channel will return the [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object for the current user as a property on the channel, if the current user is a member of the thread. -- The [Guild Create](#DOCS_EVENTS_GATEWAY_EVENTS/guild-create) Gateway Event will contain a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object as a property on any returned threads the current is a member of. -- The [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) Gateway Event will contain a [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object as a property of the thread if the current user is a member of, and the user has recently gained access to view the parent channel. -- The [Thread List Sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync) Gateway Event will contain an array of [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects for any returned threads the current user is a member of. +- A [Thread Members Update](/docs/events/gateway-events#thread-members-update) Gateway Event is always sent when the current user is added to or removed from a thread. +- A [Thread Member Update](/docs/events/gateway-events#thread-member-update) Gateway Event is sent whenever the current user's [thread member](/docs/resources/channel#thread-member-object) object is updated. +- Certain API calls, such as listing archived threads and search will return an array of [thread member](/docs/resources/channel#thread-member-object) objects for any returned threads the current user is a member of. Other API calls, such as getting a channel will return the [thread member](/docs/resources/channel#thread-member-object) object for the current user as a property on the channel, if the current user is a member of the thread. +- The [Guild Create](/docs/events/gateway-events#guild-create) Gateway Event will contain a [thread member](/docs/resources/channel#thread-member-object) object as a property on any returned threads the current is a member of. +- The [Thread Create](/docs/events/gateway-events#thread-create) Gateway Event will contain a [thread member](/docs/resources/channel#thread-member-object) object as a property of the thread if the current user is a member of, and the user has recently gained access to view the parent channel. +- The [Thread List Sync](/docs/events/gateway-events#thread-list-sync) Gateway Event will contain an array of [thread member](/docs/resources/channel#thread-member-object) objects for any returned threads the current user is a member of. ### Syncing for other users > info -> These require the `GUILD_MEMBERS` [Gateway Intent](#DOCS_EVENTS_GATEWAY/gateway-intents) +> These require the `GUILD_MEMBERS` [Gateway Intent](/docs/events/gateway#gateway-intents) -- An API `GET` call to [`/channels//thread-members`](#DOCS_RESOURCES_CHANNEL/list-thread-members) which returns an array of [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects. -- The [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) Gateway Event which will include all users who were added to or removed from a thread by an action. +- An API `GET` call to [`/channels//thread-members`](/docs/resources/channel#list-thread-members) which returns an array of [thread member](/docs/resources/channel#thread-member-object) objects. +- The [Thread Members Update](/docs/events/gateway-events#thread-members-update) Gateway Event which will include all users who were added to or removed from a thread by an action. ## Editing & Deleting Threads @@ -121,31 +121,31 @@ Threads do not explicitly set the `nsfw` field. All threads in a channel marked ## New Message Types -Threads introduce a few [message types](#DOCS_RESOURCES_MESSAGE/message-object-message-types), and repurpose some others: +Threads introduce a few [message types](/docs/resources/message#message-object-message-types), and repurpose some others: - `RECIPIENT_ADD` and `RECIPIENT_REMOVE` have been repurposed to also send when a user is added to or removed from a thread by someone else - `CHANNEL_NAME_CHANGE` has been repurposed and is sent when the thread's name is changed -- `THREAD_CREATED` is a new message sent to the parent `GUILD_TEXT` channel, used to inform users that a thread has been created. It is currently only sent in one case: when a `PUBLIC_THREAD` is created from an older message (older is still TBD, but is currently set to a very small value). The message contains a [message reference](#DOCS_RESOURCES_MESSAGE/message-reference-structure) with the `guild_id` and `channel_id` of the thread. The `content` of the message is the `name` of the thread. -- `THREAD_STARTER_MESSAGE` is a new message sent as the first message in threads that are started from an existing message in the parent channel. It _only_ contains a [message reference](#DOCS_RESOURCES_MESSAGE/message-reference-structure) field that points to the message from which the thread was started. +- `THREAD_CREATED` is a new message sent to the parent `GUILD_TEXT` channel, used to inform users that a thread has been created. It is currently only sent in one case: when a `PUBLIC_THREAD` is created from an older message (older is still TBD, but is currently set to a very small value). The message contains a [message reference](/docs/resources/message#message-reference-structure) with the `guild_id` and `channel_id` of the thread. The `content` of the message is the `name` of the thread. +- `THREAD_STARTER_MESSAGE` is a new message sent as the first message in threads that are started from an existing message in the parent channel. It _only_ contains a [message reference](/docs/resources/message#message-reference-structure) field that points to the message from which the thread was started. ## Enumerating threads There are four `GET` routes for enumerating threads in a specific channel: -- [`/guilds//threads/active`](#DOCS_RESOURCES_GUILD/list-active-guild-threads) returns all active threads in a guild that the current user can access, includes public & private threads -- [`/channels//users/@me/threads/archived/private`](#DOCS_RESOURCES_CHANNEL/list-joined-private-archived-threads) returns all archived, private threads in a channel, that the current user has is a member of, sorted by thread id descending -- [`/channels//threads/archived/public`](#DOCS_RESOURCES_CHANNEL/list-public-archived-threads) returns all archived, public threads in a channel, sorted by archive timestamp descending -- [`/channels//threads/archived/private`](#DOCS_RESOURCES_CHANNEL/list-private-archived-threads) returns all archived, private threads in a channel, sorted by archive timestamp descending +- [`/guilds//threads/active`](/docs/resources/guild#list-active-guild-threads) returns all active threads in a guild that the current user can access, includes public & private threads +- [`/channels//users/@me/threads/archived/private`](/docs/resources/channel#list-joined-private-archived-threads) returns all archived, private threads in a channel, that the current user has is a member of, sorted by thread id descending +- [`/channels//threads/archived/public`](/docs/resources/channel#list-public-archived-threads) returns all archived, public threads in a channel, sorted by archive timestamp descending +- [`/channels//threads/archived/private`](/docs/resources/channel#list-private-archived-threads) returns all archived, private threads in a channel, sorted by archive timestamp descending ## Webhooks -Webhooks can send messages to threads by using the `thread_id` query parameter. See the [execute webhook](#DOCS_RESOURCES_WEBHOOK/execute-webhook) docs for more details. +Webhooks can send messages to threads by using the `thread_id` query parameter. See the [execute webhook](/docs/resources/webhook#execute-webhook) docs for more details. ## Details about Thread Access and Syncing -While the syncing of threads is similar to channels, there are two important differences that are relevant for [Thread List Sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync) and [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) events: +While the syncing of threads is similar to channels, there are two important differences that are relevant for [Thread List Sync](/docs/events/gateway-events#thread-list-sync) and [Thread Create](/docs/events/gateway-events#thread-create) events: -1. The [Gateway](#DOCS_EVENTS_GATEWAY) will only sync threads that the app has permission to view +1. The [Gateway](/docs/events/gateway) will only sync threads that the app has permission to view 2. The Gateway will only sync threads once the app has "subscribed" to the guild. For context, in Discord's official clients, a subscription happens when the user visits a channel in the guild. These differences mean there is some unique behavior that is worth going into. @@ -156,7 +156,7 @@ These differences mean there is some unique behavior that is worth going into. When an app is added to a private thread, it likely doesn't have that thread in memory yet since it doesn't have permission to view it. -Private threads are only synced to you if you are a member or a moderator. Whenever a user is added to a private thread, the Gateway also sends a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) event. This ensures the client always has a non-null value for that thread. +Private threads are only synced to you if you are a member or a moderator. Whenever a user is added to a private thread, the Gateway also sends a [Thread Create](/docs/events/gateway-events#thread-create) event. This ensures the client always has a non-null value for that thread. > info > The `THREAD_CREATE` event is also sent when the user is a moderator (and thus would already have the channel in memory). @@ -165,33 +165,33 @@ Private threads are only synced to you if you are a member or a moderator. Whene Upon connecting to the Gateway, apps will be automatically subscribed to thread events and active threads. -However, when a non-app is added to a public thread but hasn't subscribed to threads, it may not have that thread in memory yet (which is a requirement for Discord's clients). Because of this, the Gateway will send a [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) event when a user is added to _any_ thread, even if the event is not necessary for apps. +However, when a non-app is added to a public thread but hasn't subscribed to threads, it may not have that thread in memory yet (which is a requirement for Discord's clients). Because of this, the Gateway will send a [Thread Create](/docs/events/gateway-events#thread-create) event when a user is added to _any_ thread, even if the event is not necessary for apps. ### Channel Access #### Gaining Access to Channels -When an app gains access to a channel (for example, they're given the moderator role), they likely won't have the threads in memory for that channel since the Gateway only syncs threads that the client has permission to view. To account for this, a [Thread List Sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync) event is sent. +When an app gains access to a channel (for example, they're given the moderator role), they likely won't have the threads in memory for that channel since the Gateway only syncs threads that the client has permission to view. To account for this, a [Thread List Sync](/docs/events/gateway-events#thread-list-sync) event is sent. -The [Thread List Sync](#DOCS_EVENTS_GATEWAY_EVENTS/thread-list-sync) event contains a `channel_ids` array, which is the IDs of all channels whose threads are being synced. This field can be used to first clear out any active threads whose `parent_id` is in the `channel_ids` array, and then ingest any threads that were in the event. +The [Thread List Sync](/docs/events/gateway-events#thread-list-sync) event contains a `channel_ids` array, which is the IDs of all channels whose threads are being synced. This field can be used to first clear out any active threads whose `parent_id` is in the `channel_ids` array, and then ingest any threads that were in the event. #### Losing Access to Channels -When an app loses access to a channel, the Gateway does **not** send it [Thread Delete](#DOCS_EVENTS_GATEWAY_EVENTS/thread-delete) event (or any equivalent thread-specific event). Instead, the app will receive the event that caused its permissions on the channel to change. +When an app loses access to a channel, the Gateway does **not** send it [Thread Delete](/docs/events/gateway-events#thread-delete) event (or any equivalent thread-specific event). Instead, the app will receive the event that caused its permissions on the channel to change. -If an app wanted to track when it lost access to any thread, it's possible but difficult as it would need to handle all cases correctly. Usually, events that cause permission changes are a [Guild Role Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-role-update), [Guild Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/guild-member-update) or [Channel Update](#DOCS_EVENTS_GATEWAY_EVENTS/channel-update) event. +If an app wanted to track when it lost access to any thread, it's possible but difficult as it would need to handle all cases correctly. Usually, events that cause permission changes are a [Guild Role Update](/docs/events/gateway-events#guild-role-update), [Guild Member Update](/docs/events/gateway-events#guild-member-update) or [Channel Update](/docs/events/gateway-events#channel-update) event. > info > Discord's clients check their permissions *first* when performing an action. That way, even if it has some stale data, it does not end up acting on it. -Additionally, when a user or app loses access to a channel, they are not removed from the thread and will continue to be reported as a member of that thread. However, they will **not** receive any new Gateway events unless they are removed from the thread, in which case they will receive a [Thread Members Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-members-update) event. +Additionally, when a user or app loses access to a channel, they are not removed from the thread and will continue to be reported as a member of that thread. However, they will **not** receive any new Gateway events unless they are removed from the thread, in which case they will receive a [Thread Members Update](/docs/events/gateway-events#thread-members-update) event. ### Unarchiving a Thread When a thread is unarchived, there is no guarantee that an app has the thread or its member status in memory. To account for this, the Gateway will send two events (in the listed order): -1. A [Thread Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-update) event, which contains the full channel object. -2. A [Thread Member Update](#DOCS_EVENTS_GATEWAY_EVENTS/thread-member-update) event, which is sent to all members of the unarchived thread. Discord's clients only load active threads into memory on start, so this event is sent even if it may not be relevant to most apps. +1. A [Thread Update](/docs/events/gateway-events#thread-update) event, which contains the full channel object. +2. A [Thread Member Update](/docs/events/gateway-events#thread-member-update) event, which is sent to all members of the unarchived thread. Discord's clients only load active threads into memory on start, so this event is sent even if it may not be relevant to most apps. ## Forums @@ -212,7 +212,7 @@ A `GUILD_MEDIA` (type `16`) channel is similar to a `GUILD_FORUM` channel in tha ### Creating Threads in Forum and Media Channels -Within thread-only channels, threads appear as posts. Threads can be created using the [`POST /channels//threads`](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-or-media-channel) endpoint with [slightly different parameters](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-or-media-channel-jsonform-params) than threads in text channels. For example, when creating threads in a threads-only channel, a message is created that has the same ID as the thread which requires you to pass parameters for both a thread *and* a message. +Within thread-only channels, threads appear as posts. Threads can be created using the [`POST /channels//threads`](/docs/resources/channel#start-thread-in-forum-or-media-channel) endpoint with [slightly different parameters](/docs/resources/channel#start-thread-in-forum-or-media-channel-jsonform-params) than threads in text channels. For example, when creating threads in a threads-only channel, a message is created that has the same ID as the thread which requires you to pass parameters for both a thread *and* a message. Threads in thread-only channels have the same permissions behavior as threads in a text channel, inheriting all permissions from the parent channel, with one exception: creating a thread in a thread-only channel only requires the `SEND_MESSAGES` permission. @@ -220,21 +220,21 @@ Threads in thread-only channels have the same permissions behavior as threads in It's worth calling out a few details about fields specific to thread-only channels that may be important to keep in mind: -- The `last_message_id` field is the ID of the most recently created thread in that channel. As with messages, your app will not receive a `CHANNEL_UPDATE` event when the field is changed. Instead clients should update the value when receiving [Thread Create](#DOCS_EVENTS_GATEWAY_EVENTS/thread-create) events. +- The `last_message_id` field is the ID of the most recently created thread in that channel. As with messages, your app will not receive a `CHANNEL_UPDATE` event when the field is changed. Instead clients should update the value when receiving [Thread Create](/docs/events/gateway-events#thread-create) events. - The `topic` field is what is shown in the "Guidelines" section within the Discord client. - The `rate_limit_per_user` field limits how frequently threads can be created. There is a new `default_thread_rate_limit_per_user` field on thread-only channels as well, which limits how often messages can be sent _in a thread_. This field is copied into `rate_limit_per_user` on the thread at creation time. - The `available_tags` field can be set when creating or updating a channel, which determines which tags can be set on individual threads within the thread's `applied_tags` field. -- The `flags` field indicates any [channel flags](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) set for a thread-only channel. Currently only `REQUIRE_TAG` can be used, which requires that a tag from `available_tags` be specified when creating a thread in that channel. +- The `flags` field indicates any [channel flags](/docs/resources/channel#channel-object-channel-flags) set for a thread-only channel. Currently only `REQUIRE_TAG` can be used, which requires that a tag from `available_tags` be specified when creating a thread in that channel. -All fields for channels, including thread-only channels, can be found in the [Channel Object](#DOCS_RESOURCES_CHANNEL/channel-object). +All fields for channels, including thread-only channels, can be found in the [Channel Object](/docs/resources/channel#channel-object). ### Forum and Media Channel Thread Fields -A thread can be pinned within a thread-only, which will be represented as the [`PINNED` flag](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) in the `flags` field within a thread-only channel. A thread that is pinned will have the `(1 << 1)` flag set, and archiving that thread will unset the flag. A pinned thread will *not* auto-archive. +A thread can be pinned within a thread-only, which will be represented as the [`PINNED` flag](/docs/resources/channel#channel-object-channel-flags) in the `flags` field within a thread-only channel. A thread that is pinned will have the `(1 << 1)` flag set, and archiving that thread will unset the flag. A pinned thread will *not* auto-archive. The `message_count` and `total_message_sent` fields on threads in thread-only channels will increment on `MESSAGE_CREATE` events, and decrement on `MESSAGE_DELETE` and `MESSAGE_DELETE_BULK` events. There will be no specific `CHANNEL_UPDATE` event that notifies your app of changes to those fields—instead, apps should update those values when receiving corresponding events. -All fields for threads in thread-only channels can be found in the [channel resources documentation](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-or-media-channel-jsonform-params). +All fields for threads in thread-only channels can be found in the [channel resources documentation](/docs/resources/channel#start-thread-in-forum-or-media-channel-jsonform-params). ### Forum and Media Channel Formatting diff --git a/docs/topics/voice-connections.mdx b/docs/topics/voice-connections.mdx index 6b6b4b35e8..f2ef19ea09 100644 --- a/docs/topics/voice-connections.mdx +++ b/docs/topics/voice-connections.mdx @@ -1,10 +1,10 @@ # Voice -Voice connections operate in a similar fashion to the [Gateway](#DOCS_EVENTS_GATEWAY) connection. However, they use a different set of payloads and a separate UDP-based connection for voice data transmission. Because UDP is used for both receiving and transmitting voice data, your client _must_ be able to receive UDP packets, even through a firewall or NAT (see [UDP Hole Punching](https://en.wikipedia.org/wiki/UDP_hole_punching) for more information). The Discord Voice servers implement functionality (see [IP Discovery](#DOCS_TOPICS_VOICE_CONNECTIONS/ip-discovery)) for discovering the local machines remote UDP IP/Port, which can assist in some network configurations. +Voice connections operate in a similar fashion to the [Gateway](/docs/events/gateway) connection. However, they use a different set of payloads and a separate UDP-based connection for voice data transmission. Because UDP is used for both receiving and transmitting voice data, your client _must_ be able to receive UDP packets, even through a firewall or NAT (see [UDP Hole Punching](https://en.wikipedia.org/wiki/UDP_hole_punching) for more information). The Discord Voice servers implement functionality (see [IP Discovery](/docs/topics/voice-connections#ip-discovery)) for discovering the local machines remote UDP IP/Port, which can assist in some network configurations. ## Voice Gateway Versioning -To ensure that you have the most up-to-date information, please use [version 8](#DOCS_TOPICS_VOICE_CONNECTIONS/voice-gateway-versioning-gateway-versions). Otherwise, we cannot guarantee that the [Opcodes](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) documented here will reflect what you receive over the socket. +To ensure that you have the most up-to-date information, please use [version 8](/docs/topics/voice-connections#voice-gateway-versioning-gateway-versions). Otherwise, we cannot guarantee that the [Opcodes](/docs/topics/opcodes-and-status-codes#voice) documented here will reflect what you receive over the socket. Previously if the version query string `v` was omitted the voice gateway would default to version 1. That behavior is being deprecated, in the future you must present a voice gateway version or your voice connection will be rejected. @@ -28,7 +28,7 @@ Previously if the version query string `v` was omitted the voice gateway would d ### Retrieving Voice Server Information -The first step in connecting to a voice server (and in turn, a guild's voice channel) is formulating a request that can be sent to the [Gateway](#DOCS_EVENTS_GATEWAY), which will return information about the voice server we will connect to. Because Discord's voice platform is widely distributed, users **should never** cache or save the results of this call. To inform the gateway of our intent to establish voice connectivity, we first send an [Opcode 4 Gateway Voice State Update](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/gateway): +The first step in connecting to a voice server (and in turn, a guild's voice channel) is formulating a request that can be sent to the [Gateway](/docs/events/gateway), which will return information about the voice server we will connect to. Because Discord's voice platform is widely distributed, users **should never** cache or save the results of this call. To inform the gateway of our intent to establish voice connectivity, we first send an [Opcode 4 Gateway Voice State Update](/docs/topics/opcodes-and-status-codes#gateway): ###### Gateway Voice State Update Example @@ -44,7 +44,7 @@ The first step in connecting to a voice server (and in turn, a guild's voice cha } ``` -If our request succeeded, the gateway will respond with _two_ events—a [Voice State Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-state-update) event and a [Voice Server Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-server-update) event—meaning your library must properly wait for both events before continuing. The first will contain a new key, `session_id`, and the second will provide voice server information we can use to establish a new voice connection: +If our request succeeded, the gateway will respond with _two_ events—a [Voice State Update](/docs/events/gateway-events#voice-state-update) event and a [Voice Server Update](/docs/events/gateway-events#voice-server-update) event—meaning your library must properly wait for both events before continuing. The first will contain a new key, `session_id`, and the second will provide voice server information we can use to establish a new voice connection: ###### Example Voice Server Update Payload @@ -72,7 +72,7 @@ When sending a voice state update to change channels within the same guild, it i ## Establishing a Voice Websocket Connection -Once we retrieve a session_id, token, and endpoint information, we can connect and handshake with the voice server over another secure WebSocket. Unlike the gateway endpoint we receive in an HTTP [Get Gateway](#DOCS_EVENTS_GATEWAY/get-gateway) request, the endpoint received from our [Voice Server Update](#DOCS_EVENTS_GATEWAY_EVENTS/voice-server-update) payload does not contain a URL protocol, so some libraries may require manually prepending it with "wss://" before connecting. Once connected to the voice WebSocket endpoint, we can send an [Opcode 0 Identify](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payload with our server_id, user_id, session_id, and token: +Once we retrieve a session_id, token, and endpoint information, we can connect and handshake with the voice server over another secure WebSocket. Unlike the gateway endpoint we receive in an HTTP [Get Gateway](/docs/events/gateway#get-gateway) request, the endpoint received from our [Voice Server Update](/docs/events/gateway-events#voice-server-update) payload does not contain a URL protocol, so some libraries may require manually prepending it with "wss://" before connecting. Once connected to the voice WebSocket endpoint, we can send an [Opcode 0 Identify](/docs/topics/opcodes-and-status-codes#voice) payload with our server_id, user_id, session_id, and token: ###### Example Voice Identify Payload @@ -88,7 +88,7 @@ Once we retrieve a session_id, token, and endpoint information, we can connect a } ``` -The voice server should respond with an [Opcode 2 Ready](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payload, which informs us of the `SSRC`, UDP IP/port, and supported encryption modes the voice server expects: +The voice server should respond with an [Opcode 2 Ready](/docs/topics/opcodes-and-status-codes#voice) payload, which informs us of the `SSRC`, UDP IP/port, and supported encryption modes the voice server expects: ###### Example Voice Ready Payload @@ -110,7 +110,7 @@ The voice server should respond with an [Opcode 2 Ready](#DOCS_TOPICS_OPCODES_AN ## Heartbeating -In order to maintain your WebSocket connection, you need to continuously send heartbeats at the interval determined in [Opcode 8 Hello](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice): +In order to maintain your WebSocket connection, you need to continuously send heartbeats at the interval determined in [Opcode 8 Hello](/docs/topics/opcodes-and-status-codes#voice): ###### Example Hello Payload @@ -123,7 +123,7 @@ In order to maintain your WebSocket connection, you need to continuously send he } ``` -After receiving [Opcode 8 Hello](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice), you should send [Opcode 3 Heartbeat](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice)—which contains an integer nonce—every elapsed interval: +After receiving [Opcode 8 Hello](/docs/topics/opcodes-and-status-codes#voice), you should send [Opcode 3 Heartbeat](/docs/topics/opcodes-and-status-codes#voice)—which contains an integer nonce—every elapsed interval: ###### Example Heartbeat Payload since V8 @@ -137,7 +137,7 @@ After receiving [Opcode 8 Hello](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice), y } ``` -Since voice gateway version 8, heartbeat messages must include `seq_ack` which contains the sequence number of last numbered message received from the gateway. See [Buffered Resume](#DOCS_TOPICS_VOICE_CONNECTIONS/buffered-resume) for more information. +Since voice gateway version 8, heartbeat messages must include `seq_ack` which contains the sequence number of last numbered message received from the gateway. See [Buffered Resume](/docs/topics/voice-connections#buffered-resume) for more information. ###### Example Heartbeat Payload below V8 @@ -148,7 +148,7 @@ Since voice gateway version 8, heartbeat messages must include `seq_ack` which c } ``` -In return, you will be sent back an [Opcode 6 Heartbeat ACK](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) that contains the previously sent nonce: +In return, you will be sent back an [Opcode 6 Heartbeat ACK](/docs/topics/opcodes-and-status-codes#voice) that contains the previously sent nonce: ###### Example Heartbeat ACK Payload since V8 @@ -172,7 +172,7 @@ In return, you will be sent back an [Opcode 6 Heartbeat ACK](#DOCS_TOPICS_OPCODE ## Establishing a Voice UDP Connection -Once we receive the properties of a UDP voice server from our [Opcode 2 Ready](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payload, we can proceed to the final step of voice connections, which entails establishing and handshaking a UDP connection for voice data. +Once we receive the properties of a UDP voice server from our [Opcode 2 Ready](/docs/topics/opcodes-and-status-codes#voice) payload, we can proceed to the final step of voice connections, which entails establishing and handshaking a UDP connection for voice data. ###### Example Ready Payload @@ -186,7 +186,7 @@ Once we receive the properties of a UDP voice server from our [Opcode 2 Ready](# } ``` -First, we open a UDP connection to the IP and port provided in the Ready payload. If required, we can now perform an [IP Discovery](#DOCS_TOPICS_VOICE_CONNECTIONS/ip-discovery) using this connection. Once we've fully discovered our external IP and UDP port, we can then tell the voice WebSocket what it is, and start receiving/sending data. We do this using [Opcode 1 Select Protocol](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice): +First, we open a UDP connection to the IP and port provided in the Ready payload. If required, we can now perform an [IP Discovery](/docs/topics/voice-connections#ip-discovery) using this connection. Once we've fully discovered our external IP and UDP port, we can then tell the voice WebSocket what it is, and start receiving/sending data. We do this using [Opcode 1 Select Protocol](/docs/topics/opcodes-and-status-codes#voice): ###### Example Select Protocol Payload @@ -217,7 +217,7 @@ When a call is E2EE, all members of the call exchange keys via a [Messaging Laye ### Binary Websocket Messages -To reduce overhead, some of the new DAVE protocol opcodes are sent as binary instead of JSON text. See the binary column in the [Voice Opcodes Table](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to identify these opcodes. Binary websocket messages have the following format: +To reduce overhead, some of the new DAVE protocol opcodes are sent as binary instead of JSON text. See the binary column in the [Voice Opcodes Table](/docs/topics/opcodes-and-status-codes#voice) to identify these opcodes. Binary websocket messages have the following format: | Field | Description | Size | |-----------------|--------------------------------------------------------------------|----------------| @@ -225,13 +225,13 @@ To reduce overhead, some of the new DAVE protocol opcodes are sent as binary ins | Opcode | Unsigned integer opcode value | 1 bytes | | Payload | Binary message payload (format defined by opcode) | Variable bytes | -Sequence numbers are only sent from the server to the client, and all server-sent binary opcodes require the sequence number. See [Resuming Voice Connection](#DOCS_TOPICS_VOICE_CONNECTIONS/resuming-voice-connection) for further details on how sequence numbers are used when present. +Sequence numbers are only sent from the server to the client, and all server-sent binary opcodes require the sequence number. See [Resuming Voice Connection](/docs/topics/voice-connections#resuming-voice-connection) for further details on how sequence numbers are used when present. ### Indicating DAVE Protocol Support -Include the highest DAVE protocol version you support in [Opcode 0 Identify](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) as `max_dave_protocol_version`. Sending version 0, or omitting the `max_dave_protocol_version` field, indicates no DAVE protocol support. +Include the highest DAVE protocol version you support in [Opcode 0 Identify](/docs/topics/opcodes-and-status-codes#voice) as `max_dave_protocol_version`. Sending version 0, or omitting the `max_dave_protocol_version` field, indicates no DAVE protocol support. -The voice gateway specifies the initial protocol version in [Opcode 4 Session Description](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) under `dave_protocol_version`. This may be any non-discontinued protocol version equal to or less than your supported protocol version. +The voice gateway specifies the initial protocol version in [Opcode 4 Session Description](/docs/topics/opcodes-and-status-codes#voice) under `dave_protocol_version`. This may be any non-discontinued protocol version equal to or less than your supported protocol version. >warn >Clients must retain backwards-compatibility of any non-discontinued DAVE protocol versions. The voice gateway selects the lowest shared protocol version for the call. @@ -240,19 +240,19 @@ The voice gateway specifies the initial protocol version in [Opcode 4 Session De The voice gateway negotiates protocol version and MLS group transitions, to ensure the continuity of media being sent for the call. This can occur when the call is upgrading/downgrading to/from E2EE (in the initial transition phase), changing protocol versions, or when the MLS group is changing. -Some opcodes include a transition ID. After preparing local state necessary to perform the transition, send [Opcode 23 DAVE Protocol Transition Ready](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to indicate to the voice gateway that you are ready to execute the transition. When all participants are ready or when a timeout has been reached, the voice gateway dispatches [Opcode 22 DAVE Protocol Execute Transition](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to confirm execution of the transition. The transition execution is what indicates to media senders that they can begin sending media with the new protocol context (e.g. without E2EE after a downgrade, with a new protocol version after a protocol version change, or using a new key ratchet after a group participant change). +Some opcodes include a transition ID. After preparing local state necessary to perform the transition, send [Opcode 23 DAVE Protocol Transition Ready](/docs/topics/opcodes-and-status-codes#voice) to indicate to the voice gateway that you are ready to execute the transition. When all participants are ready or when a timeout has been reached, the voice gateway dispatches [Opcode 22 DAVE Protocol Execute Transition](/docs/topics/opcodes-and-status-codes#voice) to confirm execution of the transition. The transition execution is what indicates to media senders that they can begin sending media with the new protocol context (e.g. without E2EE after a downgrade, with a new protocol version after a protocol version change, or using a new key ratchet after a group participant change). #### Downgrade -Downgrades to protocol version 0 are announced via [Opcode 21 DAVE Protocol Prepare Transition](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). This can occur during the transition phase when a client that does not support the protocol joins the call. When this transition is executed, senders should stop sending media using the protocol format. +Downgrades to protocol version 0 are announced via [Opcode 21 DAVE Protocol Prepare Transition](/docs/topics/opcodes-and-status-codes#voice). This can occur during the transition phase when a client that does not support the protocol joins the call. When this transition is executed, senders should stop sending media using the protocol format. #### Protocol Version Change & Upgrade -Protocol version transitions (including upgrades from protocol version 0) are announced via [Opcode 24 DAVE Protocol Prepare Epoch](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). In addition to the `transition_id`, this opcode includes the `epoch_id` for the upcoming MLS epoch. +Protocol version transitions (including upgrades from protocol version 0) are announced via [Opcode 24 DAVE Protocol Prepare Epoch](/docs/topics/opcodes-and-status-codes#voice). In addition to the `transition_id`, this opcode includes the `epoch_id` for the upcoming MLS epoch. -Receiving [Opcode 24 DAVE Protocol Prepare Epoch](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) with `epoch_id = 1` indicates that a new MLS group is being created. Participants must: +Receiving [Opcode 24 DAVE Protocol Prepare Epoch](/docs/topics/opcodes-and-status-codes#voice) with `epoch_id = 1` indicates that a new MLS group is being created. Participants must: - prepare a local MLS group with the parameters appropriate for the DAVE protocol version -- generate and send [Opcode 26 DAVE MLS Key Package](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to deliver a new MLS key package to the voice gateway +- generate and send [Opcode 26 DAVE MLS Key Package](/docs/topics/opcodes-and-status-codes#voice) to deliver a new MLS key package to the voice gateway When the `epoch_id` is greater than 1, the protocol version of the existing MLS group is changing. @@ -260,11 +260,11 @@ When the transition is executed, senders must start sending media using the new #### MLS Group Changes -When the participants of the MLS group must change, existing participants receive an [Opcode 29 DAVE MLS Announce Commit Transition](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) whereas new members being added to the group receive [Opcode 30 DAVE MLS Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). Both opcodes include the transition ID and binary MLS Commit or MLS Welcome message. +When the participants of the MLS group must change, existing participants receive an [Opcode 29 DAVE MLS Announce Commit Transition](/docs/topics/opcodes-and-status-codes#voice) whereas new members being added to the group receive [Opcode 30 DAVE MLS Welcome](/docs/topics/opcodes-and-status-codes#voice). Both opcodes include the transition ID and binary MLS Commit or MLS Welcome message. -To prepare for the protocol transition, existing group members must apply the commit to progress their local MLS group to the correct next state. [Opcode 23 DAVE Protocol Transition Ready](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) is sent when the MLS commit has been processed. +To prepare for the protocol transition, existing group members must apply the commit to progress their local MLS group to the correct next state. [Opcode 23 DAVE Protocol Transition Ready](/docs/topics/opcodes-and-status-codes#voice) is sent when the MLS commit has been processed. -Welcomed members send [Opcode 23 DAVE Protocol Transition Ready](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) after succesfully joining the group received in the MLS Welcome message. +Welcomed members send [Opcode 23 DAVE Protocol Transition Ready](/docs/topics/opcodes-and-status-codes#voice) after succesfully joining the group received in the MLS Welcome message. ### External Sender @@ -272,17 +272,17 @@ The voice gateway must be an external sender of the MLS group, so that it can se DAVE protocol participants only process proposals which arrive from the external sender, and not from any other group members. The external sender only sends Add or Remove proposals. -The voice gateway uses [Opcode 25 DAVE MLS External Sender Package](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to provide the external sender public key and credential to MLS group participants. This message may be sent immediately on voice gateway connection or at a later time when the call is upgrading to use the DAVE protocol. +The voice gateway uses [Opcode 25 DAVE MLS External Sender Package](/docs/topics/opcodes-and-status-codes#voice) to provide the external sender public key and credential to MLS group participants. This message may be sent immediately on voice gateway connection or at a later time when the call is upgrading to use the DAVE protocol. Group creators must include the external sender they receive from the voice gateway in their MLS group extensions when creating the group. Welcomed group members ensure that the expected external sender extension is present in the group they are about to join. ### Joining the MLS Group -Except for the initial creation of the first group for the call, joining the MLS group always occurs after receiving [Opcode 30 DAVE MLS Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). +Except for the initial creation of the first group for the call, joining the MLS group always occurs after receiving [Opcode 30 DAVE MLS Welcome](/docs/topics/opcodes-and-status-codes#voice). #### Key Packages -To be proposed to be added to the MLS group, pending members must send an MLS key package via [Opcode 26 DAVE MLS Key Package](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). Key packages are only used one time, and a new key package must be generated each time pending member is waiting to be added or re-added to the group. +To be proposed to be added to the MLS group, pending members must send an MLS key package via [Opcode 26 DAVE MLS Key Package](/docs/topics/opcodes-and-status-codes#voice). Key packages are only used one time, and a new key package must be generated each time pending member is waiting to be added or re-added to the group. ##### Identity Public Key @@ -292,27 +292,27 @@ You can choose to generate a new ephemeral keypair for every protocol call or us #### Initial Group -When there is not yet an MLS group (e.g. a transport-only encrypted call is upgrading or two members have just joined a new call) all pending group members create a local group using the MLS parameters defined by the DAVE protocol version and including the voice gateway external sender received via [Opcode 25 DAVE MLS External Sender Package](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). Every pending member of the group has the chance to produce the initial commit that creates the MLS group with `epoch = 1`. +When there is not yet an MLS group (e.g. a transport-only encrypted call is upgrading or two members have just joined a new call) all pending group members create a local group using the MLS parameters defined by the DAVE protocol version and including the voice gateway external sender received via [Opcode 25 DAVE MLS External Sender Package](/docs/topics/opcodes-and-status-codes#voice). Every pending member of the group has the chance to produce the initial commit that creates the MLS group with `epoch = 1`. Pending group members receive add proposals for every other pending group member from the voice gateway. If an additional pending member joins while there is not yet an MLS group, they receive all in-flight proposal messages. -Proposal and commit handling follows the same process whether or not there is an established group. See [Proposals and Commits](#DOCS_TOPICS_VOICE_CONNECTIONS/proposals-and-commits) +Proposal and commit handling follows the same process whether or not there is an established group. See [Proposals and Commits](/docs/topics/voice-connections#proposals-and-commits) #### Welcome -Pending group members receive a welcome message from another group member which adds them to the MLS group. This is dispatched from the voice gateway via [Opcode 30 DAVE MLS Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). +Pending group members receive a welcome message from another group member which adds them to the MLS group. This is dispatched from the voice gateway via [Opcode 30 DAVE MLS Welcome](/docs/topics/opcodes-and-status-codes#voice). #### Invalid Group -If the group received in an [Opcode 30 DAVE MLS Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) or [Opcode 29 DAVE MLS Announce Commit Transition](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) is unprocessable, the member receiving the unprocessable message sends [Opcode 31 DAVE MLS Invalid Commit Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to the voice gateway. Additionally, the local group state is reset and a new key package is generated and sent to the voice gateway via [Opcode 26 DAVE MLS Key Package](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). +If the group received in an [Opcode 30 DAVE MLS Welcome](/docs/topics/opcodes-and-status-codes#voice) or [Opcode 29 DAVE MLS Announce Commit Transition](/docs/topics/opcodes-and-status-codes#voice) is unprocessable, the member receiving the unprocessable message sends [Opcode 31 DAVE MLS Invalid Commit Welcome](/docs/topics/opcodes-and-status-codes#voice) to the voice gateway. Additionally, the local group state is reset and a new key package is generated and sent to the voice gateway via [Opcode 26 DAVE MLS Key Package](/docs/topics/opcodes-and-status-codes#voice). This causes the voice gateway to propose the removal and re-addition of the requesting member. ### Proposals and Commits -The voice gateway dispatches proposals which must be appended or revoked via [Opcode 27 DAVE MLS Proposals](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). All members of the established or pending MLS group must append or revoke the proposals they receive, and then produce an MLS commit message and optionally an MLS welcome message (when committing add proposals which add new members) which they send to the voice gateway via [Opcode 28 DAVE MLS Commit Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). +The voice gateway dispatches proposals which must be appended or revoked via [Opcode 27 DAVE MLS Proposals](/docs/topics/opcodes-and-status-codes#voice). All members of the established or pending MLS group must append or revoke the proposals they receive, and then produce an MLS commit message and optionally an MLS welcome message (when committing add proposals which add new members) which they send to the voice gateway via [Opcode 28 DAVE MLS Commit Welcome](/docs/topics/opcodes-and-status-codes#voice). -In each epoch, the voice gateway dispatches the "winning" commit via [Opcode 29 DAVE MLS Announce Commit Transition](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) and optionally the associated welcome messages via [Opcode 30 DAVE MLS Welcome](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). The voice gateway broadcasts the first valid commit and welcome(s) it sees in the given epoch, and drops any commits later received for the out-of-date epoch. All dispatched unrevoked proposals in the epoch must be included in the commit for it to be valid. All members added in the epoch must be welcomed for the welcome to be valid. +In each epoch, the voice gateway dispatches the "winning" commit via [Opcode 29 DAVE MLS Announce Commit Transition](/docs/topics/opcodes-and-status-codes#voice) and optionally the associated welcome messages via [Opcode 30 DAVE MLS Welcome](/docs/topics/opcodes-and-status-codes#voice). The voice gateway broadcasts the first valid commit and welcome(s) it sees in the given epoch, and drops any commits later received for the out-of-date epoch. All dispatched unrevoked proposals in the epoch must be included in the commit for it to be valid. All members added in the epoch must be welcomed for the welcome to be valid. ### Audio Frame E2EE @@ -380,7 +380,7 @@ OPUS frames are fully encrypted and no additional data is passed to the AEAD. Transport encryption between the client and the selective forwarding unit (SFU) is still used even in E2EE calls. -Voice data sent to discord should be encoded with [Opus](https://www.opus-codec.org/), using two channels (stereo) and a sample rate of 48kHz. Voice Data is sent using a [RTP Header](https://www.rfcreader.com/#rfc3550_line548), followed by encrypted Opus audio data. Voice encryption uses the key passed in [Opcode 4 Session Description](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) and the nonce formed with the 12 byte header appended with 12 null bytes to achieve the 24 required by xsalsa20_poly1305. Discord encrypts with the [libsodium](https://download.libsodium.org/doc/) encryption library. +Voice data sent to discord should be encoded with [Opus](https://www.opus-codec.org/), using two channels (stereo) and a sample rate of 48kHz. Voice Data is sent using a [RTP Header](https://www.rfcreader.com/#rfc3550_line548), followed by encrypted Opus audio data. Voice encryption uses the key passed in [Opcode 4 Session Description](/docs/topics/opcodes-and-status-codes#voice) and the nonce formed with the 12 byte header appended with 12 null bytes to achieve the 24 required by xsalsa20_poly1305. Discord encrypts with the [libsodium](https://download.libsodium.org/doc/) encryption library. ### Transport Encryption Modes @@ -402,13 +402,13 @@ Voice data sent to discord should be encoded with [Opus](https://www.opus-codec. The RTP size variants determine the unencrypted size of the RTP header in [the same way as SRTP](https://tools.ietf.org/html/rfc3711#section-3.1), which considers CSRCs and (optionally) the extension preamble to be part of the unencrypted header. The deprecated variants use a fixed size unencrypted header for RTP. -The voice gateway will report what encryption modes are available in [Opcode 2 Ready](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). +The voice gateway will report what encryption modes are available in [Opcode 2 Ready](/docs/topics/opcodes-and-status-codes#voice). Voice gateway compatible modes will always include `aead_xchacha20_poly1305_rtpsize` but may not include `aead_aes256_gcm_rtpsize` depending on the underlying hardware. You must support `aead_xchacha20_poly1305_rtpsize`. You should prefer to use `aead_aes256_gcm_rtpsize` when it is available. -Include your selected mode in [Opcode 1 Select Protocol](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice). +Include your selected mode in [Opcode 1 Select Protocol](/docs/topics/opcodes-and-status-codes#voice). -Finally, the voice server will respond with a [Opcode 4 Session Description](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) that includes the `mode` and `secret_key`, a 32 byte array used for [transport encryption and sending](#DOCS_TOPICS_VOICE_CONNECTIONS/transport-encryption-and-sending-voice) voice data: +Finally, the voice server will respond with a [Opcode 4 Session Description](/docs/topics/opcodes-and-status-codes#voice) that includes the `mode` and `secret_key`, a 32 byte array used for [transport encryption and sending](/docs/topics/voice-connections#transport-encryption-and-sending-voice) voice data: ###### Example Session Description Payload @@ -437,7 +437,7 @@ We can now start encrypting and sending voice data over the previously establish ## Speaking -Speaking updates are used to update the **speaking modes** used by the client. This speaking mode is set using a [Opcode 5 Speaking](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payload. The client must send this at least once before sending audio to update the SSRC and set the initial speaking mode. +Speaking updates are used to update the **speaking modes** used by the client. This speaking mode is set using a [Opcode 5 Speaking](/docs/topics/opcodes-and-status-codes#voice) payload. The client must send this at least once before sending audio to update the SSRC and set the initial speaking mode. The following flags can be used as a bitwise mask. For example `5` would be priority and voice. The speaking mode should not be 0 to allow sending audio. @@ -461,7 +461,7 @@ The following flags can be used as a bitwise mask. For example `5` would be prio ``` > warn -> You must send at least one [Opcode 5 Speaking](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payload before sending voice data, or you will be disconnected with an invalid SSRC error. +> You must send at least one [Opcode 5 Speaking](/docs/topics/opcodes-and-status-codes#voice) payload before sending voice data, or you will be disconnected with an invalid SSRC error. > info > The `delay` property should be set to `0` for bots that use the voice gateway. @@ -472,7 +472,7 @@ When there's a break in the sent data, the packet transmission shouldn't simply ## Resuming Voice Connection -When your client detects that its connection has been severed, it should open a new WebSocket connection. Once the new connection has been opened, your client should send an [Opcode 7 Resume](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payload: +When your client detects that its connection has been severed, it should open a new WebSocket connection. Once the new connection has been opened, your client should send an [Opcode 7 Resume](/docs/topics/opcodes-and-status-codes#voice) payload: ###### Example Resume Connection Payload Since V8 @@ -501,7 +501,7 @@ When your client detects that its connection has been severed, it should open a } ``` -If successful, the Voice server will respond with an [Opcode 9 Resumed](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) to signal that your client is now resumed: +If successful, the Voice server will respond with an [Opcode 9 Resumed](/docs/topics/opcodes-and-status-codes#voice) to signal that your client is now resumed: ###### Example Resumed Payload @@ -512,7 +512,7 @@ If successful, the Voice server will respond with an [Opcode 9 Resumed](#DOCS_TO } ``` -If the resume is unsuccessful—for example, due to an invalid session—the WebSocket connection will close with the appropriate [close event code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice-voice-close-event-codes). You should then follow the [Connecting](#DOCS_TOPICS_VOICE_CONNECTIONS/connecting-to-voice) flow to reconnect. +If the resume is unsuccessful—for example, due to an invalid session—the WebSocket connection will close with the appropriate [close event code](/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes). You should then follow the [Connecting](/docs/topics/voice-connections#connecting-to-voice) flow to reconnect. ### Buffered Resume @@ -532,15 +532,15 @@ Since voice gateway version 8, the gateway can resend buffered messages that hav } ``` -A client using voice gateway version 8 must include the last sequence number they received under the data `d` key as `seq_ack` in both the [Opcode 3 Heartbeat](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) and [Opcode 7 Resume](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) payloads. +A client using voice gateway version 8 must include the last sequence number they received under the data `d` key as `seq_ack` in both the [Opcode 3 Heartbeat](/docs/topics/opcodes-and-status-codes#voice) and [Opcode 7 Resume](/docs/topics/opcodes-and-status-codes#voice) payloads. If no sequence numbered messages have been received, `seq_ack` can be omitted or included with a value of -1. The gateway server uses a fixed bit length sequence number and handles wrapping the sequence number around. Since voice gateway messages will always arrive in order, a client only needs to retain the last sequence number they have seen. -If the session is successfully resumed the voice gateway will respond with an [Opcode 9 Resumed](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/voice) and will re-send any messages that the client did not receive. +If the session is successfully resumed the voice gateway will respond with an [Opcode 9 Resumed](/docs/topics/opcodes-and-status-codes#voice) and will re-send any messages that the client did not receive. -The resume may be unsuccessful if the voice gateway buffer for the session no longer contains a message that has been missed. In this case the session will be closed and you should then follow the [Connecting](#DOCS_TOPICS_VOICE_CONNECTIONS/connecting-to-voice) flow to reconnect. +The resume may be unsuccessful if the voice gateway buffer for the session no longer contains a message that has been missed. In this case the session will be closed and you should then follow the [Connecting](/docs/topics/voice-connections#connecting-to-voice) flow to reconnect. ## IP Discovery diff --git a/docs/tutorials/configuring-app-metadata-for-linked-roles.md b/docs/tutorials/configuring-app-metadata-for-linked-roles.md index e783d503d3..2b235db68b 100644 --- a/docs/tutorials/configuring-app-metadata-for-linked-roles.md +++ b/docs/tutorials/configuring-app-metadata-for-linked-roles.md @@ -2,7 +2,7 @@ Linked roles are a type of role in Discord that requires a user to connect to 3rd-party services and meet defined criteria. A role's criteria could just include the user connecting to that service, but it's often more narrow—like having a verified account, having certain stats, or having more than a certain number of followers. -Apps can define their own [role connection metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA), which admins can use to configure linked roles in servers where that app is installed. Apps must also set up an [OAuth2 flow](#DOCS_TOPICS_OAUTH2) to allow users to authenticate and grant the required `role_connections.write` scope. +Apps can define their own [role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA), which admins can use to configure linked roles in servers where that app is installed. Apps must also set up an [OAuth2 flow](/docs/topics/oauth2) to allow users to authenticate and grant the required `role_connections.write` scope. This tutorial walks through building a Discord app in JavaScript with linked roles support. @@ -13,10 +13,10 @@ This tutorial walks through building a Discord app in JavaScript with linked rol ## Creating an app -The first thing we’ll do is create an app through the [developer dashboard](https://discord.com/developers/applications). If you already have an app created, you can jump right to the [Running your app](#DOCS_TUTORIALS_CONFIGURING_APP_METADATA_FOR_LINKED_ROLES/running-your-app) section. +The first thing we’ll do is create an app through the [developer dashboard](https://discord.com/developers/applications). If you already have an app created, you can jump right to the [Running your app](/docs/tutorials/configuring-app-metadata-for-linked-roles#running-your-app) section. > info -> Basic steps to create an app are outlined below, but a more detailed walkthrough is in the [Getting Started guide](#DOCS_QUICK_START_GETTING_STARTED). +> Basic steps to create an app are outlined below, but a more detailed walkthrough is in the [Getting Started guide](/docs/quick-start/getting-started). - Navigate to the [developer dashboard](https://discord.com/developers/applications) - Click **New Application** in the upper right corner, then select a name and create your app @@ -124,7 +124,7 @@ COOKIE_SECRET: As a one-time step, you must tell Discord which metadata fields you are going to allow admins to use for linked roles associated with your app. -To configure connection metadata for your app, you'll call the [PUT /users/@me/applications//role-connection](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/update-application-role-connection-metadata-records) method with [application connection role metadata](#DOCS_RESOURCES_APPLICATION_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object). In the sample app, this is handled in [`src/register.js`](https://github.com/discord/linked-roles-sample/blob/main/src/register.js), and can be run via the command line. +To configure connection metadata for your app, you'll call the [PUT /users/@me/applications//role-connection](/docs/resources/application_ROLE_CONNECTION_METADATA/update-application-role-connection-metadata-records) method with [application connection role metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object). In the sample app, this is handled in [`src/register.js`](https://github.com/discord/linked-roles-sample/blob/main/src/register.js), and can be run via the command line. Go back to Glitch, click the **terminal** tab, and run the following command: diff --git a/docs/tutorials/developing-a-user-installable-app.mdx b/docs/tutorials/developing-a-user-installable-app.mdx index a1aecd2779..cb789c6cc7 100644 --- a/docs/tutorials/developing-a-user-installable-app.mdx +++ b/docs/tutorials/developing-a-user-installable-app.mdx @@ -2,7 +2,7 @@ Discord apps can be installed to servers, users, or both. This guide will walk you through building a basic game integration app that is installable to both Discord users and servers. -While the tutorial will focus on supporting different [installation contexts](#DOCS_RESOURCES_APPLICATION/installation-context), we'll be building a basic game integration along the way with a wiki lookup with user-specific bookmarking and a server leaderboard. The app has four commands (`/link`, `/profile`, `/leaderboard`, and `/wiki`) that can be run in different installation and interaction contexts (which are concepts we'll dig into later in the tutorial). +While the tutorial will focus on supporting different [installation contexts](/docs/resources/application#installation-context), we'll be building a basic game integration along the way with a wiki lookup with user-specific bookmarking and a server leaderboard. The app has four commands (`/link`, `/profile`, `/leaderboard`, and `/wiki`) that can be run in different installation and interaction contexts (which are concepts we'll dig into later in the tutorial). @@ -83,13 +83,13 @@ Now that you have the credentials you need, we'll configure your app to support ### Add Guild Members intent -The sample app fetches members in the server when constructing a fake game leaderboard. Getting server members requires a special permission called a [privileged intent](#DOCS_EVENTS_GATEWAY/privileged-intents), so we'll add that to our app. +The sample app fetches members in the server when constructing a fake game leaderboard. Getting server members requires a special permission called a [privileged intent](/docs/events/gateway#privileged-intents), so we'll add that to our app. Go to the **Bot** page and find the **Privileged Gateway Intents** section. Toggle "Server Member Intent" to be active. ### Choosing Supported Installation Contexts -An app's **[installation context](#DOCS_RESOURCES_APPLICATION/installation-context)** defines how it's installed: to a server, to a user, or both. +An app's **[installation context](/docs/resources/application#installation-context)** defines how it's installed: to a server, to a user, or both. We're going to configure our app to support both installation contexts, and while that's a good default for most apps, some apps may only make sense in one context or the other. @@ -97,11 +97,11 @@ In your app's settings, go to the **Installation** page from the sidebar. Under ### Configuring Default Install Settings -The default install settings of your app determines the default [scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) and [bot user permissions](#DOCS_TOPICS_PERMISSIONS) for each supported installation context. At the moment, apps installed to a user context only support the `applications.commands` scope (which allows your app to install [commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS)) in the default install settings. +The default install settings of your app determines the default [scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) and [bot user permissions](/docs/topics/permissions) for each supported installation context. At the moment, apps installed to a user context only support the `applications.commands` scope (which allows your app to install [commands](/docs/interactions/application-commands)) in the default install settings. ###### Update Install Link -Before adding default install settings, we need to select Discord Provided Link for the app's [install link](#DOCS_RESOURCES_APPLICATION/install-links). Under the **Install Link** section, select `Discord Provided Link` from the dropdown if it isn't already selected (it should be by default). Once its selected, the **Default Install Settings** will appear. +Before adding default install settings, we need to select Discord Provided Link for the app's [install link](/docs/resources/application#install-links). Under the **Install Link** section, select `Discord Provided Link` from the dropdown if it isn't already selected (it should be by default). Once its selected, the **Default Install Settings** will appear. ###### Adding Default Install Settings @@ -110,7 +110,7 @@ Under the **Default Install Settings** section: - For **Guild Install**, add the `applications.commands` scope and `bot` scope. When you select `bot`, a new **Permissions** menu will appear to select the bot user's permissions. Select any permissions that you may want for your app—for now, I'll just select `Send Messages`. > info -> Permissions for a bot user are very similar to permissions for other Discord users. Details about permissions, and a list of available permissions is on the [Permissions](#DOCS_TOPICS_PERMISSIONS/permissions-bitwise-permission-flags) page. +> Permissions for a bot user are very similar to permissions for other Discord users. Details about permissions, and a list of available permissions is on the [Permissions](/docs/topics/permissions#permissions-bitwise-permission-flags) page. After you've selected the scopes and permissions for your app, click **Save Changes**. @@ -134,16 +134,16 @@ Follow the installation prompt to install your app to your user account. Once it ## Step 2: Setting Up Commands -Next, we'll register the [application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) for our app. But before touching code, it's important to understand the concept of command contexts: +Next, we'll register the [application commands](/docs/interactions/application-commands) for our app. But before touching code, it's important to understand the concept of command contexts: Commands have two context fields that can be set when creating or updating a command which let you limit the supported install methods and surfaces in Discord for that command: -- **`integration_types`** lets you control which **[installation contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/installation-context)** a command is supported (user, guild, or both). For example, the `/link` and `/profile` commands we'll be creating are only available when the app is installed to a user. -- **`contexts`** lets you set the **[interaction contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts)**, or the surfaces in Discord, where a command can be used (in a guild channel, in your bot user's DM, and within other DMs or GDMs). For example, the `/leaderboard` command we'll be creating is only available when the command is run from a guild channel. +- **`integration_types`** lets you control which **[installation contexts](/docs/interactions/application-commands#installation-context)** a command is supported (user, guild, or both). For example, the `/link` and `/profile` commands we'll be creating are only available when the app is installed to a user. +- **`contexts`** lets you set the **[interaction contexts](/docs/interactions/application-commands#interaction-contexts)**, or the surfaces in Discord, where a command can be used (in a guild channel, in your bot user's DM, and within other DMs or GDMs). For example, the `/leaderboard` command we'll be creating is only available when the command is run from a guild channel. -More information and details about command contexts are in the [contexts](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts) documentation, but for now we'll get a better understanding of contexts by using them in our sample app. +More information and details about command contexts are in the [contexts](/docs/interactions/application-commands#contexts) documentation, but for now we'll get a better understanding of contexts by using them in our sample app. ### Commands in the sample project @@ -158,7 +158,7 @@ We'll be setting up four commands for our sample app that all have *slightly* di | `/link` | Link your game account to Discord | `USER_INSTALL` | `BOT_DM` | > info -> The supported installation contexts for a command affects which interaction contexts you can set. Specifically, the `PRIVATE_CHANNEL` interaction context can only be included in `contexts` if `USER_INSTALL` is included in `integration_types` for the command. Read details in the [documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/contexts). +> The supported installation contexts for a command affects which interaction contexts you can set. Specifically, the `PRIVATE_CHANNEL` interaction context can only be included in `contexts` if `USER_INSTALL` is included in `integration_types` for the command. Read details in the [documentation](/docs/interactions/application-commands#contexts). The payloads for our app's commands are in `commands.js` in the project folder in case you want to change any values or see what the command's context fields (`integration_types` and `contexts`) look like for each of the commands in the table above. @@ -170,7 +170,7 @@ Now let's register your app's commands so you can see them in Discord. In your p npm run register ``` -The register command will call the [Create Global Application Command](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-global-application-command) endpoint for each of the command payloads in `commands.js`. +The register command will call the [Create Global Application Command](/docs/interactions/application-commands#create-global-application-command) endpoint for each of the command payloads in `commands.js`. After your new commands have been created, you can go into Discord and look for the commands in the surfaces where we made them available: - In **channels within the guild you installed your app**, you should see `/leaderboard`, `/wiki`, and `/profile` @@ -196,7 +196,7 @@ First, go to your project's folder and run the following to start your app: npm run start ``` -There should be some output indiciating your app is running on port 3000. Behind the scenes, our app is ready to handle interactions from Discord, which includes verifying security request headers and responding to `PING` requests. We're skipping over a lot of the details in this tutorial, but details about preparing apps for interactions is in the [Interactions Overview](#DOCS_INTERACTIONS_OVERVIEW/preparing-for-interactions) documentation. +There should be some output indiciating your app is running on port 3000. Behind the scenes, our app is ready to handle interactions from Discord, which includes verifying security request headers and responding to `PING` requests. We're skipping over a lot of the details in this tutorial, but details about preparing apps for interactions is in the [Interactions Overview](/docs/interactions/overview#preparing-for-interactions) documentation. > info > By default, the server will listen to requests sent to port 3000, but if you want to change the port, you can specify a `PORT` variable in your `.env` file. @@ -257,13 +257,13 @@ The payload below is condensed to be more readable, but your interaction request -To see which command was run, you can look at the [`data` object](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-data). +To see which command was run, you can look at the [`data` object](/docs/interactions/receiving-and-responding#interaction-object-interaction-data). However, for this tutorial, we're going to focus more on the metadata related to installation and interaction contexts. There are a few metadata fields you'll want to pay attention to when building an app that can be installed to multiple interaction contexts— ###### `context` -`context` tells you which [interaction context](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/interaction-contexts) the command was invoked from. Since I triggered the command from my app's DM the `context` is `1` (or `BOT_DM`). +`context` tells you which [interaction context](/docs/interactions/application-commands#interaction-contexts) the command was invoked from. Since I triggered the command from my app's DM the `context` is `1` (or `BOT_DM`). With interaction context, something to keep in mind in `BOT_DM` is only the *DM with your bot user*. If you run the same command in a DM with your bestie, or in a group DM, the interaction context will be `PRIVATE_CHANNEL` (`2`). @@ -276,7 +276,7 @@ The keys in the object are the relevant installation context(s) (`GUILD_INSTALL` > info > `authorizing_integration_owners` is not the same as the user that triggered the interaction. Information about the user that triggered the interaction is in the `user` object. -Understanding the authorization owner can be helpful when handling interactions from message components for apps installed to a user, which is discussed more in the [message component interactions](#DOCS_TUTORIALS_DEVELOPING_A_USER_INSTALLABLE_APP/using-metadata-for-message-component-interactions) section. Or you can find technical details in the [Authorizing Integration Owners](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-authorizing-integration-owners-object) documentation. +Understanding the authorization owner can be helpful when handling interactions from message components for apps installed to a user, which is discussed more in the [message component interactions](/docs/tutorials/develing-a-user-installable-app/using-metadata-for-message-component-interactions) section. Or you can find technical details in the [Authorizing Integration Owners](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) documentation. ###### `app_permissions` @@ -284,7 +284,7 @@ Understanding the authorization owner can be helpful when handling interactions In the sample payload, the value is `"442368"`. -These values can be helpful when deciding how you want your app to [respond to the interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/responding-to-an-interaction). For example, perhaps you want your app to respond ephemerally when a specific command is invoked from a server, which the sample app does for the `/profile` command. +These values can be helpful when deciding how you want your app to [respond to the interaction](/docs/interactions/receiving-and-responding#responding-to-an-interaction). For example, perhaps you want your app to respond ephemerally when a specific command is invoked from a server, which the sample app does for the `/profile` command. ### Using metadata for command interactions @@ -355,7 +355,7 @@ There are two fields additional fields to know about that can be helpful in this ###### `interaction_metadata` -Messages created in response to an interaction will include an [`interaction_metadata` object](#DOCS_RESOURCES_MESSAGE/message-interaction-metadata-object) which includes metadata related to the interaction. +Messages created in response to an interaction will include an [`interaction_metadata` object](/docs/resources/message#message-interaction-metadata-object) which includes metadata related to the interaction. ###### `authorizing_integration_owners` @@ -368,7 +368,7 @@ For user-installed apps, it can be used to differentiate between the user that i *Yay~!* At this point, you have an app that supports both installation contexts and understand the basics of using metadata to support different contexts. Now you can go explore the documentation for details, or play with the sample app to develop more complex features. - + Explore the Interactions documentation to learn more about receiving and responding to commands and message components diff --git a/docs/tutorials/hosting-on-cloudflare-workers.md b/docs/tutorials/hosting-on-cloudflare-workers.md index 5b8aacc8e6..251173e968 100644 --- a/docs/tutorials/hosting-on-cloudflare-workers.md +++ b/docs/tutorials/hosting-on-cloudflare-workers.md @@ -4,7 +4,7 @@ sidebar_label: Hosting on Cloudflare Workers # Hosting a Reddit API Discord app on Cloudflare Workers -When building Discord apps, your app can receive common events from the client as [webhooks](#DOCS_RESOURCES_WEBHOOK) when users interact with your app through interactions like [application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) or [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS). +When building Discord apps, your app can receive common events from the client as [webhooks](/docs/resources/webhook) when users interact with your app through interactions like [application commands](/docs/interactions/application-commands) or [message components](/docs/interactions/message-components). Discord will send these events to a pre-configured HTTPS endpoint (called an Interactions Endpoint URL in an app's configuration) as a JSON payload with details about the event. @@ -16,7 +16,7 @@ All of the code for this app can be found **[on GitHub](https://github.com/disco ### Features and technologies used -- [Discord Interactions API](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) (specifically slash commands) +- [Discord Interactions API](/docs/interactions/receiving-and-responding) (specifically slash commands) - [Cloudflare Workers](https://workers.cloudflare.com/) for hosting - [Reddit API](https://www.reddit.com/dev/api/) to send messages back to the user @@ -40,7 +40,7 @@ To start, we'll create the app through the [Discord Developer Dashboard](https:/ ## Adding bot permissions -Now we'll configure the bot with [permissions](#DOCS_TOPICS_PERMISSIONS) required to create and use slash commands, as well as send messages in channels. +Now we'll configure the bot with [permissions](/docs/topics/permissions) required to create and use slash commands, as well as send messages in channels. - Click on the `OAuth2` tab, and choose the `URL Generator`. Click the `bot` and `applications.commands` scopes. - Check the boxes next to `Send Messages` and `Use Slash Commands`, then copy the `Generated URL`. @@ -131,7 +131,7 @@ export const INVITE_COMMAND = { }; ``` -The code to register commands lives in `register.js`. Commands can be [registered globally](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-global-application-command), making them available for all servers with the app installed, or they can be [registered on a single server](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-guild-application-command). +The code to register commands lives in `register.js`. Commands can be [registered globally](/docs/interactions/application-commands#create-global-application-command), making them available for all servers with the app installed, or they can be [registered on a single server](/docs/interactions/application-commands#create-guild-application-command). In this example - we'll just focus on global commands: @@ -345,6 +345,6 @@ router.post('/', async (request, env) => { With your app built and deployed, you can start customizing it to be your own: -- Use **[message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS)** in your app to add more interactivity (like buttons and select menus). +- Use **[message components](/docs/interactions/message-components)** in your app to add more interactivity (like buttons and select menus). - Take a look at different **[public APIs](https://github.com/public-apis/public-apis)** on GitHub. - Join the **[Discord Developers server](https://discord.gg/discord-developers)** to ask questions about the API, attend events hosted by the Discord API team, and interact with other developers. diff --git a/docs/tutorials/upgrading-to-application-commands.md b/docs/tutorials/upgrading-to-application-commands.md index a64ffed9b8..fd791979fd 100644 --- a/docs/tutorials/upgrading-to-application-commands.md +++ b/docs/tutorials/upgrading-to-application-commands.md @@ -4,14 +4,14 @@ sidebar_label: Upgrading to Application Commands # Upgrading Apps to Use Application Commands -As [message content has become a privileged intent](https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ) for verified apps, [application commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) are the primary way Discord users interact with apps. The three types of commands (slash commands, user commands, and message commands) act as entry points into apps, and can be registered globally or for a subset of guilds. +As [message content has become a privileged intent](https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ) for verified apps, [application commands](/docs/interactions/application-commands) are the primary way Discord users interact with apps. The three types of commands (slash commands, user commands, and message commands) act as entry points into apps, and can be registered globally or for a subset of guilds. This guide is intended to provide developers with apps currently using message content with a resource to walk through implementing and designing commands. Throughout the guide, the terms "application commands" and "commands" are used interchangeably. ![Client interfaces showing the different types of application commands](images/command-types.png) > info -> If you are developing an app for the first time, the [commands documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS) may be a more helpful resource for you. +> If you are developing an app for the first time, the [commands documentation](/docs/interactions/application-commands) may be a more helpful resource for you. Before diving in, it’s worth noting that with the message content changes, apps can still access message content in their DMs with users, as well as when messages are sent that directly `@mentions` their bot user (since there is clear user intent that the bot can read those messages). @@ -25,20 +25,20 @@ There are three types of application commands: slash commands, user commands, an ### Slash Commands -[Slash commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/slash-commands) are the most common type of command. They are accessed by typing a forward slash (`/`) followed by the command’s name, or by using the plus button (+) to the left of the message input. +[Slash commands](/docs/interactions/application-commands#slash-commands) are the most common type of command. They are accessed by typing a forward slash (`/`) followed by the command’s name, or by using the plus button (+) to the left of the message input. Slash commands can appear in channels and DMs, so they’re helpful when an action is tied to a channel, a server, or nothing at all. ### User Commands -[User commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) are in the context menu for users, which is accessed by right-clicking or tapping on any user. They’re helpful when an action is tied to an individual user, like a moderation app adding a timeout to someone. +[User commands](/docs/interactions/application-commands#user-commands) are in the context menu for users, which is accessed by right-clicking or tapping on any user. They’re helpful when an action is tied to an individual user, like a moderation app adding a timeout to someone. > info > Within the context menus for users and messages, the `Apps` submenu will only appear if an app in that server has installed a corresponding command (whether or not an individual user can use the installed command). ### Message Commands -[Message commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) are in the context menu for messages, which is accessed by right-clicking on a message, or by clicking on the ellipses at the top-right of a message. They’re helpful when an action is tied to a message, like creating a reminder to reply to a message the following day. +[Message commands](/docs/interactions/application-commands#message-commands) are in the context menu for messages, which is accessed by right-clicking on a message, or by clicking on the ellipses at the top-right of a message. They’re helpful when an action is tied to a message, like creating a reminder to reply to a message the following day. ### After This Section - Start thinking about how different app features might map to the different types of application commands. @@ -48,30 +48,30 @@ Slash commands can appear in channels and DMs, so they’re helpful when an acti Commands can be registered via HTTP requests after an app is authorized with the `applications.commands` scope. The `applications.commands` scope is also automatically included when an app requests the `bot` scope. > info -> There is a section on [designing commands](#DOCS_TUTORIALS_UPGRADING_TO_APPLICATION_COMMANDS/designing-for-commands) below implementation details that may be helpful as you start mapping out different commands +> There is a section on [designing commands](/docs/tutorials/upgrading-to-application-commands#designing-for-commands) below implementation details that may be helpful as you start mapping out different commands The API endpoint to register (or create) commands is different depending on its scope: -- **[Global commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/making-a-global-command)** are available in all of the servers where your app is installed, and can be created using the [`/applications/{YOUR APP ID}/commands` endpoint](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-global-application-command). All of your app's global commands will automatically be added to the servers your app is installed in, regardless of whether they were registered before or after installation. -- **[Guild commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/making-a-guild-command)** are only available in the servers you explicitly add them to via the API, making them useful for features available only to a subset of guilds. They can be created using the [`/applications/{YOUR APP ID}/guilds/{A GUILD ID}/commands` endpoint](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-guild-application-command). +- **[Global commands](/docs/interactions/application-commands#making-a-global-command)** are available in all of the servers where your app is installed, and can be created using the [`/applications/{YOUR APP ID}/commands` endpoint](/docs/interactions/application-commands#create-global-application-command). All of your app's global commands will automatically be added to the servers your app is installed in, regardless of whether they were registered before or after installation. +- **[Guild commands](/docs/interactions/application-commands#making-a-guild-command)** are only available in the servers you explicitly add them to via the API, making them useful for features available only to a subset of guilds. They can be created using the [`/applications/{YOUR APP ID}/guilds/{A GUILD ID}/commands` endpoint](/docs/interactions/application-commands#create-guild-application-command). -While most apps won’t need to register more than a handful of commands, apps can have up to 100 global slash commands and 100 guild slash commands with unique names. They can also have 5 global user commands and 5 global message commands. Different limitations apply for global and guild commands, which can be found [in the documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/registering-a-command). +While most apps won’t need to register more than a handful of commands, apps can have up to 100 global slash commands and 100 guild slash commands with unique names. They can also have 5 global user commands and 5 global message commands. Different limitations apply for global and guild commands, which can be found [in the documentation](/docs/interactions/application-commands#registering-a-command). ### Using Options as Parameters -Command options is an optional field (`options`) that can be defined when creating commands. When used, options will display for the user to fill out during invocation. You can also provide dynamic option suggestions using the `autocomplete` field. Read more about options [in the documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure). +Command options is an optional field (`options`) that can be defined when creating commands. When used, options will display for the user to fill out during invocation. You can also provide dynamic option suggestions using the `autocomplete` field. Read more about options [in the documentation](/docs/interactions/application-commands#application-command-object-application-command-option-structure). ![Slash command using options](images/slash-command-options.png) ### Using Subcommands to Group Actions -[Subcommands and subcommand groups](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/subcommands-and-subcommand-groups) help organize commands that are related to a shared resource or action. Instead of several top-level commands (like `/add-resource` and `/delete-resource`), you can have one top-level command with several subcommands (like `/resource add` and `/resource delete`). +[Subcommands and subcommand groups](/docs/interactions/application-commands#subcommands-and-subcommand-groups) help organize commands that are related to a shared resource or action. Instead of several top-level commands (like `/add-resource` and `/delete-resource`), you can have one top-level command with several subcommands (like `/resource add` and `/resource delete`). Subcommands use the same `options` field as passing parameters, but with a type of `2`. ### Restricting Command Use -[Application command permissions](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions) allow users and apps to restrict command usage in a server. When commands are restricted for a user, they won't appear for them in the client. +[Application command permissions](/docs/interactions/application-commands#permissions) allow users and apps to restrict command usage in a server. When commands are restricted for a user, they won't appear for them in the client. If your app currently relies on permissioning, using command permissions can be a way to port them. It also cleans up the command picker UI for users, making it easier for them to find your app’s commands that are most relevant to them. @@ -111,13 +111,13 @@ Below is a sample payload to create a global slash command with an optional para #### Default Permissions -When [creating](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-global-application-command) or [updating](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-global-application-command) a command, you can use the `default_member_permissions` field to restrict the command to a set of bitwise permissions that reflect the default permission flags a user must be granted in order to use the command. +When [creating](/docs/interactions/application-commands#create-global-application-command) or [updating](/docs/interactions/application-commands#edit-global-application-command) a command, you can use the `default_member_permissions` field to restrict the command to a set of bitwise permissions that reflect the default permission flags a user must be granted in order to use the command. In addition, the `dm_permission` flag can be used to control whether a global command is available in DMs (not available for guild commands). #### Updating Permissions -Permissions for specific roles, users, and channels can be updated by your app if you have the `applications.commands.permissions.update` scope and a [Bearer token](#DOCS_TOPICS_OAUTH2) that’s authenticated by a user with the necessary user permissions. Details about updating a command’s permissions are [in the documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/permissions). +Permissions for specific roles, users, and channels can be updated by your app if you have the `applications.commands.permissions.update` scope and a [Bearer token](/docs/topics/oauth2) that’s authenticated by a user with the necessary user permissions. Details about updating a command’s permissions are [in the documentation](/docs/interactions/application-commands#permissions). ### After This Section @@ -128,27 +128,27 @@ Permissions for specific roles, users, and channels can be updated by your app i ## Handling Commands -Commands use the [interactions model](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) through HTTP-based outgoing webhooks or the WebSocket-based [Interaction Create gateway event](#DOCS_EVENTS_GATEWAY_EVENTS/interaction-create). Regardless of the transit method used to arrive, your app will receive relevant information when a Discord user triggers one of your app’s interactions. +Commands use the [interactions model](/docs/interactions/receiving-and-responding) through HTTP-based outgoing webhooks or the WebSocket-based [Interaction Create gateway event](/docs/events/gateway-events#interaction-create). Regardless of the transit method used to arrive, your app will receive relevant information when a Discord user triggers one of your app’s interactions. > warn -> If you continue using Gateway events, you’ll still receive message events but the payloads will have empty string or array data for message content-related fields like `content`, `embeds`, `attachments`, and `components` while `poll` will be omitted. You can read more in the [message content intent](#DOCS_EVENTS_GATEWAY/message-content-intent) section. +> If you continue using Gateway events, you’ll still receive message events but the payloads will have empty string or array data for message content-related fields like `content`, `embeds`, `attachments`, and `components` while `poll` will be omitted. You can read more in the [message content intent](/docs/events/gateway#message-content-intent) section. -For commands, this means that each time one of your commands is used, your app will receive information like the command name and the user who triggered it. More information about this information is below in the section on [parsing command payloads](#DOCS_TUTORIALS_UPGRADING_TO_APPLICATION_COMMANDS/parsing-command-payloads). +For commands, this means that each time one of your commands is used, your app will receive information like the command name and the user who triggered it. More information about this information is below in the section on [parsing command payloads](/docs/tutorials/upgrading-to-application-commands#parsing-command-payloads). ### Adding an Interactions Endpoint URL > info -> This step is specific to receiving interactions over HTTP. If you prefer to use the [Gateway](#DOCS_EVENTS_GATEWAY), this step won't be applicable to your app. +> This step is specific to receiving interactions over HTTP. If you prefer to use the [Gateway](/docs/events/gateway), this step won't be applicable to your app. Before your app can receive interactions, you’ll need to set up an **Interaction Endpoint URL** in your app settings. This endpoint should be a public URL where Discord can send all interactions-related requests. However, before adding your URL to your app settings, your endpoint must be set up to handle two things: -1. **Responding to `PING` events**: When you save a URL in your settings, Discord will send a `POST` request with `type: 1`. To acknowledge this request (and thus verify your endpoint), you should return a `200` response with a payload containing `type: 1`. More information can be found in the [Receiving an Interaction documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction). -2. **Verifying request signatures**: To ensure that requests are coming from Discord, your endpoint must verify each request using the included headers, specifically `X-Signature-Ed25519` and `X-Signature-Timestamp`. If the signature fails validating, your app should return a `401` response. More information and example code can be found in the [Security and Authorization documentation](#DOCS_INTERACTIONS_OVERVIEW/setting-up-an-endpoint-validating-security-request-headers). +1. **Responding to `PING` events**: When you save a URL in your settings, Discord will send a `POST` request with `type: 1`. To acknowledge this request (and thus verify your endpoint), you should return a `200` response with a payload containing `type: 1`. More information can be found in the [Receiving an Interaction documentation](/docs/interactions/receiving-and-responding#receiving-an-interaction). +2. **Verifying request signatures**: To ensure that requests are coming from Discord, your endpoint must verify each request using the included headers, specifically `X-Signature-Ed25519` and `X-Signature-Timestamp`. If the signature fails validating, your app should return a `401` response. More information and example code can be found in the [Security and Authorization documentation](/docs/interactions/overview#setting-up-an-endpoint-validating-security-request-headers). > info -> Many libraries on the [Community Resources page](#DOCS_DEVELOPER_TOOLS_COMMUNITY_RESOURCES/interactions) simplify verification and interaction request handling by exporting reusable functions and/or handling it automatically. +> Many libraries on the [Community Resources page](/docs/developer-tools/community-resources/interactions) simplify verification and interaction request handling by exporting reusable functions and/or handling it automatically. After your URL is set up to handle signature verification and `PING` requests, you can add your Interaction Endpoint URL by navigating to your app settings from the [developer portal](https://discord.com/developers/applications). On the **General Information** page, you’ll see a field for your **Interactions Endpoint URL**. @@ -162,9 +162,9 @@ If all goes well, your endpoint will successfully save. And if not, you should d Once your app has a verified endpoint, you should start being able to receive command requests from Discord. -As mentioned above, these include information relevant to handling the command like its name, the user who invoked it, and the guild and channel it was invoked from. It also includes additional details that could be relevant, like the [command options](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-structure) or [locale information](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/localization). +As mentioned above, these include information relevant to handling the command like its name, the user who invoked it, and the guild and channel it was invoked from. It also includes additional details that could be relevant, like the [command options](/docs/interactions/application-commands#application-command-object-application-command-option-structure) or [locale information](/docs/interactions/application-commands#localization). -Since slash commands (`CHAT_INPUT` commands) are run in the context of a channel, you’ll notice that their payloads don’t contain any information about specific messages. If your app needs the message content, you can use [message commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands) which *do* include the message content. +Since slash commands (`CHAT_INPUT` commands) are run in the context of a channel, you’ll notice that their payloads don’t contain any information about specific messages. If your app needs the message content, you can use [message commands](/docs/interactions/application-commands#message-commands) which *do* include the message content. > info > In the getting started guide’s repository, there’s a code sample showing [how to create and handle commands using JavaScript](https://github.com/discord/discord-example-app/blob/main/examples/command.js). @@ -211,7 +211,7 @@ Below is an example payload your app would receive when a user invoked a global } ``` -To determine how your app should handle an incoming command-related interaction, you can look in the `data` object which contains all of the command-specific information (including any options a user selected). Details about the full interactions object your app receives can be found in the [Interactions documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object). +To determine how your app should handle an incoming command-related interaction, you can look in the `data` object which contains all of the command-specific information (including any options a user selected). Details about the full interactions object your app receives can be found in the [Interactions documentation](/docs/interactions/receiving-and-responding#interaction-object). ### After This Section @@ -230,7 +230,7 @@ Adding commands to your app can add discoverability and interactivity for users. When creating a command, keep the name short and relevant. The name of the command should give users an idea of the action they’re invoking. A description can be a bit more verbose, leaving room to be more explicit about the action and its result. -And when your app has several commands (and perhaps [subcommands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/subcommands-and-subcommand-groups)), it’s important to keep the naming scheme consistent. +And when your app has several commands (and perhaps [subcommands](/docs/interactions/application-commands#subcommands-and-subcommand-groups)), it’s important to keep the naming scheme consistent. #### Examples @@ -239,13 +239,13 @@ And when your app has several commands (and perhaps [subcommands](#DOCS_INTERACT ### Collecting User Input -When commands need a bit of input from a user, you can use the `options` field. Command options can be thought of as parameters to your command. They can be one of many [types](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-object-application-command-option-type), like the standard string or number, or the more Discord-specific role, user, and channel. +When commands need a bit of input from a user, you can use the `options` field. Command options can be thought of as parameters to your command. They can be one of many [types](/docs/interactions/application-commands#application-command-object-application-command-option-type), like the standard string or number, or the more Discord-specific role, user, and channel. -Options are great for short input, but if you need user input that’s longer than a couple of words, like a title or description, you can collect form-like input using [modals](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-modal) as a response to the command invocation. +Options are great for short input, but if you need user input that’s longer than a couple of words, like a title or description, you can collect form-like input using [modals](/docs/interactions/receiving-and-responding#interaction-response-object-modal) as a response to the command invocation. ### Scoping a Command -Commands can optionally be [scoped to specific guilds](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/create-guild-application-command), rather than available everywhere your app is installed. Guild commands can be useful when your app has functionality that may not be relevant to all servers like: +Commands can optionally be [scoped to specific guilds](/docs/interactions/application-commands#create-guild-application-command), rather than available everywhere your app is installed. Guild commands can be useful when your app has functionality that may not be relevant to all servers like: - When a command is in development - When a specific command is opt-in or opt-out @@ -253,9 +253,9 @@ Commands can optionally be [scoped to specific guilds](#DOCS_INTERACTIONS_APPLIC ### Responding to a Command -Interactions (including commands) can have a hand-picked reply using one of the many available [interaction responses](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/responding-to-an-interaction). +Interactions (including commands) can have a hand-picked reply using one of the many available [interaction responses](/docs/interactions/receiving-and-responding#responding-to-an-interaction). -The specific response type should be picked based on the situation. Some commands may call for sending a message back to the channel where the command was invoked from, or perhaps just to the specific user who ran the command (for this, the [ephemeral message flag](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-response-object-messages) can be used). Other commands may necessitate descriptive input from the user, in which case responding with a follow-up modal with text inputs might make the most sense. +The specific response type should be picked based on the situation. Some commands may call for sending a message back to the channel where the command was invoked from, or perhaps just to the specific user who ran the command (for this, the [ephemeral message flag](/docs/interactions/receiving-and-responding#interaction-response-object-messages) can be used). Other commands may necessitate descriptive input from the user, in which case responding with a follow-up modal with text inputs might make the most sense. Regardless of the response, it should be picked based on the specific interaction the user is taking. @@ -298,6 +298,6 @@ This can come in the form of a specific command that shows app usage, a message Hopefully this guide was helpful in considering how to design and implement application commands. Below is a couple of follow-up resources you can use: -- [Application command documentation](#DOCS_INTERACTIONS_APPLICATION_COMMANDS)—I know it's linked a bunch in this guide, but there's a reason! +- [Application command documentation](/docs/interactions/application-commands)—I know it's linked a bunch in this guide, but there's a reason! - Help center article on [message content intent workarounds](https://support-dev.discord.com/hc/en-us/articles/6383579033751-Message-Content-Intent-Alternatives-Workarounds) - The [DDevs server](https://discord.gg/discord-developers) where you can find API updates, ask questions about developing apps, and connect with other developers From fff535c47389c439b0a2458dd3759af8d49761ce Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 16 Apr 2025 08:51:23 -0700 Subject: [PATCH 2/4] fewer broken things --- docs/activities/building-an-activity.mdx | 2 +- .../2021-11-23-guild-scheduled-events.md | 8 +-- docs/change-log/2022-06-16-auto-moderation.md | 2 +- ...ion-spam-and-mention-spam-trigger-types.md | 2 +- ...n-connections-metadata-and-linked-roles.md | 4 +- ...024-03-18-user-installable-apps-preview.md | 2 +- docs/discord-social-sdk/core-concepts.mdx | 20 +++--- docs/discord-social-sdk/design-guidelines.mdx | 22 +++---- .../design-guidelines/connection-points.mdx | 2 +- .../design-guidelines/consoles.mdx | 4 +- .../design-guidelines/direct-messages.mdx | 2 +- .../design-guidelines/linked-channels.mdx | 2 +- .../discord-social-sdk/development-guides.mdx | 6 +- .../account-linking-on-consoles.mdx | 10 +-- .../account-linking-with-discord.mdx | 2 +- .../creating-a-unified-friends-list.mdx | 6 +- .../development-guides/linked-channels.mdx | 2 +- .../development-guides/managing-lobbies.mdx | 8 +-- .../sending-direct-messages.mdx | 4 +- .../setting-rich-presence.mdx | 2 +- .../using-with-discord-apis.mdx | 2 +- docs/discord-social-sdk/getting-started.mdx | 6 +- .../getting-started/using-unity.mdx | 2 +- docs/events/gateway-events.mdx | 12 ++-- docs/quick-start/getting-started.mdx | 4 +- docs/quick-start/overview-of-apps.mdx | 4 +- docs/reference.mdx | 2 +- .../application-role-connection-metadata.md | 6 +- docs/resources/application.md | 2 +- docs/resources/audit-log.md | 8 +-- docs/resources/guild-scheduled-event.mdx | 66 +++++++++---------- docs/resources/guild-template.md | 22 +++---- docs/resources/invite.md | 2 +- docs/resources/lobby.md | 2 +- docs/resources/user.md | 4 +- .../using-with-the-discord-social-sdk.mdx | 2 +- ...nfiguring-app-metadata-for-linked-roles.md | 4 +- .../developing-a-user-installable-app.mdx | 2 +- tools/checkLinks.ts | 12 ++-- 39 files changed, 139 insertions(+), 137 deletions(-) diff --git a/docs/activities/building-an-activity.mdx b/docs/activities/building-an-activity.mdx index e7c5a825ff..09514c5083 100644 --- a/docs/activities/building-an-activity.mdx +++ b/docs/activities/building-an-activity.mdx @@ -129,7 +129,7 @@ As mentioned, installation contexts determine where your app can be installed. T - Apps installed in a **[server context](/docs/resources/application#server-context)** (server-installed apps) must be authorized by a server member with the `MANAGE_GUILD` permission, and are visible to all members of the server. - Apps installed in a **[user context](/docs/resources/application#user-context)** (user-installed apps) are visible only to the authorizing user, and therefore don't require any server-specific permissions. Apps installed to a user context are visible across all of the user's servers, DMs, and GDMs—however, they're limited to using commands. -Details about installation contexts is in the [Application documentation](/docs/resources/application#installation-context) and the [Developing a User-Installable App tutorial](/docs/tutorials/develing-a-user-installable-app). +Details about installation contexts is in the [Application documentation](/docs/resources/application#installation-context) and the [Developing a User-Installable App tutorial](/docs/tutorials/developing-a-user-installable-app). Click on **Installation** in the left sidebar, then under **Installation Contexts** make sure both "User Install" and "Guild Install" are selected. This will make sure users can launch our app's Activity across Discord servers, DMs, and Group DMs. diff --git a/docs/change-log/2021-11-23-guild-scheduled-events.md b/docs/change-log/2021-11-23-guild-scheduled-events.md index f2dd642e49..9e78bbf0da 100644 --- a/docs/change-log/2021-11-23-guild-scheduled-events.md +++ b/docs/change-log/2021-11-23-guild-scheduled-events.md @@ -7,11 +7,11 @@ date: "2021-11-23" #### Nov 18, 2021 -* Breaking change for return type for `GET /guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users` -* Add `with_user_count` query param for `GET /guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}` -* Return additional `creator` field by default in response for `GET /guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}` +* Breaking change for return type for `GET /guilds/{guild.id}/scheduled-events/{guild-scheduled-event.id}/users` +* Add `with_user_count` query param for `GET /guilds/{guild.id}/scheduled-events/{guild-scheduled-event.id}` +* Return additional `creator` field by default in response for `GET /guilds/{guild.id}/scheduled-events/{guild-scheduled-event.id}` * More details and clarification for the guild scheduled events feature. -* Document support for `before` and `after` query params for `GET /guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users` +* Document support for `before` and `after` query params for `GET /guilds/{guild.id}/scheduled-events/{guild-scheduled-event.id}/users` #### Nov 15, 2021 diff --git a/docs/change-log/2022-06-16-auto-moderation.md b/docs/change-log/2022-06-16-auto-moderation.md index 67370d6d36..f9f85f6e28 100644 --- a/docs/change-log/2022-06-16-auto-moderation.md +++ b/docs/change-log/2022-06-16-auto-moderation.md @@ -3,7 +3,7 @@ title: "Auto Moderation" date: "2022-06-16" --- -Add new [Auto Moderation feature](/docs/resorces/auto-moderation) which enables guilds to moderate message content based on keywords, harmful links, and unwanted spam. This change includes: +Add new [Auto Moderation feature](/docs/resources/auto-moderation) which enables guilds to moderate message content based on keywords, harmful links, and unwanted spam. This change includes: * New endpoints for [creating](/docs/resources/auto-moderation#create-auto-moderation-rule), [updating](/docs/resources/auto-moderation#modify-auto-moderation-rule), and [deleting](/docs/resources/auto-moderation#delete-auto-moderation-rule) Auto Moderation rules * New gateway events emitted when Auto Moderation rules are [created](/docs/events/gateway-events#auto-moderation-rule-create) (`AUTO_MODERATION_RULE_CREATE`), [updated](/docs/events/gateway-events#auto-moderation-rule-update) (`AUTO_MODERATION_RULE_UPDATE `), and [deleted](/docs/events/gateway-events#auto-moderation-rule-delete) (`AUTO_MODERATION_RULE_DELETE `). Requires the `AUTO_MODERATION_CONFIGURATION` (`1 << 20`) intent diff --git a/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md b/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md index c3b5039d69..4837b24829 100644 --- a/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md +++ b/docs/change-log/2022-09-21-auto-moderation-spam-and-mention-spam-trigger-types.md @@ -8,4 +8,4 @@ Two new [trigger types](/docs/resources/auto-moderation#auto-moderation-rule-obj * `MENTION_SPAM` blocks messages that mention more than a set number of unique server members or roles. Apps can define the number (up to 50) using the `mention_total_limit` field in the [trigger metadata object](/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata) when creating or updating an Auto Moderation rule. * `SPAM` blocks links and messages that are identified as spam. -More information can be found in the [Auto Moderation documentation](/docs/resorces/auto-moderation). +More information can be found in the [Auto Moderation documentation](/docs/resources/auto-moderation). diff --git a/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md b/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md index 75f55c8a82..07518d450b 100644 --- a/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md +++ b/docs/change-log/2022-12-12-add-application-connections-metadata-and-linked-roles.md @@ -6,8 +6,8 @@ date: "2022-12-12" Introducing [linked roles](https://discord.com/blog/connected-accounts-functionality-boost-linked-roles) as well as the ability for all developers to set up their own linked roles with an application. This includes: * New [`role_connections_verification_url`](/docs/resources/application#application-object) that can be set in the developer portal in order for the application to render as potential verification option for linked roles. -* [Application metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) to specify more detailed linked role requirements. -* New endpoints to [retrieve](/docs/resources/application_ROLE_CONNECTION_METADATA/get-application-role-connection-metadata-records) (`GET /applications//role-connections/metadata`) and [update](/docs/resources/application_ROLE_CONNECTION_METADATA/update-application-role-connection-metadata-records) (`PUT /applications//role-connections/metadata`) application connection metadata. +* [Application metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) to specify more detailed linked role requirements. +* New endpoints to [retrieve](/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records) (`GET /applications//role-connections/metadata`) and [update](/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records) (`PUT /applications//role-connections/metadata`) application connection metadata. * New [`role_connections.write`](/docs/topics/oauth2#shared-resources-oauth2-scopes) OAuth2 scope required to authenticate the below requests. * Endpoints to [retrieve](/docs/resources/user#get-current-user-application-role-connection) (`GET /users/@me/applications/{application.id}/role-connection`) and [update](/docs/resources/user#update-current-user-application-role-connection) (`PUT /users/@me/applications/{application.id}/role-connection`) a user's role connections, both of which return an [application role connection](/docs/resources/user#application-role-connection-object) object. diff --git a/docs/change-log/2024-03-18-user-installable-apps-preview.md b/docs/change-log/2024-03-18-user-installable-apps-preview.md index 7809adf6f0..078de6b426 100644 --- a/docs/change-log/2024-03-18-user-installable-apps-preview.md +++ b/docs/change-log/2024-03-18-user-installable-apps-preview.md @@ -7,7 +7,7 @@ topics: Apps can now be installed to users—making them easier to install, discover, and access across Discord. User-installed apps can be used across all of a user's servers, within their (G)DMs, and in DMs with the app's bot user. -When creating or updating your app, you can choose which installation types your app supports on the **Installation** page in your [app's settings](https://discord.com/developers/applications). To quickly get started, you can follow the new [Developing a User-Installable App tutorial](/docs/tutorials/develing-a-user-installable-app) or read details about the new changes below. +When creating or updating your app, you can choose which installation types your app supports on the **Installation** page in your [app's settings](https://discord.com/developers/applications). To quickly get started, you can follow the new [Developing a User-Installable App tutorial](/docs/tutorials/developing-a-user-installable-app) or read details about the new changes below. This change introduces new concepts and fields across the API that apps will now encounter— diff --git a/docs/discord-social-sdk/core-concepts.mdx b/docs/discord-social-sdk/core-concepts.mdx index 9add0ea981..8caefe77fe 100644 --- a/docs/discord-social-sdk/core-concepts.mdx +++ b/docs/discord-social-sdk/core-concepts.mdx @@ -28,7 +28,7 @@ To implement the Discord Social SDK, developers for all platforms will generally - Implement [unified friends list](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) and [relationships](/docs/discord-social-sdk/development-guides/managing-relationships). - Use [rich presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) for game activity updates. - Set up [lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) for multiplayer interaction and [game invites](/docs/discord-social-sdk/development-guides/managing-game-invites). - - Manage [direct message](/docs/discord-social-sdk/development-guides/sending-direct-messages), [linked channels](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list), and [voice communication](/docs/discord-social-sdk/development-guides_JOINING_VOICE_CHAT). + - Manage [direct message](/docs/discord-social-sdk/development-guides/sending-direct-messages), [linked channels](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list), and [voice communication](/docs/discord-social-sdk/development-guides/joining-voice-chat). 5. Handle events & API calls: - Listen for changes in friend lists, presence updates, and chat messages. - Use Discord's APIs to update statuses, send messages, and manage connections. @@ -97,12 +97,12 @@ Account linking allows a game to authenticate users with their Discord credentia | Development Guides | |----------------------------------------------------------------------------------------------------------| | [Account Linking with Discord](/docs/discord-social-sdk/development-guides/account-linking-with-discord) | -| [Account Linking on Consoles](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES) | +| [Account Linking on Consoles](/docs/discord-social-sdk/development-guides/account-linking-on-consoles) | | Design Guidelines | |----------------------------------------------------------------------------------| -| [Signing in with Discord](/docs/discord-social-sdk/design-guidelines_SIGNING_IN) | -| [Consoles](/docs/discord-social-sdk/design-guidelines_CONSOLES) | +| [Signing in with Discord](/docs/discord-social-sdk/design-guidelines/signing-in) | +| [Consoles](/docs/discord-social-sdk/design-guidelines/consoles) | ### Provisional Accounts @@ -130,7 +130,7 @@ The SDK models friendships and relationships in two ways: | Design Guidelines | |-----------------------------------------------------------------------------------------| | [Unified Friends List](/docs/discord-social-sdk/design-guidelines/provisional-accounts) | -| [Game Friends](/docs/discord-social-sdk/design-guidelines_GAME_FRIENDS) | +| [Game Friends](/docs/discord-social-sdk/design-guidelines/game-friends) | ### Messaging & Communication @@ -142,11 +142,11 @@ Users can communicate via direct messages (DMs) and voice calls: | Development Guides | |------------------------------------------------------------------------------------------------| | [Sending Direct Messages](/docs/discord-social-sdk/development-guides/sending-direct-messages) | -| [Joining Voice Chat](/docs/discord-social-sdk/development-guides_JOINING_VOICE_CHAT) | +| [Joining Voice Chat](/docs/discord-social-sdk/development-guides/joining-voice-chat) | | Design Guidelines | |-------------------------------------------------------------------------------| -| [Direct Messages](/docs/discord-social-sdk/design-guidelines_DIRECT_MESSAGES) | +| [Direct Messages](/docs/discord-social-sdk/design-guidelines/direct-messages) | ### Presence & Rich Presence @@ -162,7 +162,7 @@ Presence refers to a user's online status, while Rich Presence provides game-spe | Design Guidelines | |-------------------------------------------------------------------------------------------| -| [Status & Rich Presence](/docs/discord-social-sdk/design-guidelines_STATUS_RICH_PRESENCE) | +| [Status & Rich Presence](/docs/discord-social-sdk/design-guidelines/status-rich-presence) | ### Lobbies & In-Game Chat @@ -181,11 +181,11 @@ Games can link in-game chat with Discord's server-based text channels in their U | Development Guides | |--------------------------------------------------------------------------------| -| [Linked channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) | +| [Linked channels](/docs/discord-social-sdk/development-guides/linked-channels) | | Design Guidelines | |-------------------------------------------------------------------------------| -| [Linked channels](/docs/discord-social-sdk/design-guidelines_LINKED_CHANNELS) | +| [Linked channels](/docs/discord-social-sdk/design-guidelines/linked-channels) | --- diff --git a/docs/discord-social-sdk/design-guidelines.mdx b/docs/discord-social-sdk/design-guidelines.mdx index 6ac92d03e8..83e1331fc6 100644 --- a/docs/discord-social-sdk/design-guidelines.mdx +++ b/docs/discord-social-sdk/design-guidelines.mdx @@ -21,40 +21,40 @@ subpages: These design guidelines provide best practices and guidelines for designing social features in your game. Following these patterns can create a seamless and engaging user experience that leverages SDK social features to enhance your game. -If you are looking for a place to get started, we recommend you start with [Principles](/docs/discord-social-sdk/design-guidelines_PRINCIPLES) or the [Getting Started](/docs/discord-social-sdk/getting-started) guide. +If you are looking for a place to get started, we recommend you start with [Principles](/docs/discord-social-sdk/design-guidelines/principles) or the [Getting Started](/docs/discord-social-sdk/getting-started) guide. - + Fundamental best practices for integrating Discord's social layer into your game. These principles ensure a seamless and engaging user experience. - + Strategies for implementing user authentication and account linking, allowing players to connect their Discord accounts with your game. - + Key integration points where your game can interact with Discord's services, enhancing the overall player experience through seamless connectivity. - + Guidelines for using Discord's brand assets within your game, ensuring consistent and respectful representation of the Discord brand. - + Techniques for designing a unified friends list - allowing players to see and interact with their Discord friends directly within your game. - + Best practices for enabling direct messaging between players, facilitating private communication, and enhancing social interactions. Designing around provisional accounts for users who prefer not to link their Discord accounts, allowing them to enjoy social features still. - + Leveraging Discord's presence and rich presence features to display detailed player status and game activity for in-game social interactions. - + Integrating Discord's social features on console platforms, ensuring a consistent experience across different devices. - + Techniques for managing and displaying in-game friends, allowing players to connect and play with their Discord friends easily. - + Guidelines for linking Discord channels to your game, enabling players to connect and communicate across different platforms. diff --git a/docs/discord-social-sdk/design-guidelines/connection-points.mdx b/docs/discord-social-sdk/design-guidelines/connection-points.mdx index 8d04639e2e..6276818074 100644 --- a/docs/discord-social-sdk/design-guidelines/connection-points.mdx +++ b/docs/discord-social-sdk/design-guidelines/connection-points.mdx @@ -14,7 +14,7 @@ If the game has account management, then this connection point is **required**, Discord's sign-in button is presented as the **primary option** to log-in for the player amongst the list of **external identity-providers** due to providing deeper user-benefits than a standard OAuth login. -Please use the [**Blurple Button**](/docs/discord-social-sdk/design-guidelines_BRANDING_GUIDELINES/buttons) button styling for the sign-in connection point. +Please use the [**Blurple Button**](/docs/discord-social-sdk/design-guidelines/branding-guidelines/buttons) button styling for the sign-in connection point. ![Signing In](images/social-sdk/design-guidelines/ConnectionPoints-03.png) diff --git a/docs/discord-social-sdk/design-guidelines/consoles.mdx b/docs/discord-social-sdk/design-guidelines/consoles.mdx index 460f8b9791..d98ce2f1c2 100644 --- a/docs/discord-social-sdk/design-guidelines/consoles.mdx +++ b/docs/discord-social-sdk/design-guidelines/consoles.mdx @@ -40,7 +40,7 @@ Game chat will be available for games who support the feature on consoles. Howev ## Friends list on console -Please leverage the same [friends list guidelines](/docs/discord-social-sdk/design-guidelines_UNIFIED_FRIENDS_LIST) previously documented in the playbook. There are no notable differences in the friends list on console in comparison to other devices. However, consoles do not support hover interactions so there needs to be console-friendly way for players to access secondary information (such as alternate identities) about friends in the list. +Please leverage the same [friends list guidelines](/docs/discord-social-sdk/design-guidelines/unified-friends-list) previously documented in the playbook. There are no notable differences in the friends list on console in comparison to other devices. However, consoles do not support hover interactions so there needs to be console-friendly way for players to access secondary information (such as alternate identities) about friends in the list. ![chat on console](images/social-sdk/design-guidelines/Consoles-06.jpg) @@ -48,7 +48,7 @@ Please leverage the same [friends list guidelines](/docs/discord-social-sdk/desi ## Resources -- [Development Guide: Account Linking on Consoles](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES) +- [Development Guide: Account Linking on Consoles](/docs/discord-social-sdk/development-guides/account-linking-on-consoles) ## Change Log diff --git a/docs/discord-social-sdk/design-guidelines/direct-messages.mdx b/docs/discord-social-sdk/design-guidelines/direct-messages.mdx index 33aa4a73f2..e952a27d06 100644 --- a/docs/discord-social-sdk/design-guidelines/direct-messages.mdx +++ b/docs/discord-social-sdk/design-guidelines/direct-messages.mdx @@ -9,7 +9,7 @@ sidebar_label: Direct Messages ## Badge when online elsewhere -The badging logic in direct-messages is consistent with the logic detailed in the [Unified Friends List](/docs/discord-social-sdk/design-guidelines_UNIFIED_FRIENDS_LIST) section. +The badging logic in direct-messages is consistent with the logic detailed in the [Unified Friends List](/docs/discord-social-sdk/design-guidelines/unified-friends-list) section. If the user is **online elsewhere** and is not in the game client, their usernames will include a **Discord badge**. Once they're online in the game-client, they will not retain the Discord badge. diff --git a/docs/discord-social-sdk/design-guidelines/linked-channels.mdx b/docs/discord-social-sdk/design-guidelines/linked-channels.mdx index d47f66fa5c..806a1bbffc 100644 --- a/docs/discord-social-sdk/design-guidelines/linked-channels.mdx +++ b/docs/discord-social-sdk/design-guidelines/linked-channels.mdx @@ -78,7 +78,7 @@ When "Remove channel-link" is interacted with, show the player a **confirmation* ## Resources -- [Development Guide: Linked Channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) +- [Development Guide: Linked Channels](/docs/discord-social-sdk/development-guides/linked-channels) - [Design Assets: Linked Channel Icon](https://github.com/discord/discord-api-docs/blob/main/resources/discord-social-sdk) ## Change Log diff --git a/docs/discord-social-sdk/development-guides.mdx b/docs/discord-social-sdk/development-guides.mdx index bb4e2b2124..f4e78e6070 100644 --- a/docs/discord-social-sdk/development-guides.mdx +++ b/docs/discord-social-sdk/development-guides.mdx @@ -30,7 +30,7 @@ If you are new to the Discord Social SDK, we recommend you start with the [Getti Learn how to authenticate users with their Discord accounts using OAuth2. - + Implement Discord authentication flows for console platforms. @@ -60,10 +60,10 @@ If you are new to the Discord Social SDK, we recommend you start with the [Getti Bring players together in a shared lobby with invites, text chat, and voice comms. - + Connect game lobbies to Discord text channels. - + Add in-game voice communication.
diff --git a/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx b/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx index 7b33524b79..78d72db321 100644 --- a/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx +++ b/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx @@ -92,11 +92,11 @@ If you plan to handle console authorization manually, you can follow these steps We'll be following the same OAuth2 device authorization flow as the automatic method, but you'll need to manually handle the polling and token exchange. -1. [Request a device code from Discord](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-1-request-a-device-code-from-discord) -2. [Display the user verification information](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-2-display-authorize-screen-with-qr-code-and-user-code) or open the authorization screen (optional) -3. [Poll for the user's authorization](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-3-poll-for-users-authorization) -4. [Exchange the device code for an access token](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-4-exchange-device-code-for-access-token) -5. [Handle the token response](/docs/discord-social-sdk/development-guides_ACCOUNT_LINKING_ON_CONSOLES/step-5-handle-token-response) and close authorization screen (optional) +1. [Request a device code from Discord](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-1-request-a-device-code-from-discord) +2. [Display the user verification information](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-2-display-authorize-screen-with-qr-code-and-user-code) or open the authorization screen (optional) +3. [Poll for the user's authorization](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-3-poll-for-users-authorization) +4. [Exchange the device code for an access token](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-4-exchange-device-code-for-access-token) +5. [Handle the token response](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-5-handle-token-response) and close authorization screen (optional) ### Step 1: Request a Device Code from Discord diff --git a/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx b/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx index 7814f22112..d1c2307c18 100644 --- a/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx +++ b/docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx @@ -239,7 +239,7 @@ def revoke_token(access_or_refresh_token): Now that you've successfully implemented account linking with Discord, you can integrate more social features into your game. - + Design guidelines for account linking and user authentication diff --git a/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx b/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx index 761dc22f6c..50a84895f0 100644 --- a/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx +++ b/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list.mdx @@ -47,7 +47,7 @@ Presence is how Discord stores whether a user is currently online or not, as wel > info The SDK will only display activities associated with the current game, meaning you will not be able to see other game activities in Rich Presence, even if you can see them in the Discord client. -See our [Design Guidelines: Status & Rich Presence](/docs/discord-social-sdk/design-guidelines_STATUS_RICH_PRESENCE) for best practices on displaying presence information. +See our [Design Guidelines: Status & Rich Presence](/docs/discord-social-sdk/design-guidelines/status-rich-presence) for best practices on displaying presence information. Let's combine to create a unified friends list. @@ -116,7 +116,7 @@ This will output the raw relationship data to the console. You can use this info ## Step 2: Organize Relationships -Based on our design guidelines for a [Unified Friends List](/docs/discord-social-sdk/design-guidelines_UNIFIED_FRIENDS_LIST), you should separate the player's friends list into three sections: `Online - GameTitle`, `Online - Elsewhere`, and `Offline`. +Based on our design guidelines for a [Unified Friends List](/docs/discord-social-sdk/design-guidelines/unified-friends-list), you should separate the player's friends list into three sections: `Online - GameTitle`, `Online - Elsewhere`, and `Offline`. Because we are building a text console application, we will use emojis to represent the status of each friend but you can use your own design elements to convey status and presence in your game. @@ -265,7 +265,7 @@ Now your friends list will automatically update when the presence of a friend ch Now that you have a unified friends list, you can build on your social features by allowing players to manage relationships, send game invites, and more. Check out our other guides for more information: - + Best practices for designing your Unified Friends List. diff --git a/docs/discord-social-sdk/development-guides/linked-channels.mdx b/docs/discord-social-sdk/development-guides/linked-channels.mdx index b16a53e14b..9877ba3ee8 100644 --- a/docs/discord-social-sdk/development-guides/linked-channels.mdx +++ b/docs/discord-social-sdk/development-guides/linked-channels.mdx @@ -116,7 +116,7 @@ struct GuildChannel { ### Saving a channel link selection -Once the user has chosen a channel to link to, you can call [`Client::LinkChannelToLobby`] to set or change the channel a lobby is linked to. You can also use [`Client::UnlinkChannelFromLobby`] to remove the link. The conditions specified in [Linked Channel Requirements](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS/channel-requirements) must be met for the given lobby, channel, and user. +Once the user has chosen a channel to link to, you can call [`Client::LinkChannelToLobby`] to set or change the channel a lobby is linked to. You can also use [`Client::UnlinkChannelFromLobby`] to remove the link. The conditions specified in [Linked Channel Requirements](/docs/discord-social-sdk/development-guides/linked-channels/channel-requirements) must be met for the given lobby, channel, and user. ### Try It Out diff --git a/docs/discord-social-sdk/development-guides/managing-lobbies.mdx b/docs/discord-social-sdk/development-guides/managing-lobbies.mdx index b25e4697dc..c023425a92 100644 --- a/docs/discord-social-sdk/development-guides/managing-lobbies.mdx +++ b/docs/discord-social-sdk/development-guides/managing-lobbies.mdx @@ -149,13 +149,13 @@ client->SetMessageCreatedCallback([&client](uint64_t messageId) { You can connect a lobby to a Discord text channel with Linked Channels. Linked Channels allows users to chat with each other in the lobby using Discord, even if they are not in the game. -See our guide on [Linked Channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) for more information on how to link a channel to a lobby. +See our guide on [Linked Channels](/docs/discord-social-sdk/development-guides/linked-channels) for more information on how to link a channel to a lobby. --- ## Joining Voice Chat -See our guide on [Joining Voice Chat](/docs/discord-social-sdk/development-guides_JOINING_VOICE_CHAT) for more information on how to start a voice call in a lobby. +See our guide on [Joining Voice Chat](/docs/discord-social-sdk/development-guides/joining-voice-chat) for more information on how to start a voice call in a lobby. --- @@ -175,10 +175,10 @@ With your game able to create and manage lobbies, you can now implement addition Allow players to invite friends to join their game session or party. - + Add voice communication to your lobbies. - + Connect lobbies to Discord text channels. diff --git a/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx b/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx index 0332cc172e..fbef333ca0 100644 --- a/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx +++ b/docs/discord-social-sdk/development-guides/sending-direct-messages.mdx @@ -60,7 +60,7 @@ client->SendUserMessage(recipientId, message, [](auto result, uint64_t messageId In some situations, messages from your game with the Social SDK will also appear in Discord. This will happen for: - 1 on 1 chat when at least one of the users is a full Discord user -- Lobby chat when the lobby is [linked to a Discord channel](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) +- Lobby chat when the lobby is [linked to a Discord channel](/docs/discord-social-sdk/development-guides/linked-channels) - The message must have been sent by a user who is not banned on Discord. When messaging between provisional accounts or non-friends, channel ID and recipient ID is set to the other user's ID. These messages are sent ephemerally and do not persist within a channel. Because of that, you will not be able to resolve a [`ChannelHandle`] for them. @@ -116,7 +116,7 @@ Now that you know how to send and receive messages, check out these other Discor Bring players together in a shared lobby with invites, text chat, and voice comms. - + Enable cross-platform text chat between a Discord channel and your game. diff --git a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx index d896f18a92..b20a81d854 100644 --- a/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx +++ b/docs/discord-social-sdk/development-guides/setting-rich-presence.mdx @@ -206,7 +206,7 @@ Now that you've set up Rich Presence, you might want to explore: Bring players together in a shared lobby with invites, text chat, and voice comms. - + Best practices for Rich Presence UI/UX.
diff --git a/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx b/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx index 3a1032d5be..45550d8e32 100644 --- a/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx +++ b/docs/discord-social-sdk/development-guides/using-with-discord-apis.mdx @@ -128,7 +128,7 @@ Now that you've set up Rich Presence, you might want to explore: Bring players together in a shared lobby with invites, text chat, and voice comms. - + Best practices for Rich Presence UI/UX.
diff --git a/docs/discord-social-sdk/getting-started.mdx b/docs/discord-social-sdk/getting-started.mdx index 194052316f..7ae616eb22 100644 --- a/docs/discord-social-sdk/getting-started.mdx +++ b/docs/discord-social-sdk/getting-started.mdx @@ -21,13 +21,13 @@ Select a platform to get started. If you are unsure which platform to choose, we recommend starting with the C++ guide to familiarize yourself with the SDK's core concepts. - + For use with custom engines or standalone applications. - + For use with Unity. - + For use with Unreal Engine. diff --git a/docs/discord-social-sdk/getting-started/using-unity.mdx b/docs/discord-social-sdk/getting-started/using-unity.mdx index c209da68b2..6569129c85 100644 --- a/docs/discord-social-sdk/getting-started/using-unity.mdx +++ b/docs/discord-social-sdk/getting-started/using-unity.mdx @@ -154,7 +154,7 @@ This will hook up the API status changes to your text in the game. Then we'll ne - The **status callback** tells you when you're connected and ready to use Discord features > info -> The Unity plugin handles running the SDK callbacks for you in Unity, no need to use [`RunCallbacks`] like we do in the [C++ guide](/docs/discord-social-sdk/getting-started_USING_C++). +> The Unity plugin handles running the SDK callbacks for you in Unity, no need to use [`RunCallbacks`] like we do in the [C++ guide](/docs/discord-social-sdk/getting-started/using-c++). > info > Most Discord features won't work until the status is `Ready`. The status callback lets you know when you can start using them. diff --git a/docs/events/gateway-events.mdx b/docs/events/gateway-events.mdx index d12e8a7a20..1052eeb55a 100644 --- a/docs/events/gateway-events.mdx +++ b/docs/events/gateway-events.mdx @@ -460,7 +460,7 @@ The inner `d` key is a boolean that indicates whether the session may be resumab ### Auto Moderation -All [Auto Moderation](/docs/resorces/auto-moderation) related events are only sent to bot users which have the `MANAGE_GUILD` permission. +All [Auto Moderation](/docs/resources/auto-moderation) related events are only sent to bot users which have the `MANAGE_GUILD` permission. #### Auto Moderation Rule Create @@ -494,7 +494,7 @@ Sent when a rule is triggered and an action is executed (e.g. when a message is | matched_keyword | ?string | Word or phrase configured in the rule that triggered the rule | | matched_content *** | ?string | Substring in content that triggered the rule | -\* `message_id` will not exist if message was blocked by [Auto Moderation](/docs/resorces/auto-moderation) or content was not part of any message +\* `message_id` will not exist if message was blocked by [Auto Moderation](/docs/resources/auto-moderation) or content was not part of any message \*\* `alert_system_message_id` will not exist if this event does not correspond to an action with type `SEND_ALERT_MESSAGE` @@ -645,7 +645,7 @@ The inner payload can be: | threads | array of [channel](/docs/resources/channel#channel-object) objects | All active threads in the guild that current user has permission to view | | presences | array of partial [presence update](/docs/events/gateway-events#presence-update) objects | Presences of the members in the guild, will only include non-offline members if the size is greater than `large threshold` | | stage_instances | array of [stage instance](/docs/resources/stage-instance#stage-instance-object) objects | Stage instances in the guild | -| guild_scheduled_events | array of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) objects | Scheduled events in the guild | +| guild_scheduled_events | array of [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) objects | Scheduled events in the guild | | soundboard_sounds | array of [soundboard sound](/docs/resources/soundboard#soundboard-sound-object) objects | Soundboard sounds in the guild | > warn @@ -828,15 +828,15 @@ Sent when a guild role is deleted. #### Guild Scheduled Event Create -Sent when a guild scheduled event is created. The inner payload is a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object. +Sent when a guild scheduled event is created. The inner payload is a [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object. #### Guild Scheduled Event Update -Sent when a guild scheduled event is updated. The inner payload is a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object. +Sent when a guild scheduled event is updated. The inner payload is a [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object. #### Guild Scheduled Event Delete -Sent when a guild scheduled event is deleted. The inner payload is a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object. +Sent when a guild scheduled event is deleted. The inner payload is a [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object. #### Guild Scheduled Event User Add diff --git a/docs/quick-start/getting-started.mdx b/docs/quick-start/getting-started.mdx index d7a65c2e8b..8d9af3fc0d 100644 --- a/docs/quick-start/getting-started.mdx +++ b/docs/quick-start/getting-started.mdx @@ -141,7 +141,7 @@ Now we'll select where your app can be installed in Discord, which is determined Click on **Installation** in the left sidebar, then under **Installation Contexts** make sure both "User Install" and "Guild Install" are selected. > info -> Some apps may only want to support one installation context—for example, a moderation app may only support a server context. However, by default, we recommend supporting both installation contexts. For detailed information about supporting user-installed apps, you can read the [user-installable app tutorial](/docs/tutorials/develing-a-user-installable-app). +> Some apps may only want to support one installation context—for example, a moderation app may only support a server context. However, by default, we recommend supporting both installation contexts. For detailed information about supporting user-installed apps, you can read the [user-installable app tutorial](/docs/tutorials/developing-a-user-installable-app). ### Setting up an install link @@ -568,7 +568,7 @@ Hopefully you learned a bit about Discord apps, how to configure them, and how t Explore 1st party and community-built libraries and tools to speed up and simplify your development - + Tutorial on building and handling interactions for apps installed to a user diff --git a/docs/quick-start/overview-of-apps.mdx b/docs/quick-start/overview-of-apps.mdx index 2f48202780..4fda82d0e0 100644 --- a/docs/quick-start/overview-of-apps.mdx +++ b/docs/quick-start/overview-of-apps.mdx @@ -34,11 +34,11 @@ Using the [Embedded App SDK](/docs/developer-tools/embedded-app-sdk), apps can c ### Customize servers -With the right API endpoints and proper [permissions](/docs/topics/permissions), apps can customize the experience of using and moderating servers by accessing and customizing all sorts of resources core to Discord—including [users](/docs/resources/user), [channels](/docs/resources/channel), and [AutoMod](/docs/resorces/auto-moderation) to name a few. Explore the **Resources** documentation category to learn about the different Discord resources and how apps can use them. +With the right API endpoints and proper [permissions](/docs/topics/permissions), apps can customize the experience of using and moderating servers by accessing and customizing all sorts of resources core to Discord—including [users](/docs/resources/user), [channels](/docs/resources/channel), and [AutoMod](/docs/resources/auto-moderation) to name a few. Explore the **Resources** documentation category to learn about the different Discord resources and how apps can use them. ### Update user metadata and presence -Apps can update a Discord's user metadata with data from a party game or app in a few ways. Apps can also update a user's profile with actionable data from a game or app by integrating **[Rich Presence](/docs/rich-presence/overview)**. Apps can also use **[role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA)** to associate third-party metadata (like stats or account type) with Discord users, which server admins can use to set up roles based on. You can explore more in the [configuring metadata for linked roles](/docs/tutorials/configuring-app-metadata-for-linked-roles) tutorial. +Apps can update a Discord's user metadata with data from a party game or app in a few ways. Apps can also update a user's profile with actionable data from a game or app by integrating **[Rich Presence](/docs/rich-presence/overview)**. Apps can also use **[role connection metadata](/docs/resources/application-role-connection-metadata)** to associate third-party metadata (like stats or account type) with Discord users, which server admins can use to set up roles based on. You can explore more in the [configuring metadata for linked roles](/docs/tutorials/configuring-app-metadata-for-linked-roles) tutorial. ### Add premium features diff --git a/docs/reference.mdx b/docs/reference.mdx index 547b5803db..fc1fae4404 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -348,7 +348,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be | Team Icon | team-icons/[team_id](/docs/topics/teams#data-models-team-object)/[team_icon](/docs/topics/teams#data-models-team-object).png | PNG, JPEG, WebP | | Sticker | stickers/[sticker_id](/docs/resources/sticker#sticker-object).png \*\*\* \*\*\*\* | PNG, Lottie, GIF | | Role Icon | role-icons/[role_id](/docs/topics/permissions#role-object)/[role_icon](/docs/topics/permissions#role-object).png | PNG, JPEG, WebP | -| Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object).png | PNG, JPEG, WebP | +| Guild Scheduled Event Cover | guild-events/[scheduled_event_id](/docs/resources/guild-scheduled-event#guild-scheduled-event-object)/[scheduled_event_cover_image](/docs/resources/guild-scheduled-event#guild-scheduled-event-object).png | PNG, JPEG, WebP | | Guild Member Banner | guilds/[guild_id](/docs/resources/guild#guild-object)/users/[user_id](/docs/resources/user#user-object)/banners/[member_banner](/docs/resources/guild#guild-member-object).png \* | PNG, JPEG, WebP, GIF | \* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. (example: `a_1269e74af4df7417b13759eae50c83dc`) diff --git a/docs/resources/application-role-connection-metadata.md b/docs/resources/application-role-connection-metadata.md index e5e274b022..6d5b356b67 100644 --- a/docs/resources/application-role-connection-metadata.md +++ b/docs/resources/application-role-connection-metadata.md @@ -14,7 +14,7 @@ When a user connects their account using the bot's [`role_connections_verificati | Field | Type | Description | |----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| -| type | [ApplicationRoleConnectionMetadataType](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object-application-role-connection-metadata-type) | type of metadata value | +| type | [ApplicationRoleConnectionMetadataType](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type) | type of metadata value | | key | string | dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters) | | name | string | name of the metadata field (1-100 characters) | | name_localizations? | dictionary with keys in [available locales](/docs/reference#locales) | translations of the name | @@ -39,11 +39,11 @@ When a user connects their account using the bot's [`role_connections_verificati ## Get Application Role Connection Metadata Records % GET /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata -Returns a list of [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) objects for the given application. +Returns a list of [application role connection metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) objects for the given application. ## Update Application Role Connection Metadata Records % PUT /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata -Updates and returns a list of [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) objects for the given application. +Updates and returns a list of [application role connection metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) objects for the given application. > info > An application can have a maximum of 5 metadata records. diff --git a/docs/resources/application.md b/docs/resources/application.md index 349206ad7a..4885a3950a 100644 --- a/docs/resources/application.md +++ b/docs/resources/application.md @@ -138,7 +138,7 @@ Status indicating whether event webhooks are enabled or disabled for an applicat | Value | Name | Description | |-----------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `1 << 6` | APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE | Indicates if an app uses the [Auto Moderation API](/docs/resorces/auto-moderation) | +| `1 << 6` | APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE | Indicates if an app uses the [Auto Moderation API](/docs/resources/auto-moderation) | | `1 << 12` | GATEWAY_PRESENCE | Intent required for bots in **100 or more servers** to receive [`presence_update` events](/docs/events/gateway-events#presence-update) | | `1 << 13` | GATEWAY_PRESENCE_LIMITED | Intent required for bots in under 100 servers to receive [`presence_update` events](/docs/events/gateway-events#presence-update), found on the **Bot** page in your app's settings | | `1 << 14` | GATEWAY_GUILD_MEMBERS | Intent required for bots in **100 or more servers** to receive member-related events like `guild_member_add`. See the list of member-related events [under `GUILD_MEMBERS`](/docs/events/gateway#list-of-intents) | diff --git a/docs/resources/audit-log.md b/docs/resources/audit-log.md index 7877baaf33..4f8b3beb2c 100644 --- a/docs/resources/audit-log.md +++ b/docs/resources/audit-log.md @@ -19,7 +19,7 @@ When an app is performing an eligible action using the APIs, it can pass an `X-A | application_commands | array of [application commands](/docs/interactions/application-commands#application-command-object) objects | List of application commands referenced in the audit log | | audit_log_entries | array of [audit log entry](/docs/resources/audit-log#audit-log-entry-object) objects | List of audit log entries, sorted from most to least recent | | auto_moderation_rules | array of [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) objects | List of auto moderation rules referenced in the audit log | -| guild_scheduled_events | array of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) objects | List of guild scheduled events referenced in the audit log | +| guild_scheduled_events | array of [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) objects | List of guild scheduled events referenced in the audit log | | integrations | array of partial [integration](/docs/resources/guild#integration-object) objects | List of partial integration objects | | threads | array of thread-specific [channel](/docs/resources/channel#channel-object) objects | List of threads referenced in the audit log\* | | users | array of [user](/docs/resources/user#user-object) objects | List of users referenced in the audit log | @@ -119,9 +119,9 @@ If no object is noted, there won't be a `changes` array in the entry, though oth | STICKER_CREATE | 90 | Sticker was created | [Sticker](/docs/resources/sticker#sticker-object) | | STICKER_UPDATE | 91 | Sticker details were updated | [Sticker](/docs/resources/sticker#sticker-object) | | STICKER_DELETE | 92 | Sticker was deleted | [Sticker](/docs/resources/sticker#sticker-object) | -| GUILD_SCHEDULED_EVENT_CREATE | 100 | Event was created | [Guild Scheduled Event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) | -| GUILD_SCHEDULED_EVENT_UPDATE | 101 | Event was updated | [Guild Scheduled Event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) | -| GUILD_SCHEDULED_EVENT_DELETE | 102 | Event was cancelled | [Guild Scheduled Event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) | +| GUILD_SCHEDULED_EVENT_CREATE | 100 | Event was created | [Guild Scheduled Event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) | +| GUILD_SCHEDULED_EVENT_UPDATE | 101 | Event was updated | [Guild Scheduled Event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) | +| GUILD_SCHEDULED_EVENT_DELETE | 102 | Event was cancelled | [Guild Scheduled Event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) | | THREAD_CREATE | 110 | Thread was created in a channel | [Thread](/docs/resources/channel#thread-metadata-object) | | THREAD_UPDATE | 111 | Thread was updated | [Thread](/docs/resources/channel#thread-metadata-object) | | THREAD_DELETE | 112 | Thread was deleted | [Thread](/docs/resources/channel#thread-metadata-object) | diff --git a/docs/resources/guild-scheduled-event.mdx b/docs/resources/guild-scheduled-event.mdx index cee08dd6cc..82c6a5870c 100644 --- a/docs/resources/guild-scheduled-event.mdx +++ b/docs/resources/guild-scheduled-event.mdx @@ -10,26 +10,26 @@ A representation of a scheduled event in a [guild](/docs/resources/guild#). |-----------------------|--------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | snowflake | the id of the scheduled event | | guild_id | snowflake | the guild id which the scheduled event belongs to | -| channel_id ** | ?snowflake | the channel id in which the scheduled event will be hosted, or `null` if [scheduled entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) is `EXTERNAL` | +| channel_id ** | ?snowflake | the channel id in which the scheduled event will be hosted, or `null` if [scheduled entity type](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types) is `EXTERNAL` | | creator_id? * | ?snowflake | the id of the user that created the scheduled event * | | name | string | the name of the scheduled event (1-100 characters) | | description? | ?string | the description of the scheduled event (1-1000 characters) | | scheduled_start_time | ISO8601 timestamp | the time the scheduled event will start | | scheduled_end_time ** | ?ISO8601 timestamp | the time the scheduled event will end, required if entity_type is `EXTERNAL` | -| privacy_level | [privacy level](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | -| status | [event status](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | -| entity_type | [scheduled entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the type of the scheduled event | +| privacy_level | [privacy level](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | +| status | [event status](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | +| entity_type | [scheduled entity type](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types) | the type of the scheduled event | | entity_id | ?snowflake | the id of an entity associated with a guild scheduled event | -| entity_metadata ** | ?[entity metadata](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | additional metadata for the guild scheduled event | +| entity_metadata ** | ?[entity metadata](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | additional metadata for the guild scheduled event | | creator? | [user](/docs/resources/user#user-object) object | the user that created the scheduled event | | user_count? | integer | the number of users subscribed to the scheduled event | | image? | ?string | the [cover image hash](/docs/reference#image-formatting) of the scheduled event | -| recurrence_rule | ?[recurrence rule](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | +| recurrence_rule | ?[recurrence rule](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | \* `creator_id` will be null and `creator` will not be included for events created before October 25th, 2021, when the concept of `creator_id` was introduced and tracked. -\** See [field requirements by entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) to understand the relationship between `entity_type` and the following fields: `channel_id`, `entity_metadata`, and `scheduled_end_time` +\** See [field requirements by entity type](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-field-requirements-by-entity-type) to understand the relationship between `entity_type` and the following fields: `channel_id`, `entity_metadata`, and `scheduled_end_time` ###### Guild Scheduled Event Privacy Level @@ -90,7 +90,7 @@ SCHEDULED --> CANCELED |-------------|--------|------------------------------------------| | location? * | string | location of the event (1-100 characters) | -\* [required](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) for events with `'entity_type': EXTERNAL` +\* [required](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata) for events with `'entity_type': EXTERNAL` ### Guild Scheduled Event User Object @@ -113,11 +113,11 @@ Discord's recurrence rule is a subset of the behaviors [defined in the iCalendar |-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | start | ISO8601 timestamp | Starting time of the recurrence interval | | end \[1\] | ?ISO8601 timestamp | Ending time of the recurrence interval | -| frequency | [recurrence rule - frequency](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency) object | How often the event occurs | +| frequency | [recurrence rule - frequency](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency) object | How often the event occurs | | interval | int | The spacing between the events, defined by `frequency`. For example, `frequency` of `WEEKLY` and an `interval` of `2` would be "every-other week" | -| by_weekday | ?array of [recurrence rule - weekday](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | Set of specific days within a week for the event to recur on | -| by_n_weekday | ?array of [recurrence rule - n_weekday](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure) objects | List of specific days within a specific week (1-5) to recur on | -| by_month | ?array of [recurrence rule - month](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month) | Set of specific months to recur on | +| by_weekday | ?array of [recurrence rule - weekday](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | Set of specific days within a week for the event to recur on | +| by_n_weekday | ?array of [recurrence rule - n_weekday](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure) objects | List of specific days within a specific week (1-5) to recur on | +| by_month | ?array of [recurrence rule - month](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month) | Set of specific months to recur on | | by_month_day | ?array of int | Set of specific dates within a month to recur on | | by_year_day \[1\] | ?array of int | Set of days within a year to recur on (1-364) | | count \[1\] | ?int | The total amount of times that the event is allowed to recur before stopping | @@ -240,7 +240,7 @@ by_month_day = [24] | Field | Type | Description | |-------|------|-------------------------------| | n | int | The week to reoccur on. 1 - 5 | -| day | [recurrence rule - weekday](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | The day within the week to reoccur on | | guild member data for this user for the guild which this event belongs to, if any | +| day | [recurrence rule - weekday](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday) | The day within the week to reoccur on | | guild member data for this user for the guild which this event belongs to, if any | ###### Guild Scheduled Event Recurrence Rule - Month @@ -261,7 +261,7 @@ by_month_day = [24] ## List Scheduled Events for Guild % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events -Returns a list of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) objects for the given guild. +Returns a list of [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) objects for the given guild. ###### Query String Params @@ -271,7 +271,7 @@ Returns a list of [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/ ## Create Guild Scheduled Event % POST /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events -Create a guild scheduled event in the guild. Returns a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Create](/docs/events/gateway-events#guild-scheduled-event-create) Gateway event. +Create a guild scheduled event in the guild. Returns a [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Create](/docs/events/gateway-events#guild-scheduled-event-create) Gateway event. > info > A guild can have a maximum of 100 events with `SCHEDULED` or `ACTIVE` status at any time. @@ -284,24 +284,24 @@ Create a guild scheduled event in the guild. Returns a [guild scheduled event](/ | Field | Type | Description | |------------------------|-----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------| | channel_id? * | snowflake * | the channel id of the scheduled event. | -| entity_metadata? ** | [entity metadata](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | +| entity_metadata? ** | [entity metadata](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | | name | string | the name of the scheduled event | -| privacy_level | [privacy level](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | +| privacy_level | [privacy level](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | | scheduled_start_time | ISO8601 timestamp | the time to schedule the scheduled event | | scheduled_end_time? ** | ISO8601 timestamp | the time when the scheduled event is scheduled to end | | description? | string | the description of the scheduled event | -| entity_type | [entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | +| entity_type | [entity type](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | | image? | [image data](/docs/reference#image-data) | the cover image of the scheduled event | -| recurrence_rule? | [recurrence rule](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | +| recurrence_rule? | [recurrence rule](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | \* Optional for events with `'entity_type': EXTERNAL` \*\* Required for events with `'entity_type': EXTERNAL` -## Get Guild Scheduled Event % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\} +## Get Guild Scheduled Event % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild-scheduled-event.id/docs/resources/guild-scheduled-event#guild-scheduled-event-object\} -Get a guild scheduled event. Returns a [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. +Get a guild scheduled event. Returns a [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object on success. ###### Query String Params @@ -309,12 +309,12 @@ Get a guild scheduled event. Returns a [guild scheduled event](/docs/resources/g |------------------|--------------------------------------------------|--------------------------------------------------| | with_user_count? | [boolean](/docs/reference#boolean-query-strings) | include number of users subscribed to this event | -## Modify Guild Scheduled Event % PATCH /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\} +## Modify Guild Scheduled Event % PATCH /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild-scheduled-event.id/docs/resources/guild-scheduled-event#guild-scheduled-event-object\} -Modify a guild scheduled event. Returns the modified [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Update](/docs/events/gateway-events#guild-scheduled-event-update) Gateway event. +Modify a guild scheduled event. Returns the modified [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object on success. Fires a [Guild Scheduled Event Update](/docs/events/gateway-events#guild-scheduled-event-update) Gateway event. > info -> To start or end an event, use this endpoint to modify the event's [status](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) field. +> To start or end an event, use this endpoint to modify the event's [status](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status) field. > info > This endpoint supports the `X-Audit-Log-Reason` header. @@ -330,31 +330,31 @@ Modify a guild scheduled event. Returns the modified [guild scheduled event](/do | Field | Type | Description | |-----------------------|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | channel_id? * | ?snowflake | the channel id of the scheduled event, set to `null` if changing entity type to `EXTERNAL` | -| entity_metadata? | ?[entity metadata](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | +| entity_metadata? | ?[entity metadata](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata) | the entity metadata of the scheduled event | | name? | string | the name of the scheduled event | -| privacy_level? | [privacy level](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | +| privacy_level? | [privacy level](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level) | the privacy level of the scheduled event | | scheduled_start_time? | ISO8601 timestamp | the time to schedule the scheduled event | | scheduled_end_time? * | ISO8601 timestamp | the time when the scheduled event is scheduled to end | | description? | ?string | the description of the scheduled event | -| entity_type? * | [event entity type](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | -| status? | [event status](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | +| entity_type? * | [event entity type](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types) | the entity type of the scheduled event | +| status? | [event status](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status) | the status of the scheduled event | | image? | [image data](/docs/reference#image-data) | the cover image of the scheduled event | -| recurrence_rule? | ?[recurrence rule](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | +| recurrence_rule? | ?[recurrence rule](/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object) | the definition for how often this event should recur | \* If updating `entity_type` to `EXTERNAL`: -- `channel_id` is required and [must be set to null](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object-field-requirements-by-entity-type) +- `channel_id` is required and [must be set to null](/docs/resources/guild-scheduled-event#guild-scheduled-event-object-field-requirements-by-entity-type) - `entity_metadata` with a `location` field must be provided - `scheduled_end_time` must be provided -## Delete Guild Scheduled Event % DELETE /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\} +## Delete Guild Scheduled Event % DELETE /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild-scheduled-event.id/docs/resources/guild-scheduled-event#guild-scheduled-event-object\} Delete a guild scheduled event. Returns a `204` on success. Fires a [Guild Scheduled Event Delete](/docs/events/gateway-events#guild-scheduled-event-delete) Gateway event. -## Get Guild Scheduled Event Users % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild_scheduled_event.id/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object\}/users +## Get Guild Scheduled Event Users % GET /guilds/\{guild.id/docs/resources/guild#guild-object\}/scheduled-events/\{guild-scheduled-event.id/docs/resources/guild-scheduled-event#guild-scheduled-event-object\}/users -Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of [guild scheduled event user](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-user-object) objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set. +Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of [guild scheduled event user](/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object) objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set. ###### Query String Params diff --git a/docs/resources/guild-template.md b/docs/resources/guild-template.md index c66b44cbe3..0f867e7fd5 100644 --- a/docs/resources/guild-template.md +++ b/docs/resources/guild-template.md @@ -99,11 +99,11 @@ Represents a code that when used, creates a guild based on a snapshot of an exis } ``` -## Get Guild Template % GET /guilds/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} +## Get Guild Template % GET /guilds/templates/{template.code/docs/resources/guild-template#guild-template-object} -Returns a [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object for the given code. +Returns a [guild template](/docs/resources/guild-template#guild-template-object) object for the given code. -## Create Guild from Guild Template % POST /guilds/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} +## Create Guild from Guild Template % POST /guilds/templates/{template.code/docs/resources/guild-template#guild-template-object} Create a new guild based on a template. Returns a [guild](/docs/resources/guild#guild-object) object on success. Fires a [Guild Create](/docs/events/gateway-events#guild-create) Gateway event. @@ -119,11 +119,11 @@ Create a new guild based on a template. Returns a [guild](/docs/resources/guild# ## Get Guild Templates % GET /guilds/{guild.id/docs/resources/guild#guild-object}/templates -Returns an array of [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) objects. Requires the `MANAGE_GUILD` permission. +Returns an array of [guild template](/docs/resources/guild-template#guild-template-object) objects. Requires the `MANAGE_GUILD` permission. ## Create Guild Template % POST /guilds/{guild.id/docs/resources/guild#guild-object}/templates -Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. +Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created [guild template](/docs/resources/guild-template#guild-template-object) object on success. ###### JSON Params @@ -132,13 +132,13 @@ Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Return | name | string | name of the template (1-100 characters) | | description? | ?string | description for the template (0-120 characters) | -## Sync Guild Template % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} +## Sync Guild Template % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild-template#guild-template-object} -Syncs the template to the guild's current state. Requires the `MANAGE_GUILD` permission. Returns the [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. +Syncs the template to the guild's current state. Requires the `MANAGE_GUILD` permission. Returns the [guild template](/docs/resources/guild-template#guild-template-object) object on success. -## Modify Guild Template % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} +## Modify Guild Template % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild-template#guild-template-object} -Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. +Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the [guild template](/docs/resources/guild-template#guild-template-object) object on success. ###### JSON Params @@ -147,6 +147,6 @@ Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Return | name? | string | name of the template (1-100 characters) | | description? | ?string | description for the template (0-120 characters) | -## Delete Guild Template % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild_TEMPLATE/guild-template-object} +## Delete Guild Template % DELETE /guilds/{guild.id/docs/resources/guild#guild-object}/templates/{template.code/docs/resources/guild-template#guild-template-object} -Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted [guild template](/docs/resources/guild_TEMPLATE/guild-template-object) object on success. +Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted [guild template](/docs/resources/guild-template#guild-template-object) object on success. diff --git a/docs/resources/invite.md b/docs/resources/invite.md index 82b735fb20..02ffbd7400 100644 --- a/docs/resources/invite.md +++ b/docs/resources/invite.md @@ -24,7 +24,7 @@ Represents a code that when used, adds a user to a guild or group DM channel. | approximate_member_count? | integer | approximate count of total members, returned from the `GET /invites/` endpoint when `with_counts` is `true` | | expires_at? | ?ISO8601 timestamp | the expiration date of this invite, returned from the `GET /invites/` endpoint when `with_expiration` is `true` | | stage_instance? | [invite stage instance](/docs/resources/invite#invite-stage-instance-object) object | stage instance data if there is a [public Stage instance](/docs/resources/stage-instance) in the Stage channel this invite is for (deprecated) | -| guild_scheduled_event? | [guild scheduled event](/docs/resources/guild_SCHEDULED_EVENT/guild-scheduled-event-object) object | guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id | +| guild-scheduled-event? | [guild scheduled event](/docs/resources/guild-scheduled-event#guild-scheduled-event-object) object | guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id | ###### Invite Types diff --git a/docs/resources/lobby.md b/docs/resources/lobby.md index 51b067e134..54bdf41a89 100644 --- a/docs/resources/lobby.md +++ b/docs/resources/lobby.md @@ -136,7 +136,7 @@ Returns nothing. ## Link Channel to Lobby % PATCH /lobbies/{lobby.id/docs/resources/lobby#lobby-object}/channel-linking -Links an existing text channel to a lobby. See [Linked Channels](/docs/discord-social-sdk/development-guides_LINKED_CHANNELS) for more information. +Links an existing text channel to a lobby. See [Linked Channels](/docs/discord-social-sdk/development-guides/linked-channels) for more information. Uses `Bearer` token for authorization and user must be a lobby member with `CanLinkLobby` [lobby member flag](/docs/resources/lobby#lobby-member-object-lobby-member-flags). diff --git a/docs/resources/user.md b/docs/resources/user.md index 9574757c3c..5d59a58233 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -181,7 +181,7 @@ The role connection object that an application has attached to a user. |-------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | platform_name | ?string | the vanity name of the platform a bot has connected (max 50 characters) | | platform_username | ?string | the username on the platform a bot has connected (max 100 characters) | -| metadata | object | object mapping [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | +| metadata | object | object mapping [application role connection metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | ## Get Current User % GET /users/@me @@ -291,4 +291,4 @@ Updates and returns the [application role connection](/docs/resources/user#appli |--------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | platform_name? | string | the vanity name of the platform a bot has connected (max 50 characters) | | platform_username? | string | the username on the platform a bot has connected (max 100 characters) | -| metadata? | object | object mapping [application role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | +| metadata? | object | object mapping [application role connection metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected | diff --git a/docs/rich-presence/using-with-the-discord-social-sdk.mdx b/docs/rich-presence/using-with-the-discord-social-sdk.mdx index dbf43158df..4515ab1dfe 100644 --- a/docs/rich-presence/using-with-the-discord-social-sdk.mdx +++ b/docs/rich-presence/using-with-the-discord-social-sdk.mdx @@ -24,6 +24,6 @@ Before we dig in, it's helpful to understand what Rich Presence data you can set Check out our [Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) guide and our to learn how to set custom presence data for your players using the Discord Social SDK. -- [Design Guidelines: Status & Rich Presence](/docs/discord-social-sdk/design-guidelines_STATUS_RICH_PRESENCE) +- [Design Guidelines: Status & Rich Presence](/docs/discord-social-sdk/design-guidelines/status-rich-presence) ![Rich Presence](images/social-sdk/design-guidelines/StatusPresence-06.png) diff --git a/docs/tutorials/configuring-app-metadata-for-linked-roles.md b/docs/tutorials/configuring-app-metadata-for-linked-roles.md index 2b235db68b..93deeeeaf9 100644 --- a/docs/tutorials/configuring-app-metadata-for-linked-roles.md +++ b/docs/tutorials/configuring-app-metadata-for-linked-roles.md @@ -2,7 +2,7 @@ Linked roles are a type of role in Discord that requires a user to connect to 3rd-party services and meet defined criteria. A role's criteria could just include the user connecting to that service, but it's often more narrow—like having a verified account, having certain stats, or having more than a certain number of followers. -Apps can define their own [role connection metadata](/docs/resources/application_ROLE_CONNECTION_METADATA), which admins can use to configure linked roles in servers where that app is installed. Apps must also set up an [OAuth2 flow](/docs/topics/oauth2) to allow users to authenticate and grant the required `role_connections.write` scope. +Apps can define their own [role connection metadata](/docs/resources/application-role-connection-metadata), which admins can use to configure linked roles in servers where that app is installed. Apps must also set up an [OAuth2 flow](/docs/topics/oauth2) to allow users to authenticate and grant the required `role_connections.write` scope. This tutorial walks through building a Discord app in JavaScript with linked roles support. @@ -124,7 +124,7 @@ COOKIE_SECRET: As a one-time step, you must tell Discord which metadata fields you are going to allow admins to use for linked roles associated with your app. -To configure connection metadata for your app, you'll call the [PUT /users/@me/applications//role-connection](/docs/resources/application_ROLE_CONNECTION_METADATA/update-application-role-connection-metadata-records) method with [application connection role metadata](/docs/resources/application_ROLE_CONNECTION_METADATA/application-role-connection-metadata-object). In the sample app, this is handled in [`src/register.js`](https://github.com/discord/linked-roles-sample/blob/main/src/register.js), and can be run via the command line. +To configure connection metadata for your app, you'll call the [PUT /users/@me/applications//role-connection](/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records) method with [application connection role metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object). In the sample app, this is handled in [`src/register.js`](https://github.com/discord/linked-roles-sample/blob/main/src/register.js), and can be run via the command line. Go back to Glitch, click the **terminal** tab, and run the following command: diff --git a/docs/tutorials/developing-a-user-installable-app.mdx b/docs/tutorials/developing-a-user-installable-app.mdx index cb789c6cc7..5a30059dc5 100644 --- a/docs/tutorials/developing-a-user-installable-app.mdx +++ b/docs/tutorials/developing-a-user-installable-app.mdx @@ -276,7 +276,7 @@ The keys in the object are the relevant installation context(s) (`GUILD_INSTALL` > info > `authorizing_integration_owners` is not the same as the user that triggered the interaction. Information about the user that triggered the interaction is in the `user` object. -Understanding the authorization owner can be helpful when handling interactions from message components for apps installed to a user, which is discussed more in the [message component interactions](/docs/tutorials/develing-a-user-installable-app/using-metadata-for-message-component-interactions) section. Or you can find technical details in the [Authorizing Integration Owners](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) documentation. +Understanding the authorization owner can be helpful when handling interactions from message components for apps installed to a user, which is discussed more in the [message component interactions](/docs/tutorials/developing-a-user-installable-app/using-metadata-for-message-component-interactions) section. Or you can find technical details in the [Authorizing Integration Owners](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) documentation. ###### `app_permissions` diff --git a/tools/checkLinks.ts b/tools/checkLinks.ts index 069578f0bd..798be912ff 100644 --- a/tools/checkLinks.ts +++ b/tools/checkLinks.ts @@ -106,7 +106,7 @@ const validLinks = new Map([ // Gather valid links const changelogAnchors = []; for (const [name, raw] of docFiles) { - const keyName = `DOCS${name.replaceAll("/", "_").replaceAll("-", "_").toUpperCase()}`; + const keyName = `/docs${name}`; if (!validLinks.has(keyName)) { validLinks.set(keyName, []); } @@ -153,8 +153,10 @@ for (const [name, raw] of docFiles) { } } +console.log(validLinks); + // Add changelog anchors to the list of valid links -validLinks.get("DOCS_CHANGE_LOG")?.push(...changelogAnchors); +validLinks.get("/docs/change-log")?.push(...changelogAnchors); const results = new Map(); @@ -177,9 +179,9 @@ for (const [name, raw] of docFiles) { const componentMatches = line.matchAll(/(?:link|href)="(?!https?|mailto)(?.+?)"/g); for (const match of concatIterables(markdownMatches, componentMatches)) { - const split = match.groups!.link.split("#")[1].split("/"); - const page = split[0]; - const anchor = split[1]; + if (!match.groups) continue; + const [page, anchor] = match.groups?.link.split("#") ?? []; + console.log(match.groups?.link, page, anchor); if (!validLinks.has(page)) { ownResults.push({ title: `Base url ${chalk.blueBright(page)} does not exist`, From 9b30374ffac61a1d0712d3214934e61b022b5dd1 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 16 Apr 2025 09:03:30 -0700 Subject: [PATCH 3/4] fix many more --- ...s-and-subcommands-to-message-interaction-objects.md | 2 +- docs/developer-tools/game-sdk.mdx | 2 +- .../design-guidelines/connection-points.mdx | 2 +- .../design-guidelines/signing-in.mdx | 2 +- docs/discord-social-sdk/development-guides.mdx | 2 +- .../development-guides/account-linking-on-consoles.mdx | 10 +++++----- .../development-guides/linked-channels.mdx | 2 +- docs/events/gateway.mdx | 4 ++-- docs/events/overview.mdx | 2 +- docs/interactions/application-commands.mdx | 2 +- docs/interactions/overview.mdx | 2 +- docs/topics/certified-devices.md | 2 +- docs/topics/oauth2.md | 2 +- docs/topics/rpc.md | 2 +- docs/tutorials/developing-a-user-installable-app.mdx | 2 +- docs/tutorials/upgrading-to-application-commands.md | 2 +- tools/checkLinks.ts | 3 --- 17 files changed, 21 insertions(+), 24 deletions(-) diff --git a/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md b/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md index 256c2b8f65..06ab2203f9 100644 --- a/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md +++ b/docs/change-log/2022-07-01-add-subcommand-groups-and-subcommands-to-message-interaction-objects.md @@ -4,7 +4,7 @@ date: "2022-07-01" breaking: true --- -While this is a breaking change, most apps only rely on interaction responses (`INTERACTION_CREATE`), *not* message interaction objects (`MESSAGE_CREATE`). [Interaction responses](/docs/interactions/receiving-and-responding#message-interaction-object/interaction-object-interaction-data) are unaffected by this change. +While this is a breaking change, most apps only rely on interaction responses (`INTERACTION_CREATE`), *not* message interaction objects (`MESSAGE_CREATE`). [Interaction responses](/docs/interactions/receiving-and-responding#interaction-object-interaction-data) are unaffected by this change. #### Upcoming Changes diff --git a/docs/developer-tools/game-sdk.mdx b/docs/developer-tools/game-sdk.mdx index a618380ce1..d091ddb904 100644 --- a/docs/developer-tools/game-sdk.mdx +++ b/docs/developer-tools/game-sdk.mdx @@ -647,7 +647,7 @@ For more detailed information and documentation around the Rich Presence feature | Custom | 4 | | Competing | 5 | -For more details about the activity types, [see Gateway documentation](/docs/events/gateway-events#/activity-object-activity-types). +For more details about the activity types, [see Gateway documentation](/docs/events/gateway-events#activity-object-activity-types). `ActivityType` is strictly for the purpose of handling events that you receive from Discord; though the SDK will not reject a payload with an `ActivityType` sent, it will be discarded and will not change anything in the client. diff --git a/docs/discord-social-sdk/design-guidelines/connection-points.mdx b/docs/discord-social-sdk/design-guidelines/connection-points.mdx index 6276818074..7d73b5e4d3 100644 --- a/docs/discord-social-sdk/design-guidelines/connection-points.mdx +++ b/docs/discord-social-sdk/design-guidelines/connection-points.mdx @@ -14,7 +14,7 @@ If the game has account management, then this connection point is **required**, Discord's sign-in button is presented as the **primary option** to log-in for the player amongst the list of **external identity-providers** due to providing deeper user-benefits than a standard OAuth login. -Please use the [**Blurple Button**](/docs/discord-social-sdk/design-guidelines/branding-guidelines/buttons) button styling for the sign-in connection point. +Please use the [**Blurple Button**](/docs/discord-social-sdk/design-guidelines/branding-guidelines#buttons) button styling for the sign-in connection point. ![Signing In](images/social-sdk/design-guidelines/ConnectionPoints-03.png) diff --git a/docs/discord-social-sdk/design-guidelines/signing-in.mdx b/docs/discord-social-sdk/design-guidelines/signing-in.mdx index 9b13f25264..b098200d26 100644 --- a/docs/discord-social-sdk/design-guidelines/signing-in.mdx +++ b/docs/discord-social-sdk/design-guidelines/signing-in.mdx @@ -11,7 +11,7 @@ sidebar_label: Signing In ## Overall flow -Sign-in or log-in flows all begin with the interaction of a [**Discord-styled button**](/docs/discord-social-sdk/design-guidelines_BRANDING_GUIDELINES/buttons). +Sign-in or log-in flows all begin with the interaction of a [**Discord-styled button**](/docs/discord-social-sdk/design-guidelines/branding-guidelines#buttons). The Discord Social SDK will support the user-journeys for those who already **have a Discord account** and those who **do not**. We will similarly support those who have Discord installed as well as those who do not (via browser). diff --git a/docs/discord-social-sdk/development-guides.mdx b/docs/discord-social-sdk/development-guides.mdx index f4e78e6070..ea5c805980 100644 --- a/docs/discord-social-sdk/development-guides.mdx +++ b/docs/discord-social-sdk/development-guides.mdx @@ -72,7 +72,7 @@ If you are new to the Discord Social SDK, we recommend you start with the [Getti ## Developer Best Practices - + Use logging and debugging tools to troubleshoot issues. diff --git a/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx b/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx index 78d72db321..896d38910d 100644 --- a/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx +++ b/docs/discord-social-sdk/development-guides/account-linking-on-consoles.mdx @@ -92,11 +92,11 @@ If you plan to handle console authorization manually, you can follow these steps We'll be following the same OAuth2 device authorization flow as the automatic method, but you'll need to manually handle the polling and token exchange. -1. [Request a device code from Discord](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-1-request-a-device-code-from-discord) -2. [Display the user verification information](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-2-display-authorize-screen-with-qr-code-and-user-code) or open the authorization screen (optional) -3. [Poll for the user's authorization](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-3-poll-for-users-authorization) -4. [Exchange the device code for an access token](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-4-exchange-device-code-for-access-token) -5. [Handle the token response](/docs/discord-social-sdk/development-guides/account-linking-on-consoles/step-5-handle-token-response) and close authorization screen (optional) +1. [Request a device code from Discord](/docs/discord-social-sdk/development-guides/account-linking-on-consoles#step-1-request-a-device-code-from-discord) +2. [Display the user verification information](/docs/discord-social-sdk/development-guides/account-linking-on-consoles#step-2-display-authorize-screen-with-qr-code-and-user-code) or open the authorization screen (optional) +3. [Poll for the user's authorization](/docs/discord-social-sdk/development-guides/account-linking-on-consoles#step-3-poll-for-users-authorization) +4. [Exchange the device code for an access token](/docs/discord-social-sdk/development-guides/account-linking-on-consoles#step-4-exchange-device-code-for-access-token) +5. [Handle the token response](/docs/discord-social-sdk/development-guides/account-linking-on-consoles#step-5-handle-token-response) and close authorization screen (optional) ### Step 1: Request a Device Code from Discord diff --git a/docs/discord-social-sdk/development-guides/linked-channels.mdx b/docs/discord-social-sdk/development-guides/linked-channels.mdx index 9877ba3ee8..1f2aaf6194 100644 --- a/docs/discord-social-sdk/development-guides/linked-channels.mdx +++ b/docs/discord-social-sdk/development-guides/linked-channels.mdx @@ -116,7 +116,7 @@ struct GuildChannel { ### Saving a channel link selection -Once the user has chosen a channel to link to, you can call [`Client::LinkChannelToLobby`] to set or change the channel a lobby is linked to. You can also use [`Client::UnlinkChannelFromLobby`] to remove the link. The conditions specified in [Linked Channel Requirements](/docs/discord-social-sdk/development-guides/linked-channels/channel-requirements) must be met for the given lobby, channel, and user. +Once the user has chosen a channel to link to, you can call [`Client::LinkChannelToLobby`] to set or change the channel a lobby is linked to. You can also use [`Client::UnlinkChannelFromLobby`] to remove the link. The conditions specified in [Linked Channel Requirements](/docs/discord-social-sdk/development-guides/linked-channels#channel-requirements) must be met for the given lobby, channel, and user. ### Try It Out diff --git a/docs/events/gateway.mdx b/docs/events/gateway.mdx index 09d4320e42..abe9c4794d 100644 --- a/docs/events/gateway.mdx +++ b/docs/events/gateway.mdx @@ -9,7 +9,7 @@ The Gateway API lets apps open secure WebSocket connections with Discord to rece > info > In *most* cases, performing REST operations on Discord resources can be done using the [HTTP API](/docs/reference#http-api) rather than the Gateway API. -The Gateway is Discord's form of real-time communication used by clients (including apps), so there are nuances and data passed that simply isn't relevant to apps. Interacting with the Gateway can be tricky, but there are [community-built libraries](/docs/developer-tools/community-resources/libraries) with built-in support that simplify the most complicated bits and pieces. If you're planning on writing a custom implementation, be sure to read the following documentation in its entirety so you understand the sacred secrets of the Gateway (or at least those that matter for apps). +The Gateway is Discord's form of real-time communication used by clients (including apps), so there are nuances and data passed that simply isn't relevant to apps. Interacting with the Gateway can be tricky, but there are [community-built libraries](/docs/developer-tools/community-resources#libraries) with built-in support that simplify the most complicated bits and pieces. If you're planning on writing a custom implementation, be sure to read the following documentation in its entirety so you understand the sacred secrets of the Gateway (or at least those that matter for apps). ## Gateway Events @@ -441,7 +441,7 @@ In addition to the gateway restrictions described here, Discord's REST API is al #### Enabling Privileged Intents -Before using privileged intents, you must enable them in your app's settings. In the [Developer Portal](#APPLICATIONS), you can navigate to your app's settings then toggle the privileged intents on the **Bots** page under the "Privileged Gateway Intents" section. You should only toggle privileged intents that your bot *requires to function*. +Before using privileged intents, you must enable them in your app's settings. In the [Developer Portal](https://discord.com/developers/applications), you can navigate to your app's settings then toggle the privileged intents on the **Bots** page under the "Privileged Gateway Intents" section. You should only toggle privileged intents that your bot *requires to function*. If your app qualifies for [verification](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified), you must first [verify your app](https://support-dev.discord.com/hc/en-us/articles/23926564536471-How-Do-I-Get-My-App-Verified) and request access to these intents during the verification process. If your app is already verified and you need to request additional privileged intents, you can [contact support](https://dis.gd/support). diff --git a/docs/events/overview.mdx b/docs/events/overview.mdx index 1181c754ab..c18bd6c004 100644 --- a/docs/events/overview.mdx +++ b/docs/events/overview.mdx @@ -19,7 +19,7 @@ Read details about each way to receive events in the sections below. Gateway events are the primary way apps can listen and send events. Most events related to resources in Discord, like updates to channels, guilds, roles, and messages, are only available over [Gateway](/docs/events/gateway). -Gateway events are sent over a WebSocket-based [Gateway connection](/docs/events/gateway#connections) between Discord and your app. To receive Gateway events, your app must open and maintain a persistent Gateway connection which you can read details about in the [Gateway documentation](/docs/events/gateway#connections). To make receiving Gateway events simpler, we suggest using a [developer library](/docs/developer-tools/community-resources/libraries) which helps setup, maintain, and handle common pitfalls with Gateway connections (like [rate limits](/docs/events/gateway#rate-limiting)). +Gateway events are sent over a WebSocket-based [Gateway connection](/docs/events/gateway#connections) between Discord and your app. To receive Gateway events, your app must open and maintain a persistent Gateway connection which you can read details about in the [Gateway documentation](/docs/events/gateway#connections). To make receiving Gateway events simpler, we suggest using a [developer library](/docs/developer-tools/community-resources#libraries) which helps setup, maintain, and handle common pitfalls with Gateway connections (like [rate limits](/docs/events/gateway#rate-limiting)). Details about receiving events using the Gateway API is in the [Gateway documentation](/docs/events/gateway#receiving-events), and the full list of available Gateway events is in the [Gateway Events documentation](/docs/events/gateway-events). diff --git a/docs/interactions/application-commands.mdx b/docs/interactions/application-commands.mdx index 05d00c37e0..e51e4d7411 100644 --- a/docs/interactions/application-commands.mdx +++ b/docs/interactions/application-commands.mdx @@ -27,7 +27,7 @@ Application commands are native ways to interact with apps in the Discord client | dm_permission? | boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | all | | default_permission? | ?boolean | Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to `true` | all | | nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands), defaults to `false` | all | -| integration_types? | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation contexts](/docs/resources/application#installation-context) where the command is available, only for globally-scoped commands. Defaults to your app's [configured contexts](/docs/resources/application#installation-context/setting-supported-installation-contexts) | all | +| integration_types? | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation contexts](/docs/resources/application#installation-context) where the command is available, only for globally-scoped commands. Defaults to your app's [configured contexts](/docs/resources/application#setting-supported-installation-contexts) | all | | contexts? | ?list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all | | version | snowflake | Autoincrementing version identifier updated during substantial record changes | all | | handler? | one of [command handler types](/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types) | Determines whether the interaction is handled by the app's interactions handler or by Discord | PRIMARY_ENTRY_POINT | diff --git a/docs/interactions/overview.mdx b/docs/interactions/overview.mdx index d2637ccc46..71c97af39b 100644 --- a/docs/interactions/overview.mdx +++ b/docs/interactions/overview.mdx @@ -157,7 +157,7 @@ except BadSignatureError: In addition to ensuring your app validates security-related request headers at the time of saving your endpoint, Discord will also perform automated, routine security checks against your endpoint, including purposefully sending you invalid signatures. If you fail the validation, we will remove your interactions URL and alert you via email and System DM. -We highly recommend checking out our [Community Resources](/docs/developer-tools/community-resources/interactions) and the libraries found there. They not only provide typing for Interactions data models, but also include decorators for API frameworks like Flask and Express to make validation easy. +We highly recommend checking out our [Community Resources](/docs/developer-tools/community-resources#interactions) and the libraries found there. They not only provide typing for Interactions data models, but also include decorators for API frameworks like Flask and Express to make validation easy. #### Adding an Interactions Endpoint URL diff --git a/docs/topics/certified-devices.md b/docs/topics/certified-devices.md index 162f255d49..71391083e8 100644 --- a/docs/topics/certified-devices.md +++ b/docs/topics/certified-devices.md @@ -6,7 +6,7 @@ Baked into Discord is the ability for hardware manufacturers to tell us a little I'm glad you asked! -1. [Create an application](#APPLICATIONS) for your hardware vendor—save the Client ID! +1. [Create an application](https://discord.com/developers/applications) for your hardware vendor—save the Client ID! 2. Talk to Discord via one simple HTTP or WebSocket call 3. Send us a [`SET_CERTIFIED_DEVICES`](/docs/topics/rpc#setcertifieddevices) WebSocket payload or equivalent HTTP POST whenever the state of the device changes diff --git a/docs/topics/oauth2.md b/docs/topics/oauth2.md index 805fd2323e..608b82d380 100644 --- a/docs/topics/oauth2.md +++ b/docs/topics/oauth2.md @@ -4,7 +4,7 @@ OAuth2 enables application developers to build applications that utilize authent ## Shared Resources -The first step in implementing OAuth2 is [registering a developer application](#APPLICATIONS) and retrieving your client ID and client secret. Most people who will be implementing OAuth2 will want to find and utilize a library in the language of their choice. For those implementing OAuth2 from scratch, please see [RFC 6749](https://tools.ietf.org/html/rfc6749) for details. After you create your application with Discord, make sure that you have your `client_id` and `client_secret` handy. The next step is to figure out which OAuth2 flow is right for your purposes. +The first step in implementing OAuth2 is [registering a developer application](https://discord.com/developers/applications) and retrieving your client ID and client secret. Most people who will be implementing OAuth2 will want to find and utilize a library in the language of their choice. For those implementing OAuth2 from scratch, please see [RFC 6749](https://tools.ietf.org/html/rfc6749) for details. After you create your application with Discord, make sure that you have your `client_id` and `client_secret` handy. The next step is to figure out which OAuth2 flow is right for your purposes. ###### OAuth2 URLs diff --git a/docs/topics/rpc.md b/docs/topics/rpc.md index 1fb45a4a4e..10fbe9cf4a 100644 --- a/docs/topics/rpc.md +++ b/docs/topics/rpc.md @@ -40,7 +40,7 @@ For WebSocket connections, the connection is always `ws://127.0.0.1:PORT/?v=VERS - `PORT` is the port of the RPC Server. - `ENCODING` is the type of encoding for this connection to use. `json` and `etf` are supported. -To begin, you'll need to create an app. Head to [your apps](#APPLICATIONS) and click the big plus button. When you create an app on our Developers site, you must specify an "RPC Origin" and "Redirect URI" from which to permit connections and authorizations. **The origin you send when connecting and the redirect uri you send when exchanging an authorization code for an access token must match one of the ones entered on the Developers site.** +To begin, you'll need to create an app. Head to [your apps](https://discord.com/developers/applications) and click the big plus button. When you create an app on our Developers site, you must specify an "RPC Origin" and "Redirect URI" from which to permit connections and authorizations. **The origin you send when connecting and the redirect uri you send when exchanging an authorization code for an access token must match one of the ones entered on the Developers site.** When establishing a WebSocket connection, we verify the Origin header on connection to prevent client ID spoofing. You will be instantly disconnected if the Origin does not match. diff --git a/docs/tutorials/developing-a-user-installable-app.mdx b/docs/tutorials/developing-a-user-installable-app.mdx index 5a30059dc5..6ce4112b81 100644 --- a/docs/tutorials/developing-a-user-installable-app.mdx +++ b/docs/tutorials/developing-a-user-installable-app.mdx @@ -276,7 +276,7 @@ The keys in the object are the relevant installation context(s) (`GUILD_INSTALL` > info > `authorizing_integration_owners` is not the same as the user that triggered the interaction. Information about the user that triggered the interaction is in the `user` object. -Understanding the authorization owner can be helpful when handling interactions from message components for apps installed to a user, which is discussed more in the [message component interactions](/docs/tutorials/developing-a-user-installable-app/using-metadata-for-message-component-interactions) section. Or you can find technical details in the [Authorizing Integration Owners](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) documentation. +Understanding the authorization owner can be helpful when handling interactions from message components for apps installed to a user, which is discussed more in the [message component interactions](/docs/tutorials/developing-a-user-installable-app#using-metadata-for-message-component-interactions) section. Or you can find technical details in the [Authorizing Integration Owners](/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object) documentation. ###### `app_permissions` diff --git a/docs/tutorials/upgrading-to-application-commands.md b/docs/tutorials/upgrading-to-application-commands.md index fd791979fd..e041d18a44 100644 --- a/docs/tutorials/upgrading-to-application-commands.md +++ b/docs/tutorials/upgrading-to-application-commands.md @@ -148,7 +148,7 @@ However, before adding your URL to your app settings, your endpoint must be set 2. **Verifying request signatures**: To ensure that requests are coming from Discord, your endpoint must verify each request using the included headers, specifically `X-Signature-Ed25519` and `X-Signature-Timestamp`. If the signature fails validating, your app should return a `401` response. More information and example code can be found in the [Security and Authorization documentation](/docs/interactions/overview#setting-up-an-endpoint-validating-security-request-headers). > info -> Many libraries on the [Community Resources page](/docs/developer-tools/community-resources/interactions) simplify verification and interaction request handling by exporting reusable functions and/or handling it automatically. +> Many libraries on the [Community Resources page](/docs/developer-tools/community-resources#interactions) simplify verification and interaction request handling by exporting reusable functions and/or handling it automatically. After your URL is set up to handle signature verification and `PING` requests, you can add your Interaction Endpoint URL by navigating to your app settings from the [developer portal](https://discord.com/developers/applications). On the **General Information** page, you’ll see a field for your **Interactions Endpoint URL**. diff --git a/tools/checkLinks.ts b/tools/checkLinks.ts index 798be912ff..cddfd162c6 100644 --- a/tools/checkLinks.ts +++ b/tools/checkLinks.ts @@ -153,8 +153,6 @@ for (const [name, raw] of docFiles) { } } -console.log(validLinks); - // Add changelog anchors to the list of valid links validLinks.get("/docs/change-log")?.push(...changelogAnchors); @@ -181,7 +179,6 @@ for (const [name, raw] of docFiles) { for (const match of concatIterables(markdownMatches, componentMatches)) { if (!match.groups) continue; const [page, anchor] = match.groups?.link.split("#") ?? []; - console.log(match.groups?.link, page, anchor); if (!validLinks.has(page)) { ownResults.push({ title: `Base url ${chalk.blueBright(page)} does not exist`, From f146a8deb0ed3b2bf3de98a84af206752c87a7e2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 16 Apr 2025 09:04:52 -0700 Subject: [PATCH 4/4] come on now man --- docs/interactions/application-commands.mdx | 36 +++++++++++----------- docs/resources/application.md | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/interactions/application-commands.mdx b/docs/interactions/application-commands.mdx index e51e4d7411..5ed6de7678 100644 --- a/docs/interactions/application-commands.mdx +++ b/docs/interactions/application-commands.mdx @@ -12,25 +12,25 @@ Application commands are native ways to interact with apps in the Discord client ###### Application Command Structure -| Field | Type | Description | Valid Types | -|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -| id | snowflake | Unique ID of command | all | -| type? | one of [command types](/docs/interactions/application-commands#application-command-object-application-command-types) | [Type of command](/docs/interactions/application-commands#application-command-object-application-command-types), defaults to `1` | all | -| application_id | snowflake | ID of the parent application | all | -| guild_id? | snowflake | Guild ID of the command, if not global | all | -| name | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | all | -| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for `name` field. Values follow the same restrictions as `name` | all | -| description | string | Description for `CHAT_INPUT` commands, 1-100 characters. Empty string for `USER` and `MESSAGE` commands | all | -| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for `description` field. Values follow the same restrictions as `description` | all | -| options? \* | array of [command options](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | CHAT_INPUT | -| default_member_permissions | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | all | -| dm_permission? | boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | all | -| default_permission? | ?boolean | Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to `true` | all | -| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands), defaults to `false` | all | +| Field | Type | Description | Valid Types | +|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| +| id | snowflake | Unique ID of command | all | +| type? | one of [command types](/docs/interactions/application-commands#application-command-object-application-command-types) | [Type of command](/docs/interactions/application-commands#application-command-object-application-command-types), defaults to `1` | all | +| application_id | snowflake | ID of the parent application | all | +| guild_id? | snowflake | Guild ID of the command, if not global | all | +| name | string | [Name of command](/docs/interactions/application-commands#application-command-object-application-command-naming), 1-32 characters | all | +| name_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for `name` field. Values follow the same restrictions as `name` | all | +| description | string | Description for `CHAT_INPUT` commands, 1-100 characters. Empty string for `USER` and `MESSAGE` commands | all | +| description_localizations? | ?dictionary with keys in [available locales](/docs/reference#locales) | Localization dictionary for `description` field. Values follow the same restrictions as `description` | all | +| options? \* | array of [command options](/docs/interactions/application-commands#application-command-object-application-command-option-structure) | Parameters for the command, max of 25 | CHAT_INPUT | +| default_member_permissions | ?string | Set of [permissions](/docs/topics/permissions) represented as a bit set | all | +| dm_permission? | boolean | **Deprecated (use `contexts` instead)**; Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. | all | +| default_permission? | ?boolean | Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to `true` | all | +| nsfw? | boolean | Indicates whether the command is [age-restricted](/docs/interactions/application-commands#agerestricted-commands), defaults to `false` | all | | integration_types? | list of [integration types](/docs/resources/application#application-object-application-integration-types) | [Installation contexts](/docs/resources/application#installation-context) where the command is available, only for globally-scoped commands. Defaults to your app's [configured contexts](/docs/resources/application#setting-supported-installation-contexts) | all | -| contexts? | ?list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all | -| version | snowflake | Autoincrementing version identifier updated during substantial record changes | all | -| handler? | one of [command handler types](/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types) | Determines whether the interaction is handled by the app's interactions handler or by Discord | PRIMARY_ENTRY_POINT | +| contexts? | ?list of [interaction context types](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) | [Interaction context(s)](/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. | all | +| version | snowflake | Autoincrementing version identifier updated during substantial record changes | all | +| handler? | one of [command handler types](/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types) | Determines whether the interaction is handled by the app's interactions handler or by Discord | PRIMARY_ENTRY_POINT | \* `options` can only be set for application commands of type `CHAT_INPUT`. diff --git a/docs/resources/application.md b/docs/resources/application.md index 4885a3950a..1626cb5173 100644 --- a/docs/resources/application.md +++ b/docs/resources/application.md @@ -138,7 +138,7 @@ Status indicating whether event webhooks are enabled or disabled for an applicat | Value | Name | Description | |-----------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `1 << 6` | APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE | Indicates if an app uses the [Auto Moderation API](/docs/resources/auto-moderation) | +| `1 << 6` | APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE | Indicates if an app uses the [Auto Moderation API](/docs/resources/auto-moderation) | | `1 << 12` | GATEWAY_PRESENCE | Intent required for bots in **100 or more servers** to receive [`presence_update` events](/docs/events/gateway-events#presence-update) | | `1 << 13` | GATEWAY_PRESENCE_LIMITED | Intent required for bots in under 100 servers to receive [`presence_update` events](/docs/events/gateway-events#presence-update), found on the **Bot** page in your app's settings | | `1 << 14` | GATEWAY_GUILD_MEMBERS | Intent required for bots in **100 or more servers** to receive member-related events like `guild_member_add`. See the list of member-related events [under `GUILD_MEMBERS`](/docs/events/gateway#list-of-intents) |