Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 56 additions & 56 deletions docs/components/reference.mdx

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/components/using-message-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ All content must be sent as components instead of using the standard message for

```json
{
"flags": 32768,
"flags": 32768, // MessageFlags.IS_COMPONENTS_V2
"components": [
{
"type": 10,
"type": 10, // ComponentType.TEXT_DISPLAY
"content": "This is a message using the Text Display component"
}
]
Expand All @@ -50,14 +50,14 @@ To send a message with multiple components, you can include multiple component o

```json
{
"flags": 32768,
"flags": 32768, // MessageFlags.IS_COMPONENTS_V2
"components": [
{
"type": 10,
"type": 10, // ComponentType.TEXT_DISPLAY
"content": "This is a Text Display component."
},
{
"type": 10,
"type": 10, // ComponentType.TEXT_DISPLAY
"content": "This is another Text Display component!"
}
]
Expand All @@ -72,24 +72,24 @@ For example, you can create a message with an Action Row component that contains

```json
{
"flags": 32768,
"flags": 32768, // MessageFlags.IS_COMPONENTS_V2
"components": [
{
"type": 10,
"type": 10, // ComponentType.TEXT_DISPLAY
"content": "This is a message with v2 components"
},
{
"type": 1,
"type": 1, // ComponentType.ACTION_ROW
"components": [
{
"type": 2,
"style": 1,
"type": 2, // ComponentType.BUTTON
"style": 1, // ButtonStyle.PRIMARY
"label": "Click Me",
"custom_id": "click_me_1"
},
{
"type": 2,
"style": 2,
"type": 2, // ComponentType.BUTTON
"style": 2, // ButtonStyle.SECONDARY
"label": "Click Me Too",
"custom_id": "click_me_2"
}
Expand Down
12 changes: 6 additions & 6 deletions docs/components/using-modal-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ An example of a modal with a [String Select](/docs/components/reference#string-s

```json
{
"type": 9,
"type": 9, // InteractionCallbackType.MODAL
"data": {
"custom_id": "bug_modal",
"title": "Bug Report",
"components": [
{
"type": 18,
"type": 18, // ComponentType.LABEL
"label": "What's your favorite bug?",
"component": {
"type": 3,
"type": 3, // ComponentType.STRING_SELECT
"custom_id": "bug_string_select",
"placeholder": "Choose...",
"options": [
Expand Down Expand Up @@ -62,13 +62,13 @@ An example of a modal with a [String Select](/docs/components/reference#string-s
}
},
{
"type": 18,
"type": 18, // ComponentType.LABEL
"label": "Why is it your favorite?",
"description": "Please provide as much detail as possible!",
"component": {
"type": 4,
"type": 4, // ComponentType.TEXT_INPUT
"custom_id": "bug_explanation",
"style": 2,
"style": 2, // TextInputStyle.PARAGRAPH
"min_length": 1000,
"max_length": 4000,
"placeholder": "Write your explanation here...",
Expand Down
6 changes: 3 additions & 3 deletions docs/developer-tools/embedded-app-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ Received when the current user object changes.
},
"bot": false,
"flags": 1,
"premium_type": 2
"premium_type": 2 // PremiumType.Nitro
}
```

Expand Down Expand Up @@ -1081,7 +1081,7 @@ No scopes required
},
"bot": false,
"flags": 1,
"premium_type": 2
"premium_type": 2 // PremiumType.Nitro
}
]
}
Expand Down Expand Up @@ -1117,7 +1117,7 @@ Requires Discord approval
},
"bot": false,
"flags": 1,
"premium_type": 2
"premium_type": 2 // PremiumType.Nitro
}
}
```
Expand Down
8 changes: 4 additions & 4 deletions docs/events/gateway-events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ These fields originally were $ prefixed (i.e: `$browser`) but [this syntax is de
"presence": {
"activities": [{
"name": "Cards Against Humanity",
"type": 0
"type": 0 // ActivityType.GAME
}],
"status": "dnd",
"since": 91879201,
Expand Down Expand Up @@ -292,7 +292,7 @@ Sent by the client to indicate a presence or status update.
"since": 91879201,
"activities": [{
"name": "Save the Oxford Comma",
"type": 0
"type": 0 // ActivityType.GAME
}],
"status": "online",
"afk": false
Expand Down Expand Up @@ -1278,7 +1278,7 @@ When received over the gateway, the `buttons` field is an array of strings, whic
"details": "24H RL Stream for Charity",
"state": "Rocket League",
"name": "Twitch",
"type": 1,
"type": 1, // ActivityType.STREAMING
"url": "https://www.twitch.tv/discord"
}
```
Expand All @@ -1288,7 +1288,7 @@ When received over the gateway, the `buttons` field is an array of strings, whic
```json
{
"name": "Rocket League",
"type": 0,
"type": 0, // ActivityType.GAME
"application_id": "379286085710381999",
"state": "In a Match",
"details": "Ranked Duos: 2-1",
Expand Down
38 changes: 19 additions & 19 deletions docs/events/webhook-events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ The "Value" column corresponds to the event's `type` field value in the [event b
{
"version": 1,
"application_id": "1234560123453231555",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "APPLICATION_AUTHORIZED",
"timestamp": "2024-10-18T14:42:53.064834",
"data": {
"integration_type": 1,
"integration_type": 1, // InstallationContext.USER
"scopes": [
"applications.commands"
],
Expand Down Expand Up @@ -200,7 +200,7 @@ The "Value" column corresponds to the event's `type` field value in the [event b
{
"version": 1,
"application_id": "1234560123453231555",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "APPLICATION_DEAUTHORIZED",
"timestamp": "2024-10-18T14:42:53.064834",
Expand All @@ -227,7 +227,7 @@ The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-ob
{
"version": 1,
"application_id": "1234560123453231555",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "ENTITLEMENT_CREATE",
"timestamp": "2024-10-18T18:41:21.109604",
Expand All @@ -239,7 +239,7 @@ The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-ob
"id": "1234505980407808808",
"promotion_id": null,
"sku_id": "123489045643835123",
"type": 4,
"type": 4, // EntitlementType.GIFT
"user_id": "111178765189277770"
}
}
Expand All @@ -260,7 +260,7 @@ The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-ob
{
"version": 1,
"application_id": "1234560123453231555",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "ENTITLEMENT_UPDATE",
"timestamp": "2024-10-18T18:41:21.109604",
Expand All @@ -272,7 +272,7 @@ The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-ob
"id": "1234505980407808808",
"promotion_id": null,
"sku_id": "123489045643835123",
"type": 4,
"type": 4, // EntitlementType.GIFT
"user_id": "111178765189277770"
}
}
Expand All @@ -293,7 +293,7 @@ The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-ob
{
"version": 1,
"application_id": "1234560123453231555",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "ENTITLEMENT_DELETE",
"timestamp": "2024-10-18T18:41:21.109604",
Expand All @@ -305,7 +305,7 @@ The inner payload is an [entitlement](/docs/resources/entitlement#entitlement-ob
"id": "1234505980407808808",
"promotion_id": null,
"sku_id": "123489045643835123",
"type": 4,
"type": 4, // EntitlementType.GIFT
"user_id": "111178765189277770"
}
}
Expand Down Expand Up @@ -334,13 +334,13 @@ The inner payload is a [lobby message object](/docs/events/webhook-events#lobby-
{
"version": 1,
"application_id": "1234567765431056709",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "LOBBY_MESSAGE_CREATE",
"timestamp": "2024-10-18T18:41:21.109604",
"data": {
"id": "1397729799727878254",
"type": 0,
"type": 0, // MessageType.DEFAULT
"content": "welcome to the party!",
"lobby_id": "1397729744753266719",
"channel_id": "1397729744753266719",
Expand Down Expand Up @@ -368,13 +368,13 @@ The inner payload is a [lobby message object](/docs/events/webhook-events#lobby-
{
"version": 1,
"application_id": "1234567765431056709",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "LOBBY_MESSAGE_UPDATE",
"timestamp": "2025-08-05T20:39:19.587872",
"data": {
"id": "1402390388030832792",
"type": 0,
"type": 0, // MessageType.DEFAULT
"content": "noice",
"lobby_id": "1402385687281537066",
"channel_id": "1402389638311841883",
Expand Down Expand Up @@ -406,7 +406,7 @@ The inner payload is a [lobby message object](/docs/events/webhook-events#lobby-
{
"version": 1,
"application_id": "1234567765431056709",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "LOBBY_MESSAGE_DELETE",
"timestamp": "2025-08-05T21:44:09.412957",
Expand All @@ -432,13 +432,13 @@ The inner payload is a [message object](/docs/events/webhook-events#message-obje
{
"version": 1,
"application_id": "1234567765431056709",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "GAME_DIRECT_MESSAGE_CREATE",
"timestamp": "2025-08-14T18:09:38.063234",
"data": {
"id": "1405614357781545021",
"type": 0,
"type": 0, // MessageType.DEFAULT
"content": "get in friend, we're going raiding",
"channel_id": "1405604229820715098",
"author": {
Expand Down Expand Up @@ -466,7 +466,7 @@ The inner payload is a [message object](/docs/events/webhook-events#message-obje
{
"version": 1,
"application_id": "1234567765431056709",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "GAME_DIRECT_MESSAGE_UPDATE",
"timestamp": "2025-08-14T16:44:31.847073",
Expand Down Expand Up @@ -497,13 +497,13 @@ The inner payload is a [message object](/docs/events/webhook-events#message-obje
{
"version": 1,
"application_id": "1234567765431056709",
"type": 1,
"type": 1, // WebhookType.EVENT
"event": {
"type": "GAME_DIRECT_MESSAGE_DELETE",
"timestamp": "2025-08-20T17:01:50.099204",
"data": {
"id": "1407771600643686503",
"type": 0,
"type": 0, // MessageType.DEFAULT
"content": "cant make it in time",
"channel_id": "1405604229820715098",
"author": {
Expand Down
Loading