Automod
Stops spam, floods, blocked words, links you didn't allow, mass mentions and invite links.
Set it up
- Open Modules, then Automod. Every rule starts off.
- Turn on Log only so nothing is removed while you tune.
- Turn on the rules you want and set their limits.
- Add exempt roles and channels.
- Read the modlog for a few days, then turn Log only off.
Rules
| Rule | Fires when | Default |
|---|---|---|
| Spam | Too many messages too fast | 6 messages in 5 seconds |
| Duplicates | The same text again and again. Case and spacing are ignored. | 3 times in 30 seconds |
| Link allowlist | A link to a host not on your list | Up to 50 domains |
| Blocked words | A listed word or pattern | Up to 200 entries, 20 patterns |
| Caps | Mostly capital letters | 70 percent of at least 10 letters |
| Zalgo | Stacked marks on letters | Four in a row on one letter |
| Emoji | Too many emoji | 10 |
| Mention limit | Too many unique mentions, through Discord AutoMod | Off |
| Invite links | discord.gg, discord.com/invite and dsc.gg links, through Discord AutoMod | Off |
Who is checked
Members with Manage Messages, administrators and the owner are never checked, and neither are bots, exempt roles (up to 25) or exempt channels (up to 50).
Blocked word kinds
Fancy letters, accents, look-alike letters, invisible characters, leetspeak like b4dw0rd, stretched letters like baaaad and spaced out letters like b a d are all read as plain text first.
wordmatches the whole word.asscatches "you ass" but not "class".word*matches any word starting with it.scam*catches "scammer".*word*matches anywhere, ignoring spaces and symbols. Use it sparingly, it is the one that can hit innocent words.- Patterns are regular expressions in RE2 syntax, checked against the message as sent. Add
(?i)to ignore case.
Link allowlist
A domain also allows its subdomains: youtube.com allows www.youtube.com. A domain starting with *. allows only its subdomains. Tricks like https://youtube.com@evil.example are caught because the real host is checked. Internationalized domains must be written in punycode.
What happens on a hit
The message is deleted. With a timeout set, the member is also timed out with a case. Without one, the modlog gets Message removed, at most once a minute per member.
Log only
Every rule still runs but nothing is deleted and nobody is timed out. Each hit posts Message would be removed instead. Mention and invite rules can only block, so they come down while Log only is on and go back up after.