August 21, 2026 · The Minely team
How to build a mod-logs bot with AI (cases, attribution, summaries)
Moderation without logs is just vibes and accusations. A mod-logs bot records every punitive action with who did it, to whom, and why, turning 'who banned this person?' from a mystery into a lookup. It is the accountability layer every team needs before it needs it.
What a mod-logs bot actually is
A mod-logs bot listens for bans, kicks, timeouts, and unbans, writes a case record for each with the moderator and reason, and posts them to a dedicated channel with case numbers. Weekly summaries keep the whole team aware of the trend without anyone compiling anything.
How it works under the hood
Audit-log-aware event listeners capture the action, target, actor, and reason where available. Each case gets a sequential number and a record (type, target, moderator, reason, timestamp), posted to the mod-log channel in a compact format. A /case command retrieves and edits cases (fixing reasons later is normal), and a weekly job posts totals by type and by moderator.
The prompt that builds it
You do not have to write this yourself. A precise description is enough:
a mod-logs bot that records bans, kicks, and timeouts with case numbers and moderator attribution, /case lookup and edit, and a weekly summary
Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.
Building it in the right order
- Capture the moderation events with actor and reason.
- Write case records with sequential numbers.
- Post the compact mod-log format.
- Build /case lookup and reason editing.
- Add the weekly summary job.
The details that matter in production
In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.
Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.
Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.
Tuning it after the first build
One case format, always: number, action, target, moderator, reason, link. The weekly summary should be three lines (totals, top moderators, trend) — a report nobody reads is a report nobody needed.
Tips that save you a rebuild
- Attribute every action to a person; 'unknown moderator' is a bug, not a fact.
- Let staff edit reasons later with the edit logged; honesty over tidiness.
- Post summaries at a fixed weekday time; ritual beats volume.
- Export cases for the big reviews; a CSV beats a scrollback.
Questions people ask
Can I log warnings from other bots?
An API command other bots can call to file cases into the same log.
What about automatic actions?
Mark them as automatic with the rule that fired them; mixed queues need the distinction.
How long should cases be kept?
Forever in storage, a year in the channel summary view.
Open the dashboard, paste the prompt from this guide, and watch it build live. The first one is free, and the source is yours either way.
