How to Auto-Moderate Discord with an AI Agent

A working prompt that reads every message in your Discord server, classifies nuance the keyword filters miss, and escalates only the real problems to human moderators — running on a schedule or triggered by volume.

01The Problem

Discord AutoMod never catches the real abuse

Keyword filters catch slurs and spam. They miss sarcasm, coordinated harassment, dog whistles, and context-dependent toxicity — the stuff that actually drives people away.

AutoMod is a blunt instrument

Discord's built-in AutoMod only matches keywords, regex, and mention spam. It cannot see that "nice work 👍" in a serious channel is sarcasm, or that five users posting variations of the same phrase in ten minutes is a raid. The filter catches the word, not the intent.

Context-dependent toxicity flies under the radar

Harassment often uses dog whistles, inside jokes, or replies that look innocent in isolation. A message saying "as a [group] member, I think..." weaponizes identity in a way no keyword list catches. The pattern only emerges when you read the thread, the user history, and the channel culture together.

Moderator burnout is a throughput problem

A 50k-member server generates 2,000+ messages a day. Reading every message for nuance is impossible. The mod team either misses the bad stuff or burns out reading the boring stuff. The agent reads everything; the humans only decide on the edge cases.

02The How-To

The Discord AI auto-moderation prompt, step by step

Copy it once, paste it into Zaira, connect the Discord MCP server, and it reads every message with context awareness — then hands you only what needs a human decision.

Discord auto-moderation AI Agent

Step 0: Find and read the rules before the messages

Access to @Discord. Act as the moderation layer for this server. Do not classify anything yet. First locate this server's own rules and read them: the rules or guidelines channel, any channel or thread named for rules, guidelines or code of conduct, and the server description and pinned messages in the channels you are about to watch. Restate what you found in your own words and name the channel each rule came from. If two channels state a rule differently, show both and say which you are following rather than picking silently. If you find no written rules anywhere, stop and tell me that before reading a single message. A run with no rulebook is guesswork with a delete button.

Step 1: Read the thread, not the message

For every message since the last run - on the first run, since [YOUR TIME WINDOW] - do not classify it on its own. Pull the parent post and up to five replies above it, then the last fifty messages from that author. Most harassment in a community is a sentence that is only hostile in reply to something you cannot see in isolation. Classify the thread.

Step 2: Assign exactly one category

For each thread, pick one: clean, spam, harassment, hate, sexual content, violence, self-harm reference, dog whistle, coordinated raid. Give a confidence from 0 to 100 and one sentence of reasoning naming the specific message that drove the call. A thread that could reasonably be two categories goes to needs-review, not to the louder one.

Step 3: Act only where you are certain

Pick two thresholds from the rules you just read and say what they are before you use them: an auto-action threshold, above which the rules say to act without asking, and an escalation threshold, below which you log and move on. Anything between them goes to the moderation review channel with the reasoning attached and no action taken. Where the rules set their own numbers, the rules win. Below the escalation threshold, log it and move on. Never ban. Timeouts cap at 24 hours.

Step 4: Check for raids by velocity, not by content

Flag a coordinated raid when more than five messages land from one account in sixty seconds, or when more than twenty land in one channel in sixty seconds with the same shape of content. Compare meaning, not spelling - leetspeak and spacing are the oldest evasion there is.

Step 5: Report what you got wrong

End every run with the counts per category, every thread you escalated, and every false positive a moderator rejected. Rejected escalations are the most useful output you produce. Do not smooth them out.

Step 6: Propose it as an automation, so it runs again without me

You have just done this once, on this conversation. Now offer to repeat it. Call create_automation with:
name: three or four words for the task. frequency: daily, because a moderation sweep wants a day of messages, not a minute. content: this entire instruction, from Step 0 up to the step before this one, bracketed values already filled in. run_at: the first scheduled run, with today's date and my timezone. timezone: mine.
Two things. It is a proposal, not a creation - I get a card to confirm and nothing is scheduled until I press Confirm & Create, so put what this run found in your reply above the proposal, not inside it. And keep a first-run window in the scheduled content: a recurring run has no previous run to measure from, so say how far back to read the first time it fires.
03Why People're Using

Here's what it does once it's running

The queue drops to signal, the team stops reading noise, and the community culture improves because the edge cases stopped slipping through.

Every message read with its thread and history

AutoMod matches the line in front of it. This reads the parent post, the replies and the author's recent messages before deciding — the only way “nice work” gets read as sarcasm.

Ambiguity routed to a person, not guessed at

Threads that could reasonably be two things go to the review channel with the reasoning attached. The agent is allowed to say it is not sure, and your rules say what happens when it does.

Rejections become the tuning input

Every run ends with the escalations moderators rejected. That list tells you which rule is written wrong, rather than which agent needs to try harder.

Are you ready?

Launch your discord auto-moderation AI Agent in seconds

All without you getting tasks done on manual, missing out the opportunity you want, or putting your hard work in vain.

Try it with Zaira now
Ready to runImmediate startNo code required
04FAQ

Frequently asked questions

The practical questions people ask before wiring this into a live server.

AutoMod is keyword/regex only. It cannot detect sarcasm, dog whistles, coordinated raids, or context-dependent harassment. This agent reads every message with full context — channel, thread, user history, server rules — and catches the nuance no keyword list can.

Ten categories: spam, harassment, hate speech, sexual content, violence, self-harm, coordinated raids, dog whistles, and sarcasm — plus clean, so you can see what it deliberately let through. Each read comes back with a confidence score. The model is trained on moderation data and adapts to your server rules.

Only where you allow it. Every Discord action — delete, timeout, thread creation — requires a confidence score above your threshold AND a category where that action is permitted. Anything below the line, or in a category you haven't enabled, goes to a human instead. That is what stops a misread from becoming a deleted message.

It works across languages, though accuracy varies. For non-English communities, add language-specific patterns to the server rules document and lower the auto-action threshold. The escalation path catches what the model misses.

The mod reacts ❌ in the action channel. The agent logs the false positive, adds the message pattern to a suppression list, and adjusts thresholds in the weekly calibration. The message is already in the channel — no deletion without human ✅.

It runs on Zaira's Discord gateway — you install the gateway in your server, grant it the moderation permissions, and the agent operates through that connection. No custom bot code, no hosting, no token management.

The server rules document is your control plane. Write your norms in plain language: 'We allow heated debate but not personal attacks', 'Sarcasm is fine unless it targets identity'. The agent reads this document on every classification. Update it weekly based on mod feedback — the agent adapts immediately.