From 7b95e59931c9f51885b96c58763c4e67170ce7cd Mon Sep 17 00:00:00 2001 From: Anthony Tesija Date: Fri, 16 May 2025 20:24:36 +0000 Subject: [PATCH 1/2] Added info for v2 message flag --- docs/components/reference.mdx | 2 +- docs/resources/message.mdx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/components/reference.mdx b/docs/components/reference.mdx index 95252d7f72..984fb9ac25 100644 --- a/docs/components/reference.mdx +++ b/docs/components/reference.mdx @@ -10,7 +10,7 @@ This document serves as a comprehensive reference for all available components. - **Content Components** - For displaying static text, images, and files (Text Display, Media Gallery, Thumbnails) - **Interactive Components** - For user interactions (Buttons, Select Menus, Text Input) -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: +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: - 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 - Attachments won't show by default - they must be exposed through components diff --git a/docs/resources/message.mdx b/docs/resources/message.mdx index 573fca7da2..3eb76109f6 100644 --- a/docs/resources/message.mdx +++ b/docs/resources/message.mdx @@ -147,7 +147,9 @@ Type `19` and `20` are only available in API v8 and above. In v6, they are repre | SUPPRESS_NOTIFICATIONS | `1 << 12` | this message will not trigger push and desktop notifications | | IS_VOICE_MESSAGE | `1 << 13` | this message is a voice message | | HAS_SNAPSHOT | `1 << 14` | this message has a snapshot (via Message Forwarding) | -| IS_COMPONENTS_V2 | `1 << 15` | allows you to create fully [component](/docs/components/overview)-driven messages | +| IS_COMPONENTS_V2 \* | `1 << 15` | allows you to create fully [component](/docs/components/overview)-driven messages | + +\* Once a message has been sent with this flag, it can't be removed from that message. ###### Example Message From 7e8d7ef0e91fe1500dd5965964c676de158cad41 Mon Sep 17 00:00:00 2001 From: Anthony Tesija Date: Fri, 16 May 2025 20:43:39 +0000 Subject: [PATCH 2/2] Added info around cv2 and followup messages --- docs/interactions/receiving-and-responding.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/interactions/receiving-and-responding.mdx b/docs/interactions/receiving-and-responding.mdx index 440803cd0c..c9829772a2 100644 --- a/docs/interactions/receiving-and-responding.mdx +++ b/docs/interactions/receiving-and-responding.mdx @@ -254,7 +254,7 @@ Not all message fields are currently supported. | attachments? \*\* | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with filename and description | | poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | Details about the poll | -\* 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 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. \*\* See [Uploading Files](/docs/reference#uploading-files) for details. @@ -424,7 +424,7 @@ Deletes the initial Interaction response. Returns `204 No Content` on success. 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`) ::: -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. +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. 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.