Creates a new auto moderation rule for a Discord guild. Requires MANAGE_GUILD permission. Use this to set up filters for profanity, spam, excessive mentions, or custom keywords.
nameRequiredstringThe name of the rule (1-100 characters).
actionsRequiredarrayThe actions to execute when the rule is triggered (max 5).
enabledbooleanWhether the rule is enabled. Defaults to false.
guild_idRequiredstringThe unique identifier (snowflake ID) of the Discord guild where the rule will be created.
event_typeRequiredintegerThe event type: 1=MESSAGE_SEND, 2=MEMBER_UPDATE.
exempt_rolesarrayRole IDs not affected by the rule (max 20).
trigger_typeRequiredintegerThe trigger type: 1=KEYWORD (max 6/guild), 3=SPAM (max 1/guild), 4=KEYWORD_PRESET (max 1/guild), 5=MENTION_SPAM (max 1/guild), 6=MEMBER_PROFILE (max 1/guild).
exempt_channelsarrayChannel IDs not affected by the rule (max 50).
trigger_metadataobjectAdditional metadata associated with the rule's trigger type.
dataRequiredData from the action execution
errorstringError if any occurred during the execution of the action
successfulRequiredbooleanWhether or not the action execution was successful or not
OAuth connection. Risk level 2 of 5.
Free Action
No published Skills explicitly reference this Action yet.