Make a Discord moderation bot
A moderation bot enforces your rules for you: it removes ads, counts warnings, times people out and slows down a heated channel. On discbot.net you write the rule in plain words and the assistant codes the command or the automatic check. Discord’s built-in AutoMod is still worth using alongside it; the bot covers the rules AutoMod cannot follow.
Updated
Which actions can the bot take?
Everything a moderator does by hand, within Discord’s own limits:
- warn, keeping a count for each member;
- time out, from 1 second to 28 days;
- kick, ban with or without deleting recent messages, and unban;
- turn on slow mode, up to one message every 6 hours per member;
- lock a channel and open it again;
- clear up to 100 recent messages at once;
- post a report of every action in a staff-only channel.
Moderation commands can be hidden from members who lack the matching permission. The bot still checks on every call, in case a role was set up wrong. Note that the discbot.net dashboard and assistant are in French for now; your bot can answer members in English.
How do you block ads and invite links?
If someone posts a Discord invite link, delete it, time them out for 10 minutes and log it in #mod-log. Moderators are exempt.
discbot.netDone. Anti-ad rule active, with a report in #mod-log.
To read messages, the bot needs Message Content Intent, turned on in the Developer Portal (intents guide). Slash commands do not need it.
How do you escalate with warnings?
Make a moderator-only /warn command with a member and a reason. On the third warning, time them out for one hour.
discbot.netDone. /warn keeps a count for each member.
You can then add /warnings to look up a member’s total, or /forgive to reset it. Each idea is one more sentence to the assistant.
Which permissions does the bot need?
The basic invite offered by discbot.net carries no moderation permission. In Server Settings, Roles, give the bot’s role only what your commands use:
- Manage Messages, to delete and clear;
- Timeout Members;
- Kick Members and Ban Members;
- Manage Channels, for slow mode;
- Manage Roles, to lock a channel by changing its permissions.
Also put the bot’s role above the roles of the members it may act on: Discord stops a bot from acting on anyone whose role is at the same level or higher. See the invite guide for details.
Discord’s help center covers timeouts, slow mode and AutoMod on its side.
What does the bot not do yet?
- Mass actions during a raid: past 10 bans, kicks or timeouts a minute, or 5 single message deletions a minute, discbot.net pauses the bot as a safety measure and you confirm the restart on the Publish page. For raids, rely first on AutoMod and the server’s verification level.
- Looking inside images or files: the bot sees that an attachment exists, not what it shows.
- Creating or editing Discord AutoMod rules for you.
- Reading the server’s audit log or producing moderation statistics.
- Sharing a ban list across servers: a discbot.net bot lives on one server.
Why does an action fail?
- ProblemThe bot says it cannot time this member out.
- FixThe member’s role is equal to or above the bot’s, they own the server, or they have Administrator, which Discord protects from timeouts. Move the bot’s role up if that makes sense.
- ProblemInvite links get through.
- FixMessage Content Intent is off, or the bot lacks Manage Messages in that channel. Check both, then publish again.
- ProblemClearing leaves some messages behind.
- FixDiscord does not bulk delete messages older than 14 days. Those have to be removed by hand.
- ProblemThe bot paused itself.
- FixA safety limit was crossed. Open the Publish page, read the reason, narrow the rule if it catches too much, then confirm the restart.
Frequently asked questions
How is this different from Discord AutoMod?
AutoMod is built into Discord and blocks words or mention spam without a bot. A bot is for your own rules: counted warnings, escalating actions, an explanation to the member and a report for the team.
Are warnings kept?
Yes. They are saved in the bot’s storage, which stays in place across restarts, new versions and stops.
Can any member use /ban?
Not if the command requires the Ban Members permission. Discord hides it from everyone else, and the bot refuses the action even if the request reaches it.
Does it cost anything?
No, it is free for now, with no credit card. During the private beta, building and publishing a bot needs an approved account.
Free for now. Create your account and write your first rule once your private beta access is approved.
