mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
15 lines
459 B
TypeScript
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);
|
|
}
|