Automod (Trap Channels & Cross-Post Ban)
Auto-softban anyone who posts in a designated trap channel, and permanently ban users who spam the same message across multiple channels.
StarBot's automod adds two opt-in rules. Both are off by default and both share the same exemptions. Configure them on the Moderation tab of your guild's dashboard page, or with /config-mod in Discord.
Prerequisite: StarBot's role must have the Ban Members permission and sit above the members it needs to action in your role list. If it can't ban a user, the action is skipped and logged to your mod-log channel.
Rule 1 — Trap channels (7-day softban)
Designate one or more channels as "do not post" traps. Any non-exempt member who posts in one is instantly softbanned: they're banned with a 7-day message purge and then immediately unbanned. In practice this kicks them and deletes their recent messages, but they can rejoin.
When you add a trap channel, StarBot posts and pins a warning embed there so members are told not to post before they get caught. Running /config-mod trap add in Discord posts it instantly; if you configure traps from the dashboard, the bot can't post to Discord directly, so it backfills the warning on its next hourly sweep (or immediately on its next restart). Enforcement itself is live either way — the warning embed is just the heads-up.
Enable it:
- Open the Moderation tab, check the channels you want to trap, and save. Or run
/config-mod trap add channel:#your-channel. - (Optional) Set custom warning text in the modal, or with
/config-mod trap warning text:.... /config-mod trap listshows the current traps;/config-mod trap removeclears one.
Rule 2 — Cross-post duplicate auto-ban (permanent)
If a user posts the same content in two or more different channels within a short time window, they are permanently banned with their recent messages purged. Repeating it in a single channel does not trigger it.
"Same content" means the same text (after trimming whitespace) and the same attachments. Image spam is covered: an attachment is fingerprinted by its byte size, dimensions, and type, so the same image re-posted across channels is caught even with no caption. Re-uploading the same file produces the same fingerprint (the filename is ignored, since a spammer can change it freely).
Tunables (defaults):
- Window — how close together the posts must be. Default 60 seconds (range 5–600).
- Min length — text-only messages shorter than this are ignored, so someone typing "lol" in two channels isn't banned. Messages with attachments are always checked, regardless of caption length. Default 10 characters (range 1–200).
- Min channels — how many distinct channels the identical content must appear in. Default 2 (range 2–10).
Enable it: toggle Cross-post duplicate auto-ban on in the modal, or run /config-mod dupban enable. Tune with /config-mod dupban settings window_seconds: min_length: min_channels:.
⚠️ This is powerful. A legitimate member who cross-posts the same announcement in two channels within the window would be banned. That's why it ships off by default and admins/mods are exempt — turn it on deliberately and keep the defaults conservative.
Who is exempt
Both rules skip:
- Members with Administrator, Ban Members, or Manage Server permission.
- The server owner and StarBot itself.
- Other bots and webhooks.
- Any role you add to the Exempt Roles list (dashboard checkboxes, or
/config-mod exempt add role:@Role).
What gets logged
If you've set a mod-log channel (/config-mod set_log_channel), every automod softban and ban — and every failed attempt (e.g. StarBot lacked permission) — is posted there as an embed with the user, channel, and reason.