Skip to content
All docs

Guides

Discord auto-moderation bot: filter spam, links & bad words

Set up Discord auto-moderation in about 5 minutes: auto-delete banned words, block invite links and spam, and warn or time out offenders. No code, on your own bot.

4 min read

Auto-moderation keeps your server clean without a human watching chat 24/7. This guide shows the most useful moderation rules you can copy, and how to run them automatically on your own Discord bot, no code, in about five minutes.

What auto-moderation can catch

A moderation rule is always the same shape: a trigger (a new message arrives), a condition (does it break a rule?), and an action (delete it, warn the user, time them out). Here are the rules most servers want:

  • Banned words: profanity, slurs, or server-specific terms you don't allow.
  • Invite links: messages containing discord.gg/ (a classic ad-spam and poaching vector).
  • External links: block all links, or allow only a whitelist of trusted domains.
  • Spam & flooding: the same message repeated, or many messages in a few seconds.
  • Mass mentions: messages that @everyone, @here, or ping many users at once (raid behaviour).
  • ALL CAPS / wall-of-text: messages that are mostly uppercase or extremely long.
  • New-account posting: a brand-new member dropping a link in their first message.

Common rules to copy

Start with these three. They cover the majority of real abuse:

  1. Invite-link filter. Delete any message where the content contains discord.gg/ or discord.com/invite/, then DM the user: Please don't post server invites here.
  2. Bad-word filter. Keep a private list (e.g. word1, word2, word3); if the message contains any of them, delete it and add a warning. Repeat offenders get a timeout.
  3. Mention-spam guard: if a message pings more than 5 users (or uses @everyone from a non-moderator), delete it and time the sender out for 10 minutes.

Escalation ladder that works well: 1st offence → delete + warn, 2nd → 10-minute timeout, 3rd → kick or ban. You can build each rung as its own branch.

Locking the server down during a raid

Per-message rules handle the steady state. A raid is different: dozens of fresh accounts arriving at once, faster than any per-message rule can escalate. Two server-wide levers help, and both are one action each:

  • Discord: Update Server with Verification level set to High stops accounts that only just joined from posting at all. Pair it with a second workflow (or a Wait node) that sets the level back afterwards, so you don't leave the server locked for weeks.
  • Discord: Set Channel Permission, denying Send Messages for @everyone on your busiest channel, closes just that room instead of the whole server.

A common shape: a Member Join trigger counts joins with a Scores node. If more than N arrive inside a minute, it raises the verification level and posts a heads-up in your mod channel.

Logging what your moderators do

Rules catch members. A mod log catches everything else, and Discord only records who performed an administrative action in the audit log, so that's where the answer lives.

The Discord: Audit Log Entry trigger fires whenever something is written there, giving you the action (member_kick, channel_delete, role_update…), who did it, the target and the reason. Two filters keep it useful. Action Filter narrows it to the actions you care about; left empty, it fires on everything, which is noisy on a busy server. Only when done by watches specific people.

Wire it into a Send Embed in a private #mod-log channel and you have a permanent, searchable record. Your bot needs the View Audit Log permission, without it Discord never sends the event at all.

Set it up with NoriaFlow

Try the moderation workflow in the real editor below. Move or connect steps and edit their settings; changes stay in this demo and reset when you leave:

TriggerLoading step…
ActionLoading step…
ActionLoading step…

You don't need to rent a generic bot. Connect your own and let it enforce your rules:

  1. Connect your Discord bot to NoriaFlow (paste your bot token, it stays encrypted). Give it Manage Messages and Moderate Members permissions.
  2. Open the editor and add a Discord: Message trigger.
  3. Add a Condition that checks the message content against your rule, for example, "contains discord.gg/".
  4. On the match branch, add a Delete Message action, then an optional Send Message (a DM or channel warning) and a Timeout Member action.
  5. Click Activate. Every new message is now checked automatically.

The fastest start is the Discord Auto-Moderation template. It opens pre-wired so you only edit the word list and the channel.

Make it your own

  • Whitelist your mods: add a condition that skips the rule if the author has a moderator role, so staff aren't caught by their own filters.
  • Log every action: send a copy of each deletion to a private #mod-log channel with the user, the message, and the rule that fired.
  • Combine rules: an invite-link filter and a mention-spam guard can run as separate workflows on the same bot; they don't conflict.
  • Tune the escalation: read the triggers and actions guide to add timeouts and role changes to the ladder.

That's a self-cleaning server, running on your own bot, with rules only you control.

Setup checks and next steps

  • Check the selected bot, server and destination channel. Role actions also require the bot role to sit above the role it changes.
  • Test with a dedicated channel or member before enabling this automation for everyone.
  • If a step fails, inspect its error and inputs rather than reconnecting every account.

See the extension setup guide for adding and reusing services, the node reference for parameters, and testing and debugging for execution diagnostics.

Frequently asked questions

How do I set up auto-moderation on Discord without code?

Connect your own Discord bot to NoriaFlow, add a Discord: Message trigger, add a condition that checks the message content against your rule (banned word, invite link, all-caps, too many mentions), then wire a Delete Message action, plus an optional warn or timeout. Activate it and every new message is checked automatically. No code required.

Can the bot delete messages with banned words automatically?

Yes. Add a condition that matches your word list against the message content, then a Delete Message action on the match branch. You can keep the word list private and update it any time without touching code.

Can it block Discord invite links and spam?

Yes. Match the message against a pattern like discord.gg/ to catch invite links, or count repeated messages / excessive mentions to catch spam and raids. Each rule is just a condition plus an action, so you can stack as many as you need.

Does auto-moderation work on the free tier?

Yes. You bring your own Discord bot (a free token from the Discord Developer Portal) and the moderation workflow runs on NoriaFlow's free tier. Give the bot the Manage Messages and Moderate Members permissions so it can delete and time out.