mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
fix(core): Support attachment editing on interactions (#9356)
fix(core): support attachment editing on interactions Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -238,7 +238,11 @@ export class WebhooksAPI {
|
|||||||
id: Snowflake,
|
id: Snowflake,
|
||||||
token: string,
|
token: string,
|
||||||
messageId: Snowflake,
|
messageId: Snowflake,
|
||||||
{ thread_id, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { thread_id?: string },
|
{
|
||||||
|
thread_id,
|
||||||
|
files,
|
||||||
|
...body
|
||||||
|
}: RESTPatchAPIWebhookWithTokenMessageJSONBody & { files?: RawFile[]; thread_id?: string },
|
||||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||||
) {
|
) {
|
||||||
return this.rest.patch(Routes.webhookMessage(id, token, messageId), {
|
return this.rest.patch(Routes.webhookMessage(id, token, messageId), {
|
||||||
@@ -246,6 +250,7 @@ export class WebhooksAPI {
|
|||||||
auth: false,
|
auth: false,
|
||||||
body,
|
body,
|
||||||
signal,
|
signal,
|
||||||
|
files,
|
||||||
}) as Promise<RESTPatchAPIWebhookWithTokenMessageResult>;
|
}) as Promise<RESTPatchAPIWebhookWithTokenMessageResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user