Skip to content
yurna
  1. Documentation
  2. Moderation
  3. 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.

SetupCommandsDashboardModerationSecurity

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/… or discord.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#

  1. Open Dashboard → Moderation → Automod (/dashboard/<server>/automod).
  2. Turn a rule on with the switch at the top of its card. This takes effect immediately.
  3. Under Exemptions, pick the roles and channels the rule should ignore.
  4. Under Actions, choose what should happen. At least one action is required, otherwise you can’t save.
  5. 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#

CommandWhat it doesWho can use it
/automod settingsShows the current Automod settingsManage Server
/automod anti-invite enableTurns on Anti-Invite. Options: exempt-roles, exempt-channels, timeout, log-channelManage Server
/automod anti-link enableTurns on Anti-Link, same options as Anti-InviteManage Server
/automod anti-mention enableTurns on Anti-Mention. Additionally limit (1–50)Manage Server
/automod anti-spam enableTurns on Anti-Spam. Options: exempt-roles, exempt-channels, log-channelManage Server
/automod anti-bad-words enableTurns on the bad word filter. Word lists: profanity, sexual-content, slurs, plus exemptions and log channelManage Server
/automod anti-invite disableTurns 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#

Last updated on 15 October 2026