Files
discordeno/plugins/helpers/src/suppressEmbeds.ts
2022-01-26 19:02:34 +01:00

18 lines
407 B
TypeScript

import { Bot, Message } from "../deps.ts";
/** Suppress all the embeds in this message */
export async function suppressEmbeds(
bot: Bot,
channelId: bigint,
messageId: bigint,
) {
const result = await bot.rest.runMethod<Message>(
bot.rest,
"patch",
bot.constants.endpoints.CHANNEL_MESSAGE(channelId, messageId),
{ flags: 4 },
);
return bot.transformers.message(bot, result);
}