AI Guardrails for a Teen Discord Server: The Code Around the Model Call A developer built an opt-in Discord AI assistant for a private server with minors, restricting the bot to a single slash command and channel to avoid hidden conversations and constant message scraping. The project's core architecture relies on a fixed-rule pre-check running locally before any model call, which blocks dangerous prompts with public refusals and admin alerts rather than deletions or punishments. The developer discovered that rule ordering in the pre-check is critical, as broad patterns like `\bsteal\b` can shadow more specific rules like `steal.*(password|account)` unless narrower tests are placed first. I built a Discord bot that gives my thirteen-year-old and a few of her friends an AI assistant they can talk to. The model call is the least interesting line in the whole project. Everything worth writing about is the code wrapped around it: where the AI is allowed to run, what runs before it, and the handful of things that broke along the way. This is the practitioner cut. If you're building a bot for a small private server, especially one with minors in it, here's the architecture and the specific failures, with the values scrubbed. The instinct is to let the bot respond to everything. Don't. A bot that reads every message is noisy, ships a constant stream of user text off to the model, and is nearly impossible to audit. I made the AI opt-in: one channel, one slash command, public replies. AI is opt-in: one channel, one command, public replies AI ASK ENABLED=true AI ASK CHANNEL=ask-ai AI ASK COOLDOWN SECONDS=30 AI ASK MAX CHARS=800 AI ASK MEMORY ENABLED=true AI ASK MEMORY TURNS=6 the separate server-wide monitor is alert-only: never deletes, never times out AI CHAT MONITORING=true AI CHAT MIN LENGTH=12 AI CHAT COOLDOWN SECONDS=30 AI CHAT ALERT THRESHOLD=medium OLLAMA URL=http://