mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-15 19:08:17 +00:00
fix: transform embed to discord form
This commit is contained in:
@@ -19,7 +19,7 @@ export async function editInteractionResponse(
|
||||
: bot.constants.endpoints.INTERACTION_ORIGINAL_ID_TOKEN(bot.applicationId, token),
|
||||
{
|
||||
content: options.content,
|
||||
embeds: options.embeds,
|
||||
embeds: options.embeds?.map((embed) => bot.transformers.reverse.embed(bot, embed)),
|
||||
file: options.file,
|
||||
allowed_mentions: options.allowedMentions
|
||||
? {
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function editFollowupMessage(
|
||||
bot.constants.endpoints.WEBHOOK_MESSAGE(bot.applicationId, interactionToken, messageId),
|
||||
{
|
||||
content: options.content,
|
||||
embeds: options.embeds,
|
||||
embeds: options.embeds?.map(embed => bot.transformers.reverse.embed(bot, embed)),
|
||||
file: options.file,
|
||||
allowed_mentions: options.allowedMentions
|
||||
? {
|
||||
|
||||
@@ -22,7 +22,7 @@ export async function editWebhookMessage(
|
||||
|
||||
const result = await bot.rest.runMethod<DiscordMessage>(bot.rest, "patch", url, {
|
||||
content: options.content,
|
||||
embeds: options.embeds,
|
||||
embeds: options.embeds?.map((embed) => bot.transformers.reverse.embed(bot, embed)),
|
||||
file: options.file,
|
||||
allowed_mentions: options.allowedMentions
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user