Create AutoMod rule
create_automod_ruleCreate server-side moderation rules to filter keywords, presets, spam, or member profiles, then block, alert, or timeout offenders.
Instructions
Create a server-side moderation rule that runs on Discord's own infrastructure: Discord-maintained preset word lists (slurs, profanity, sexual content), custom keyword filters (with optional regex), spam detection, mention-flood limits, or member_profile checks on usernames, nicknames, and bios (Community servers only). For slur or hate-speech filtering prefer trigger keyword_preset with the slurs preset: Discord maintains the word list, so none needs to be written. Actions: block the message, alert a channel, and/or time the sender out (timeout is not available on spam, keyword_preset, or member_profile rules). On member_profile rules block quarantines the member until they fix their profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| actions | Yes | What happens on a match. | |
| enabled | No | Default true. | |
| presets | No | For keyword_preset rules: Discord-maintained lists. | |
| trigger | Yes | ||
| keywords | No | For keyword rules. Wildcards: word* matches prefixes. | |
| allow_list | No | Words exempt from keyword and keyword_preset rules. | |
| exempt_roles | No | ||
| alert_channel | No | Where alert actions post. | |
| mention_limit | No | For mention_spam rules: max unique mentions per message. | |
| regex_patterns | No | For keyword rules; Rust-flavored regex. | |
| exempt_channels | No | ||
| timeout_minutes | No | How long timeout actions last. |