From 3568fc898231ab673de0f5cc676ad9ae94f98077 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Apr 2025 13:30:46 -0700 Subject: [PATCH 1/4] Use mdx for all route subheadings --- docs/events/gateway.mdx | 7 +- docs/interactions/application-commands.mdx | 51 +++++-- .../interactions/receiving-and-responding.mdx | 24 ++- ... application-role-connection-metadata.mdx} | 8 +- .../{application.md => application.mdx} | 31 ++-- .../resources/{audit-log.md => audit-log.mdx} | 3 +- ...auto-moderation.md => auto-moderation.mdx} | 15 +- docs/resources/{channel.md => channel.mdx} | 78 ++++++---- docs/resources/{emoji.md => emoji.mdx} | 30 ++-- .../{entitlement.md => entitlement.mdx} | 15 +- docs/resources/guild-scheduled-event.mdx | 18 ++- .../{guild-template.md => guild-template.mdx} | 21 ++- docs/resources/{guild.md => guild.mdx} | 141 ++++++++++++------ docs/resources/{invite.md => invite.mdx} | 6 +- docs/resources/{lobby.md => lobby.mdx} | 63 ++++---- docs/resources/{message.md => message.mdx} | 39 +++-- docs/resources/{poll.md => poll.mdx} | 6 +- docs/resources/{sku.md => sku.mdx} | 3 +- .../{soundboard.md => soundboard.mdx} | 21 ++- .../{stage-instance.md => stage-instance.mdx} | 12 +- docs/resources/{sticker.md => sticker.mdx} | 24 ++- .../{subscription.md => subscription.mdx} | 6 +- docs/resources/{user.md => user.mdx} | 33 ++-- docs/resources/{voice.md => voice.mdx} | 15 +- docs/resources/{webhook.md => webhook.mdx} | 100 +++++++------ docs/topics/{oauth2.md => oauth2.mdx} | 6 +- 26 files changed, 492 insertions(+), 284 deletions(-) rename docs/resources/{application-role-connection-metadata.md => application-role-connection-metadata.mdx} (94%) rename docs/resources/{application.md => application.mdx} (96%) rename docs/resources/{audit-log.md => audit-log.mdx} (99%) rename docs/resources/{auto-moderation.md => auto-moderation.mdx} (95%) rename docs/resources/{channel.md => channel.mdx} (94%) rename docs/resources/{emoji.md => emoji.mdx} (84%) rename docs/resources/{entitlement.md => entitlement.mdx} (89%) rename docs/resources/{guild-template.md => guild-template.mdx} (85%) rename docs/resources/{guild.md => guild.mdx} (94%) rename docs/resources/{invite.md => invite.mdx} (97%) rename docs/resources/{lobby.md => lobby.mdx} (69%) rename docs/resources/{message.md => message.mdx} (97%) rename docs/resources/{poll.md => poll.mdx} (95%) rename docs/resources/{sku.md => sku.mdx} (97%) rename docs/resources/{soundboard.md => soundboard.mdx} (87%) rename docs/resources/{stage-instance.md => stage-instance.mdx} (93%) rename docs/resources/{sticker.md => sticker.mdx} (90%) rename docs/resources/{subscription.md => subscription.mdx} (94%) rename docs/resources/{user.md => user.mdx} (95%) rename docs/resources/{voice.md => voice.mdx} (89%) rename docs/resources/{webhook.md => webhook.mdx} (84%) rename docs/topics/{oauth2.md => oauth2.mdx} (99%) diff --git a/docs/events/gateway.mdx b/docs/events/gateway.mdx index f2753acccc..08c9ced403 100644 --- a/docs/events/gateway.mdx +++ b/docs/events/gateway.mdx @@ -697,7 +697,8 @@ The [Get Gateway Bot endpoint](/docs/events/gateway#get-gateway-bot) will always 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 +## Get Gateway +/gateway :::info This endpoint does not require authentication. @@ -713,7 +714,9 @@ Returns an object with a valid WSS URL which the app can use when [Connecting](/ } ``` -## Get Gateway Bot % GET /gateway/bot +## Get Gateway Bot + +/gateway/bot :::warn This endpoint requires authentication using a valid bot token. diff --git a/docs/interactions/application-commands.mdx b/docs/interactions/application-commands.mdx index 8df90d591e..5bc8732734 100644 --- a/docs/interactions/application-commands.mdx +++ b/docs/interactions/application-commands.mdx @@ -1156,7 +1156,8 @@ Details about accessing and using age-restricted commands is in [the Help Center 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 +/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). @@ -1170,7 +1171,8 @@ Fetch all of the global commands for your application. Returns an array of [appl |---------------------|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 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 +/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. @@ -1195,11 +1197,13 @@ Create a new global command. Returns `201` if a command with the same name does | 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 +/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. -## 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 +/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. @@ -1223,11 +1227,13 @@ Edit a global command. Returns `200` and an [application command](/docs/interact | 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 +/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 +/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. @@ -1235,7 +1241,8 @@ Takes a list of application commands, overwriting the existing global command li 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 +/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). @@ -1249,7 +1256,8 @@ Fetch all of the guild commands for your application for a specific guild. Retur |---------------------|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 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 +/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. @@ -1271,11 +1279,13 @@ Create a new guild command. New guild commands will be available in the guild im | 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 +/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. -## 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 +/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. @@ -1296,11 +1306,15 @@ Edit a guild command. Updates for guild commands will be available immediately. | 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) | -## 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 + +/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 + +/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. @@ -1326,15 +1340,19 @@ This will overwrite **all** types of application commands: slash commands, user | 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 + +/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. -## 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 +/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. -## 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 +/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 @@ -1358,7 +1376,8 @@ Deleting or renaming a command will permanently delete all permissions for the c |-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------| | 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 +/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)). diff --git a/docs/interactions/receiving-and-responding.mdx b/docs/interactions/receiving-and-responding.mdx index 2d9c0e825d..fcd82195b5 100644 --- a/docs/interactions/receiving-and-responding.mdx +++ b/docs/interactions/receiving-and-responding.mdx @@ -389,7 +389,8 @@ Interaction tokens are valid for **15 minutes**, meaning you can respond to an i 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 +/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). @@ -402,19 +403,23 @@ This endpoint also supports file attachments similar to the webhook endpoints. R | 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 +/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). -## 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 +/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). -## 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 +/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 +/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`) @@ -424,14 +429,17 @@ Create a followup message for an Interaction. Functions the same as [Execute Web 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 +/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). -## 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 +/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). -## 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 +/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/resources/application-role-connection-metadata.md b/docs/resources/application-role-connection-metadata.mdx similarity index 94% rename from docs/resources/application-role-connection-metadata.md rename to docs/resources/application-role-connection-metadata.mdx index 4590502bdd..2d9c2d861d 100644 --- a/docs/resources/application-role-connection-metadata.md +++ b/docs/resources/application-role-connection-metadata.mdx @@ -38,11 +38,15 @@ When a user connects their account using the bot's [`role_connections_verificati 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 + +/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. -## Update Application Role Connection Metadata Records % PUT /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata +## Update Application Role Connection Metadata Records + +/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. diff --git a/docs/resources/application.md b/docs/resources/application.mdx similarity index 96% rename from docs/resources/application.md rename to docs/resources/application.mdx index dc20d7a97a..c7c7160be5 100644 --- a/docs/resources/application.md +++ b/docs/resources/application.mdx @@ -182,9 +182,8 @@ 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. -::: +> 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. ## Install Links @@ -194,9 +193,8 @@ 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`. -::: +> 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`. #### Discord Provided Link @@ -210,9 +208,8 @@ https://discord.com/oauth2/authorize?client_id=1234567895647001626 Instead, these links will prompt the user for the scopes and bot user permissions configured in your Default Install Settings. -:::info -Discord Provided Links are limited to the `application.commands` and `bot` scopes -::: +> info +> Discord Provided Links are limited to the `application.commands` and `bot` scopes #### Custom URL @@ -226,17 +223,18 @@ You can configure your app's install link in your [app's settings](https://disco The Default Install Settings will appear on the **Installation** page when you have "Discord Provided Link" selected as your install link type. -## Get Current Application % GET /applications/@me +## Get Current Application +/applications/@me Returns the [application](/docs/resources/application#application-object) object associated with the requesting bot user. -## Edit Current Application % PATCH /applications/@me +## Edit Current Application +/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. -:::info -All parameters to this endpoint are optional -::: +> info +> All parameters to this endpoint are optional ###### JSON Params @@ -260,11 +258,11 @@ All parameters to this endpoint are optional \*\* 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 +/applications/[\{application.id\}](/docs/resources/application#application-object)/activity-instances/[\{instance_id\}](/docs/resources/application#get-application-activity-instance-activity-instance-object) 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 ```json @@ -293,7 +291,6 @@ Returns a serialized activity instance, if it exists. Useful for [preventing unw | users | array of snowflakes, [user](/docs/resources/user#user-object) IDs | IDs of the Users currently connected to the instance | - ###### Activity Location Object The Activity Location is an object that describes the location in which an activity instance is running. diff --git a/docs/resources/audit-log.md b/docs/resources/audit-log.mdx similarity index 99% rename from docs/resources/audit-log.md rename to docs/resources/audit-log.mdx index 8c5a925371..97c56a6c4f 100644 --- a/docs/resources/audit-log.md +++ b/docs/resources/audit-log.mdx @@ -197,7 +197,8 @@ For most objects, the change keys may be any field on the changed object. The fo | [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 +/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. diff --git a/docs/resources/auto-moderation.md b/docs/resources/auto-moderation.mdx similarity index 95% rename from docs/resources/auto-moderation.md rename to docs/resources/auto-moderation.mdx index 208365964a..1e57a5d9fc 100644 --- a/docs/resources/auto-moderation.md +++ b/docs/resources/auto-moderation.mdx @@ -198,7 +198,8 @@ value of [action type](/docs/resources/auto-moderation#auto-moderation-action-ob 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. -## List Auto Moderation Rules for Guild % GET /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules +## List Auto Moderation Rules for Guild +/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. @@ -206,7 +207,8 @@ Get a list of all rules currently configured for the guild. Returns a list of [a 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 +/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. @@ -214,7 +216,8 @@ Get a single rule. Returns an [auto moderation rule](/docs/resources/auto-modera 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 +/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. @@ -246,7 +249,8 @@ See [Trigger Types](/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 Auto Moderation Rule +/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. @@ -276,7 +280,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. \* 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 +/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. diff --git a/docs/resources/channel.md b/docs/resources/channel.mdx similarity index 94% rename from docs/resources/channel.md rename to docs/resources/channel.mdx index d3f19df986..26037022f4 100644 --- a/docs/resources/channel.md +++ b/docs/resources/channel.mdx @@ -345,11 +345,13 @@ When updating a `GUILD_FORUM` or a `GUILD_MEDIA` channel, tag objects in `availa \* 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 +/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. -## Modify Channel % PATCH /channels/{channel.id/docs/resources/channel#channel-object} +## Modify Channel +/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. @@ -417,7 +419,8 @@ Otherwise, requires the `MANAGE_THREADS` permission. Fires a [Thread Update](/do | 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 +/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). @@ -433,7 +436,8 @@ For Community guilds, the Rules or Guidelines channel and the Community Updates 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 +/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). @@ -449,11 +453,13 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. -## Create Channel Invite % POST /channels/{channel.id/docs/resources/channel#channel-object}/invites +## Create Channel Invite +/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. @@ -473,7 +479,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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) @@ -481,7 +488,8 @@ Delete a channel permission overwrite for a user or role in a channel. Only usab 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 +/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. @@ -495,17 +503,20 @@ This endpoint supports the `X-Audit-Log-Reason` header. |--------------------|-----------|----------------------| | webhook_channel_id | snowflake | id of target channel | -## Trigger Typing Indicator % POST /channels/{channel.id/docs/resources/channel#channel-object}/typing +## Trigger Typing Indicator +/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. 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 +/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. -## Pin Message % PUT /channels/{channel.id/docs/resources/channel#channel-object}/pins/{message.id/docs/resources/message#message-object} +## Pin Message +/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. @@ -517,7 +528,8 @@ The max pinned messages is 50. 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 +/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. @@ -525,7 +537,8 @@ Unpin a message in a channel. Requires the `MANAGE_MESSAGES` permission. Returns 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 +/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. @@ -536,11 +549,13 @@ 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 +/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 +/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. @@ -558,7 +573,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -578,7 +594,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. \* `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 +/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. @@ -630,23 +647,28 @@ When sending a message, apps must provide a value for **at least one of** `conte \* 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 +/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. -## Add Thread Member % PUT /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/{user.id/docs/resources/user#user-object} +## Add Thread Member +/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. -## Leave Thread % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/@me +## Leave Thread +/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. -## Remove Thread Member % DELETE /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/{user.id/docs/resources/user#user-object} +## Remove Thread Member +/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. -## Get Thread Member % GET /channels/{channel.id/docs/resources/channel#channel-object}/thread-members/{user.id/docs/resources/user#user-object} +## Get Thread Member +/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. @@ -658,7 +680,8 @@ When `with_member` is set to `true`, the thread member object will include a `me |--------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------| | 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 +/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. @@ -680,7 +703,8 @@ This endpoint is restricted according to whether the `GUILD_MEMBERS` [Privileged | 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 +/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. @@ -699,7 +723,8 @@ Returns archived threads in the channel that are public. When called on a `GUILD | 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 +/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. @@ -718,7 +743,8 @@ Returns archived threads in the channel that are of [type](/docs/resources/chann | 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 +/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. diff --git a/docs/resources/emoji.md b/docs/resources/emoji.mdx similarity index 84% rename from docs/resources/emoji.md rename to docs/resources/emoji.mdx index 22f7d177e4..fec6d990bb 100644 --- a/docs/resources/emoji.md +++ b/docs/resources/emoji.mdx @@ -91,15 +91,18 @@ In `MESSAGE_REACTION_ADD` and `MESSAGE_REACTION_REMOVE` gateway events `name` ma } ``` -## List Guild Emojis % GET /guilds/{guild.id/docs/resources/guild#guild-object}/emojis +## List Guild Emojis +/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. -## Get Guild Emoji % GET /guilds/{guild.id/docs/resources/guild#guild-object}/emojis/{emoji.id/docs/resources/emoji#emoji-object} +## Get Guild Emoji +/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. -## Create Guild Emoji % POST /guilds/{guild.id/docs/resources/guild#guild-object}/emojis +## Create Guild Emoji +/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. @@ -119,7 +122,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -138,7 +142,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -146,7 +151,8 @@ Delete the given emoji. For emojis created by the current user, requires either 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 +/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. @@ -172,11 +178,13 @@ 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 +/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. -## Create Application Emoji % POST /applications/{application.id/docs/resources/application#application-object}/emojis +## Create Application Emoji +/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. @@ -191,7 +199,8 @@ Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to up | name | string | name of the emoji | | 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 +/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. @@ -201,6 +210,7 @@ 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 +/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.mdx similarity index 89% rename from docs/resources/entitlement.md rename to docs/resources/entitlement.mdx index 7e2ff0a84e..f546b9948f 100644 --- a/docs/resources/entitlement.md +++ b/docs/resources/entitlement.mdx @@ -58,7 +58,8 @@ 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 +/applications/[\{application.id\}](/docs/resources/application#application-object)/entitlements Returns all entitlements for a given app, active and expired. @@ -95,7 +96,8 @@ 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 +/applications/[\{application.id\}](/docs/resources/application#application-object)/entitlements/[\{entitlement.id\}](/docs/resources/entitlement#entitlement-object) Returns an entitlement. @@ -117,13 +119,15 @@ 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 +/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). Returns a `204 No Content` on success. -## Create Test Entitlement % POST /applications/{application.id/docs/resources/application#application-object}/entitlements +## Create Test Entitlement +/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 +151,8 @@ 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 + /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 6e41b35a4d..2858857173 100644 --- a/docs/resources/guild-scheduled-event.mdx +++ b/docs/resources/guild-scheduled-event.mdx @@ -260,7 +260,8 @@ 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 +/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. @@ -270,7 +271,8 @@ Returns a list of [guild scheduled event](/docs/resources/guild-scheduled-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 +/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. @@ -302,7 +304,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. \*\* 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 +/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. @@ -312,7 +315,8 @@ 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 +/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. @@ -355,11 +359,13 @@ All parameters to this endpoint are optional - `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 +/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 +/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. diff --git a/docs/resources/guild-template.md b/docs/resources/guild-template.mdx similarity index 85% rename from docs/resources/guild-template.md rename to docs/resources/guild-template.mdx index 59b0faefdb..90e139a71a 100644 --- a/docs/resources/guild-template.md +++ b/docs/resources/guild-template.mdx @@ -99,11 +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 +/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. -## Create Guild from Guild Template % POST /guilds/templates/{template.code/docs/resources/guild-template#guild-template-object} +## Create Guild from Guild Template +/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. @@ -118,11 +120,13 @@ This endpoint can be used only by bots in less than 10 guilds. | name | string | name of the guild (2-100 characters) | | 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 +/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. -## Create Guild Template % POST /guilds/{guild.id/docs/resources/guild#guild-object}/templates +## Create Guild Template +/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. @@ -133,11 +137,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 +/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. -## 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 +/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. @@ -148,6 +154,7 @@ 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 +/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. diff --git a/docs/resources/guild.md b/docs/resources/guild.mdx similarity index 94% rename from docs/resources/guild.md rename to docs/resources/guild.mdx index 28604339f0..52ee8f8e3d 100644 --- a/docs/resources/guild.md +++ b/docs/resources/guild.mdx @@ -693,7 +693,8 @@ We are making significant changes to the Membership Screening API specifically r } ``` -## Create Guild % POST /guilds +## Create Guild +/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. @@ -763,7 +764,8 @@ The `region` field is deprecated and is replaced by [channel.rtc_region](/docs/r } ``` -## Get Guild % GET /guilds/{guild.id/docs/resources/guild#guild-object} +## Get Guild +/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. @@ -844,12 +846,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 +/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). -## Modify Guild % PATCH /guilds/{guild.id/docs/resources/guild#guild-object} +## Modify Guild +/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. @@ -891,15 +895,18 @@ Attempting to add or remove the `COMMUNITY` [guild feature](/docs/resources/guil | 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 +/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. -## Get Guild Channels % GET /guilds/{guild.id/docs/resources/guild#guild-object}/channels +## Get Guild Channels +/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. -## Create Guild Channel % POST /guilds/{guild.id/docs/resources/guild#guild-object}/channels +## Create Guild Channel +/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. @@ -938,7 +945,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. \*\* 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 +/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. @@ -957,7 +965,8 @@ 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 +/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. @@ -968,11 +977,13 @@ Returns all active threads in the guild, including public and private threads. T | 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 +/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. -## List Guild Members % GET /guilds/{guild.id/docs/resources/guild#guild-object}/members +## List Guild Members +/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. @@ -991,7 +1002,8 @@ All parameters to this endpoint are optional | 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 +/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. @@ -1006,7 +1018,8 @@ All parameters to this endpoint except for `query` are optional | 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 +/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. @@ -1031,7 +1044,8 @@ The Authorization header must be a Bot token (belonging to the same application | 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 +/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. @@ -1055,7 +1069,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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) | -## Modify Current Member % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/members/@me +## Modify Current Member +/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. @@ -1069,7 +1084,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. |-------|---------|---------------------------------|-----------------| | 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 +/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). @@ -1087,7 +1103,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. |-------|---------|---------------------------------|-----------------| | 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 +/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. @@ -1095,7 +1112,8 @@ Adds a role to a [guild member](/docs/resources/guild#guild-member-object). Requ 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 +/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. @@ -1103,7 +1121,8 @@ Removes a role from a [guild member](/docs/resources/guild#guild-member-object). 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 +/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. @@ -1111,7 +1130,8 @@ Remove a member from a guild. Requires `KICK_MEMBERS` permission. Returns a 204 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 +/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. @@ -1125,11 +1145,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 +/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. -## Create Guild Ban % PUT /guilds/{guild.id/docs/resources/guild#guild-object}/bans/{user.id/docs/resources/user#user-object} +## Create Guild Ban +/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. @@ -1144,7 +1166,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -1152,7 +1175,8 @@ Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Returns a 204 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 +/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. @@ -1180,15 +1204,18 @@ On success, this endpoint returns a 200 success response with the following body 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 +/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/roles 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 +/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. -## Create Guild Role % POST /guilds/{guild.id/docs/resources/guild#guild-object}/roles +## Create Guild Role +/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. @@ -1208,7 +1235,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -1225,7 +1253,8 @@ 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 +/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. @@ -1249,7 +1278,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -1263,7 +1293,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. |-------|---------|-----------------------------------------------------------| | 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 +/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. @@ -1271,7 +1302,8 @@ Delete a guild role. Requires the `MANAGE_ROLES` permission. Returns a 204 empty 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 +/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. @@ -1284,7 +1316,8 @@ 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 +/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. @@ -1303,15 +1336,18 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. -## Get Guild Invites % GET /guilds/{guild.id/docs/resources/guild#guild-object}/invites +## Get Guild Invites +/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. -## Get Guild Integrations % GET /guilds/{guild.id/docs/resources/guild#guild-object}/integrations +## Get Guild Integrations +/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. @@ -1319,7 +1355,8 @@ Returns a list of [integration](/docs/resources/guild#integration-object) object 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 +/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. @@ -1327,11 +1364,13 @@ Delete the attached [integration](/docs/resources/guild#integration-object) obje 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 +/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. -## Modify Guild Widget % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/widget +## Modify Guild Widget +/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. @@ -1339,11 +1378,13 @@ Modify a [guild widget settings](/docs/resources/guild#guild-widget-settings-obj 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 +/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. -## Get Guild Vanity URL % GET /guilds/{guild.id/docs/resources/guild#guild-object}/vanity-url +## Get Guild Vanity URL +/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. @@ -1360,7 +1401,8 @@ This endpoint is required to get the usage count of the vanity invite, but the i } ``` -## Get Guild Widget Image % GET /guilds/{guild.id/docs/resources/guild#guild-object}/widget.png +## Get Guild Widget Image +/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/widget.png Returns a PNG image widget for the guild. Requires no permissions or authentication. @@ -1384,11 +1426,13 @@ All parameters to this endpoint are optional. | 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 +/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. -## Modify Guild Welcome Screen % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/welcome-screen +## Modify Guild Welcome Screen +/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. @@ -1408,11 +1452,13 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/onboarding 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 +/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. @@ -1433,7 +1479,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | enabled | boolean | Whether onboarding is enabled in the guild | | 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 +/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. diff --git a/docs/resources/invite.md b/docs/resources/invite.mdx similarity index 97% rename from docs/resources/invite.md rename to docs/resources/invite.mdx index 4b3a365b89..892d6320b9 100644 --- a/docs/resources/invite.md +++ b/docs/resources/invite.mdx @@ -145,7 +145,8 @@ This is deprecated. } ``` -## Get Invite % GET /invites/{invite.code/docs/resources/invite#invite-object} +## Get Invite +/invites/[\{invite.code\}](/docs/resources/invite#invite-object) Returns an [invite](/docs/resources/invite#invite-object) object for the given code. @@ -157,7 +158,8 @@ Returns an [invite](/docs/resources/invite#invite-object) object for the given c | 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 +/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. diff --git a/docs/resources/lobby.md b/docs/resources/lobby.mdx similarity index 69% rename from docs/resources/lobby.md rename to docs/resources/lobby.mdx index 97bb7c6e6a..6472cf1e75 100644 --- a/docs/resources/lobby.md +++ b/docs/resources/lobby.mdx @@ -14,7 +14,7 @@ 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. | +| 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 | | linked_channel? | channel object | the guild channel linked to the lobby | @@ -24,11 +24,11 @@ Represents a member of a lobby, including optional metadata and flags. ###### Lobby Member Structure -| Field | Type | Description | -|-----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| -| 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) | +| Field | Type | Description | +|-----------|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| +| 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) | ###### Lobby Member Flags @@ -56,7 +56,8 @@ Represents a member of a lobby, including optional metadata and flags. } ``` -## Create Lobby % POST /lobbies +## Create Lobby +/lobbies Creates a new lobby, adding any of the specified members to it, if provided. @@ -70,23 +71,25 @@ Returns a [lobby](/docs/resources/lobby#lobby-object) object. | Field | Type | Description | |-----------------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| metadata? | ?dict | optional dictionary of string key/value pairs. The max total length is 1000. | +| 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 | | 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 -| Field | Type | Description | -|-----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| -| 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) | +| Field | Type | Description | +|-----------|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| +| 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) | -## Get Lobby % GET /lobbies/{lobby.id/docs/resources/lobby#lobby-object} +## Get Lobby +/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. -## Modify Lobby % PATCH /lobbies/{lobby.id/docs/resources/lobby#lobby-object} +## Modify Lobby +/lobbies/[\{lobby.id\}](/docs/resources/lobby#lobby-object) Modifies the specified lobby with new values, if provided. @@ -96,11 +99,12 @@ Returns the updated [lobby](/docs/resources/lobby#lobby-object) object. | Field | Type | Description | |-----------------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| metadata? | ?dict | optional dictionary of string key/value pairs. The max total length is 1000. Overwrites any existing metadata. | +| 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. | | 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 +/lobbies/[\{lobby.id\}](/docs/resources/lobby#lobby-object) Deletes the specified lobby if it exists. @@ -108,7 +112,8 @@ 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 +/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. @@ -116,18 +121,20 @@ 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) | +| 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) | -## 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 +/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 +/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. @@ -135,7 +142,8 @@ 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 +/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. @@ -149,7 +157,8 @@ 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 +/lobbies/[\{lobby.id\}](/docs/resources/lobby#lobby-object)/channel-linking Unlinks any currently linked channels from the specified lobby. @@ -159,6 +168,6 @@ Uses `Bearer` token for authorization and user must be a lobby member with `CanL Returns a [lobby](/docs/resources/lobby#lobby-object) object without a linked channel. - +{/* Autogenerated Reference Links */} [`Client::CreateOrJoinLobby`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a8b4e195555ecaa89ccdfc0acd28d3512 [`LobbyHandle`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1LobbyHandle.html#aa3510c347c4c4758bdf9f19caf2a95f3 \ No newline at end of file diff --git a/docs/resources/message.md b/docs/resources/message.mdx similarity index 97% rename from docs/resources/message.md rename to docs/resources/message.mdx index cec22bb11e..4b2d170543 100644 --- a/docs/resources/message.md +++ b/docs/resources/message.mdx @@ -734,7 +734,8 @@ 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 +/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. @@ -755,13 +756,15 @@ The `before`, `after`, and `around` parameters are mutually exclusive, only one | 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 +/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. 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 +/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. @@ -823,28 +826,33 @@ When creating a message, apps must provide a value for **at least one of** `cont 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 +/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. -## 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 +/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. 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 +/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. 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 +/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. 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 +/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. 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. @@ -864,16 +872,19 @@ 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 +/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. -## 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 +/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. 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 +/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). @@ -905,7 +916,8 @@ All parameters to this endpoint are optional and nullable. | 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 +/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. @@ -913,7 +925,8 @@ Delete a message. If operating on a guild channel and trying to delete a message 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 +/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. diff --git a/docs/resources/poll.md b/docs/resources/poll.mdx similarity index 95% rename from docs/resources/poll.md rename to docs/resources/poll.mdx index ac6580d244..0ae7fbee2e 100644 --- a/docs/resources/poll.md +++ b/docs/resources/poll.mdx @@ -123,7 +123,8 @@ For creating a poll, see [Create Message](/docs/resources/message#create-message 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 +/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. @@ -140,7 +141,8 @@ Get a list of users that voted for this specific 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 +/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. diff --git a/docs/resources/sku.md b/docs/resources/sku.mdx similarity index 97% rename from docs/resources/sku.md rename to docs/resources/sku.mdx index 93ede3526b..8c50dbd15d 100644 --- a/docs/resources/sku.md +++ b/docs/resources/sku.mdx @@ -65,7 +65,8 @@ 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 +/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.mdx similarity index 87% rename from docs/resources/soundboard.md rename to docs/resources/soundboard.mdx index 1cb9504d0f..6ffe150c9e 100644 --- a/docs/resources/soundboard.md +++ b/docs/resources/soundboard.mdx @@ -60,7 +60,8 @@ 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 +/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. @@ -73,11 +74,13 @@ Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNA | sound_id | snowflake | the id of the soundboard sound to play | | source_guild_id? | snowflake | the id of the guild the soundboard sound is from, required to play sounds from different servers | -## List Default Soundboard Sounds % GET /soundboard-default-sounds +## List Default Soundboard Sounds +/soundboard-default-sounds 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 +/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. @@ -87,11 +90,13 @@ Returns a list of the guild's soundboard sounds. Includes `user` fields if the b |-------|-----------------------------------------------------------------------------------------| | 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 +/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. -## Create Guild Soundboard Sound % POST /guilds/{guild.id/docs/resources/guild#guild-object}/soundboard-sounds +## Create Guild Soundboard Sound +/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. @@ -113,7 +118,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. @@ -134,7 +140,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. diff --git a/docs/resources/stage-instance.md b/docs/resources/stage-instance.mdx similarity index 93% rename from docs/resources/stage-instance.md rename to docs/resources/stage-instance.mdx index 494f4eaff7..36ba8f41b5 100644 --- a/docs/resources/stage-instance.md +++ b/docs/resources/stage-instance.mdx @@ -61,7 +61,8 @@ Below are some definitions related to stages. When a Stage channel has no speakers for a certain period of time (on the order of minutes), the Stage instance will be automatically deleted. -## Create Stage Instance % POST /stage-instances +## Create Stage Instance +/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. @@ -83,11 +84,13 @@ This endpoint supports the `X-Audit-Log-Reason` header. \* 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 +/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 +/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. @@ -104,7 +107,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 | -## Delete Stage Instance % DELETE /stage-instances/{channel.id/docs/resources/channel#channel-object} +## Delete Stage Instance +/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. diff --git a/docs/resources/sticker.md b/docs/resources/sticker.mdx similarity index 90% rename from docs/resources/sticker.md rename to docs/resources/sticker.mdx index 0f008837c8..b8bf15699c 100644 --- a/docs/resources/sticker.md +++ b/docs/resources/sticker.mdx @@ -100,11 +100,13 @@ Represents a pack of standard stickers. } ``` -## Get Sticker % GET /stickers/{sticker.id/docs/resources/sticker#sticker-object} +## Get Sticker +/stickers/[\{sticker.id\}](/docs/resources/sticker#sticker-object) Returns a [sticker](/docs/resources/sticker#sticker-object) object for the given sticker ID. -## List Sticker Packs % GET /sticker-packs +## List Sticker Packs +/sticker-packs Returns a list of available sticker packs. @@ -114,19 +116,23 @@ Returns a list of available sticker packs. |---------------|------------------------------------------------------------------------------| | 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 +/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. -## List Guild Stickers % GET /guilds/{guild.id/docs/resources/guild#guild-object}/stickers +## List Guild Stickers +/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. -## Get Guild Sticker % GET /guilds/{guild.id/docs/resources/guild#guild-object}/stickers/{sticker.id/docs/resources/sticker#sticker-object} +## Get Guild Sticker +/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. -## Create Guild Sticker % POST /guilds/{guild.id/docs/resources/guild#guild-object}/stickers +## Create Guild Sticker +/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. @@ -153,7 +159,8 @@ Uploaded stickers are constrained to 5 seconds in length for animated stickers, | 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 +/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. @@ -173,7 +180,8 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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. diff --git a/docs/resources/subscription.md b/docs/resources/subscription.mdx similarity index 94% rename from docs/resources/subscription.md rename to docs/resources/subscription.mdx index 2b148cef60..e2fc879bc0 100644 --- a/docs/resources/subscription.md +++ b/docs/resources/subscription.mdx @@ -60,7 +60,8 @@ 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 +/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. @@ -73,6 +74,7 @@ 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 +/skus/[\{sku.id\}](/docs/resources/sku#sku-object)/subscriptions/[\{subscription.id\}](/docs/resources/subscription#subscription-object) 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.mdx similarity index 95% rename from docs/resources/user.md rename to docs/resources/user.mdx index 9491063cb3..2c42ceceea 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.mdx @@ -183,15 +183,18 @@ The role connection object that an application has attached to a user. | 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 | -## Get Current User % GET /users/@me +## Get Current User +/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. -## Get User % GET /users/{user.id/docs/resources/user#user-object} +## Get User +/users/[\{user.id\}](/docs/resources/user#user-object) Returns a [user](/docs/resources/user#user-object) object for a given user ID. -## Modify Current User % PATCH /users/@me +## Modify Current User +/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. @@ -207,7 +210,8 @@ All parameters to this endpoint are optional. | 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 +## Get Current User Guilds +/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. @@ -240,15 +244,18 @@ This endpoint returns 200 guilds by default, which is the maximum number of guil | 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 | -## Get Current User Guild Member % GET /users/@me/guilds/{guild.id/docs/resources/guild#guild-object}/member +## Get Current User Guild Member +/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. -## Leave Guild % DELETE /users/@me/guilds/{guild.id/docs/resources/guild#guild-object} +## Leave Guild +/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. -## Create DM % POST /users/@me/channels +## Create DM +/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). @@ -262,7 +269,8 @@ You should not use this endpoint to DM everyone in a server about something. DMs |--------------|-----------|-----------------------------------------| | recipient_id | snowflake | the recipient to open a DM channel with | -## Create Group DM % POST /users/@me/channels +## Create Group DM +/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. @@ -277,15 +285,18 @@ This endpoint is limited to 10 active group DMs. | access_tokens | array of strings | access tokens of users that have granted your app the `gdm.join` scope | | nicks | dict | a dictionary of user ids to their respective nicknames | -## Get Current User Connections % GET /users/@me/connections +## Get Current User Connections +/users/@me/connections 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 +/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. -## 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 +/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. diff --git a/docs/resources/voice.md b/docs/resources/voice.mdx similarity index 89% rename from docs/resources/voice.md rename to docs/resources/voice.mdx index 1e392f6d4c..6070160fe7 100644 --- a/docs/resources/voice.md +++ b/docs/resources/voice.mdx @@ -54,19 +54,23 @@ Used to represent a user's voice connection status. | deprecated | boolean | whether this is a deprecated voice region (avoid switching to these) | | custom | boolean | whether this is a custom voice region (used for events/etc) | -## List Voice Regions % GET /voice/regions +## List Voice Regions +/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). -## Get Current User Voice State % GET /guilds/{guild.id/docs/resources/guild#guild-object}/voice-states/@me +## Get Current User Voice State +/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. -## 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 +/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. -## Modify Current User Voice State % PATCH /guilds/{guild.id/docs/resources/guild#guild-object}/voice-states/@me +## Modify Current User Voice State +/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. @@ -88,7 +92,8 @@ 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 +/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. diff --git a/docs/resources/webhook.md b/docs/resources/webhook.mdx similarity index 84% rename from docs/resources/webhook.md rename to docs/resources/webhook.mdx index ac19f4914f..1905519130 100644 --- a/docs/resources/webhook.md +++ b/docs/resources/webhook.mdx @@ -33,9 +33,8 @@ Used to represent a webhook. ###### 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. -::: +> 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. | Value | Name | Description | |-------|------------------|----------------------------------------------------------------------------------------------------------------| @@ -109,7 +108,8 @@ These types don't include [webhook events](/docs/events/webhook-events), which a } ``` -## Create Webhook % POST /channels/{channel.id/docs/resources/channel#channel-object}/webhooks +## Create Webhook +/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. @@ -118,9 +118,8 @@ An error will be returned if a webhook name (`name`) is not valid. A webhook nam - 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 -:::info -This endpoint supports the `X-Audit-Log-Reason` header. -::: +> info +> This endpoint supports the `X-Audit-Log-Reason` header. ###### JSON Params @@ -129,36 +128,39 @@ This endpoint supports the `X-Audit-Log-Reason` header. | name | string | name of the webhook (1-80 characters) | | 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 +/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. -## Get Guild Webhooks % GET /guilds/{guild.id/docs/resources/guild#guild-object}/webhooks +## Get Guild Webhooks +/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. -## Get Webhook % GET /webhooks/{webhook.id/docs/resources/webhook#webhook-object} +## Get Webhook +/webhooks/[\{webhook.id\}](/docs/resources/webhook#webhook-object) 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) -## Get Webhook with Token % GET /webhooks/{webhook.id/docs/resources/webhook#webhook-object}/{webhook.token/docs/resources/webhook#webhook-object} +## Get Webhook with Token +/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 +/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. -:::info -All parameters to this endpoint are optional -::: +> info +> All parameters to this endpoint are optional -:::info -This endpoint supports the `X-Audit-Log-Reason` header. -::: +> info +> This endpoint supports the `X-Audit-Log-Reason` header. ###### JSON Params @@ -168,37 +170,37 @@ This endpoint supports the `X-Audit-Log-Reason` header. | 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 +/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 +/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. -:::info -This endpoint supports the `X-Audit-Log-Reason` header. -::: +> 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 +/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 +/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. -:::info -Note that when sending a message, you must provide a value for at **least one of** `content`, `embeds`, `components`, `file`, or `poll`. -::: +> info +> Note that when sending a message, you must provide a value for at **least one of** `content`, `embeds`, `components`, `file`, or `poll`. -:::info -If the webhook channel is a forum or media channel, you must provide either `thread_id` in the query string params, or `thread_name` in the JSON/form params. If `thread_id` is provided, the message will send in that thread. If `thread_name` is provided, a thread with that name will be created in the channel. -::: +> info +> If the webhook channel is a forum or media channel, you must provide either `thread_id` in the query string params, or `thread_name` in the JSON/form params. If `thread_id` is provided, the message will send in that thread. If `thread_name` is provided, a thread with that name will be created in the channel. -:::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. -::: +> 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. ###### Query String Params @@ -231,11 +233,11 @@ Discord may strip certain characters from message content, like invalid unicode \*\* 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. -::: +> 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 +/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. @@ -246,7 +248,8 @@ Refer to [Slack's documentation](https://api.slack.com/incoming-webhooks) for mo | 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 | -## 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 +/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`. @@ -257,7 +260,8 @@ Refer to [Slack's documentation](https://api.slack.com/incoming-webhooks) for mo | 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 | -## 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 +/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. @@ -267,7 +271,8 @@ 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 +/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. @@ -276,13 +281,11 @@ When the `content` field is edited, the `mentions` array in the message object w 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 -Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. -::: +> warn +> Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. -:::info -All parameters to this endpoint are optional and nullable. -::: +> info +> All parameters to this endpoint are optional and nullable. ###### Query String Params @@ -310,7 +313,8 @@ All parameters to this endpoint are optional and nullable. \*\*\* 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 +/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/topics/oauth2.md b/docs/topics/oauth2.mdx similarity index 99% rename from docs/topics/oauth2.md rename to docs/topics/oauth2.mdx index ce8bc0eae3..47e033f3c6 100644 --- a/docs/topics/oauth2.md +++ b/docs/topics/oauth2.mdx @@ -415,11 +415,13 @@ From this object, you should store the `webhook.token` and `webhook.id`. See the 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 +## Get Current Bot Application Information +/oauth2/applications/@me Returns the bot's [application](/docs/resources/application#application-object) object. -## Get Current Authorization Information % GET /oauth2/@me +## Get Current Authorization Information +/oauth2/@me Returns info about the current authorization. Requires authentication with a bearer token. From a918abf3f929c3555ad7e332e3e5e1cb66ab4ebb Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Apr 2025 13:36:20 -0700 Subject: [PATCH 2/4] fix links --- docs/interactions/receiving-and-responding.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/interactions/receiving-and-responding.mdx b/docs/interactions/receiving-and-responding.mdx index fcd82195b5..1bbab8f4e5 100644 --- a/docs/interactions/receiving-and-responding.mdx +++ b/docs/interactions/receiving-and-responding.mdx @@ -430,16 +430,16 @@ Create a followup message for an Interaction. Functions the same as [Execute Web 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 -/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) +/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/messages/[\{message.id\}](/docs/resources/message#message-object) Returns a followup message for an Interaction. Functions the same as [Get Webhook Message](/docs/resources/webhook#get-webhook-message). ## Edit Followup Message -/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) +/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/messages/[\{message.id\}](/docs/resources/message#message-object) Edits a followup message for an Interaction. Functions the same as [Edit Webhook Message](/docs/resources/webhook#edit-webhook-message). ## Delete Followup Message -/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) +/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/messages/[\{message.id\}](/docs/resources/message#message-object) Deletes a followup message for an Interaction. Returns `204 No Content` on success. From 27ffb2ba66e432b0581d9f6df4679fa8458b427f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Apr 2025 13:41:55 -0700 Subject: [PATCH 3/4] weird --- docs/resources/application.mdx | 20 ++++++++----- docs/resources/webhook.mdx | 55 ++++++++++++++++++++-------------- 2 files changed, 45 insertions(+), 30 deletions(-) diff --git a/docs/resources/application.mdx b/docs/resources/application.mdx index c7c7160be5..a795254107 100644 --- a/docs/resources/application.mdx +++ b/docs/resources/application.mdx @@ -182,8 +182,9 @@ 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. +:::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. +::: ## Install Links @@ -193,8 +194,9 @@ 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`. +:::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`. +::: #### Discord Provided Link @@ -208,8 +210,9 @@ https://discord.com/oauth2/authorize?client_id=1234567895647001626 Instead, these links will prompt the user for the scopes and bot user permissions configured in your Default Install Settings. -> info -> Discord Provided Links are limited to the `application.commands` and `bot` scopes +:::info +Discord Provided Links are limited to the `application.commands` and `bot` scopes +::: #### Custom URL @@ -233,8 +236,9 @@ Returns the [application](/docs/resources/application#application-object) object 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 +:::info +All parameters to this endpoint are optional +::: ###### JSON Params diff --git a/docs/resources/webhook.mdx b/docs/resources/webhook.mdx index 1905519130..f17d12a5ea 100644 --- a/docs/resources/webhook.mdx +++ b/docs/resources/webhook.mdx @@ -33,8 +33,9 @@ Used to represent a webhook. ###### 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. +:::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. +::: | Value | Name | Description | |-------|------------------|----------------------------------------------------------------------------------------------------------------| @@ -118,8 +119,9 @@ An error will be returned if a webhook name (`name`) is not valid. A webhook nam - 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 -> info -> This endpoint supports the `X-Audit-Log-Reason` header. +:::info +This endpoint supports the `X-Audit-Log-Reason` header. +::: ###### JSON Params @@ -156,11 +158,13 @@ Same as above, except this call does not require authentication and returns no u 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 +:::info +All parameters to this endpoint are optional +::: -> info -> This endpoint supports the `X-Audit-Log-Reason` header. +:::info +This endpoint supports the `X-Audit-Log-Reason` header. +::: ###### JSON Params @@ -180,8 +184,9 @@ Same as above, except this call does not require authentication, does not accept 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. +:::info +This endpoint supports the `X-Audit-Log-Reason` header. +::: ## Delete Webhook with Token /webhooks/[\{webhook.id\}](/docs/resources/webhook#webhook-object)/[\{webhook.token\}](/docs/resources/webhook#webhook-object) @@ -193,14 +198,17 @@ Same as above, except this call does not require authentication. 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`. +:::info +Note that when sending a message, you must provide a value for at **least one of** `content`, `embeds`, `components`, `file`, or `poll`. +::: -> info -> If the webhook channel is a forum or media channel, you must provide either `thread_id` in the query string params, or `thread_name` in the JSON/form params. If `thread_id` is provided, the message will send in that thread. If `thread_name` is provided, a thread with that name will be created in the channel. +:::info +If the webhook channel is a forum or media channel, you must provide either `thread_id` in the query string params, or `thread_name` in the JSON/form params. If `thread_id` is provided, the message will send in that thread. If `thread_name` is provided, a thread with that name will be created in the channel. +::: -> 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. +:::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. +::: ###### Query String Params @@ -233,8 +241,9 @@ Refer to [Uploading Files](/docs/reference#uploading-files) for details on attac \*\* 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. +:::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 /webhooks/[\{webhook.id\}](/docs/resources/webhook#webhook-object)/[\{webhook.token\}](/docs/resources/webhook#webhook-object)/slack @@ -281,11 +290,13 @@ When the `content` field is edited, the `mentions` array in the message object w 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 -> Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. +:::warn +Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body. +::: -> info -> All parameters to this endpoint are optional and nullable. +:::info +All parameters to this endpoint are optional and nullable. +::: ###### Query String Params From 012ec1b3ec625157c2af0253026b253d6bd9853f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Apr 2025 17:05:22 -0700 Subject: [PATCH 4/4] Update docs/interactions/receiving-and-responding.mdx Co-authored-by: Colin Loretz --- docs/interactions/receiving-and-responding.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/interactions/receiving-and-responding.mdx b/docs/interactions/receiving-and-responding.mdx index 1bbab8f4e5..bd4d94bcb0 100644 --- a/docs/interactions/receiving-and-responding.mdx +++ b/docs/interactions/receiving-and-responding.mdx @@ -390,7 +390,7 @@ The endpoints below are not bound to the application's [Global Rate Limit](/docs ::: ## Create Interaction Response -/interactions/\{interaction.id/docs/interactions/receiving-and-responding#interaction-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/callback +/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).