Skip to content

Commit a01324f

Browse files
Components V2 message and followup clarifications (#7560)
* Added info for v2 message flag * Added info around cv2 and followup messages
1 parent 2c0e95d commit a01324f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docs/components/reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This document serves as a comprehensive reference for all available components.
1010
- **Content Components** - For displaying static text, images, and files (Text Display, Media Gallery, Thumbnails)
1111
- **Interactive Components** - For user interactions (Buttons, Select Menus, Text Input)
1212

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:
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. Once a message has been sent with this flag, it can't be removed from that message. This enables the new components system with the following changes:
1414

1515
- 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) as replacements
1616
- Attachments won't show by default - they must be exposed through components

docs/interactions/receiving-and-responding.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Not all message fields are currently supported.
254254
| attachments? \*\* | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with filename and description |
255255
| poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | Details about the poll |
256256

257-
\* If you create a callback with the [type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` the only valid [message flag](/docs/resources/message#message-object-message-flags) you may use is `EPHEMERAL`.
257+
\* If you create a callback with the [type](/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type) `DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` the only valid [message flag](/docs/resources/message#message-object-message-flags) you may use is `EPHEMERAL`. If you'd like to create a component based message with `IS_COMPONENTS_V2` you must do that with the [followup](/docs/interactions/receiving-and-responding#followup-messages) message, not this one.
258258

259259
\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
260260

@@ -424,7 +424,7 @@ Deletes the initial Interaction response. Returns `204 No Content` on success.
424424
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`)
425425
:::
426426

427-
Create a followup message for an Interaction. Functions the same as [Execute Webhook](/docs/resources/webhook#execute-webhook), but `wait` is always true. The `thread_id`, `avatar_url`, and `username` parameters are not supported when using this endpoint for interaction followups. You can use the `EPHEMERAL` [message flag](/docs/resources/message#message-object-message-flags) `1 << 6` (64) to send a message that only the user can see.
427+
Create a followup message for an Interaction. Functions the same as [Execute Webhook](/docs/resources/webhook#execute-webhook), but `wait` is always true. The `thread_id`, `avatar_url`, and `username` parameters are not supported when using this endpoint for interaction followups. You can use the `EPHEMERAL` [message flag](/docs/resources/message#message-object-message-flags) `1 << 6` (64) to send a message that only the user can see. You can also use the `IS_COMPONENTS_V2` [message flag](/docs/resources/message#message-object-message-flags) `1 << 15` (32768) to send a [component](/docs/components/reference)-based message.
428428

429429
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.
430430

docs/resources/message.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ Type `19` and `20` are only available in API v8 and above. In v6, they are repre
147147
| SUPPRESS_NOTIFICATIONS | `1 << 12` | this message will not trigger push and desktop notifications |
148148
| IS_VOICE_MESSAGE | `1 << 13` | this message is a voice message |
149149
| 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/overview)-driven messages |
150+
| IS_COMPONENTS_V2 \* | `1 << 15` | allows you to create fully [component](/docs/components/overview)-driven messages |
151+
152+
\* Once a message has been sent with this flag, it can't be removed from that message.
151153

152154
###### Example Message
153155

0 commit comments

Comments
 (0)