From c4ce74e0d5fc82e80f0e12e7477b1192bc2d2d10 Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Wed, 28 Apr 2021 22:03:49 +0200 Subject: [PATCH] Allowlist instead of blocklist --- backend/src/plugins/Automod/actions/setSlowmode.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/Automod/actions/setSlowmode.ts b/backend/src/plugins/Automod/actions/setSlowmode.ts index 810077dd..587b7243 100644 --- a/backend/src/plugins/Automod/actions/setSlowmode.ts +++ b/backend/src/plugins/Automod/actions/setSlowmode.ts @@ -19,8 +19,9 @@ export const SetSlowmodeAction = automodAction({ for (const channelId of actionConfig.channels) { const channel = pluginData.guild.channels.get(channelId); - // 2 = Guild Voice, 5 = Guild News - Both dont allow slowmode - if (!channel || channel.type === 2 || channel.type === 5) continue; + // 0 = Guild Text, 4 = Guild Category - Both dont allow slowmode + if (!channel) continue; + if (channel.type === 0 || channel.type === 4) continue; let channelsToSlowmode: AnyGuildChannel[] = []; if (channel.type === 4) {