- Documentation
- Moderation
- Automod: rules against invites, links, mentions and spam
Automod: rules against invites, links, mentions and spam
Let yurna set up Discord’s built-in AutoMod rules for you – in the dashboard or with /automod.
Automod uses Discord’s own AutoMod. yurna creates the rules on your server and manages them for you. Because Discord enforces the rules itself, they apply instantly – before a message even shows up in the channel, and even if yurna is briefly offline.
There are five rules:
- Anti-Invite – blocks messages containing Discord server invites (e.g.
discord.gg/…ordiscord.com/invite/…). - Anti-Link – blocks messages containing links, server invites and other URLs.
- Anti-Mention – blocks messages with too many unique user or role mentions.
- Anti-Spam – turns on Discord’s spam detection.
- Anti-Badwords – uses Discord’s word lists for profanity, sexual content and slurs (currently via command only).
How to set it up#
- Open Dashboard → Moderation → Automod (
/dashboard/<server>/automod). - Turn a rule on with the switch at the top of its card. This takes effect immediately.
- Under Exemptions, pick the roles and channels the rule should ignore.
- Under Actions, choose what should happen. At least one action is required, otherwise you can’t save.
- Click Save.
Anti-Badwords is still marked “Coming Soon” in the dashboard. Turn it on with /automod anti-bad-words enable in chat.
Settings#
- Ignored roles and Ignored channels – these roles and channels don’t trigger the rule. Members with Administrator or Manage Server permissions are always exempt.
- Delete message – the triggering message is blocked and never appears.
- Time out member – available for Anti-Invite, Anti-Link and Anti-Mention. In the dashboard you pick a duration between 1 minute and 1 week.
- Log to channel – Discord posts an alert in the selected channel for every hit.
- Mentions per message (Anti-Mention only) – 2, 5, 10 or 20 mentions in the dashboard; 1 to 50 via command (default 5). Discord’s mention raid protection is always on for this rule.
Commands#
| Command | What it does | Who can use it |
|---|---|---|
/automod settings | Shows the current Automod settings | Manage Server |
/automod anti-invite enable | Turns on Anti-Invite. Options: exempt-roles, exempt-channels, timeout, log-channel | Manage Server |
/automod anti-link enable | Turns on Anti-Link, same options as Anti-Invite | Manage Server |
/automod anti-mention enable | Turns on Anti-Mention. Additionally limit (1–50) | Manage Server |
/automod anti-spam enable | Turns on Anti-Spam. Options: exempt-roles, exempt-channels, log-channel | Manage Server |
/automod anti-bad-words enable | Turns on the bad word filter. Word lists: profanity, sexual-content, slurs, plus exemptions and log channel | Manage Server |
/automod anti-invite disable | Turns the rule off (same for anti-link, anti-mention, anti-spam, anti-bad-words) | Manage Server |
With the command you can exempt one role and one channel (or a whole category); pick several in the dashboard. The timeout option sets the timeout duration in seconds (5–120).
Note
If the rule already exists, enable simply turns it back on – new options are not applied. Change exemptions and actions in the dashboard instead.
Common problems#
- “There is already a spam rule” or a similar message: Discord allows only one spam rule, one word list rule and one mention rule per server. If another bot or someone manually already created such a rule, yurna won’t delete it but reports the conflict. Disable or delete the other rule under Discord → Server Settings → AutoMod.
- No more rules possible: Discord allows at most six keyword rules. Anti-Invite and Anti-Link use one each.
- Moderators aren’t blocked: That’s intended – anyone with Manage Server or Administrator is always exempt from AutoMod.
- The command reports missing permissions: yurna needs the “Manage Server” permission to create and edit AutoMod rules.
Tip
AutoMod hits show up in the server log as “AutoMod stepped in”. If you also want them in a channel, enable the event in the event logs.
Automod is included in every plan without limits.
See also#
- Shield – raid, scam and new account protection, spam trap and lockdown
- Case files
- yurna’s permissions
Last updated on 15 October 2026