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
| content | string | the message contents (up to 2000 characters) | one of content, file, embeds, poll |
226
-
| username | string | override the default username of the webhook | false |
227
-
| avatar_url | string | override the default avatar of the webhook | false |
228
-
| tts | boolean | true if this is a TTS message | false |
229
-
| embeds | array of up to 10 [embed](/docs/resources/message#embed-object) objects | embedded `rich` content | one of content, file, embeds, poll |
230
-
| allowed_mentions |[allowed mention object](/docs/resources/message#allowed-mentions-object)| allowed mentions for the message | false |
231
-
| components \*| array of [message component](/docs/components/reference#component-object)| the components to include with the message | false |
232
-
| files[n]\*\*| file contents | the contents of the file being sent | one of content, file, embeds, poll |
233
-
| payload_json \*\*| string | JSON encoded body of non-file params |`multipart/form-data` only |
234
-
| attachments \*\*| array of partial [attachment](/docs/resources/message#attachment-object) objects | attachment objects with filename and description | false |
235
-
| 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`and `SUPPRESS_NOTIFICATIONS` can be set) | false |
236
-
| thread_name | string | name of thread to create (requires the webhook channel to be a forum or media channel) | false |
237
-
| applied_tags | array of snowflakes | array of tag ids to apply to the thread (requires the webhook channel to be a forum or media channel) | false |
238
-
| poll |[poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | one of content, file, embeds, poll |
| content | string | the message contents (up to 2000 characters) | one of content, file, embeds, poll |
226
+
| username | string | override the default username of the webhook | false |
227
+
| avatar_url | string | override the default avatar of the webhook | false |
228
+
| tts | boolean | true if this is a TTS message | false |
229
+
| embeds | array of up to 10 [embed](/docs/resources/message#embed-object) objects | embedded `rich` content | one of content, file, embeds, poll |
230
+
| allowed_mentions |[allowed mention object](/docs/resources/message#allowed-mentions-object)| allowed mentions for the message | false |
231
+
| components \*| array of [message component](/docs/components/reference#component-object)| the components to include with the message | false |
232
+
| files[n]\*\*| file contents | the contents of the file being sent | one of content, file, embeds, poll |
233
+
| payload_json \*\*| string | JSON encoded body of non-file params |`multipart/form-data` only |
234
+
| attachments \*\*| array of partial [attachment](/docs/resources/message#attachment-object) objects | attachment objects with filename and description | false |
235
+
| 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`and `IS_COMPONENTS_V2` can be set) | false |
236
+
| thread_name | string | name of thread to create (requires the webhook channel to be a forum or media channel) | false |
237
+
| applied_tags | array of snowflakes | array of tag ids to apply to the thread (requires the webhook channel to be a forum or media channel) | false |
238
+
| poll |[poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | one of content, file, embeds, poll |
239
239
240
240
\* Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the `components` field will be ignored unless they set the `with_components` query param.
241
241
242
242
\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
243
243
244
+
\*\*\* When the flag `IS_COMPONENTS_V2` is set, the webhook message can only contain `components`. Providing `content, `embeds`, `files[n]` or `poll` will fail with a 400 BAD REQUEST response.
245
+
244
246
:::info
245
247
For the webhook embed objects, you can set every field except `type` (it will be `rich` regardless of if you try to set it), `provider`, `video`, and any `height`, `width`, or `proxy_url` values for images.
246
248
:::
@@ -285,7 +287,7 @@ Returns a previously-sent webhook message from the same token. Returns a [messag
285
287
286
288
Edits a previously-sent webhook message from the same token. Returns a [message](/docs/resources/message#message-object) object on success.
287
289
288
-
When the `content` field is edited, the `mentions`array in the message object will be reconstructed from scratch based on the new content. The `allowed_mentions` field of the edit request controls how this happens. If there is no explicit `allowed_mentions` in the edit request, the content will be parsed with _default_ allowances, that is, without regard to whether or not an `allowed_mentions` was present in the request that originally created the message.
290
+
When the `content` field is edited, the arrays `mentions`and `mention_roles` and the boolean `mention_everyone`in the message object will be reconstructed from scratch based on the new content. When the message flag `IS_COMPONENTS_V2` is set, the reconstructed arrays and boolean are based on the edited content in the `components` array. The `allowed_mentions` field of the edit request controls how this happens. If there is no explicit `allowed_mentions` in the edit request, the content will be parsed with _default_ allowances, that is, without regard to whether or not an `allowed_mentions` was present in the request that originally created the message.
289
291
290
292
Refer to [Uploading Files](/docs/reference#uploading-files) for details on attachments and `multipart/form-data` requests.
291
293
Any provided files will be **appended** to the message. To remove or replace files you will have to supply the `attachments` field which specifies the files to retain on the message after edit.
@@ -307,22 +309,25 @@ All parameters to this endpoint are optional and nullable.
| content | string | the message contents (up to 2000 characters) |
313
-
| embeds | array of up to 10 [embed](/docs/resources/message#embed-object) objects | embedded `rich` content |
314
-
| allowed_mentions |[allowed mention object](/docs/resources/message#allowed-mentions-object)| allowed mentions for the message |
315
-
| components \*| array of [message component](/docs/components/reference#component-object)| the components to include with the message |
316
-
| files[n]\*\*| file contents | the contents of the file being sent/edited |
317
-
| payload_json \*\*| string | JSON encoded body of non-file params (multipart/form-data only) |
318
-
| attachments \*\*| array of partial [attachment](/docs/resources/message#attachment-object) objects | attached files to keep and possible descriptions for new files |
319
-
| poll \*\*\*|[poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
| content | string | the message contents (up to 2000 characters) |
315
+
| embeds | array of up to 10 [embed](/docs/resources/message#embed-object) objects | embedded `rich` content |
316
+
| flags \*| integer |[message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (`SUPPRESS_EMBEDS` and `IS_COMPONENTS_V2` only) |
317
+
| allowed_mentions |[allowed mention object](/docs/resources/message#allowed-mentions-object)| allowed mentions for the message |
318
+
| components \*\*| array of [message component](/docs/components/reference#component-object)| the components to include with the message |
319
+
| files[n]\*\*\*| file contents | the contents of the file being sent/edited |
320
+
| payload_json \*\*\*| string | JSON encoded body of non-file params (multipart/form-data only) |
321
+
| attachments \*\*\*| array of partial [attachment](/docs/resources/message#attachment-object) objects | attached files to keep and possible descriptions for new files |
322
+
| poll \*\*\*\*|[poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
320
323
321
-
\*Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the `components` field will be ignored unless they set the `with_components` query param.
324
+
\*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`, `files[n]` or `poll` values in the initial message must be set to `null` first, otherwise it will fail with a 400 BAD REQUEST response.
322
325
323
-
\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
326
+
\*\* Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the `components` field will be ignored unless they set the `with_components` query param.
327
+
328
+
\*\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
324
329
325
-
\*\*\* Polls can only be added when editing a deferred interaction response.
330
+
\*\*\*\* Polls can only be added when editing a deferred interaction response.
0 commit comments