Skip to content

Commit 90d9059

Browse files
Use mdx for all route subheadings (#7485)
1 parent f458da8 commit 90d9059

26 files changed

+462
-239
lines changed

docs/events/gateway.mdx

+5-2
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,8 @@ The [Get Gateway Bot endpoint](/docs/events/gateway#get-gateway-bot) will always
697697

698698
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).
699699

700-
## Get Gateway % GET /gateway
700+
## Get Gateway
701+
<Route type="GET">/gateway</Route>
701702

702703
:::info
703704
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](/
713714
}
714715
```
715716

716-
## Get Gateway Bot % GET /gateway/bot
717+
## Get Gateway Bot
718+
719+
<Route type="GET">/gateway/bot</Route>
717720

718721
:::warn
719722
This endpoint requires authentication using a valid bot token.

docs/interactions/application-commands.mdx

+35-16
Large diffs are not rendered by default.

docs/interactions/receiving-and-responding.mdx

+16-8
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ Interaction tokens are valid for **15 minutes**, meaning you can respond to an i
389389
The endpoints below are not bound to the application's [Global Rate Limit](/docs/topics/rate-limits#global-rate-limit).
390390
:::
391391

392-
## Create Interaction Response % POST /interactions/\{interaction.id/docs/interactions/receiving-and-responding#interaction-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/callback
392+
## Create Interaction Response
393+
<Route type="POST">/interactions/[\{interaction.id}](/docs/interactions/receiving-and-responding#interaction-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/callback</Route>
393394

394395
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).
395396

@@ -402,19 +403,23 @@ This endpoint also supports file attachments similar to the webhook endpoints. R
402403
| 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 |
403404

404405

405-
## Get Original Interaction Response % GET /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/@original
406+
## Get Original Interaction Response
407+
<Route type="GET">/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/messages/@original</Route>
406408

407409
Returns the initial Interaction response. Functions the same as [Get Webhook Message](/docs/resources/webhook#get-webhook-message).
408410

409-
## Edit Original Interaction Response % PATCH /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/@original
411+
## Edit Original Interaction Response
412+
<Route type="PATCH">/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/messages/@original</Route>
410413

411414
Edits the initial Interaction response. Functions the same as [Edit Webhook Message](/docs/resources/webhook#edit-webhook-message).
412415

413-
## Delete Original Interaction Response % DELETE /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}/messages/@original
416+
## Delete Original Interaction Response
417+
<Route type="DELETE">/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)/messages/@original</Route>
414418

415419
Deletes the initial Interaction response. Returns `204 No Content` on success.
416420

417-
## Create Followup Message % POST /webhooks/\{application.id/docs/resources/application#application-object\}/\{interaction.token/docs/interactions/receiving-and-responding#interaction-object\}
421+
## Create Followup Message
422+
<Route type="POST">/webhooks/[\{application.id\}](/docs/resources/application#application-object)/[\{interaction.token\}](/docs/interactions/receiving-and-responding#interaction-object)</Route>
418423

419424
:::info
420425
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
424429

425430
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.
426431

427-
## 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\}
432+
## Get Followup Message
433+
<Route type="GET">/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)</Route>
428434

429435
Returns a followup message for an Interaction. Functions the same as [Get Webhook Message](/docs/resources/webhook#get-webhook-message).
430436

431-
## 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\}
437+
## Edit Followup Message
438+
<Route type="PATCH">/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)</Route>
432439

433440
Edits a followup message for an Interaction. Functions the same as [Edit Webhook Message](/docs/resources/webhook#edit-webhook-message).
434441

435-
## 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\}
442+
## Delete Followup Message
443+
<Route type="DELETE">/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)</Route>
436444

437445
Deletes a followup message for an Interaction. Returns `204 No Content` on success.

docs/resources/application-role-connection-metadata.md renamed to docs/resources/application-role-connection-metadata.mdx

+6-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ When a user connects their account using the bot's [`role_connections_verificati
3838
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.
3939
:::
4040

41-
## Get Application Role Connection Metadata Records % GET /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata
41+
## Get Application Role Connection Metadata Records
42+
43+
<Route type="GET">/applications/[\{application.id\}](/docs/resources/application#application-object)/role-connections/metadata</Route>
4244

4345
Returns a list of [application role connection metadata](/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object) objects for the given application.
4446

45-
## Update Application Role Connection Metadata Records % PUT /applications/{application.id/docs/resources/application#application-object}/role-connections/metadata
47+
## Update Application Role Connection Metadata Records
48+
49+
<Route type="PUT">/applications/[\{application.id\}](/docs/resources/application#application-object)/role-connections/metadata</Route>
4650

4751
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.
4852

docs/resources/application.md renamed to docs/resources/application.mdx

+6-5
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,13 @@ You can configure your app's install link in your [app's settings](https://disco
226226

227227
The Default Install Settings will appear on the **Installation** page when you have "Discord Provided Link" selected as your install link type.
228228

229-
## Get Current Application % GET /applications/@me
229+
## Get Current Application
230+
<Route type="GET">/applications/@me</Route>
230231

231232
Returns the [application](/docs/resources/application#application-object) object associated with the requesting bot user.
232233

233-
## Edit Current Application % PATCH /applications/@me
234+
## Edit Current Application
235+
<Route type="PATCH">/applications/@me</Route>
234236

235237
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.
236238

@@ -260,11 +262,11 @@ All parameters to this endpoint are optional
260262

261263
\*\* 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.
262264

263-
## Get Application Activity Instance % GET /applications/{application.id/docs/resources/application#application-object}/activity-instances/{instance_id}
265+
## Get Application Activity Instance
266+
<Route>/applications/[\{application.id\}](/docs/resources/application#application-object)/activity-instances/[\{instance_id\}](/docs/resources/application#get-application-activity-instance-activity-instance-object)</Route>
264267

265268
Returns a serialized activity instance, if it exists. Useful for [preventing unwanted activity sessions](/docs/activities/development-guides#preventing-unwanted-activity-sessions).
266269

267-
268270
###### Example Activity Instance
269271

270272
```json
@@ -293,7 +295,6 @@ Returns a serialized activity instance, if it exists. Useful for [preventing unw
293295
| users | array of snowflakes, [user](/docs/resources/user#user-object) IDs | IDs of the Users currently connected to the instance |
294296

295297

296-
297298
###### Activity Location Object
298299

299300
The Activity Location is an object that describes the location in which an activity instance is running.

docs/resources/audit-log.md renamed to docs/resources/audit-log.mdx

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ For most objects, the change keys may be any field on the changed object. The fo
197197
| [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` |
198198
| [Webhook](/docs/resources/webhook#webhook-object) | `avatar_hash` key (instead of `avatar`) | |
199199

200-
## Get Guild Audit Log % GET /guilds/{guild.id/docs/resources/guild#guild-object}/audit-logs
200+
## Get Guild Audit Log
201+
<Route type="GET">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/audit-logs</Route>
201202

202203
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.
203204

docs/resources/auto-moderation.md renamed to docs/resources/auto-moderation.mdx

+10-5
Original file line numberDiff line numberDiff line change
@@ -198,23 +198,26 @@ value of [action type](/docs/resources/auto-moderation#auto-moderation-action-ob
198198
Users are required to have the `MANAGE_GUILD` permission to access all Auto Moderation resources.
199199
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.
200200

201-
## List Auto Moderation Rules for Guild % GET /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules
201+
## List Auto Moderation Rules for Guild
202+
<Route type="GET">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/auto-moderation/rules</Route>
202203

203204
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.
204205

205206
:::info
206207
This endpoint requires the `MANAGE_GUILD` [permission](/docs/resources/auto-moderation#auto-moderation-permission-requirements).
207208
:::
208209

209-
## 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}
210+
## Get Auto Moderation Rule
211+
<Route type="GET">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/auto-moderation/rules/[\{auto_moderation_rule.id\}](/docs/resources/auto-moderation#auto-moderation-rule-object)</Route>
210212

211213
Get a single rule. Returns an [auto moderation rule](/docs/resources/auto-moderation#auto-moderation-rule-object) object.
212214

213215
:::info
214216
This endpoint requires the `MANAGE_GUILD` [permission](/docs/resources/auto-moderation#auto-moderation-permission-requirements).
215217
:::
216218

217-
## Create Auto Moderation Rule % POST /guilds/{guild.id/docs/resources/guild#guild-object}/auto-moderation/rules
219+
## Create Auto Moderation Rule
220+
<Route type="POST">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/auto-moderation/rules</Route>
218221

219222
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.
220223

@@ -246,7 +249,8 @@ See [Trigger Types](/docs/resources/auto-moderation#auto-moderation-rule-object-
246249
:::
247250

248251

249-
## 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}
252+
## Modify Auto Moderation Rule
253+
<Route type="PATCH">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/auto-moderation/rules/[\{auto_moderation_rule.id\}](/docs/resources/auto-moderation#auto-moderation-rule-object)</Route>
250254

251255
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.
252256

@@ -276,7 +280,8 @@ This endpoint supports the `X-Audit-Log-Reason` header.
276280

277281
\* 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.
278282

279-
## 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}
283+
## Delete Auto Moderation Rule
284+
<Route type="DELETE">/guilds/[\{guild.id\}](/docs/resources/guild#guild-object)/auto-moderation/rules/[\{auto_moderation_rule.id\}](/docs/resources/auto-moderation#auto-moderation-rule-object)</Route>
280285

281286
Delete a rule. Returns a `204` on success. Fires an [Auto Moderation Rule Delete](/docs/events/gateway-events#auto-moderation-rule-delete) Gateway event.
282287

0 commit comments

Comments
 (0)