Moderation
Last updated Sep 27, 2026Open in dashboard

Moderation - Anti-Spam

Anti-Spam detects spam; it does not punish anyone by itself. When a detector trips, the bot:

  • fires the matching Automations trigger (for example Message spam detected) and the general Any spam detected trigger, so your automation rules decide what happens: delete the messages, warn, time out, kick, ban, post a log or raise the anti-raid level;
  • posts a Message Spam or Spam Detected entry to Mod Logs, with a link to an archive of the messages behind it, at most once every 30 seconds per member (for a join raid or thread spam, once every 30 seconds for the whole server).

Without an automation rule on those triggers, spam is only logged.

Moderation > Anti-Spam

Detectors

Each message detector counts one thing per member over a sliding window and trips when the member reaches Amount within Within Seconds:

DetectorCounts
Message SpamMessages
Mention SpamUser and role mentions
Link SpamLinks (http:// or https://)
Attachment SpamAttached files
Emoji SpamEmoji: each emoji once, however it is built (a flag, a keycap, a skin tone or a combined emoji such as a family is one), plus every custom emoji
Line SpamLines of text: every message adds its line count, so a one-line message counts 1 and five quick one-liners count 5
Character SpamCharacters
Sticker SpamStickers

By default a detector counts across the whole server: a member posting in several channels at once adds up. Switch on Count per channel on a detector to count each channel separately instead (a thread counts as its own channel), for example so a member chatting in two busy channels is not treated as one flood.

Two detectors count the whole server instead of one member, and fire their trigger with everyone involved, so a rule can act on all of them at once:

  • Join Raid counts new members joining and fires Join raid detected with every member who joined in the burst.
  • Thread Creation Spam counts new threads and forum posts and fires Thread creation spam detected with the threads and the members who created them. Threads made by bots (the bot's own case and form threads included) never count.

Every detector starts off, with these defaults:

DetectorDefaultAmountWithinPer channel
messageoff1010 soff
mentionoff1010 soff
linkoff510 soff
attachmentoff510 soff
emojioff105 soff
lineoff2010 soff
characteroff400010 soff
stickeroff510 soff
joinoff1010 sserver-wide
thread_createoff510 sserver-wide

The amount is at least 1 and the window between 1 second and 1 hour. Messages from bots never count.

Note

Line Spam counts every line. Earlier versions counted only messages with more than one line. Settings saved at the old default of 5 lines (also in scope overrides) were moved to the new default of 20 when the bot updated. An amount you chose yourself was kept: if it is low, raise it, since 5 lines in 10 seconds is now reached by five short messages.

Turning it on

  1. Open Moderation > Anti-Spam.
  2. Switch on Generic Anti-Spam Enabled. It is the main switch for every detector, the server-wide ones included: while it is off, nothing is detected. For those, also switch on Join Raid Detection Enabled or Thread Spam Detection Enabled.
  3. Switch on the detectors you want under Generic Rules and set their Amount, Within Seconds and Count per channel. The line under each shows the result, for example "8 in 5s window".
  4. Click Save Changes.
  5. In Automations, create a rule for the trigger, for example Any spam detected with the actions Delete contributing spam messages and Timeout the member.

Scope overrides

Overrides change the detectors for one category, channel or role. Under Scope Overrides, click Add in Category Overrides, Channel Overrides or Role Overrides, pick the target, then either:

  • turn anti-spam off there entirely (for example in a bot commands channel), or
  • customize only the detectors that need different limits (for example a looser link limit in a resources channel), including whether they count per channel. Detectors you do not customize keep the generic rules.

When several overrides customize the same detector, a role override beats a channel override, which beats a category override (Role - Channel - Category). An override that turns anti-spam off wins over all of them.

Overrides apply to the detectors and to automation rules that use the detector's settings. A rule with its own threshold ignores them; use the rule's conditions (Channel is, User has any of these roles, ...) to limit where it applies.

Which trigger to use

  • Any spam detected runs as soon as any enabled detector trips, with your thresholds and overrides. Its rules see which detectors matched, and Delete contributing spam messages removes the messages from all of them. It is the simplest choice for one response to every kind of spam.
  • The per-detector triggers (Message spam detected, Link spam detected, ...) let you respond differently to each kind. By default a rule on one of them runs at that detector's threshold here, overrides included, and only while the detector is on. Give the rule its own threshold (Own threshold under the trigger in the rule editor) to run at its own amount and window instead, whatever the settings on this page, even with Anti-Spam off. Rules with their own thresholds can form a ladder, for example delete at 5 messages in 5 seconds and time out at 10 in 10 seconds.
  • Join raid detected and Thread creation spam detected are the only triggers of the server-wide detectors and work the same way: the detector's threshold by default, or the rule's own. They keep firing on every further join or thread while the count stays over the threshold.

See Spam triggers for how a spam rule counts, what it does after it fired and what gets logged.

What gets logged

  • A detection posts a Message Spam entry (message floods) or a Spam Detected entry (every other detector) with a View archive link: a page with the messages behind it, kept for 30 days.
  • When a spam rule deletes messages, the entry says how many and links that rule's archive. The deletes are not also logged one by one as Message Auto-Deleted or Bulk Message Delete, and this entry is posted even inside the 30-second wait.
  • A rule with Log to mod log on also posts its Automation Rule Fired entry.