Keywords & regex
Catch messages containing specific words, phrases, or matching custom regex patterns.
When you'd use it
- Slur and harassment word lists
- Brand-specific bans ("don't mention our competitor")
- Scam phrase patterns ("FREE NITRO HERE", airdrop scams)
- Catch-all regex for things like crypto wallet addresses, suspicious link templates
Settings
| Setting | What it does |
|---|---|
| Keywords | Plain strings to match. Up to 1000 per rule, 60 chars each. |
| Regex patterns | PCRE-compatible patterns (matched with the u flag). 260 chars max per pattern. |
| Match whole word | When on, "bot" matches "you're a bot" but not "robot". When off, substring match. |
| Case sensitive | When off (default), "Scam" and "scam" both match. |
| Allow list | Phrases that cancel a match. E.g. you ban "discord-airdrop" but allow "discord-airdrop-safety-tips". |
Tips
- Use whole-word matching for short words to avoid false positives. Without it, "ass" would match "assistant".
- Test regex first — the Test pane in the dashboard runs the rule against a sample. Catch catastrophic backtracking before it lands.
- Allow-list common false positives as you find them. A keyword rule with no allow-list catches a lot of legitimate speech.
- One rule, one purpose. Don't mash slurs + scam phrases + competitor mentions into one rule — split them so the action chains can differ (slurs → ban; scams → timeout; competitor → delete + warn).
Common patterns
| Use case | Setup |
|---|---|
| Block specific slurs | Keywords list + whole-word ON + case-sensitive OFF |
| Crypto scam phrases | Keywords: ["airdrop", "free nitro", "free discord", "claim now"] + actions: delete + 30-min timeout |
| Custom slang | Regex: `\b(rude |
| Wallet address pattern | Regex: 0x[a-fA-F0-9]{40} (Ethereum) — catches paste-spam |
Actions
Usually delete + warn is the right combination. For high-severity lists (slurs, raid keywords) chain a timeout or kick after.
Limits
- 1000 keywords per rule
- 60 chars per keyword
- 260 chars per regex pattern
- 6 actions per rule
Behaviour
- Allow-list match short-circuits: if a message contains any allow-list phrase, the rule does not fire even if it also contains a keyword.
- Keyword + regex matches both add hits to the rule's history. The
Testpane shows which matched. - Rules are evaluated on every message that falls within the rule's channel scope.
Related pages
- Automod overview
- Cases & warnings — what the
warnaction produces - Cross-Server Sync — share keyword lists across your network
