Files
discordeno/src/helpers/messages/suppress_embeds.ts
T
2021-11-09 20:47:14 +00:00

15 lines
459 B
TypeScript

import type { Bot } from "../../bot.ts";
import type { Message } from "../../types/messages/message.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);
}