diff --git a/backend/src/plugins/Automod/actions/setSlowmode.ts b/backend/src/plugins/Automod/actions/setSlowmode.ts index c9a628d9..8e2a7b70 100644 --- a/backend/src/plugins/Automod/actions/setSlowmode.ts +++ b/backend/src/plugins/Automod/actions/setSlowmode.ts @@ -23,22 +23,8 @@ export const SetSlowmodeAction = automodAction({ } for (const channelId of channels) { const channel = pluginData.guild.channels.cache.get(channelId as Snowflake); - // Only text channels and text channels within categories support slowmodes - if ( - !channel || - !( - [ - ChannelTypeStrings.TEXT, - ChannelTypeStrings.CATEGORY, - ChannelTypeStrings.PUBLIC_THREAD, - ChannelTypeStrings.NEWS_THREAD, - ChannelTypeStrings.PRIVATE_THREAD, - ].includes(channel.type) - ) - ) { - continue; - } + if (!channel?.isText() && channel?.type !== ChannelTypeStrings.CATEGORY) continue; const channelsToSlowmode: Array = []; if (channel.type === ChannelTypeStrings.CATEGORY) {