Skip to content

AntiSpam

The iHorizon AntiSpam system helps you counter message spam. It watches every member's recent messages and steps in on its own so your moderators don't have to babysit the chat. It catches two kinds of spam:

  • Floods: a member sending messages too fast, one right after another.
  • Repeated messages: a member posting the same thing over and over (same text, same attachments or same stickers), even slowly and across several channels.

As soon as a member is caught, iHorizon sanctions them immediately (mute, kick or ban), deletes the spam burst if you asked it to, and posts a short warning in the channel. You set how sensitive the detection is, choose who is exempt, and pick which channels it leaves alone.

How detection works

Two settings drive the detection: Threshold before punishment (a number of messages, let's call it N) and Max interval messages (a duration, I).

  • A member is caught for flooding when they send more than N messages within N × I.
  • A member is caught for repeating when they send the same message more than N times within four times that window.

For example, with the Guard Mode preset (N = 5, I = 2.7 seconds), a sixth message within 13.5 seconds triggers a sanction, and so does a sixth identical message within 54 seconds.

Once a member has been sanctioned, iHorizon gives them a 10-second grace period: they are not sanctioned again during it, but anything they keep posting is still deleted when Remove messages is on.

Who is never checked

Members with the Administrator permission, the server owner, webhooks, members holding a bypass role and messages sent in an ignored channel are never checked. Bots are skipped too when Ignore Bots is enabled.

iHorizon needs the Administrator permission

The AntiSpam only runs when iHorizon has the Administrator permission on the server. It also cannot sanction members whose highest role is above its own, so keep iHorizon's role high in the list.

What the spammer and your staff see

When someone is sanctioned, iHorizon posts a warning in the channel where the spam happened. It mentions every member caught at the same moment and deletes itself after a few seconds.

iHorizonAPPToday at 21:47
Warning @Alex, you are spamming and may be punished. If you continue, you will be muted.

The warning posted in the channel. The last sentence depends on the sanction (muted, kicked or banned).

If you have set an AntiSpam Logs channel with /setlogs (see the Server Configuration page), a report is also posted there.

iHorizonAPPToday at 21:47
[AntiSpam] New mute
@iHorizon has sanction @Alex
Today at 21:47

The report sent to the AntiSpam logs channel.

/antispam

Subcommand for antispam category!

Subcommands

Full guide

How the AntiSpam fits with AutoMod, PunishPub, the anti-executable guard and the honeypot, and who each one ignores: Message shields.


/antispam manage

Prefix+antispam-manageAliases+mng, +antimng

Manage the antispam module

Requires the Administrator permission

Only members with the Administrator permission can use this command.

This command opens the AntiSpam control panel, where the whole system is configured. It is also available with the prefix command +antispam-manage.

/antispam manage
iHorizonAPPToday at 14:02
AntiSpam Module Configurations
Enable module
Power on
Ignore Bots
Power off
Punishment type
mute
Punishment Time
4minute(s)
Remove messages
Power on
Max interval messages
2second(s)700ms
Threshold before punishment
5
iHorizon
Make a selection!
Save configLoad Preset

The AntiSpam control panel, here with the Guard Mode preset loaded.

Pick a setting in the Make a selection! menu to change it:

Setting What it does
Enable module Turns the AntiSpam on or off.
Ignore Bots When on, messages from bots are never checked.
Punishment type What happens to a spammer: mute them (timeout), kick them or ban them.
Punishment Time How long the mute lasts, typed as a duration like 10m or 1h.
Remove messages When on, the spam burst is deleted, along with anything the spammer keeps posting right after being sanctioned.
Max interval messages The I of the detection above: the shorter it is, the faster a member has to type to be caught.
Threshold before punishment The N of the detection above: how many messages a member may send before being caught.

Load Preset fills every setting at once with a ready-made profile (your bypass roles and ignored channels are kept):

Preset Threshold Max interval Sanction Ignore Bots
Chill Mode 7 messages 1.9 seconds 2-minute mute On
Guard Mode 5 messages 2.7 seconds 4-minute mute Off
Extreme Protection Mode 3 messages 3.2 seconds 30-minute mute Off

Don't forget to save

Changes, presets included, only apply once you press Save config. The panel stops responding after 4 minutes: save before that, or run the command again.

Repeat offenders are muted longer

With the mute sanction, every new AntiSpam mute doubles the previous duration (for example 4, 8, then 16 minutes), up to Discord's 28-day maximum. The count starts over once a member has gone 24 hours without being muted by the AntiSpam. Each AntiSpam mute is also added to the member's warnings, visible with /mod warnlist.


/antispam bypass-roles

Prefix+antispam-bypass-rolesAlias+bproles

All of the roles wich bypass the antispam

Requires the Administrator permission

Only members with the Administrator permission can use this command.

Sets the roles that are allowed to skip the AntiSpam checks entirely. Give it to your moderators and trusted members so the filter leaves them alone during a fast conversation or an announcement.

The command shows the roles currently exempt and a role menu where you can select up to 20 roles. Press Save config to apply your selection. Prefix version: +antispam-bypass-roles.


/antispam ignore-channels

Prefix+antispam-ignore-channelsAlias+channels

Ignore this channels in the AntiSpam Module

Requires the Administrator permission

Only members with the Administrator permission can use this command.

Marks channels where AntiSpam should stay out of the way. Point it at channels where rapid-fire messages are normal, like a spam-for-fun channel or a bot playground, so members can post freely there without being flagged.

The channel menu accepts up to 25 text, voice, stage, forum and media channels, as well as categories: ignoring a category covers every channel inside it. Threads follow their parent channel. Press Save config to apply your selection. Prefix version: +antispam-ignore-channels.