Files
discordeno/packages/old/plugins/utils/src/suppressEmbeds.ts
2022-12-26 20:12:19 -06:00

18 lines
463 B
TypeScript

import type { BigString, Bot, DiscordMessage, Message } from 'discordeno'
/** Suppress all the embeds in this message */
export async function suppressEmbeds (
bot: Bot,
channelId: BigString,
messageId: BigString
): Promise<Message> {
const result = await bot.rest.runMethod<DiscordMessage>(
bot.rest,
'PATCH',
bot.constants.routes.CHANNEL_MESSAGE(channelId, messageId),
{ flags: 4 }
)
return bot.transformers.message(bot, result)
}