A Discord auto-mod bot with AI
Every new message is checked. Invites to other servers and words you block are removed at once. Anything else of a few words is read by AI, which removes spam, scams and harassment when it's sure. Each removal is a strike, logged in #mod-log, and three strikes in a day times the member out for an hour.
What it does
- A member sends a message.
- If it has a server invite or one of your blocked words, it's flagged. Otherwise AI decides whether it's fine, spam or abuse, and only a confident call counts.
- Members who can manage messages are left alone. For anyone else the message is deleted and a strike is recorded.
- The bot posts the details in #mod-log, and a short note in the channel that removes itself after 15 seconds.
- A third strike within 24 hours times the member out for an hour.
Checking every message means reacting to server events, which needs a bot that stays connected to Discord, on the Paid plan.
Commands
/automod wordsSets the words that get a message removed, or shows them. Needs the Manage Server permission.
/automod strikesShows a member's strikes from the last 30 days. Needs the Moderate Members permission.
/automod forgiveClears a member's strikes.
Before you add it
- A channel named mod-log that only moderators can see.
- The Message Content intent turned on for your application in the Discord Developer Portal.
- The bot's role placed above the members it might time out.
How adding it works
Press Add to my server and Buildcord asks you to sign up or sign in. It then makes a new bot from this template, with every flow already drawn. Paste your Discord bot token, add the bot to your server with the invite link and deploy. Nothing is final: the template is an ordinary bot you can open and change.
What you can change
- Edit the AI step's options to say what your server allows, or add one, such as NSFW.
- Change how sure the AI has to be in the comparison after it.
- Change three strikes and one hour, or add a kick.
- Allow invites to your own server by checking for its link first.
Questions
Does the AI read every message?
Every message of six characters or more that isn't already caught as an invite or a blocked word. Shorter ones, such as “ok”, are skipped. Delete the AI step and the bot is a plain rules filter.
What if the AI gets it wrong?
It only acts when it's at least 80% sure, moderators are never touched, and every removal is logged with the message's text so you can check it. /automod forgive clears a member's strikes.