Getting Started
Setup guide for Mellow - your AI-powered mental health companion for Discord.
Getting started with Mellow
This guide covers getting started as a user, as a server administrator, and as someone self-hosting the bot.
For users
Add Mellow
- Open the invite link.
- Add Mellow to a server, or install it as a user app to use it in DMs.
- Approve the permission request. Mellow only asks for messaging permissions, not moderation.
Set your preferences
/preferences set personality:gentle timezone:Europe/London checkin_interval:720 reminders:true- personality -
gentle,supportive,direct,playful,professional, orencouraging. - timezone - an IANA name such as
America/New_York. Enables late-night companion mode. - checkin_interval - minutes between check-in reminders.
- reminders - turn check-in reminders on or off.
You can also set context_logging, crisis_detection, and crisis_dms here. Run
/preferences view at any time to see your current settings.
Start using Mellow
Log a mood check-in:
/checkin mood:calm intensity:3 activity:reading note:Feeling steady todayTry a coping exercise:
/coping breathing feeling:stressed
/coping grounding
/coping affirmationsWrite a ghost letter (private, only you can read it):
/ghostletter write:Today was hard but I got through itExplore more
/profile- your Mellow profile and activity./insights- trends from your check-ins./coping toolbox add:breathing- save a favourite tool./coping plan set:Call a friend, then go for a walk- keep a personal coping plan./context view- see what Mellow has stored;/context cleardeletes it.
For server administrators
Review settings
/guildsettings viewConfigure the server
/guildsettings set checkin_channel:#check-ins mod_alert_channel:#crisis-alerts system_channel:#bot-logs moderator_role:@Moderator/guildsettings set also accepts:
- mod_log_channel - channel for moderation logs.
- check_ins, ghost_letters, crisis_alerts, system_logs - enable or disable features in this server.
- context_logging - allow logging messages for AI context.
- language - preferred language code, e.g.
en.
Set guild-wide AI context with /guildcontext, and check integration health with
/guilddebug and /guildcontext.
Recommended channels
#check-ins- mood check-in logs.#crisis-alerts- crisis notifications, visible to moderators only.#bot-logs- Mellow system messages.
Permissions
Mellow needs only: Send Messages, Use Application Commands, Embed Links, Attach Files, Add Reactions, Read Message History, Use External Emojis. It does not request or use moderation permissions, and it does not read your members' messages beyond DMs and messages that mention or reply to it.
Self-hosting
Prerequisites
- Go 1.26 or newer
- PostgreSQL 14+
- A Discord bot token and application (client) ID
- An Anthropic API key
Clone
git clone https://github.com/CodeMeAPixel/Mellow.git
cd MellowConfigure
Copy .env.example to .env and fill it in:
TOKEN=your_discord_bot_token
CLIENT_ID=your_discord_client_id
PRIVATE_GUILD_ID=your_dev_or_support_guild_id
OWNER_IDS=comma,separated,discord,ids
DATABASE_URL=postgres://user:pass@localhost:5432/mellow?sslmode=disable
ANTHROPIC_API_KEY=your_anthropic_key
ENCRYPTION_KEY=your_32_byte_key
ENCRYPTION_SALT_LIST=mellow-encryption-salt
PORT=9420
API_TOKEN=token_for_the_http_api
LOG_LEVEL=infoSee Environment Variables for the full list.
Build
go build -o mellow ./cmd/mellowDatabase migrations are embedded and run automatically on startup (via golang-migrate).
sqlc is only needed if you change the SQL in internal/db/queries and want to regenerate
internal/db/gen.
Run
./mellowOn startup the bot connects to the gateway with no privileged intents, registers its global
commands, registers the private/owner commands to PRIVATE_GUILD_ID, and starts the HTTP API
on PORT.
Verify
/pingresponds in Discord./checkinand/coping breathingwork and write rows to the database.GET http://localhost:9420/healthzreturns OK.
For Docker and platform deployment, see Deployment.
Command categories
- Mental health:
/checkin,/insights,/profile - Coping:
/coping <breathing|grounding|affirmations|challenge|distraction|music|gratitude|journal|plan|streaks|toolbox> - Private expression:
/ghostletter - Crisis support:
/crisis <analyze|resources|history>, plus the "Check on this message" context menu - User settings:
/preferences,/timemode,/context,/feedback,/report - Server settings (admin):
/guildsettings,/guildcontext,/guilddebug - Fun:
/joke,/compliment,/trivia,/wouldyourather,/wordgame,/memegen - Information:
/help,/about,/ping,/support,/privacy,/docs,/source,/version,/stats,/invite
Getting help
- In Discord:
/helpfor commands,/crisis resourcesfor immediate help. - Community: support server.
- Source and issues: GitHub.
- Email: [email protected].