You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/change-log/2022-10-13-new-select-menu-components.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,6 @@ Four new select menu [component types](/docs/components/reference#component-obje
10
10
* Mentionable (user *and* role) select (type `7`)
11
11
* Channel select (type `8`)
12
12
13
-
The new select menu components are defined similarly to the existing string select menu—with the exception of not including the `options` field and, within channel select menus, having the option to include a `channel_types` field. The [select menu interaction](/docs/components/reference#string-select-string-select-interaction) apps receive also contain a [`resolved` field](/docs/components/reference#string-select-select-menu-resolved-object) for the new components.
13
+
The new select menu components are defined similarly to the existing string select menu—with the exception of not including the `options` field and, within channel select menus, having the option to include a `channel_types` field. The [select menu interaction](/docs/components/reference#user-select-examples) apps receive also contain a [`resolved` field](/docs/components/reference#user-select-examples) for the new components.
14
14
15
15
More details can be found in the updated [select menu documentation](/docs/components/reference#component-object-component-types).
Copy file name to clipboardExpand all lines: docs/change-log/2025-04-29-component-limits.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@ title: "Raised Component Limits"
3
3
date: "2025-04-29"
4
4
topics:
5
5
- "User Apps"
6
-
- "HTTP API"
7
6
- "Interactions"
7
+
- "Components"
8
8
---
9
9
10
10
We're removing the top level component limit and raising the limit on number of components in a message to 40 when using the [`IS_COMPONENTS_V2` message flag](/docs/resources/message#message-object-message-flags)! We're also removing the limit on the number of components in a [Container Component](/docs/components/reference#container). Legacy messages have not changed and continue to allow up to 5 action rows.
Copy file name to clipboardExpand all lines: docs/components/using-modal-components.mdx
+53-40Lines changed: 53 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,6 @@ sidebar_label: Using Modal Components
8
8
9
9
Modal components are a great way to collect freeform information from your users.
10
10
11
-
:::info
12
-
Currently, only [Text Input](/docs/components/reference#text-input) fields are supported in a modal, and each one must be placed in an [Action Row](/docs/components/reference#action-row).
13
-
:::
14
-
15
11
### Prerequisites
16
12
17
13
- You must have a Discord account and be a member of the Discord Developer Portal.
@@ -21,50 +17,67 @@ Currently, only [Text Input](/docs/components/reference#text-input) fields are s
21
17
22
18
## Displaying a Modal
23
19
24
-
Displaying a modal can be done in response to a [slash command](/docs/tutorials/upgrading-to-application-commands#slash-commands) or when responding to an [interaction](/docs/interactions/receiving-and-responding). When displaying a modal you'll use an [interaction response](/docs/interactions/receiving-and-responding#interaction-response-object) with the [`MODAL`](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) interaction callback type and [modal fields](/docs/interactions/receiving-and-responding#interaction-response-object-modal).
20
+
Displaying a modal can be done in response to an [interaction](/docs/interactions/receiving-and-responding). When displaying a modal you'll use an [interaction response](/docs/interactions/receiving-and-responding#interaction-response-object) with the [`MODAL`](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) interaction callback type and [modal fields](/docs/interactions/receiving-and-responding#interaction-response-object-modal).
25
21
26
-
An example of a modal with two Text Inputs:
22
+
An example of a modal with a [String Select](/docs/components/reference#string-select) and [Text Input](/docs/components/reference#text-input) both wrapped in [Labels](/docs/components/reference#label):
27
23
28
24
```json
29
25
{
30
-
"type": 9,
31
-
"data": {
32
-
"custom_id": "feedback_modal",
33
-
"title": "Submit Feedback",
34
-
"components": [
26
+
"type": 9,
27
+
"data": {
28
+
"custom_id": "bug_modal",
29
+
"title": "Bug Report",
30
+
"components": [
31
+
{
32
+
"type": 18,
33
+
"label": "What's your favorite bug?",
34
+
"component": {
35
+
"type": 3,
36
+
"custom_id": "bug_string_select",
37
+
"placeholder": "Choose...",
38
+
"options": [
39
+
{
40
+
"label": "Ant",
41
+
"value": "ant",
42
+
"description": "(best option)",
43
+
"emoji": {
44
+
"name": "🐜"
45
+
}
46
+
},
35
47
{
36
-
"type": 1,
37
-
"components": [
38
-
{
39
-
"type": 4,
40
-
"custom_id": "feedback_subject",
41
-
"label": "Subject",
42
-
"style": 1,
43
-
"min_length": 1,
44
-
"max_length": 100,
45
-
"placeholder": "What is your feedback about?",
46
-
"required": true
47
-
}
48
-
]
48
+
"label": "Butterfly",
49
+
"value": "butterfly",
50
+
"emoji": {
51
+
"name": "🦋"
52
+
}
49
53
},
50
54
{
51
-
"type": 1,
52
-
"components": [
53
-
{
54
-
"type": 4,
55
-
"custom_id": "feedback_details",
56
-
"label": "Details",
57
-
"style": 2,
58
-
"min_length": 10,
59
-
"max_length": 1000,
60
-
"placeholder": "Please provide details...",
61
-
"required": true
62
-
}
63
-
]
55
+
"label": "Caterpillar",
56
+
"value": "caterpillar",
57
+
"emoji": {
58
+
"name": "🐛"
59
+
}
64
60
}
65
-
]
66
-
}
61
+
]
62
+
}
63
+
},
64
+
{
65
+
"type": 18,
66
+
"label": "Why is it your favorite?",
67
+
"description": "Please provide as much detail as possible!",
68
+
"component": {
69
+
"type": 4,
70
+
"custom_id": "bug_explanation",
71
+
"style": 2,
72
+
"min_length": 1000,
73
+
"max_length": 4000,
74
+
"placeholder": "Write your explanation here...",
75
+
"required": true
76
+
}
77
+
}
78
+
]
79
+
}
67
80
}
68
81
```
69
82
70
-

83
+

Copy file name to clipboardExpand all lines: docs/interactions/overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ A list of all message components and details on sending and receiving component
49
49
50
50

51
51
52
-
The only interactive component that modals can contain are [text inputs](/docs/components/reference#text-input), which allow users to fill out single-or-multi line form inputs.
52
+
The components that modals can contain are found in the [component reference](/docs/components/reference). The data received after a modal is submitted can be found in [each component's interaction response structure](/docs/interactions/receiving-and-responding#interaction-response-object-modal).
53
53
54
54
Details about creating and using modals is in the [Receiving and Responding](/docs/interactions/receiving-and-responding#interaction-response-object-modal) documentation.
Copy file name to clipboardExpand all lines: docs/interactions/receiving-and-responding.mdx
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,15 @@ The values in `authorizing_integration_owners` depend on the key—
87
87
88
88
While the `data` field is guaranteed to be present for all [interaction types](/docs/interactions/receiving-and-responding#interaction-object-interaction-type) besides `PING`, its structure will vary. The following tables detail the inner `data` payload for each interaction type.
| custom_id | string | The custom ID provided for the modal |
133
+
| components | array of [modal submit component data](/docs/interactions/receiving-and-responding#interaction-response-object-modal)| Values submitted by the user |
Copy file name to clipboardExpand all lines: docs/resources/message.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ An app will receive empty values in the `content`, `embeds`, `attachments`, and
53
53
| stickers? | array of [sticker](/docs/resources/sticker#sticker-object) objects |**Deprecated** the stickers sent with the message |
54
54
| position? | integer | A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread |
55
55
| role_subscription_data? |[role subscription data](/docs/resources/message#role-subscription-data-object) object | data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message |
56
-
| resolved? |[resolved](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) data | data for users, members, channels, and roles in the message's [auto-populated select menus](/docs/components/reference#string-select-select-menu-resolved-object)|
56
+
| resolved? |[resolved](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) data | data for users, members, channels, and roles in the message's [auto-populated select menus](/docs/interactions/receiving-and-responding#interaction-response-object-modal)|
57
57
| poll? \[2\]|[poll](/docs/resources/poll#poll-object) object | A poll! |
58
58
| call? |[message call](/docs/resources/message#message-call-object) object | the call associated with the message |
0 commit comments