Anti-Spam: Settings, Trigger and Limits
How Kage's anti-spam detects message floods: settings and limits, the exact trigger, timeout, exemptions, logging and troubleshooting.
Last checked for accuracy: 14 October 2026
Anti-spam slows down members who send too many messages in a short time. It only counts how often someone writes, not what. Anyone who writes too fast has the excess messages deleted and can additionally receive a short timeout.
This page is the reference: settings with limits, the exact trigger, exemptions and causes of errors. For a walkthrough with example values, see the guide Stopping spam on Discord.
Requirements
- Access to the module: You sign in to the dashboard with Discord and need the Manage Server permission (or access granted for this module).
- Kage's permissions: Manage Messages in the channels to delete messages. For the optional timeout, Kage needs the Timeout Members permission and a role above the affected member's role. Both permissions are part of the standard invite.
- Optionally a log channel: The log runs through the Moderation module (see below).
How anti-spam detects a flood
- For each member, Kage counts how many messages they sent in the last N seconds (the time window). Counting covers all channels of the server together.
- Bots and members with the Manage Messages permission are not counted and never limited.
- The trigger is "more than" the allowed number. With 5 messages in 5 seconds, Kage therefore acts on the sixth message within the window.
- On the triggering message, Kage deletes exactly that one message. Earlier messages of the burst stay.
- If an additional timeout is set, Kage puts the member on timeout for that time.
- After that, the member is under a lock period of at least 30 seconds, or as long as the timeout if that is longer. During this time Kage silently deletes every further message from the member, without further log entries.
- If the Moderation module is switched on and a log channel is chosen there, Kage posts "🐝 Anti-spam triggered" with the member and the action ("Messages deleted" or "Messages deleted + N s timeout").
- Each trigger appears in the Logs and Statistics tabs of the module.
Kage keeps the counter only in memory. After a bot restart, counting starts over.
Settings at a glance
You find them in the dashboard under Anti-spam.
| Dashboard field | Meaning | Default and limits |
|---|---|---|
| Anti-spam active | Switches anti-spam on | off |
| Max. messages | Messages allowed in the window. The next one triggers. | 5, allowed 2 to 50 |
| Time window (sec.) | Length of the observation window | 5, allowed 1 to 60 |
| Additional timeout (sec., 0 = no timeout) | Length of the timeout after a trigger | 0, allowed 0 to 3600 |
The hint in the dashboard ("5 messages in 5 seconds triggers the action") is simplified: the action applies to the message over the limit.
There are no slash commands for anti-spam and no exemptions for individual channels or roles. Only people who may Manage Messages are exempt. Channels where people type quickly, such as counting or game channels, are therefore hard to combine with low values.
Choosing values
- Normal servers: 5 messages in 5 seconds (the default) catches spam but rarely real conversations.
- Fast chats: Raise "Max. messages" or the time window so that lively conversations do not trigger it.
- Timeout: Use it if spammers would otherwise keep writing immediately. Without a timeout only the 30-second lock period applies.
Checking the result
- Test with an unprivileged account: With a normal member account, send more messages than allowed in a short time. The message over the limit should disappear and the following messages should be deleted.
- Test with your own account: As an admin or moderator you are not limited. Test with a second account.
- Log: Check the Logs tab and the Moderation module's log channel.
Troubleshooting
Nothing is deleted
Check that "Anti-spam active" is on and saved. Check whether the person has the Manage Messages permission (also through a role). Give Kage the Manage Messages permission in the channels. If it is missing, the error appears only in the operating log.
The timeout is not applied
Kage needs the Timeout Members permission and its role must be above the member's role. Admins cannot be put on timeout. The log shows the timeout as the action even if Discord refused it.
Normal conversations trigger anti-spam
Raise "Max. messages" or the time window. Counting covers all channels together; if a member switches quickly between channels, the messages add up.
Nothing appears in the log channel
The entry only appears if the Moderation module is switched on and a log channel is chosen there. The Anti-spam module has no log channel of its own.
A member keeps being deleted although they write only once
They are in the lock period after a trigger. It lasts at least 30 seconds and, with a timeout, as long as the timeout.
Further reading
Anti-raid protects against mass joins: Preventing Discord raids. For warnings and penalties after violations, the warning system helps.
Related Kage modules
- Anti-SpamIncluded in Basic
- ModerationIncluded in Basic
Keep reading
More questions? Ask Kage AIAI
Describe what you need – Kage AI picks out the right guide and gives you the sources.
Try Kage on your server
Sign in with Discord, invite the bot and set up the modules in the dashboard. The Basic plan is free forever.