Skip to main content
discord.updateAutomodRule updates a Discord Auto Moderation rule.
automations/discord-update-automod-rule.automation.ts

Inputs

Required server and rule IDs. Provide any matching, action, exemption, name, event, or enabled fields plus optional audit-log reason. A rule’s triggerType cannot change after creation. Optional second argument { account } selects the Discord binding.

Output

Returns the updated DiscordAutomodRule.

Discord behavior

Requires MANAGE_GUILD; fields omitted from the input remain unchanged. A trigger-dependent update first reads the existing rule so Automate.ax can validate its immutable trigger type before sending the change. A supplied presets list must contain at least one entry. You can provide up to three actions with unique action types. sendAlert actions require channelId, timeoutMember actions require durationSeconds, and blockMessage actions accept optional customMessage. Timeout also requires MODERATE_MEMBERS.