From 1e9c31de1b56d77c355b1f692ac2b9ffa261f374 Mon Sep 17 00:00:00 2001 From: almeidx Date: Tue, 21 Sep 2021 12:12:41 +0100 Subject: [PATCH] allow running cleancmd on news and thread channels --- backend/src/plugins/Utility/commands/CleanCmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/commands/CleanCmd.ts b/backend/src/plugins/Utility/commands/CleanCmd.ts index 60e79f26..50153982 100644 --- a/backend/src/plugins/Utility/commands/CleanCmd.ts +++ b/backend/src/plugins/Utility/commands/CleanCmd.ts @@ -84,7 +84,7 @@ export async function cleanCmd(pluginData: GuildPluginData, a } const targetChannel = args.channel ? pluginData.guild.channels.cache.get(args.channel as Snowflake) : msg.channel; - if (!targetChannel || !(targetChannel instanceof TextChannel)) { + if (!targetChannel?.isText()) { sendErrorMessage(pluginData, msg.channel, `Invalid channel specified`); return; }