Ledra Docs

AutoMod

Six rules, six possible punishments, and full control over who is exempt.

AutoMod watches messages and acts on its own. It ships completely off — the main switch is off, and every individual rule is off. Nothing happens until you turn it on.

How it fits together#

Three independent layers:

  1. The main switch/automod toggle. Off means nothing runs, whatever the rules say.
  2. The rules — six of them, each enabled separately, each with its own punishment.
  3. The exemptions — channels, roles and staff levels AutoMod skips.
/automod toggle enabled:true
/automod rule rule:spam enabled:true action:timeout
/automod exemptlevel level:moderator
/automod status

Enabling a rule while the main switch is off is allowed — Ledra reminds you that AutoMod itself is still disabled. It lets you prepare a full configuration and switch it on in one moment.

The six rules#

Rule Triggers on Thresholds you control
spam Too many messages too quickly Messages per window, window length
mentions Too many mentions in one message Maximum mentions
invites Discord invite links
links Any URL not on your allow list The allow list
caps Shouting in capitals Percentage, minimum length
words Words on your filter list The word list

Spam#

Counts messages per member inside a rolling window. Default: 5 messages in 5 seconds.

/automod rule rule:spam enabled:true action:timeout
/automod limits spam_messages:7 spam_seconds:10

Mention spam#

Counts mentions in a single message. Default: 5.

/automod rule rule:mentions enabled:true action:timeout
/automod limits mention_limit:4

Invites#

Catches Discord invite links. No thresholds — an invite either is one or is not.

/automod rule rule:invites enabled:true action:delete

Blocks URLs, except domains you explicitly allow.

/automod rule rule:links enabled:true action:delete
/automod domain add domain:youtube.com
/automod domain add domain:github.com
/automod domain list

You can paste a full URL — https://www.youtube.com/watch?v=… is stored as youtube.com.

The link filter is strict. Enable it only in servers where links are genuinely unwelcome, or expect to grow the allow list for a while. For most servers, invites alone is what you actually wanted.

Caps#

Flags messages that are mostly uppercase. Defaults: 70% capitals, and only for messages of at least 12 characters — so "OK!" and "WHAT?" are ignored.

/automod rule rule:caps enabled:true action:delete
/automod limits caps_percentage:80 caps_min_length:20

Word filter#

Your own list of blocked words and phrases, case-insensitive.

/automod word add word:some-slur
/automod word list
/automod word remove word:some-slur
/automod word clear
/automod rule rule:words enabled:true action:warn

Adding words does nothing until the words rule is enabled — Ledra reminds you of this when you add the first one.

The six punishments#

Action Effect
none Log only. The rule fires, you see it, nothing happens to the member
delete Delete the message
warn Delete + a warning with a case number
timeout Delete + mute for the configured duration
kick Delete + remove from the server
ban Delete + permanent ban

warn, timeout, kick and ban all create real cases, so an AutoMod warning shows up in /warnings and /modlogs exactly like a manual one.

The timeout length used by action:timeout is shared by all rules:

/automod limits timeout_minutes:30

Default is 10 minutes. You can also stop AutoMod from deleting the message at all:

/automod limits delete_messages:false

Recommended progression. Start every rule at delete. Watch your AutoMod log for a week. Escalate only the rules that are actually being abused. Going straight to ban on a caps rule is how servers lose members to a typo.

Exemptions#

Three kinds, and they stack.

By staff level#

/automod exemptlevel level:moderator
Value Meaning
nobody AutoMod applies to everyone, including admins (default)
moderator Moderators and above are skipped
admin Admins and above are skipped

By channel and role#

/automod exempt add channel:#memes
/automod exempt add role:@Trusted
/automod exempt list
/automod exempt remove channel:#memes

You can pass both a channel and a role in one command.

Checking your work#

/automod status

Shows the main switch, whether messages get deleted, the punishment timeout, and for each of the six rules: on/off, its action, and its current thresholds.

What gets logged#

Every AutoMod hit goes to the automod log category — which rule fired, the member, the action taken and the message content.

/logging set category:automod channel:#mod-logs

Without a log channel, AutoMod works silently. You will not know it is punishing people. Set this up before turning AutoMod on.

AutoMod command reference · Logging · All limits

Ledra documentation. Everything here describes the hosted bot.