From 72fec3a4c61f5cce4b78b18dcb1c7e92f2969740 Mon Sep 17 00:00:00 2001 From: ITOH Date: Wed, 25 May 2022 16:38:13 +0200 Subject: [PATCH] fix(rest): `sendInteractionResponse` file upload (#2239) * fix(rest): `sendInteractionResponse` file upload * f --- helpers/interactions/sendInteractionResponse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/interactions/sendInteractionResponse.ts b/helpers/interactions/sendInteractionResponse.ts index 88cb85b6a..ec7220dee 100644 --- a/helpers/interactions/sendInteractionResponse.ts +++ b/helpers/interactions/sendInteractionResponse.ts @@ -32,7 +32,6 @@ export async function sendInteractionResponse( users: options.data.allowedMentions!.users?.map((id) => id.toString()), roles: options.data.allowedMentions!.roles?.map((id) => id.toString()), }, - file: options.data.file, custom_id: options.data.customId, title: options.data.title, components: options.data.components?.map((component) => ({ @@ -105,6 +104,7 @@ export async function sendInteractionResponse( { type: options.type, data, + file: options.data.file, }, ); } @@ -114,7 +114,7 @@ export async function sendInteractionResponse( bot.rest, "post", bot.constants.endpoints.WEBHOOK(bot.applicationId, token), - data, + { ...data, file: options.data.file }, ); return bot.transformers.message(bot, result);