|
9 | 9 | type RESTPatchAPIWebhookJSONBody,
|
10 | 10 | type RESTPatchAPIWebhookResult,
|
11 | 11 | type RESTPatchAPIWebhookWithTokenMessageJSONBody,
|
| 12 | + type RESTPatchAPIWebhookWithTokenMessageQuery, |
12 | 13 | type RESTPatchAPIWebhookWithTokenMessageResult,
|
13 | 14 | type RESTPostAPIWebhookWithTokenGitHubQuery,
|
14 | 15 | type RESTPostAPIWebhookWithTokenJSONBody,
|
@@ -127,13 +128,14 @@ export class WebhooksAPI {
|
127 | 128 | {
|
128 | 129 | wait,
|
129 | 130 | thread_id,
|
| 131 | + with_components, |
130 | 132 | files,
|
131 | 133 | ...body
|
132 | 134 | }: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[] },
|
133 | 135 | { signal }: Pick<RequestData, 'signal'> = {},
|
134 | 136 | ) {
|
135 | 137 | return this.rest.post(Routes.webhook(id, token), {
|
136 |
| - query: makeURLSearchParams({ wait, thread_id }), |
| 138 | + query: makeURLSearchParams({ wait, thread_id, with_components }), |
137 | 139 | files,
|
138 | 140 | body,
|
139 | 141 | auth: false,
|
@@ -232,13 +234,14 @@ export class WebhooksAPI {
|
232 | 234 | messageId: Snowflake,
|
233 | 235 | {
|
234 | 236 | thread_id,
|
| 237 | + with_components, |
235 | 238 | files,
|
236 | 239 | ...body
|
237 |
| - }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { files?: RawFile[]; thread_id?: string }, |
| 240 | + }: RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & { files?: RawFile[] }, |
238 | 241 | { signal }: Pick<RequestData, 'signal'> = {},
|
239 | 242 | ) {
|
240 | 243 | return this.rest.patch(Routes.webhookMessage(id, token, messageId), {
|
241 |
| - query: makeURLSearchParams({ thread_id }), |
| 244 | + query: makeURLSearchParams({ thread_id, with_components }), |
242 | 245 | auth: false,
|
243 | 246 | body,
|
244 | 247 | signal,
|
|
0 commit comments