Skip to main content
Version: Stable - 3.6.0

Anti-spam

ArthurToday at 9:07 PM
anyone up for a game tonight?

RaidProtect's anti-spam automatically detects and sanctions spam on your Discord server: bursts of messages, flooded screens, copy-pasting, links, mass mentions, selfbots and spam spread across several channels. Once enabled, it handles everything without a moderator having to step in.

❓ How does anti-spam work?​

We analyze each message by comparing it with its author's recent messages.

  • Ten triggers: each type of spam has its own trigger (spam, flood, files, duplicates, links, mentions, selfbot, external commands, messages blocked by AutoMod, multi-channel). The details are in the triggers table.
  • Four families: triggers are grouped by nature (Excess, Spam, Automated and Multi-channel spam), which lets you set sanctions in a few clicks.
  • The most severe sanction wins: when spam crosses several triggers at once, we apply the strongest sanction.
  • Clear reason: the sanction's reason states the type of spam detected.
  • Logs: each sanction is sent to your logs channel with the deleted messages (see the logs).

The anti-spam is disabled by default. It is enabled during the /setup command if you check it, or at any time from /settings.

🛡️ Anti-spam configuration​

The anti-spam is in the "Protection" tab of /settings. Its screen brings together the switch, the sanctions, the preset, the exemptions and the simulation.

Anti-spam configuration
Set up anti-spam to protect your Discord server from malicious user actions.

Sanctions
iconSanctionsTIMEOUTStandard

Ignored channel(s)
#médias
Ignored role(s)
@Modérateurs
Ignored member(s)
Member(s) to ignore (write to search)

SimulationSimulate a situation to see whether antispam would trigger: pick a member, a channel and a spam type.

Enable or disable the anti-spam​

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Click "Enable" (or "Disable") at the top right of the screen.

Choose a preset​

The simplest way to set up the anti-spam is to choose a preset. It sets the sanction of each family in one go:

PresetExcessSpamAutomatedMulti-channel spam
SoftWarnTimeoutJailTimeout
Standard (default)TimeoutSoftbanBanJail
Strict (not recommended)SoftbanBanBanBan

The Soft preset never kicks or bans: at most a timeout or the jail.

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Choose a preset in the "Choose a preset" selector.

The selector shows "Custom" when your settings match no preset. In that case, applying a preset overwrites your settings: we ask you to confirm by checking "I understand, apply the preset". The durations specific to some triggers then go back to the default duration.

Manage ignored channels, roles and members​

You can exclude certain channels, roles or members from anti-spam monitoring.

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Choose your exemptions in the "Ignored channel(s)", "Ignored role(s)" and "Ignored member(s)" selectors (25 maximum each).

The channel selector accepts categories (all their channels are then ignored), as well as voice channels, stages and forums. Threads follow their parent channel.

Who is ignored automatically?
  • Channels whose name contains "spam" (for a thread, the parent channel's name counts). An "Ignore 'spam' channels" switch, in the anti-spam screen, lets you monitor them too.
  • Members that RaidProtect cannot moderate (role higher than its own).
  • Staff (Administrator, Manage Server or Manage Messages permission), as long as no role or member is ignored. As soon as you add a role or a member to the list, only this list counts: staff members who are not on it can then be sanctioned.

Configure sanctions by trigger​

The sanction details open from the anti-spam screen.

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Click "View details" to the right of "Sanctions".
  5. Click "Edit" next to the family to set, then choose the "Sanction" and, if needed, the "Duration".
Anti-spam configuration
You can customize the sanctions applied depending on the type of spam detected. This allows for a response adapted to the severity of the violation.

Sanctions
iconSanctionsTIMEOUTStandard
Each family groups triggers of the same kind. When a spam crosses several of them, the most severe sanction wins.
Excess
Timeout · Default (1 hour)
Message volume, flood and files: someone getting carried away.
Spam
Softban
Duplicate messages, links and mentions: advertising or harassment.
Automated
Ban
Selfbot, external commands and messages blocked by AutoMod: a bot or a compromised account.
Multi-channel spam
Jail · Default (1 hour)
Replaces the trigger's sanction when spam spans several channels, only if it is more severe.

Default durationDuration applied to triggers without their own duration, for sanctions that support one (mute, timeout, jail). Ignored for other sanctions.
iconTime1 hour
Public sanction message
Enabled
Sends a message in the channel to announce the sanction (e.g. 'member has been muted'). Can be disabled with premium.

Each family groups triggers of the same nature. Here are the triggers we detect, with their default sanction (Standard preset):

FamilyTriggerWhat is detectedDefault sanction
ExcessSpamToo many messages in a short time. Emojis, stickers and gibberish messages (repeated character, looping words) count too.Timeout
ExcessFlood (screen filled)Messages that fill the screen: long texts, images, link previews, stickersTimeout
ExcessAttachment spamMass sending of files or imagesTimeout
SpamDuplicate spamCopy-pasted or nearly identical messagesSoftban
SpamLink spamMass link sending (a Discord invite counts as a link, even without https://; other Discord links and GIFs stay neutral)Softban
SpamMention spamMass mentionsSoftban
AutomatedSelfbot spamUsing selfbots to spamBan
AutomatedExternal command spamUsing external commands to spamBan
AutomatedBlocked message spam (AutoMod)Repeated messages blocked by Discord's AutoModBan
(separate)Multi-channel spamThe same message posted in several channels in a short timeJail
Multi-channel spam

Multi-channel spam is special: its sanction replaces the one from the original trigger when the spam hits several channels, but only if it is more severe. Disabling it also turns off all server-wide monitoring.

Here are the available sanctions for each family or trigger:

  • Warn: sends a warning to the member.
  • Timeout: mutes the member for a defined duration (28 days at most, Discord's limit).
  • Mute: assigns the Mute role configured on your server.
  • Jail: assigns the Jail role configured on your server.
  • Kick: kicks the member from the server.
  • Softban: bans then immediately unbans the member, thereby deleting their messages.
  • Ban: bans the member.
  • Disable: turns the trigger off completely, no sanction is applied.
info

A Jail or a Mute without a configured role becomes a Timeout: the screen shows it with "→ Timeout". Remember to set these roles in the "Moderation" tab, "Sanctions" module.

To put all sanctions back to default, click "Reset" at the top right of the sanctions screen.

Advanced mode: set each trigger​

If you want a different sanction for a single trigger (for example banning link spam but keeping a Softban for mentions), switch to advanced mode.

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Click "View details", then "Advanced mode".
  5. Choose one or more triggers in "Select the triggers to edit", then set their sanction and duration.

Advanced mode stays displayed as long as a family has different settings depending on the trigger. To go back to simple mode, click "Advanced mode" again and check "I understand, align the families".

Sanction duration​

Sanctions that have a duration (mute, timeout, jail) use the default duration, set to 1 hour. You can change it for the whole anti-spam, or give a specific duration to a family or a trigger.

Default duration:

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Click "View details".
  5. Choose a duration in the "Default duration" selector (Permanent, 5 minutes, 1 hour or 1 day), or "Custom value" to enter your own (for example 30m, 2h, 7d).

Duration specific to a family or a trigger: in the window opened by "Edit" (or by advanced mode), choose a "Duration", or enter a "Custom duration". The "Default (global duration)" option goes back to the default duration.

info
  • A custom duration must be 5 minutes minimum.
  • "Permanent" on a Timeout is brought down to 28 days, the maximum allowed by Discord.
  • The duration is ignored for sanctions that do not have one (warn, kick, softban, ban).
  • When multi-channel spam takes over, its duration applies.

Public sanction message Premium​

By default, each anti-spam sanction is announced by a public message in the channel (for example "member was muted"). Premium servers can hide it for more discreet moderation.

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Click "View details".
  5. Click "Disable" next to "Public sanction message".
info

This setting is shared with the ScamLens image filter: disabling it also hides the announcements for deleted scam images.

🔎 Simulate spam​

A member spammed without being sanctioned, or, on the contrary, a member was wrongly sanctioned? The simulation tells you whether the anti-spam would trigger in a specific situation, and why.

  1. Run the /settings command.
  2. Open the "Protection" tab.
  3. Click "Configure" next to "Anti-spam".
  4. Click "Simulate".
  5. Choose the "Member to test", the "Channel to test" and the "Spam type".

The simulation checks the permissions, the exemptions and the planned sanction.

The result also shows the member's peak over the last hour, as a percentage of the threshold, then the verdict and the sanction that would be applied.

Required permissions

The anti-spam sanctions no one unless RaidProtect has the Ban Members, Kick Members and Timeout Members permissions all at once.

🤖 Discord's AutoMod​

RaidProtect works with Discord's AutoMod:

  • Blocked message spam: when a member chains messages blocked by your AutoMod rules, the "Blocked message spam (AutoMod)" trigger sanctions them (Automated family). For this, the AutoMod rule must send its alerts to a channel RaidProtect can see: it is thanks to these alerts that we spot blocked messages.
  • Warning for each blocked message: if sanctions are active on your server, each message blocked by an AutoMod rule is recorded as a warning in the member's history, unless the rule already applies a timeout. The member does not receive a private message for this warning. More details on the sanctions page.

🐢 Preventive slowmode Premium​

To calm a very active channel without sanctioning anyone, preventive slowmode (Premium) automatically adjusts your channels' slowmode according to their message rate.

📑 Anti-spam logs​

Each sanction is sent to your logs channel, with the type of spam as the reason. For all sanctions except the warning, a file containing the deleted messages is attached: you can download or expand it.

Anti-spam logs screenshot

Frequently asked questions​

Does anti-spam work without any configuration?​

You just need to enable it, during the /setup command or in /settings, Protection tab. It then uses the Standard preset, which suits most servers. You can then change preset or adjust each family.

Does the anti-spam have security levels (high, medium, low)?​

No sensitivity level: the anti-spam is simply enabled or disabled. However, three sanction presets are offered (Soft, Standard and Strict), and each family or trigger can get its own sanction.

Can I exclude certain channels or members from anti-spam?​

Yes, you can ignore specific channels, categories, roles or members. Channels whose name contains "spam" are ignored automatically. Staff (Administrator, Manage Server, Manage Messages) is ignored as long as you have not added any role or member to the list.

Can I choose the sanction applied to spam?​

Yes. Choose a preset, set each family's sanction, or switch to advanced mode to set each trigger, from a warning to a ban. You can also completely disable a trigger and give each one its own duration.

Why was a member not sanctioned?​

Use the simulation: it checks RaidProtect's permissions, the role hierarchy, the exemptions, the channel and the sanction for the spam type, then shows the member's activity peak relative to the threshold.

Didn't find what you were looking for?

Search the whole documentation, the glossary and the blog.