AutoMod Regex
Pick preset rules, add your own, and copy one-regex-per-line output for Discord AutoMod.
Preset Rules
Custom Domains (Bulk Add)
Add multiple domains at once separated by space, comma, or new line.
Custom Rule
Regex Output (One Per Line)
Need more Discord tools?
Invite KaWaii for utility, fun, and moderation commands.
What is Discord AutoMod?
Discord AutoMod is a built-in moderation system that automatically scans every message in your server before it is posted. When a message matches a configured rule, Discord can block it, send an alert to a log channel, or time out the sender — all without any bot or human needing to be online.
One of AutoMod's most powerful rule types is the custom keyword filter, which supports standard regular expressions (regex). This allows server admins to write precise pattern-matching rules that catch spam, phishing links, slurs, and other unwanted content far more accurately than simple word lists.
How AutoMod Regex Rules Work
One rule per line
Discord AutoMod accepts one regex pattern per entry. This builder outputs one pattern per line so you can copy and add them individually to your AutoMod configuration.
Case insensitivity
Use the (?i) flag at the start of a pattern to make it case-insensitive. This is included automatically in the relevant presets so SPAM, Spam, and spam are all caught.
No full-string anchoring
Discord matches your pattern against any substring of the message, so you do not need ^ or $ anchors. A pattern for "discord.gg" will match any message containing that substring.
Testing your patterns
Always test regex patterns before adding them to AutoMod. Overly broad patterns can flag legitimate messages. The output textarea shows exactly what will be submitted.
Frequently Asked Questions
How many regex rules can I add to Discord AutoMod?
Discord allows up to 6 AutoMod rules per server on the custom keyword type. Each rule can contain multiple patterns. Structure your rules by category (links, mentions, spam, etc.) to stay within the limit.
Does AutoMod regex apply to bot messages?
No. By default, Discord AutoMod does not scan messages sent by bots or webhooks. It only applies to regular member messages. You can also exempt specific roles or channels from any AutoMod rule.
What regex flavor does Discord AutoMod use?
Discord AutoMod uses the Rust regex crate, which is a RE2-compatible flavor. It supports most standard features like character classes, quantifiers, alternation, and lookaheads, but does not support backreferences.
Can I block specific domains without blocking all links?
Yes. Use the Custom Domains section above to add specific domain names. The builder generates a regex that matches those exact domains (with or without https:// and www.) without blocking unrelated URLs.