From c2369f076c74c7db7f0b6e093595589b90923e57 Mon Sep 17 00:00:00 2001 From: Ibotmealot <42391199+Ibotmealot@users.noreply.github.com> Date: Tue, 1 Mar 2022 16:23:46 -0500 Subject: [PATCH] fix --- backend/src/plugins/Automod/actions/changePerms.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index 039fd043..317c51cf 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -47,7 +47,7 @@ export const ChangePermsAction = automodAction({ if (channelId && isValidSnowflake(channelId)) { const channel = pluginData.guild.channels.resolve(channelId); - if (!channel) return; + if (!channel || channel.isThread()) return; const overwrite = channel.permissionOverwrites.cache.find((pw) => pw.id === target); const allow = new Permissions(overwrite?.allow ?? 0n).serialize(); const deny = new Permissions(overwrite?.deny ?? 0n).serialize();