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/2025-04-22-components-v2.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
@@ -48,7 +48,7 @@ We've created guides to help you implement these new features:
48
48
49
49
[Legacy component behavior](/docs/components/reference#legacy-message-component-behavior) will continue to work as before, so your existing integrations won't break. However, when using the Components V2 flag, you'll need to adapt to a few changes:
50
50
51
-
- The `content` and `embeds` fields must be sent as components
51
+
- The `content` and `embeds` fields will no longer work but you'll be able to use [Text Display](/docs/components/reference#text-display) and [Container](/docs/components/reference#container)
52
52
- Attachments need to be exposed through components to be visible
Copy file name to clipboardExpand all lines: docs/components/reference.mdx
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This document serves as a comprehensive reference for all available components.
12
12
13
13
To use these components, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be sent on a per-message basis. This enables the new components system with the following changes:
14
14
15
-
- The `content` and `embeds` fields are no longer available directly - they must be sent as components
15
+
- The `content` and `embeds` fields will no longer work but you'll be able to use [Text Display](/docs/components/reference#text-display) and [Container](/docs/components/reference#container)
16
16
- Attachments won't show by default - they must be exposed through components
17
17
- The `poll` and `stickers` fields are disabled
18
18
@@ -28,7 +28,7 @@ For a practical guide on implementing these components, see our [Using Message C
28
28
29
29
Components allow you to style and structure your messages, modals, and interactions. They are interactive elements that can create rich user experiences in your Discord applications.
30
30
31
-
Components are a field on the [message object](/docs/resources/message#message-object). You can use them when creating messages or responding to an interaction, like an [application command](/docs/interactions/application-commands#).
31
+
Components are a field on the [message object](/docs/resources/message#message-object) and [modal](/docs/interactions/receiving-and-responding#interaction-response-object-modal). You can use them when creating messages or responding to an interaction, like an [application command](/docs/interactions/application-commands#).
32
32
33
33
### Component Object
34
34
@@ -148,7 +148,7 @@ Buttons must be placed inside an [Action Row](/docs/components/reference#action-
148
148
149
149
Buttons come in various styles to convey different types of actions. These styles also define what fields are valid for a button.
150
150
151
-
- Non-link and Non-premium buttons **must** have a `custom_id`, and cannot have a `url` or a `sku_id`.
151
+
- Non-link and non-premium buttons **must** have a `custom_id`, and cannot have a `url` or a `sku_id`.
152
152
- Link buttons **must** have a `url`, and cannot have a `custom_id`
153
153
- Link buttons do not send an [interaction](/docs/interactions/receiving-and-responding#interaction-object) to your app when clicked
154
154
- Premium buttons **must** contain a `sku_id`, and cannot have a `custom_id`, `label`, `url`, or `emoji`.
@@ -263,7 +263,7 @@ Buttons come in various styles to convey different types of actions. These style
263
263
264
264
### Button Design Guidelines
265
265
266
-
###### General Button copy
266
+
###### General Button Content
267
267
268
268
- 34 characters max with icon or emoji.
269
269
- 38 characters max without icon or emoji.
@@ -876,7 +876,7 @@ Don't hardcode `components` to contain only text components. We may add other co
876
876
877
877
## Text Display
878
878
879
-
A Text Display is a top-level content component that allows you to add text to your message formatted with markdown. This is similar to the `content` field of a message, but allows you to add multiple text components, controlling the layout of your message.
879
+
A Text Display is a top-level content component that allows you to add text to your message formatted with markdown and mention users and roles. This is similar to the `content` field of a message, but allows you to add multiple text components, controlling the layout of your message.
880
880
881
881
Text Displays are only available in messages.
882
882
@@ -1088,13 +1088,13 @@ To use this component, you need to send the [message flag](/docs/resources/messa
| id? | integer | Optional identifier for component |
1095
-
| components | array of select components | Up to 10 components of type [action row](/docs/components/reference#action-row), [text display](/docs/components/reference#text-display), [section](/docs/components/reference#section), [media gallery](/docs/components/reference#media-gallery), [separator](/docs/components/reference#separator), or [file](/docs/components/reference#file)|
1096
-
| accent_color? | ?integer | Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF`|
1097
-
| spoiler? | boolean | Whether the container should be a spoiler (or blurred out). Defaults to `false`. |
| id? | integer | Optional identifier for component|
1095
+
| components | array of components | Up to 10 components of the type [action row](/docs/components/reference#action-row), [text display](/docs/components/reference#text-display), [section](/docs/components/reference#section), [media gallery](/docs/components/reference#media-gallery), [separator](/docs/components/reference#separator), or [file](/docs/components/reference#file)|
1096
+
| accent_color? | ?integer | Color for the accent on the container as RGB from `0x000000` to `0xFFFFFF`|
1097
+
| spoiler? | boolean | Whether the container should be a spoiler (or blurred out). Defaults to `false`.|
1098
1098
1099
1099
###### Example
1100
1100
@@ -1164,7 +1164,7 @@ To upload a file with your message, you'll need to send your payload as `multipa
1164
1164
1165
1165
## Legacy Message Component Behavior
1166
1166
1167
-
Before the introduction of the `IS_COMPONENTS_V2` flag ([see changelog](/docs/change-log/2025-04-21-components-v2)), message components were sent as part of the message content. This means that you could send a message with components without setting the `IS_COMPONENTS_V2` flag, and the components would be included in the message content along with `content` and `embeds`.
1167
+
Before the introduction of the `IS_COMPONENTS_V2` flag ([see changelog](/docs/change-log/2025-04-22-components-v2)), message components were sent as part of the message content. This means that you could send a message with components without setting the `IS_COMPONENTS_V2` flag, and the components would be included in the message content along with `content` and `embeds`.
1168
1168
1169
1169
Apps using this Legacy Message Component behavior will continue to work as expected, but it is recommended to use the new `IS_COMPONENTS_V2` flag for new apps or features as they offer more options for layout and customization.
| CROSSPOSTED |`1 << 0`| this message has been published to subscribed channels (via Channel Following) |
139
-
| IS_CROSSPOST |`1 << 1`| this message originated from a message in another channel (via Channel Following) |
140
-
| SUPPRESS_EMBEDS |`1 << 2`| do not include any embeds when serializing this message |
141
-
| SOURCE_MESSAGE_DELETED |`1 << 3`| the source message for this crosspost has been deleted (via Channel Following) |
142
-
| URGENT |`1 << 4`| this message came from the urgent message system |
143
-
| HAS_THREAD |`1 << 5`| this message has an associated thread, with the same id as the message |
144
-
| EPHEMERAL |`1 << 6`| this message is only visible to the user who invoked the Interaction |
145
-
| LOADING |`1 << 7`| this message is an Interaction Response and the bot is "thinking" |
146
-
| FAILED_TO_MENTION_SOME_ROLES_IN_THREAD |`1 << 8`| this message failed to mention some roles and add their members to the thread |
147
-
| SUPPRESS_NOTIFICATIONS |`1 << 12`| this message will not trigger push and desktop notifications |
148
-
| IS_VOICE_MESSAGE |`1 << 13`| this message is a voice message |
149
-
| HAS_SNAPSHOT |`1 << 14`| this message has a snapshot (via Message Forwarding) |
150
-
| IS_COMPONENTS_V2 |`1 << 15`| allows you to create fully [component](/docs/components/reference#component-object) driven messages while removing `content` and `embeds` from the message|
0 commit comments