AutoMod
A rules engine: triggers, scopes and steps that escalate on their own.
Guard's AutoMod is built from rules. Each rule has:
- a trigger: what it looks for, like spam, scam links or blocked words (all 23 triggers)
- a scope: which roles and channels it applies to, and to whom (everyone, new members or regulars)
- steps: how many hits within how long, and the actions to take, like "reaching 3 within 10 minutes → 10 minute timeout"
For each message, the rules in scope check it. Every hit is counted over time, per member and per rule. The steps whose conditions are met fire, and their actions are merged and run.
Open it from /settings → Protection → AutoMod. Start from presets: complete rules you can turn on and tweak.
Steps
A step is a count within a window (in seconds, where 0 means a single message), plus actions.
- At least: acts every time the count is reached, at most once per window per member. A burst of spam is all deleted, but replied to, alerted and punished once.
- Reaching: acts once, when the count is crossed.
Steps can be limited to some channels.
Actions
| Action | What it does |
|---|---|
| Delete | The message, or every message the step counted |
| Reply | Replies in the channel |
| DM | Sends the member a direct message |
| React | Reacts to the message |
| Alert | Posts in the log channel with Delete, Timeout, Kick, Ban and Dismiss buttons |
| Warn, Timeout, Kick, Ban, Soft Ban | Punishes the member, creating a case linked to the alert |
| Add / remove roles | Changes the member's roles |
Every action can be delayed. When several steps fire at once, their actions are merged: one delete, the strongest punishment, and one alert listing every rule that matched.
Alert pings
An alert can ping roles, but only roles the person who set it up could mention themselves.
Trust levels
A rule can apply to:
- everyone
- new members only, to be stricter with them
- regulars only, to be looser
"New" means joined less than a set number of days ago (New Members in AutoMod's Ignored page).
Ignored roles and channels
AutoMod's Ignored page sets roles and channels no rule ever checks. Each rule's scope can narrow it further.
Testing a rule
/automod test shows which rules a message would break and what they'd do, without doing anything. Rules out of
scope, turned off, or needing more than one message are listed separately.
Edited messages
Content triggers check edited messages again, only when the text changed. A message counts once per rule.
Block Before Sending
Blocked Words rules can copy their list into Discord's own AutoMod, so matching messages are blocked before anyone sees them.
- Blocks by the copy count as the rule's hits, so its steps still escalate.
- The copy is named
Guard #<rule id>: <name>and kept in step after every change. - What Discord can't take is still caught by Guard once sent: look-alike letters, a
*inside a word, entries over 60 characters, or more than 10 patterns.
Discord AutoMod rules
A rule with the Discord AutoMod Rule trigger runs its steps when one of your server's native AutoMod rules goes off. That lets you put Guard's actions (alerts, escalating punishments, cases) on top of Discord's rules. Guard needs Manage Server to receive these events.
Rule files
Export rules to a JSON file and import them into another server. Imported rules are fitted to the server they're imported in.
Stats
Each rule shows its hits today and over 7 days, and how many of its alerts moderators dismissed. A rule that's dismissed often may be too strict.
Name filters
AutoMod's Name Filters page cleans up member names:
- Sanitize Names turns fancy fonts and zalgo into plain letters. Other languages are kept. A name with nothing left becomes Sanitized Name.
- Unhoist Names removes symbols at the start of a name that put someone at the top of the member list. A name with nothing left becomes Unhoisted Name. You can add your own Unhoisted Characters and Unhoisted Words.
- Skip Nicknames and Ignored Roles leave some members alone.
Limits
Lists of blocked words allow up to 1,000 entries and 20 patterns per list, and 5,000 entries and 50 patterns per server. Each entry adds to the cost of checking every message.