fix(rest): sendInteractionResponse file upload (#2239)

* fix(rest): `sendInteractionResponse` file upload

* f
This commit is contained in:
ITOH
2022-05-25 15:38:13 +01:00
committed by GitHub
parent be5bcb5bbc
commit 72fec3a4c6
@@ -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);