Actions193
- Application Actions
- Application Command Actions
- Application Role Connection Metadata Actions
- Audit Log Actions
- Auto Moderation Actions
- Channel Actions
- Get
- Modify
- Delete
- Trigger Typing
- Get Pinned Messages
- Unpin Message
- Create Reaction
- Delete Own Reaction
- Get Reactions
- Delete All Reactions
- Delete All Reactions For Emoji
- Bulk Delete Messages
- Crosspost Message
- Edit Channel Permissions
- Delete Channel Permission
- Get Channel Invites
- Create Channel Invite
- Follow Announcement Channel
- Group DM Add Recipient
- Group DM Remove Recipient
- Start Thread From Message
- Start Thread Without Message
- Start Thread In Forum Channel
- Join Thread
- Add Thread Member
- Leave Thread
- Get Thread Member
- List Thread Members
- List Public Archived Threads
- List Private Archived Threads
- List Joined Private Archived Threads
- Emoji Actions
- Entitlement Actions
- Guild Actions
- Get
- Modify
- Create
- Get Preview
- Delete
- Modify Channel Positions
- List Active Threads
- Get Bans
- Get Ban
- Remove Ban
- Get Prune Count
- Begin Prune
- Get Voice Regions
- Get Invites
- Get Integrations
- Delete Integration
- Get Widget Settings
- Modify Widget
- Get Widget
- Get Vanity URL
- Get Widget Image
- Get Welcome Screen
- Modify Welcome Screen
- Get Onboarding
- Modify Onboarding
- Modify Current User Voice State
- Modify User Voice State
- Search Members
- List Members
- Guild Scheduled Event Actions
- Guild Template Actions
- Interaction Response Actions
- Invite Actions
- Lobby Actions
- Member Actions
- Message Actions
- Poll Actions
- Role Actions
- SKU Actions
- Soundboard Actions
- Stage Instance Actions
- Sticker Actions
- Subscription Actions
- User Actions
- Voice Actions
- Webhook Actions
Auto Moderation → Create Rule
AI-generatedSummary
Create an auto-moderation rule for a Discord guild. Choose the event and trigger types, configure trigger metadata and actions, and optionally set exemptions and whether the rule is enabled.
Inputs
- Guild (required) — The Discord guild ID where the rule will be created.
- Name (required) — The rule name.
- Event Type (required) — Choose Message Send or Member Update as the event that triggers the rule.
- Trigger Type (required) — Choose Keyword, Spam, Keyword Preset, Mention Spam, or Member Profile.
- Keyword Filter — For Keyword and Member Profile triggers, provide comma-separated substrings to match. Discord supports wildcard syntax such as example; up to 1,000 entries of 60 characters each.
- Regex Patterns — For Keyword and Member Profile triggers, provide comma-separated Rust regular expressions; up to 10 patterns of 260 characters each.
- Allow List — Provide comma-separated substrings exempt from the rule. Shown for Keyword, Member Profile, and Keyword Preset triggers; up to 100 entries of 60 characters each.
- Presets — For Keyword Preset triggers, select Profanity, Sexual Content, or Slurs.
- Mention Total Limit — For Mention Spam triggers, set the maximum unique user and role mentions allowed per message (1–50).
- Mention Raid Protection Enabled — For Mention Spam triggers, choose whether automatic mention raid detection is enabled.
- Trigger Metadata — Raw Discord trigger_metadata JSON escape hatch. Its shape depends on the trigger type; guided fields take precedence when keys overlap.
- Actions Collection — Add actions to apply when the rule triggers: Block Message (optionally with a custom message), Send Alert Message (requires a channel ID), Timeout (duration in seconds, up to 2,419,200), or Block Member Interaction.
- Actions — Raw Discord actions JSON array escape hatch. Entries are combined with actions from Actions Collection, with raw entries first.
- Enabled — Whether the new rule is enabled; defaults to true.
- Exempt Role IDs — Comma-separated role IDs that the rule should not affect.
- Exempt Channel IDs — Comma-separated channel IDs that the rule should not affect.
- Audit Log Reason — Reason recorded in the guild audit log; Discord limits it to 512 characters.
- Authentication — Choose Bot Token (the default) or OAuth2 user token.
Output shape
A single Discord auto-moderation rule record.
The operation sends a create-rule request for the specified guild. The returned record fields are determined by Discord.