Automod

Automod checks messages in your server and deals with spam, unwanted links, blocked words and risky files. The main part of the tab sets whether automod acts, where it reports, and what it does for each kind of problem. Advanced settings holds the word and website lists, the exemptions, the limits and the strike ladder.

The safest way to start is in watch mode: automod reports what it would have done, without touching anyone. Check the log for a while, adjust the settings, then switch it to on.

Press Save changes after editing. Saving restarts the bot so it picks up the change.

Who automod checks

Automod checks new messages and edited messages from ordinary members. It never checks:

  • your superusers;
  • anyone with the Moderator role or Admin role (see Access);
  • other bots;
  • messages inside ticket channels;
  • anyone or anything on the exempt lists under Advanced settings.

How automod decides

A message can break more than one rule. Automod picks one of them, in this order, and uses that rule's action:

  1. Scam Link
  2. Blocked Host
  3. Dangerous File
  4. Blocked Word
  5. New Member Link
  6. Invite
  7. Mention Spam
  8. Cross Channel Spam
  9. Repeated Message
  10. Message Spam

If the rule it picks is set to ignore, nothing happens to that message, even if a rule lower down also matched.

What each action does

Every rule uses one of these actions:

ActionWhat happens
ignoreNothing.
deleteThe message is deleted.
warnThe message is deleted and the member gets a direct message saying why.
timeoutThe message is deleted and the member is timed out for the Timeout Minutes limit.
quarantineThe message is deleted and the member is quarantined. This needs quarantine to be set up first; see Quarantine.
kickThe message is deleted and the member is kicked.
banThe message is deleted and the member is banned. Their earlier messages are left in place.

Every action except ignore deletes the message first. If the bot cannot delete it, it takes no further action and reports the failure in the automod log. If the message is deleted but the timeout, quarantine, kick or ban fails, for example because the bot's role is below the member's, that is reported too.

Each time automod acts, it saves a moderation case, adds a strike and posts an Automod action card in the automod log with the member, channel, rule, evidence and case number.

The actions are listed from mildest to most severe. That order matters for strikes.

Automod

Turns automod off, on or into watch mode.

  • off: messages are not checked at all.
  • watch: messages are checked, and for each match automod posts an Automod watching card in the automod log saying which rule matched and what the action would have been. Nobody is touched and no strikes are counted.
  • on: automod takes the actions below.

A new bot starts in watch.

Superusers can check the current mode with /automod status, or by typing your prefix followed by automod. To try out some text, use /automod test or your prefix followed by automod test and the text, for example ,automod test free nitro here. The test says which rule would match and what it would do, without acting, and works whatever the mode. It checks words, links and invites; it does not test mentions, attachments, new-member links or message rates.

Automod log

The channel where automod posts what it caught and what it did. Quarantines made with /quarantine are logged here too.

If set to None, automod uses the Moderation log from the Channels tab. If that is also empty, automod still works but nothing is posted.

Blocked Host

What it catches: a link to a website on your Blocked website hosts list, or to any subdomain of one.

New bots: delete.

Scam Link

What it catches: a link to a website on your Known scam hosts list, or to any subdomain of one. It also catches lookalike links: a website whose name contains a brand word from Brand host mappings but which is not one of that brand's real websites. For example, with the brand discord, a link to discord-gift.example is caught, while discord.com is not.

New bots: quarantine.

Invite

What it catches: a Discord server invite, such as discord.gg/abc123 or discord.com/invite/abc123, unless its code is on your Allowed Invite Codes list. Only the first invite in a message is checked.

New bots: delete.

Blocked Word

What it catches: a word or phrase on your Blocked words or phrases list. It matches whole words only, ignoring capitals and extra spaces. For example, blocking cat catches "Cat pictures" but not "category".

New bots: delete.

Dangerous File

What it catches: an attachment whose file extension is on your Blocked file extensions list, for example setup.exe.

New bots: delete.

Mention Spam

What it catches: a message that mentions at least as many people and roles as the Mentions Per Message limit. @everyone or @here counts as one mention.

New bots: timeout.

Message Spam

What it catches: a member sending more messages than the Messages Per Window limit within Message Window Seconds.

New bots: timeout.

Repeated Message

What it catches: a member sending the same text as many times as the Repeated Messages limit within Repeat Window Seconds. Only messages of at least eight characters count, and capitals and extra spaces are ignored when comparing.

New bots: timeout.

Cross Channel Spam

What it catches: a member posting the same text in as many different channels as the Cross Channel Count limit within Cross Channel Window Seconds. As with Repeated Message, only messages of at least eight characters count.

New bots: timeout.

Message Spam, Repeated Message and Cross Channel Spam count new messages only, not edits. The counts start again whenever the bot restarts, including after you save settings.

New Member Link

What it catches: a link from a member who joined your server less than New Member Minutes ago, unless every link in the message is to a website on your Allowed website hosts list.

New bots: delete.

Advanced settings

The list settings below take one entry per line. Commas also separate entries, except in Brand host mappings, which has its own format.

Blocked words or phrases

Words or phrases for the Blocked Word rule, one per line. Up to 200 entries, each up to 80 characters. New bots start with an empty list, so the rule catches nothing until you add words.

Because commas separate entries, a phrase cannot contain a comma.

Blocked website hosts

Website names for the Blocked Host rule, such as example.com, one per line. Type the full name without https:// or a path. Subdomains are included, so example.com also blocks www.example.com. Up to 200 entries. New bots start with an empty list.

Known scam hosts

Website names for the Scam Link rule, in the same format as blocked hosts. Up to 200 entries. New bots start with an empty list.

Allowed website hosts

Website names you trust, in the same format. Links to these, and their subdomains:

  • are never treated as brand lookalikes;
  • do not trigger the New Member Link rule.

They do not override your blocked or scam lists, and they do not stop the Invite rule. Up to 200 entries. New bots start with discord.com, discord.gg, tenor.com and giphy.com.

Allowed Invite Codes

Invite codes that the Invite rule lets through, such as the code for your own server or a partner server. Type only the code, the part after discord.gg/. Capitals do not matter. Codes use letters, numbers and hyphens. Up to 100 entries. New bots start with an empty list.

Blocked file extensions

File extensions for the Dangerous File rule, without the dot, such as exe. Use lowercase letters and numbers. Up to 100 entries. New bots start with exe, scr, bat, cmd, msi, ps1 and jar.

Brand host mappings (brand: host1, host2)

Brand words and the real websites that belong to them, for spotting lookalike links. Write one brand per line: the brand word, a colon, then its real website names separated by commas. For example:

discord: discord.com, discord.gg, discordapp.com

The brand word must be 3 to 30 lowercase letters or numbers, and each brand needs at least one website. New bots start with the discord line shown above. Lookalikes are handled by the Scam Link rule.

Exempt Role Ids

Discord role IDs whose members automod never checks, one per line. Up to 100. In Discord, turn on Developer Mode, then right-click a role in Server Settings and choose Copy Role ID.

Exempt Channel Ids

Discord channel IDs where automod never checks messages, one per line. Up to 100.

Exempt User Ids

Discord user IDs that automod never checks, one per line. Up to 100.

Limits

These are the numbers the rules use. Each must be a whole number within the range shown, or the save is refused.

SettingRangeNew bots
Mentions Per Message1 to 506
Messages Per Window2 to 506
Message Window Seconds2 to 12010
Repeated Messages2 to 204
Repeat Window Seconds2 to 60045
Cross Channel Count2 to 203
Cross Channel Window Seconds5 to 900300
New Member Minutes0 to 144010
Timeout Minutes1 to 4032060

Mentions Per Message

The number of mentions in one message that counts as Mention Spam.

Messages Per Window

How many messages a member may send within Message Window Seconds. Sending more than this counts as Message Spam. For example, with 6 and 10, a seventh message within ten seconds is caught.

Message Window Seconds

The time window, in seconds, for Messages Per Window.

Repeated Messages

How many copies of the same text within Repeat Window Seconds count as a Repeated Message. The message that reaches the number is the one caught.

Repeat Window Seconds

The time window, in seconds, for Repeated Messages.

Cross Channel Count

How many different channels the same text must appear in, within Cross Channel Window Seconds, to count as Cross Channel Spam.

Cross Channel Window Seconds

The time window, in seconds, for Cross Channel Count.

New Member Minutes

How long, in minutes after joining, a member counts as new for the New Member Link rule. Set it to 0 to turn that rule off.

Timeout Minutes

How long, in minutes, the timeout action times a member out. This applies whenever automod uses timeout, whether from a rule or from the strike ladder.

Strikes

Strikes let automod get stricter with members who keep breaking the rules. Every time automod acts on a member, that counts as one strike. The strike settings are the last three advanced settings.

Enabled

Turns strikes on or off. This is the Enabled setting just above Window Hours.

  • On: before acting, automod counts the member's earlier strikes within Window Hours and looks up the matching step in Strike actions in order. If that step is more severe than the rule's own action, it uses the step instead.
  • Off: automod always uses the rule's own action.

New bots start with strikes on. Strikes are only counted in on mode, never in watch.

Window Hours

How far back, in hours, earlier strikes are counted. Strikes older than this are forgotten. Use a whole number from 1 to 2160. New bots start at 720 hours.

Strike actions in order

The ladder of actions, one per line, from a member's first offence to later ones. The first line is used when the member has no earlier strikes in the window, the second line when they have one, and so on. Once a member reaches the last line, it is used for every offence after that. You can list 1 to 10 actions, using the action names from the table above.

New bots start with:

  1. delete
  2. timeout
  3. quarantine
  4. ban

Example: with this ladder, a member posts a blocked word three times within the window, and Blocked Word is set to delete. The first message is deleted. The second is deleted and the member is timed out, because timeout is more severe than delete. The third leads to quarantine. Any after that lead to a ban.