mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
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:
@@ -38,6 +38,7 @@ export async function editFollowupMessage(
|
|||||||
type: InteractionResponseTypes.UpdateMessage,
|
type: InteractionResponseTypes.UpdateMessage,
|
||||||
data: options,
|
data: options,
|
||||||
}).data,
|
}).data,
|
||||||
|
file: options.file,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,13 @@ export async function editOriginalInteractionResponse(
|
|||||||
bot.rest,
|
bot.rest,
|
||||||
"PATCH",
|
"PATCH",
|
||||||
bot.constants.routes.INTERACTION_ORIGINAL_ID_TOKEN(bot.applicationId, token),
|
bot.constants.routes.INTERACTION_ORIGINAL_ID_TOKEN(bot.applicationId, token),
|
||||||
bot.transformers.reverse.interactionResponse(bot, {
|
{
|
||||||
type: InteractionResponseTypes.UpdateMessage,
|
...bot.transformers.reverse.interactionResponse(bot, {
|
||||||
data: options,
|
type: InteractionResponseTypes.UpdateMessage,
|
||||||
}).data,
|
data: options,
|
||||||
|
}).data,
|
||||||
|
file: options.file,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return bot.transformers.message(bot, result);
|
return bot.transformers.message(bot, result);
|
||||||
|
|||||||
@@ -27,10 +27,13 @@ export async function editOriginalWebhookMessage(
|
|||||||
bot.rest,
|
bot.rest,
|
||||||
"PATCH",
|
"PATCH",
|
||||||
bot.constants.routes.WEBHOOK_MESSAGE_ORIGINAL(webhookId, token, options),
|
bot.constants.routes.WEBHOOK_MESSAGE_ORIGINAL(webhookId, token, options),
|
||||||
bot.transformers.reverse.interactionResponse(bot, {
|
{
|
||||||
type: InteractionResponseTypes.UpdateMessage,
|
...bot.transformers.reverse.interactionResponse(bot, {
|
||||||
data: options,
|
type: InteractionResponseTypes.UpdateMessage,
|
||||||
}).data,
|
data: options,
|
||||||
|
}).data,
|
||||||
|
file: options.file,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return bot.transformers.message(bot, result);
|
return bot.transformers.message(bot, result);
|
||||||
|
|||||||
@@ -30,10 +30,13 @@ export async function editWebhookMessage(
|
|||||||
bot.rest,
|
bot.rest,
|
||||||
"PATCH",
|
"PATCH",
|
||||||
bot.constants.routes.WEBHOOK_MESSAGE(webhookId, token, messageId, options),
|
bot.constants.routes.WEBHOOK_MESSAGE(webhookId, token, messageId, options),
|
||||||
bot.transformers.reverse.interactionResponse(bot, {
|
{
|
||||||
type: InteractionResponseTypes.UpdateMessage,
|
...bot.transformers.reverse.interactionResponse(bot, {
|
||||||
data: options,
|
type: InteractionResponseTypes.UpdateMessage,
|
||||||
}).data,
|
data: options,
|
||||||
|
}).data,
|
||||||
|
file: options.file,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return bot.transformers.message(bot, result);
|
return bot.transformers.message(bot, result);
|
||||||
|
|||||||
Reference in New Issue
Block a user