diff --git a/backend/src/plugins/Automod/actions/pauseInvites.ts b/backend/src/plugins/Automod/actions/pauseInvites.ts index 1bbea34fa..262b69125 100644 --- a/backend/src/plugins/Automod/actions/pauseInvites.ts +++ b/backend/src/plugins/Automod/actions/pauseInvites.ts @@ -1,3 +1,4 @@ +import { GuildFeature } from "discord.js"; import * as t from "io-ts"; import { automodAction } from "../helpers"; @@ -9,6 +10,10 @@ export const PauseInvitesAction = automodAction({ defaultConfig: {}, async apply({ pluginData, actionConfig }) { - await pluginData.guild.disableInvites(actionConfig.paused); + const hasInvitesDisabled = pluginData.guild.features.includes(GuildFeature.InvitesDisabled); + + if (actionConfig.paused !== hasInvitesDisabled) { + await pluginData.guild.disableInvites(actionConfig.paused); + } }, });