~/projects $ cat mellow/README.md
Mellow
Discord bots·Sep 2026 – Present·● beta·10last push September 19, 2026
AI mental health companion for Discord with mood check-ins, coping tools, private journaling and tiered crisis detection that answers high-risk messages with human-reviewed resources.
Why it exists#
Mellow is an AI mental health companion for Discord. It gives people a calm, private place to check in, vent and find coping tools. It's clear that it isn't a replacement for professional care.
What it does#
- Mood check-ins with intensity ratings, trends and reminders
- Ghost letters: a private space to write things you never plan to send
- Coping tools: breathing, grounding, journaling, gratitude and more
- Late-night mode: timezone-aware, sleep-friendly support
- Per-server controls for features, channels and privacy
Handling a crisis safely#
This is the part that took the most care. A message first goes through a cheap keyword and pattern check, so nothing reaches the AI unless something matches. If it matches, one deterministic classifier call grades the risk:
- High or critical: Mellow sends a fixed, human-reviewed safety message with verified resources. The AI writes nothing free-form, and moderators are alerted.
- Medium: the normal reply continues under a standing safety instruction, and the event is logged quietly, without flooding the person with hotline numbers.
- Low or none: nothing happens.
Every AI sentence on a crisis path also goes through a method-content filter, and hotline numbers are never AI-generated.
How it's built#
Mellow is a Go rewrite of the original JavaScript bot. It uses disgo for Discord with zero privileged intents, PostgreSQL through pgx and sqlc, and Claude for conversations. Sensitive text such as journals, mood notes, ghost letters and crisis details can be encrypted at rest with AES-256-GCM. The bot also exposes a small HTTP API with an OpenAPI spec, and shards scale automatically.
What I learned#
Rewriting in Go was worth it, again. The original Mellow was JavaScript. The Go rewrite kept every feature but rebuilt the foundations: sqlc generates typed queries from plain SQL, migrations run on start, and the version is baked into the binary so /version can tell you if the running build is behind the latest release. It's the same lesson I took from moving Omniplex's services to Go: one small, boring, fast binary is easier to run and easier to trust.
Asking for less makes a better bot. Mellow runs with zero privileged intents: no Message Content, no Members, no Presence. Designing around slash commands, DMs and mentions instead of reading every message was a constraint at first. It turned out to be the right default for a bot people trust with how they feel, and it's the same idea behind NoAdmin.
For crisis handling, the AI is the last resort, not the first. The original bot leaned on AI analysis with five severity levels. The rewrite screens messages with cheap pattern matching first, makes one deterministic classifier call only when something matches, and answers anything high-risk with a fixed, human-reviewed message. Hotline numbers are never generated. When the stakes are real, predictable beats clever.
