From e0637a206f0e9c7bae14ec61c3508b92a83136c1 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 16:12:57 +0000 Subject: [PATCH] better startThread if checks (almeida is happy) Signed-off-by: GitHub --- backend/src/plugins/Automod/actions/startThread.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index b5864389..4930ebe5 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -50,13 +50,7 @@ export const StartThreadAction = automodAction({ for (const threadContext of threads) { const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id); - if ( - !channel || - !("threads" in channel) || - channel.type === ChannelType.GuildForum || - channel.type === ChannelType.GuildMedia - ) - continue; + if (!channel || !("threads" in channel) || channel.isThreadOnly()) continue; const renderThreadName = async (str: string) => renderTemplate(