Skip to content

Commit 8bb28a1

Browse files
authored
fix: Message forwards do not require other fields (#7830)
* Message forwards do not require other fields * clarify wording * Update message.mdx * remove duplicate note, reword
1 parent 4de988d commit 8bb28a1

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

docs/resources/message.mdx

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -820,28 +820,24 @@ Files must be attached using a `multipart/form-data` body as described in [Uploa
820820

821821
###### JSON/Form Params
822822

823-
:::info
824-
When creating a message, apps must provide a value for **at least one of** `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, or `poll`.
825-
:::
826-
827-
| Field | Type | Description |
828-
|--------------------|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
829-
| content?\* | string | Message contents (up to 2000 characters) |
830-
| nonce? | integer or string | Can be used to verify a message was sent (up to 25 characters). Value will appear in the [Message Create event](/docs/events/gateway-events#message-create). |
831-
| tts? | boolean | `true` if this is a TTS message |
832-
| embeds?\* | array of [embed](/docs/resources/message#embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) |
833-
| allowed_mentions? | [allowed mention object](/docs/resources/message#allowed-mentions-object) | Allowed mentions for the message |
834-
| message_reference? | [message reference](/docs/resources/message#message-reference-structure) | Include to make your message a reply or a forward |
835-
| components?\* | array of [message component](/docs/components/reference#component-object) objects | Components to include with the message |
836-
| sticker_ids?\* | array of snowflakes | IDs of up to 3 [stickers](/docs/resources/sticker#sticker-object) in the server to send in the message |
837-
| files[n]?\* | file contents | Contents of the file being sent. See [Uploading Files](/docs/reference#uploading-files) |
838-
| payload_json? | string | JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](/docs/reference#uploading-files) |
839-
| attachments? | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with filename and description. See [Uploading Files](/docs/reference#uploading-files) |
840-
| flags?\*\* | integer | [Message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS`, `SUPPRESS_NOTIFICATIONS`, `IS_VOICE_MESSAGE`, and `IS_COMPONENTS_V2` can be set) |
841-
| enforce_nonce? | boolean | If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. |
842-
| poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
843-
844-
\* At least one of `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, or `poll` is required.
823+
| Field | Type | Description |
824+
|----------------------|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
825+
| content?\* | string | Message contents (up to 2000 characters) |
826+
| nonce? | integer or string | Can be used to verify a message was sent (up to 25 characters). Value will appear in the [Message Create event](/docs/events/gateway-events#message-create). |
827+
| tts? | boolean | `true` if this is a TTS message |
828+
| embeds?\* | array of [embed](/docs/resources/message#embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) |
829+
| allowed_mentions? | [allowed mention object](/docs/resources/message#allowed-mentions-object) | Allowed mentions for the message |
830+
| message_reference?\* | [message reference](/docs/resources/message#message-reference-structure) | Include to make your message a reply or a forward |
831+
| components?\* | array of [message component](/docs/components/reference#component-object) objects | Components to include with the message |
832+
| sticker_ids?\* | array of snowflakes | IDs of up to 3 [stickers](/docs/resources/sticker#sticker-object) in the server to send in the message |
833+
| files[n]?\* | file contents | Contents of the file being sent. See [Uploading Files](/docs/reference#uploading-files) |
834+
| payload_json? | string | JSON-encoded body of non-file params, only for `multipart/form-data` requests. See [Uploading Files](/docs/reference#uploading-files) |
835+
| attachments? | array of partial [attachment](/docs/resources/message#attachment-object) objects | Attachment objects with filename and description. See [Uploading Files](/docs/reference#uploading-files) |
836+
| flags?\*\* | integer | [Message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS`, `SUPPRESS_NOTIFICATIONS`, `IS_VOICE_MESSAGE`, and `IS_COMPONENTS_V2` can be set) |
837+
| enforce_nonce? | boolean | If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. |
838+
| poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
839+
840+
\* At least one of `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, or `poll` is required. When forwarding a message, only `message_reference` is required.
845841

846842
\*\* When the flag `IS_COMPONENTS_V2` is set, the message can only contain `components`. Providing `content`, `embeds`, `sticker_ids`, `files[n]`, or `poll` will fail with a 400 BAD REQUEST response.
847843

0 commit comments

Comments
 (0)