Skip to content

Commit 056e138

Browse files
Added info about components and webhooks
1 parent 5a394d6 commit 056e138

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

docs/components/using-message-components.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ sidebar_label: Using Message Components
88

99
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.
1010

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+
1115
### Prerequisites
1216

1317
- You must have a Discord account and be a member of the Discord Developer Portal.

docs/resources/webhook.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ Discord may strip certain characters from message content, like invalid unicode
212212

213213
###### Query String Params
214214

215-
| Field | Type | Description | Required |
216-
|-----------------|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
217-
| 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 |
215+
| Field | Type | Description | Required |
216+
|-----------------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
217+
| 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 |
220220

221221
###### JSON/Form Params
222222

@@ -237,7 +237,7 @@ Discord may strip certain characters from message content, like invalid unicode
237237
| 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 |
238238
| poll | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! | one of content, file, embeds, poll |
239239

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.
241241

242242
\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
243243

@@ -300,10 +300,10 @@ All parameters to this endpoint are optional and nullable.
300300

301301
###### Query String Params
302302

303-
| Field | Type | Description | Required |
304-
|-----------------|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
305-
| thread_id | snowflake | id of the thread the message is in | false |
306-
| 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 |
303+
| Field | Type | Description | Required |
304+
|-----------------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
305+
| 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 |
307307

308308
###### JSON/Form Params
309309

@@ -318,7 +318,7 @@ All parameters to this endpoint are optional and nullable.
318318
| attachments \*\* | array of partial [attachment](/docs/resources/message#attachment-object) objects | attached files to keep and possible descriptions for new files |
319319
| poll \*\*\* | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
320320

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.
322322

323323
\*\* See [Uploading Files](/docs/reference#uploading-files) for details.
324324

0 commit comments

Comments
 (0)