making it testable

This commit is contained in:
Skillz4Killz
2021-10-25 00:11:07 +00:00
committed by GitHub
parent 5b4b10ae45
commit 231554d091
33 changed files with 459 additions and 781 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
import type { Bot } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
// import { cacheHandlers } from "../../cache.ts";
import type { Message } from "../../types/messages/message.ts";
import type { SnakeCasedPropertiesDeep } from "../../types/util.ts";
/** Suppress all the embeds in this message */
export async function suppressEmbeds(bot: Bot, channelId: bigint, messageId: bigint) {
const message = await cacheHandlers.get("messages", messageId);
const message = await bot.cache.messages.get(messageId);
await bot.utils.requireBotChannelPermissions(bot, channelId, message ? ["MANAGE_MESSAGES"] : ["SEND_MESSAGES"]);