Skip to content

Commit 5448f34

Browse files
update edit message to document the properly nullable values
1 parent 39a92dc commit 5448f34

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/resources/message.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,21 +930,22 @@ Starting with API v10, the `attachments` array must contain all attachments that
930930
:::
931931

932932
:::info
933-
All parameters to this endpoint are optional and nullable.
933+
All parameters to this endpoint are optional.
934934
:::
935935

936936
###### JSON/Form Params
937937

938938
| Field | Type | Description |
939939
|------------------|---------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
940-
| content | string | Message contents (up to 2000 characters) |
940+
| content | ?string | Message contents (up to 2000 characters) |
941941
| embeds | array of [embed](/docs/resources/message#embed-object) objects | Up to 10 `rich` embeds (up to 6000 characters) |
942942
| flags\* | integer | Edit the [flags](/docs/resources/message#message-object-message-flags) of a message (`SUPPRESS_EMBEDS` and `IS_COMPONENTS_V2` only) |
943943
| allowed_mentions | [allowed mention object](/docs/resources/message#allowed-mentions-object) | Allowed mentions for the message |
944944
| components | array of [message component](/docs/components/reference#component-object) | Components to include with the message |
945-
| files[n] | file contents | Contents of the file being sent/edited. See [Uploading Files](/docs/reference#uploading-files) |
945+
| files[n] | ?file contents | Contents of the file being sent/edited. See [Uploading Files](/docs/reference#uploading-files) |
946946
| payload_json | string | JSON-encoded body of non-file params (multipart/form-data only). See [Uploading Files](/docs/reference#uploading-files) |
947947
| attachments | array of [attachment](/docs/resources/message#attachment-object) objects | Attached files to keep and possible descriptions for new files. See [Uploading Files](/docs/reference#uploading-files) |
948+
| poll | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
948949

949950
\* The `SUPPRESS_EMBEDS` flag can be both set and unset, while the `IS_COMPONENTS_V2` flag can only be set. When the `IS_COMPONENTS_V2` flag is set, any of the used `content`, `embeds`, `sticker_ids`, or `poll` fields must have their values reset to empty. For `content` and `poll` this is `null`. For `embeds` and `sticker_ids` this is `[]`. Failing to do this will result in a 400 BAD REQUEST response.
950951

0 commit comments

Comments
 (0)