Skip to content

Discord moderation bot

Warnings, timeouts, and bans, with a log of every case.

Switch on the Moderation module and your bot gets 26 slash commands to warn, time out, kick, and ban members, clear messages, and lock channels. Every punishment gets a case number and a DM to the member saying why, and it goes in your log channel if you turn logging on. You build it in BotGhost, the Discord bot maker, and we host it.

The Moderation module is free. Managing Discord's AutoMod through your bot needs Premium.

Discord moderation commands

The module has 26 slash commands. Every command has its own switch on the Moderation page, so if your server has no voice channels, turn the voice ones off.

  • Bans and kicks

    • /ban addBan a member
    • /ban tempBan someone for a set time
    • /ban removeLift a ban by user ID
    • /kickKick someone from the server
  • Timeouts and warnings

    • /mute addTime a member out for a set time
    • /mute removeEnd a timeout early
    • /warnWarn a member, with a reason
  • Cases, notes, and history

    • /case viewSee the details of a case
    • /case removeDelete a case
    • /note addAdd a moderator note to a member
    • /note viewRead a member's note
    • /note removeDelete a note
    • /user historySee a member's moderation history
    • /user clear-historyWipe a member's historyAdmin only
  • Channels and messages

    • /purgeDelete a batch of messages
    • /slowmodeChange a channel's slowmode
    • /channel lockStop everyone sending messages in a channel
    • /channel unlockLet them send messages again
  • Roles, nicknames, and voice

    • /role addGive a member a roleAdmin only
    • /role removeTake a role awayAdmin only
    • /role tempGive a role for a set timeAdmin only
    • /user nickChange a member's nickname
    • /voice deafDeafen and mute someone in voice
    • /voice undeafUndo it
  • Server info

    • /pingCheck the bot's ping
    • /server-infoPost some info about your server

Bans, kicks, timeouts, warnings, and voice punishments all get a case number. If someone asks why they got muted last week, /case view pulls it up, and /user history lists every case on them.

Set up the Moderation module

  1. 1Make your bot and add it to your server. If you've never done that, follow How to make a Discord bot first.
  2. 2Open Modules in the dashboard and find Moderation in the list. Click it and press Enable.
  3. 3Scroll to Command Settings to say who's allowed to use the commands. Switch on Enable Moderation Logging and a channel picker shows up.

With Default Permissions on, anyone with Manage Messages can use the moderator commands, and anyone with Administrator can use the admin ones. To decide for yourself, add roles to Admin Roles and Moderator Roles.

Put your bot's role above the roles of the people it'll punish, or Discord won't let it ban or time them out.

The Moderation module in the docs
The Moderation module's Command Settings: the Default Permissions switch, Admin Roles, Moderator Roles, and the Enable Moderation Logging switch

Tell members why they were punished

With Send Direct Messages on, the bot DMs each member it punishes. It sends a default message until you write your own.

  • Send it as plain text or as an embed, up to 2,000 characters.
  • Drop {action}, {moderator}, {time}, {case}, or {reason} into your message and the bot fills each one in.
  • There are two colour settings: one for the punishment message in the channel, one for the log.
  • Ban: Delete Messages clears a banned member's recent messages too.

Automatic punishments for repeat rule breakers

The bot counts each member's warnings and timeouts. When someone reaches the number in one of your rules, it gives them the punishment that rule sets.

  1. 3 warningsTimeout for 1 hour
  2. 6 warningsKick
  3. 3 timeoutsBan

A rule watches warnings or timeouts. The punishment at the end can be a timeout, a kick, or a ban. For a timeout you type the length as a number and a letter, so 30m is half an hour and 1h is an hour (s works for seconds). Press Add to save a rule, then set up the next.

The Automatic Punishments settings: Trigger Punishment Type set to Warnings, Warnings Needed 3, Punishment set to Timeout User, and a Timeout Duration of 1h
The Discord Automod module's Custom Punishments: Broken Rules Needed 3, Punishment Type set to Timeout member, a Punishment Length of 15m, Checked Rule, and Send a DM

Discord AutoMod rules from your bot

The Discord Automod module makes rules in Discord's built-in AutoMod for you. Discord blocks the message before anyone sees it and shows the member the message you wrote. It needs Premium.

  • /discord-automod creates a filter: name the rule, add the words to block, and press Create Rule. The same command deletes a filter.
  • Choose which roles can make and delete rules, and which roles and channels the rules skip.
  • Once a member has broken your chosen number of rules, the bot can time them out (for up to 28 days), kick them, or ban them, with a DM if you like. It can watch one rule by name, or all of them.
The Discord Automod module in the docs

Build your own moderation rules with blocks

The punishments are blocks in the Discord bot command builder too: Ban a Member, Kick a Member, Timeout a Member, Purge Messages, and Delete a Message. Join them to an event like When a new message is sent and you can make rules the module doesn't have.

To get AI to check messages, add the Send an API Request block and pick a template:

  • Check a message for harmful content
  • Does this break the rules? (AI judge)
  • Toxicity score (Perspective API)

The AI only sends back an answer. You decide what happens with a Comparison Condition, so the bot only deletes a message the AI flagged. Save your API key in Secrets (5 on the free plan). More AI blocks are on the AI Discord bot page.

That's Dax's third warning, so a "3 warnings: timeout for 1 hour" rule times him out.

A case log for every member

Every punishment takes the next case number, and with logging on it's posted in your log channel. Case numbers count up across everyone, so if Dax gets cases 12, 15, and 19, other members got the ones in between.

  • /user history lists every case on a member, so a new mod can see what happened before they joined.
  • /case view pulls up one case by its number, and /case remove deletes one that was a mistake.
  • /note add leaves a note on a member for your mods, and /note view reads it back.

Free moderation bot, or Premium

The whole Moderation module is free, and its commands don't use up your 3 custom commands. Premium adds the Discord Automod module and removes the free plan's limits on commands, events, and servers.

FeatureFreePremium
Moderation module: all 26 commands, logs, DMs, and automatic punishmentsIncludedIncluded
Discord Automod module: /discord-automod and its punishmentsNot includedIncluded
Your own moderation commands and events3 commands, 3 eventsUnlimited
Send an API Request block with the AI moderation templatesIncludedIncluded
Secrets for API keys550
Servers5Unlimited

Free bots switch off after 2 days without activity. How hosting works

Discord moderation bot questions

Something else? Ask in the BotGhost Discord, or read the Moderation module docs.

It's the bot your mods use to deal with people breaking the rules. They ban, kick, warn, and time out members with slash commands, and the bot writes each one down and posts it in a log channel. On BotGhost it's your own bot, running the Moderation module.

See every moderation command

Make your Discord moderation bot

Make a bot, turn on Moderation, and your mods can be using /warn a few minutes from now. You won't need a card for the free plan.

Create your bot for free