From c837017fb6eaf1daf97d363266808b80e38e8376 Mon Sep 17 00:00:00 2001 From: almeidx Date: Tue, 1 Mar 2022 21:22:03 +0000 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();