Documentation menu

Docs/Plugins/Censor

Censor

Filter invites, links, words, tokens, zalgo, caps, mentions and nicknames per member level, plus server-wide raid protection.

Censor watches every message (and some things that are not messages, like nicknames) and removes content that matches your rules. Violations can warn, and repeat violations can auto-mute.

Everything on this page is set up on the dashboard's Setup > Filters page, in the Censor form: pick a member level under Applies to member level, then fill in the Invites, Links, Words, Mentions, Formatting and Nicknames sections and choose what happens when something is censored. Raid protection sits in the same form. Per-channel overrides are the one thing still set in the Config tab, for power users.

Setup checklist

  1. Open Setup > Filters and, in the Censor form, pick level 0 under Applies to member level. Rules there apply to ordinary members only. Pick a higher level (for example 50) only if moderators should be filtered too.
  2. Add one literal test word under Blocked words and keep the test in one private channel. Add that channel to a section's ignore list only after the enforcement test.
  3. Under When something is censored, choose whether hits only delete, also warn the member, or mute repeat offenders. A mute requires the infractions plugin, a working mute role, and role hierarchy.
  4. Subscribe a mod log channel to Censored message and, if you use Raid protection, to the raid events.
  5. Save and paste the exact message into the simulator with the test member's real level and channel.
  6. Post the same message as a regular test account. Confirm deletion, warning or mute, and the named config key in the log.
  7. Test one allowed near-match so the rule does not block more than intended.
  8. Add production lists and channels gradually. For image text, configure Image Scan OCR separately.

How rules are scoped

Rules are grouped by member level. A level's rules apply to members at or below that level, so rules under 0 apply only to regular members - trusted members, mods and admins are above them. To also filter staff, add rules under a higher level like 50 or 100. A member is checked against every level they fall under, and the first matching rule wins.

Per-channel overrides (extra rules for one channel or category) are a power-user feature in the Config tab. Every section's channel ignore list already covers the everyday case of switching a filter off in a channel - and an ignored channel exempts its threads and forum posts too.

The filters

  • Invites - Filter Discord invites, with Allowed servers, Allowed invite codes, Blocked invite codes, and channels the rule ignores. How the lists combine:
    • No lists at all: every invite is blocked except invites to your own server.
    • Only blocked codes: just those invites are blocked; everything else passes.
    • Any allow list filled in: the filter becomes allow-only - invites to your own server, the allowed servers and the allowed codes pass, everything else is blocked.
  • Links - Filter links with Blocked domains and Allowed domains only. Blocked domains match with or without https://, so a bare bad-site.com is caught too, subdomains included. The allow-list only judges real links (with a scheme), so ordinary text can never trip it. List entries are forgiving: paste a full link (https://bad-site.com/whatever) or just the domain - both mean the same thing, and a www. prefix is ignored.
  • Words and tokens - Blocked words (whole words) and Blocked text anywhere (substring matches - use these to catch n1tro-style respellings of a blocked word). Both lists are also checked against attachment file names. Entries are matched literally, so $5 means a real dollar sign - you never need to escape anything, and a stray symbol can never break your filter. If you want actual regex matching, that lives in two places: a channel rule's text pattern (the text whitelist regex on the Channel Rules page - see the Utilities docs) and the AutoMod page's regex patterns, which Discord itself enforces.
  • Zalgo - Block zalgo text, plus Strip zalgo from nicknames for names.
  • Caps - Block excessive caps. It only fires on repetition: a message counts when it carries at least the Min run of capitals in a row, and the filter acts after that many Messages within the window you set. All three numbers sit next to the toggle.
  • Mentions - members, roles and channels that cannot be pinged (see below).
  • Nicknames - Blocked nickname text and Hoisting prefixes. These apply to every member, whichever level you set them on. A nickname with blocked text is renamed to "CensoredNick"; a hoisting prefix is stripped from the front of the name. Hoisting prefixes are case-sensitive.
  • Message length - Max message length.

Blocked mentions

The Mentions section protects specific people, roles, or channels from being pinged: Members who cannot be pinged (user IDs), Roles that cannot be pinged, and Channels that cannot be linked, each with a picker or an ID box. User IDs are easiest to get with Developer Mode on in Discord (Settings, Advanced), then right-click a member and Copy ID.

What counts as a mention:

  • Typing the mention in a message.
  • Replying to someone with the @ left on. That pings them just like a written mention, so it is treated the same way. The log entry says (reply ping) so you can tell which form fired.
  • A reply with the ping switched off pings nobody, so it is left alone.

If you edit this list in the Config tab instead, every entry needs a one-letter prefix saying what the ID is - u for a user, r for a role, c for a channel (for example u80351110224678912). A bare ID with no prefix matches nothing, so the filter stays silent. Pasting a mention straight from Discord (<@806…>) is converted for you when the config is saved.

Most sections take a list of channels they ignore. An ignored channel exempts its threads and forum posts too - the filters themselves also run inside threads, like everywhere else.

Edits and old messages

An edit is checked against your rules the same as a new message, but only a real edit made in the last few minutes. Discord also updates old messages for reasons that are not edits (a pin, a thread started from it, a link preview refreshing when someone scrolls back to it); those are never censored. A hit from someone who is no longer in the server is ignored - nothing is deleted, logged, or warned.

Escalation

  • Warn the member when content is censored issues a warning infraction alongside the deletion.
  • Mute repeat offenders auto-mutes after the set number of Violations Within that many seconds, for Mute for seconds.

Anti-raid

Switch on Detect raids in the Raid protection part of the Censor form. Raid protection is server-wide - it does not matter which member level is picked above it.

It watches join velocity: Joins within Within (s) seconds starts a lockdown for Lockdown lasts (s) seconds. While it is active, every new join gets the Action on each raid joiner: give the raid role, kick, ban, or temporarily ban for the Ban length you set. Optionally the bot DMs each raid joiner about the action, and records your Reason on every one.

  • Give the raid role needs a Raid role. Without one, that action does nothing. Set the role's channel permissions so it sees nothing until staff review.
  • Alert role is pinged when a lockdown starts, in the first mod log channel that receives the Raid detected event. Give one of your log channels that event, or the alert has nowhere to go.
  • Raid shield pauses server invites and/or DMs between members at the Discord level for the lockdown, so the influx stops at the source. It needs the bot to have Manage Server and lasts at most 24 hours.

If you set raid options on more than one level in the Config tab, only the lowest level's settings are used.

You can also drive the lockdown by hand:

  • !raid status (or bare !raid) - is a lockdown active, and for how much longer.
  • !raid on [duration] - start (or extend) the lockdown manually, for example ahead of a raid you can see forming. New joins receive the configured raid action exactly as if the detector had tripped, and the shield goes up if configured. Duration defaults to the lockdown length.
  • !raid off - lift the lockdown early and return quarantined members to normal (strips the raid role).

Manual enables and lifts write their own mod log entries naming the moderator, alongside the automatic raid detection events.

Testing your rules

Setup → Filters includes a message simulator: paste a message, pick the channel and the member's level, and it shows exactly which censor rule (if any) would catch it - the same first-hit-wins order the bot uses. Every hit names the exact config key that fired (for example plugins.censor.levels.50.blocked_words), so you can jump straight to that line in your config to change or whitelist it.

Commands

Arguments in {curly braces} are required. Arguments in [square brackets] are optional. Level is the built-in command level: 0 everyone, 10 trusted, 50 moderator, 100 admin. Your commands.overrides can change it - see Permissions.

Command Level What it does
/antiraid [action] 50 (moderator) Inspect, manually enable, or lift the anti-raid lockdown: status / on [duration] / off.

Image-based scams are the Image Scan plugin's job; when its OCR layer is on, text found inside images is run through these same censor lists.

Troubleshooting

  • The simulator catches a message but live Discord does not: confirm the live member level, channel scope, bot Manage Messages permission, and that the plugin block saved.
  • A blocked word catches too little: Blocked words matches whole words; use Blocked text anywhere for substring variants.
  • A domain entry behaves oddly: paste the domain or full URL. The loader normalizes schemes and www..
  • A reply ping slips through: the reply must have its ping left on, and a hand-written Config tab entry needs its u prefix.
  • Staff are not filtered: rules under level 0 only cover regular members. Add the rules under a higher level too.
  • Mute escalation records a hit but cannot mute: configure the infractions mute role below the bot and check Manage Roles.
  • Raid alerts do not ping: the Alert role is pinged in the first mod log channel subscribed to Raid detected, so that subscription must exist.
  • Raid joiners get no role: the Give the raid role action needs a Raid role set, below HepBoat, with Manage Roles granted.
  • The raid shield does not pause invites: the bot needs Manage Server.