Spam alerts
Catch hacked accounts and spam bots that post the same message across channels. Buddy deletes the spam, times the member out and alerts your staff.
On this page
- Before you start
- Set it up
- Settings explained
- What triggers an alert
- What Buddy does when it triggers
- Commands
- Examples
- Troubleshooting
- Spam was deleted but the member wasn't timed out
- Nothing happens when I test it
- Some spam messages weren't deleted
- No report in the log channel
- Real members keep getting caught
- Related
Spam alerts stop the classic hacked-account attack: the same scam link pasted into every channel in a few seconds. When Buddy spots it, it deletes the spam, times the member out, records a warning and posts an alert for your staff, usually before most members have even seen it.
Before you start#
Buddy can only time out members whose highest role is below Buddy's own role, so keep Buddy's role near the top of Server Settings → Roles.
Members with the Manage Messages permission are never checked, so your staff can post announcements in several channels without setting it off.
Set it up#
It's under Moderation in the sidebar. Scroll to the Spam alerts card.
Set Spam alerts to Enabled and pick a Detection mode (see below).
The defaults (30 second window, 1 duplicate allowed, 10 minute timeout) suit most servers.
Pick a staff-only Spam alert log channel.
Click Save spam alerts.
You can do the same thing from Discord: run /spamalert to open the spam alerts panel.
Settings explained#
| Setting | What it does | Default |
|---|---|---|
| Spam alerts | Turns spam detection on or off. | Disabled |
| Detection mode | Same Text Across Channels catches copy-paste spam. Any Message In Multiple Channels catches someone hopping between channels, even if each message is different. | Same Text Across Channels |
| Time window (seconds) | How far back Buddy looks at a member's recent messages (5–600). | 30 |
| Duplicates allowed | Same text mode: how many identical messages are allowed inside the window before Buddy acts (1–10). | 1 |
| Channel threshold | Any message mode: posting in this many different channels (or more) inside the window counts as spam (2–20). | 3 |
| Timeout (minutes) | How long the member is timed out (0–4320, which is 3 days). 0 means Buddy only deletes the messages. | 10 |
| Spam alert log channel | Where Buddy posts a 🚨 Spam Alert report for each incident. | None |
What triggers an alert#
Same Text Across Channels: a member posts the same text more times than Duplicates allowed within the window, and those copies are in more than one channel. With the default of 1, posting an identical message in two channels within 30 seconds triggers it. Repeating yourself in a single channel never does.
Any Message In Multiple Channels: a member posts in at least Channel threshold different channels within the window. The message text doesn't matter.
What Buddy does when it triggers#
- Deletes every message from the member that matched (same text mode) or that was posted in the window (any message mode).
- Records a warning for the member with the reason "Automatic mute from spam filter", with Buddy as the moderator. It counts toward their warning total.
- Adds your mute roles, if you set any.
- Times the member out for Timeout (minutes), unless that's
0. - DMs the member to tell them why.
- Posts a case to your warn log channel (if you set one in the warn system).
- Posts a 🚨 Spam Alert report to your Spam alert log channel.
Commands#
/spamalert needs Manage Server. Run it with no options to open the spam alerts panel. Only
you can see it, and every change saves straight away:
- The Spam alerts on/off button, the Detection mode dropdown and the Log channel picker.
- Tune detection opens a form for Matching posts allowed (1–10, same text mode only), Channels that trigger it (2–20, any message mode only), Time window (5–600 seconds) and Timeout (0–4320 minutes,
0= no timeout). - A one-line summary of when spam alerts trigger with your current settings.
To change settings without the panel, run /spamalert with any of its options. Only the options you
include change; the rest keep their current value.
/spamalert [enabled] [duplicates] [window_seconds] [timeout_minutes] [mode] [channel_threshold] [log_channel] Manage ServerOpen the spam alert panel (or change settings directly with the options).
Buddy checks it has View Channel, Send Messages, Embed Links, Manage Messages
and Moderate Members in the channel where you run /spamalert. Run it in a channel where
Buddy has all of these.
Examples#
A stricter setup for a server that gets raided often:
/spamalert enabled:True duplicates:1 window_seconds:45 timeout_minutes:60 log_channel:#mod-alertsCatch fast channel-hopping instead of identical messages:
/spamalert enabled:True mode:Any message in many channels channel_threshold:4 window_seconds:20What your staff see in the log channel:
Start with Same Text Across Channels. It almost never catches real members. Switch to Any Message In Multiple Channels only if spammers in your server vary their text, and keep the Channel threshold at 4 or more so active members chatting in a few channels aren't hit.
Troubleshooting#
Spam was deleted but the member wasn't timed out#
- Check Timeout (minutes) isn't
0. - Buddy needs Moderate Members, and its role must be above the member's highest role.
- Discord never lets bots time out the server owner or members with Administrator.
Nothing happens when I test it#
- Test with an account that does not have Manage Messages. Staff are always skipped.
- In same text mode, the copies must be in different channels, inside the Time window.
- Make sure Spam alerts is set to Enabled and saved.
Some spam messages weren't deleted#
Buddy needs Manage Messages in every channel the spam landed in. Channels where it couldn't delete are listed under Bot errors on your dashboard home page.
No report in the log channel#
Pick a Spam alert log channel and check Buddy can Send Messages and Embed Links there.
Real members keep getting caught#
Raise Duplicates allowed (for example to 2 or 3), shorten the Time window, or raise the Channel threshold if you use any message mode.