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
Copy file name to clipboardExpand all lines: docs/components/using-message-components.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ sidebar_label: Using Message Components
8
8
9
9
Message components are a powerful way to add interactivity to your messages. They allow you to create rich, interactive experiences for your users, making it easier for them to engage with your content.
10
10
11
+
:::info
12
+
If you are sending components as part of a [webhook](/docs/resources/webhook) you'll need to use the [`?with_components=true`](/docs/resources/webhook#execute-webhook-query-string-params) query param otherwise they'll be ignored.
13
+
:::
14
+
11
15
### Prerequisites
12
16
13
17
- You must have a Discord account and be a member of the Discord Developer Portal.
| wait |[boolean](/docs/reference#boolean-query-strings)| waits for server confirmation of message send before response, and returns the created message body (defaults to `false`; when `false` a message that is not saved does not return an error) | false |
218
-
| thread_id | snowflake | Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. | false |
219
-
| with_components |[boolean](/docs/reference#boolean-query-strings)| whether to allow sending (non-interactive) components for non-application-owned webhooks (defaults to `false`; ignored for application-owned webhooks) | false |
| wait |[boolean](/docs/reference#boolean-query-strings)| waits for server confirmation of message send before response, and returns the created message body (defaults to `false`; when `false` a message that is not saved does not return an error) | false |
218
+
| thread_id | snowflake | Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. | false |
219
+
| with_components |[boolean](/docs/reference#boolean-query-strings)| whether to respect the `components` field of the request. When enabled, allows application-owned webhooks to use all components and non-owned webhooks to use non-interactive components. (defaults to `false`)| false |
220
220
221
221
###### JSON/Form Params
222
222
@@ -237,7 +237,7 @@ Discord may strip certain characters from message content, like invalid unicode
237
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
238
| poll |[poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | one of content, file, embeds, poll |
239
239
240
-
\* Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the field will be ignored unless they set the `with_components` query param.
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
@@ -300,10 +300,10 @@ All parameters to this endpoint are optional and nullable.
| thread_id | snowflake | id of the thread the message is in | false |
306
+
| with_components |[boolean](/docs/reference#boolean-query-strings)| whether to respect the `components` field of the request. When enabled, allows application-owned webhooks to use all components and non-owned webhooks to use non-interactive components. (defaults to `false`) | false |
307
307
308
308
###### JSON/Form Params
309
309
@@ -318,7 +318,7 @@ All parameters to this endpoint are optional and nullable.
318
318
| attachments \*\*| array of partial [attachment](/docs/resources/message#attachment-object) objects | attached files to keep and possible descriptions for new files |
319
319
| poll \*\*\*|[poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
320
320
321
-
\* Application-owned webhooks can always send components. Non-application-owned webhooks cannot send interactive components, and the field will be ignored unless they set the `with_components` query param.
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.
322
322
323
323
\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
0 commit comments