How to set up moderation on a Discord server

Good moderation starts with Discord's own settings and ends with a team that knows what it may do. A bot fills the space between: it keeps a record of every warning and applies the same rules at four in the morning, when your moderators are asleep. Set up Discord's part first, then the bot.

Updated 18 listopada 202612 min read

On this page

The short version

  • Set up Discord's AutoMod and verification level first. They work before a message is ever posted.
  • The moderation module adds warnings with history, timed mutes and bans, and a log of every action.
  • Spam filters, a join gate and raid detection run automatically, with actions you choose.

What you need

  • Your own bot on SCNX. Creating one takes about two minutes
  • A private channel for the moderation log
  • The bot's role near the top of your role list, above everyone it should be able to moderate
  • A role for quarantined members that can see next to nothing

Start with Discord's AutoMod

Discord has moderation built in, and it does one thing no bot can: AutoMod checks a message before it is posted. A blocked message never appears in the channel, and nobody gets a notification for it. You find AutoMod in your server settings. Anyone with the Manage Server permission can set it up.

The rules of Discord's AutoMod
AutoMod ruleWhat it does and what to pick
Block Commonly Flagged WordsDiscord's own word lists in three groups: insults and slurs, sexual content, severe profanity. Switch on the groups that fit your server. Single words can be allowed again.
Block Custom WordsYour own word lists, with up to 1,000 entries per rule. A * at the start or end of a word also matches longer forms. Good for the names of scams that keep coming back.
Block Spam ContentDiscord recognizes messages that look like reported spam. Switch it on. It misses things, which is where the bot's spam filters help.
Block Mention SpamBlocks messages with more mentions than you allow. Discord lets you set the limit up to 50. Five to ten suits most servers.

For each rule you choose the response: block the message, send an alert to a channel, and for your custom word rules also time the member out. Send the alerts to a private staff channel so your team sees what was caught.

Roles and channels can be exempted per rule. Members with Manage Server or Administrator are always exempt, and so are bots.

While you are in the server settings, raise the verification level so that new accounts need a verified email or a few minutes on the server before they can write. That alone stops a large share of drive-by spam.

What Discord does not do: remember that someone was warned twice last month, end a ban by itself after a week, hold back suspicious new accounts, or give your moderators a shared record. That is the job of a moderation bot.

Set up the moderation module

  1. Switch on the module

    Open Modules in the Discord-Bot section of your dashboard, find Moderation & Security and switch it on. Save your changes.

  2. Set the log channel

    Open the module's Configuration and select your private log channel under Log-Channel. Every action is recorded there, with moderator, member and reason.

  3. Create and set the quarantine role

    Create a role in Discord that can see nothing except perhaps one channel that explains what happened. Select it under Quarantine-Role. The bot's role must be above it. Several automatic protections can use quarantine, so do this before you go on.

  4. Define who may do what

    Open Moderation Levels and add a level for each tier of your team. The next section shows a setup that works for most servers.

  5. Give your team the command

    Moderators also need to be allowed to use /moderate in Discord. Open your Discord server settings, go to Integrations, select your bot and allow the command for your staff roles.

  6. Check the bot's permissions

    The bot needs Manage Roles, Kick Members, Ban Members, Timeout Members, Manage Channels, Manage Messages, View Channel, Send Messages and Embed Links. It can only act on members whose highest role is below its own.

  7. Save, reload and test

    Save and confirm Reload configuration now. Then warn a second account of yours with /moderate warn and check that the entry shows up in the log channel.

Moderation levels: who may do what

A moderation level is a list of roles and a set of switches. A member gets everything their levels allow, added together. The switches are Warn members, Mute members, Lock channels, Channel-mute members, Kick members, Clear messages, Quarantine members, Ban members and Start and lift server lockdowns.

A setup with three levels covers most teams.

Trial moderator
Warn members and Mute members. Enough to calm a channel down, and nothing that removes someone from the server.
Moderator
Add Clear messages, Lock channels, Channel-mute members, Kick members and Quarantine members.
Admin
Add Ban members and Start and lift server lockdowns. Also switch on Bypass automod, so the spam filters do not act on the people who clean up after a raid.

Each level also has Immune to reports and two lockdown switches that decide who can still write while the server is locked.

The commands your team uses

Everything runs through /moderate. The member gets a DM about the action if their DMs are open, and the action goes into the log. With Force moderators to set a reason on, every action needs a reason.

The most used moderation commands
CommandWhat it does
/moderate warnRecords a warning. Warnings can trigger automatic actions once enough have added up.
/moderate muteTimes the member out with Discord's timeout, for a duration up to 28 days.
/moderate kickRemoves the member. They can rejoin with an invite.
/moderate banBans the member, optionally for a set time, and can delete their recent messages. Also works on people who have already left.
/moderate quarantineTakes the member's roles away and gives them the quarantine role. /moderate unquarantine restores the roles.
/moderate clearDeletes the most recent messages in the channel.
/moderate lockStops @everyone from writing in the current channel. /moderate unlock reverses it.
/moderate actionsShows everything that was done to a member so far.
/moderate notesPrivate notes about a member for the whole team.
/reportFor members: reports another member to your team, with a reason and optional proof.
Two entries in the mod log: one automatic action and one warning from a moderator. The layout of log messages can be changed.

Illustration. The real interface may look different.

Temporary mutes, bans and quarantines end by themselves. With Lift-punishment buttons on, your team can undo an action with one click from the log message. Warn, Mute, Kick and Ban are also available from the right-click menu on a member once you switch them on under Commands.

If your team sometimes bans with Discord's own menu, switch on Import native moderation actions. The bot then records those bans, kicks and timeouts in its history as well. It needs the View Audit Log permission for that.

The bot's automatic filters

AutoMod blocks single messages. The bot's filters look at behaviour over time and answer with a moderation action, which then counts in the member's history. Go through these settings once before you rely on the filters, so each one does what you expect.

Automatic filters of the moderation module
SettingWhat it does and what to pick
Action on inviteWhat happens when someone posts an invite to another server. Pick delete to remove the message without punishing anyone. Invites to your own server are always allowed.
Action on Scam-LinkWhat happens when someone posts a scam link. Set it to delete or stricter. Level of Scam-Link-Detection on confirmed only matches verified scam domains, suspicious casts a wider net and can catch harmless links.
Blacklisted words, Action on blacklisted WordYour own word list with an action. If AutoMod already blocks these words, leave the list empty.
Default Mute-DurationUsed whenever a mute has no duration, including automatic ones. Set it to something short like 1h, so an automatic mute over a harmless link ends quickly.
AutomodAutomatic actions by number of warnings. The key is the count, the value the action, optionally with a duration: 3 and mute:1d, 5 and ban:7d.
Should warns be deleted automatically?Lets warnings expire after a time you set. Fair for servers where people stay for years.

The spam filters have their own file, Anti-Spam-Configuration. Anti-spam watches the message rate, repeated messages, mentions and mass mentions and answers with the action you set. Detectors for attachments, links, emoji floods and posting across many channels can be switched on one by one. Turn on Automatically delete detected spam messages so the flood disappears along with the spammer.

Two more tools in the same module are worth knowing. Enable new-member restrictions holds back links and attachments until a member has been on the server for a time you set. The Honeypot marks a channel that real members never write in: whoever posts there is punished automatically, which catches spam bots and hacked accounts.

New accounts and raids

A raid is many accounts joining within minutes to spam. Four parts of the module deal with it.

Join Gate
Checks every new member and can quarantine accounts that are very new or have no profile picture. On a small server among friends that can catch real people, so adjust Minimum account age and Require profile picture or switch it off in the Join-Gate-Configuration.
Anti-Join-Raid
Reacts when more members join within a timeframe than you allow. You pick the action, quarantine for example. If you post your invite somewhere public, raise Maximal count of new users first, or your launch day looks like a raid.
Verification
When it is on, new members solve a captcha, a word or a math challenge, click a button, or wait for a moderator to approve them. You set a role for unverified and one for verified members.
Lockdown
Once enabled, /moderate lockdown stops @everyone from writing in all channels at once and restores the old permissions when you lift it. It can trigger by itself on a join raid or on spam.

A starter setup that works

If you want to be done in half an hour, do these in order and leave everything else as it is.

  1. In Discord

    Switch on Block Spam Content and Block Mention Spam in AutoMod, add the flagged word groups that fit your server, and send alerts to a staff channel. Raise the verification level.

  2. Log and quarantine

    Set Log-Channel and Quarantine-Role. Put the bot's role above the quarantine role and above your members.

  3. Two or three moderation levels

    Create them as described above and allow /moderate for the same roles in Discord.

  4. Set the automatic actions

    Set Default Mute-Duration to 1h, Action on invite to delete and Action on Scam-Link to delete.

  5. Decide on Join Gate and Anti-Join-Raid

    Use them if strangers join your server every day. For a small community, loosen them or leave them off.

  6. Warn thresholds

    Add two entries under Automod, for example 3 warnings for a one-day mute and 5 for a ban.

  7. Test with a second account

    Post an invite link, spam a few lines, get warned. Look at the log channel after each step.

Write down your rules where members can read them before you automate their enforcement. A filter that punishes something nobody knew was forbidden creates more work for your team than it saves.

When something does not work

The bot says a moderator has no permission
Their role is not in a moderation level that allows the action. A level with only Warn members cannot mute, kick or ban.
/moderate does not show up for a moderator
Allow the command for their role in your Discord server settings under Integrations.
Kicks, bans or mutes fail
The bot needs the matching Discord permission, and its highest role must be above the member's highest role. It can never act on the server owner.
Quarantine does nothing
No Quarantine-Role is set, or the role is above the bot's role.
New members land in quarantine for no reason
That is the Join Gate or Anti-Join-Raid. Check both files and loosen their settings.
A member was muted for far too long over one link
Action on invite is on mute and Default Mute-Duration is set too long. Change both, then lift the mute with /moderate unmute.
Spam is not detected
Check that anti-spam and the detector you expect are on, that the channel and the member's roles are not whitelisted, and that their moderation level does not have Bypass automod.
/moderate lockdown is missing
Enable the lockdown system in the Lockdown Configuration first, then reload.

Other ways to do it

Dedicated moderation bots exist, some of them very capable. Compare what their free version includes: timed punishments, the length of the history and raid protection are common dividing lines.

On SCNX, three more modules sit next to moderation. Advanced Logging records changes to your server, such as edited and deleted messages. Anti-Nuke Protection reacts to mass deletions and mass bans by a rogue admin or a hacked account. Ping-Protection shields members and roles from unwanted mentions. Switch them on when you need them. For the day channels get deleted anyway, keep a server backup.

A moderation bot in your own code is possible, though the parts that matter are the dull ones: storing every case reliably and ending timed bans on time, even after a restart.

Common questions

Is the moderation bot free?
Yes. The moderation module is part of your bot and free on our Starter plan, including the spam filters, the Join Gate and verification.
Do I still need AutoMod if I have a moderation bot?
Yes. AutoMod blocks a message before anyone sees it, which a bot cannot do. The bot keeps the history and ends timed punishments, which AutoMod cannot do. Most servers run both.
Can punishments be temporary?
Yes. Mutes, bans and quarantines take a duration and end by themselves. An active duration can be shortened or extended later with /moderate edit-duration, once you have switched on the Lift-punishment buttons.
What is the difference between a mute and a quarantine?
A mute is Discord's timeout: the member can still read but not write, for at most 28 days. Quarantine removes the member's roles and gives them the quarantine role, so they see only what that role allows. Their roles come back when the quarantine ends.
Can members report someone?
Yes. /report sends a report with a reason and optional proof to your report channel, or to the log channel if none is set. You can have roles pinged for every report.
Do warnings expire?
Only if you want them to. Switch on Should warns be deleted automatically? and set the time after which they are removed.
Does the bot see bans made with Discord's own menu?
With Import native moderation actions switched on, yes. Bans, kicks and timeouts made with Discord's tools are then recorded in the bot's history and log channel. The bot needs the View Audit Log permission.
What protects against a moderator who goes rogue?
The Anti-Grief settings of the module quarantine a moderator who hands out more warns, mutes, kicks or bans in a timeframe than you allow. It only counts actions made through the bot. For mass deletions with Discord's own tools there is the separate Anti-Nuke Protection module.

Start with a free bot

Log in with Discord, add your server and create your bot. The dashboard walks you through each step.

Get started for free

Free on our Starter plan. A short ad video every 14 days keeps the bot online.