From 676307ff5c6c4ef56a353b6fc74501a1080da869 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Mon, 10 Apr 2023 21:35:54 +0100 Subject: [PATCH] fix(core): Support attachment editing on interactions (#9356) fix(core): support attachment editing on interactions Co-authored-by: Vlad Frangu Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/core/src/api/webhook.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/src/api/webhook.ts b/packages/core/src/api/webhook.ts index de3cdbd2a..12031a880 100644 --- a/packages/core/src/api/webhook.ts +++ b/packages/core/src/api/webhook.ts @@ -238,7 +238,11 @@ export class WebhooksAPI { id: Snowflake, token: string, messageId: Snowflake, - { thread_id, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { thread_id?: string }, + { + thread_id, + files, + ...body + }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { files?: RawFile[]; thread_id?: string }, { signal }: Pick = {}, ) { return this.rest.patch(Routes.webhookMessage(id, token, messageId), { @@ -246,6 +250,7 @@ export class WebhooksAPI { auth: false, body, signal, + files, }) as Promise; }