fix(helpers): edit interaction responses & webhook messages does not update files (#2483)

Closes: #2482

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
ITOH
2022-09-30 08:41:09 -05:00
committed by GitHub
co-authored by Skillz4Killz
parent 357376b954
commit 8fa7e89e8c
4 changed files with 22 additions and 12 deletions
@@ -38,6 +38,7 @@ export async function editFollowupMessage(
type: InteractionResponseTypes.UpdateMessage,
data: options,
}).data,
file: options.file,
},
);
@@ -29,10 +29,13 @@ export async function editOriginalInteractionResponse(
bot.rest,
"PATCH",
bot.constants.routes.INTERACTION_ORIGINAL_ID_TOKEN(bot.applicationId, token),
bot.transformers.reverse.interactionResponse(bot, {
{
...bot.transformers.reverse.interactionResponse(bot, {
type: InteractionResponseTypes.UpdateMessage,
data: options,
}).data,
file: options.file,
},
);
return bot.transformers.message(bot, result);
@@ -27,10 +27,13 @@ export async function editOriginalWebhookMessage(
bot.rest,
"PATCH",
bot.constants.routes.WEBHOOK_MESSAGE_ORIGINAL(webhookId, token, options),
bot.transformers.reverse.interactionResponse(bot, {
{
...bot.transformers.reverse.interactionResponse(bot, {
type: InteractionResponseTypes.UpdateMessage,
data: options,
}).data,
file: options.file,
},
);
return bot.transformers.message(bot, result);
+4 -1
View File
@@ -30,10 +30,13 @@ export async function editWebhookMessage(
bot.rest,
"PATCH",
bot.constants.routes.WEBHOOK_MESSAGE(webhookId, token, messageId, options),
bot.transformers.reverse.interactionResponse(bot, {
{
...bot.transformers.reverse.interactionResponse(bot, {
type: InteractionResponseTypes.UpdateMessage,
data: options,
}).data,
file: options.file,
},
);
return bot.transformers.message(bot, result);