Setup guide
Self-host Sloth Lee in an afternoon; the hosted bot needs only the invite.
Create the Discord application
Open the Discord Developer Portal, create an application, and add a bot. Copy the application id (client id) and the bot token — the token never leaves your machine.
Invite the bot
Use the OAuth invite URL with scopes bot and applications.commands. Sloth Lee asks for the permissions it actually needs — nothing server-wide beyond that.
Configure environment
Copy .env.example to .env and fill in DISCORD_TOKEN, DISCORD_CLIENT_ID, DATABASE_URL and SECRETS_KEY — a 32-byte AES-256-GCM key (openssl rand -base64 32). The bot refuses to start without them.
Start Postgres
docker compose up -d creates a local dev database (user rev, database rev, bound to 127.0.0.1). Any Postgres 16 instance works — point DATABASE_URL at it.
Install, migrate, register, run
npm install (generates the Prisma client) → npm run db:migrate (applies committed SQL) → npm run commands:register (registers your slash commands) → npm run dev.
Verify and tune
Run /setup status for a server-specific readiness report. Set PORT to get /healthz and /readyz for container hosts like Northflank. Run exactly one bot process per deployment.
Environment variables
The essentials; the repo .env.example documents the full list.
| Variable | Required | Purpose |
|---|---|---|
| DISCORD_TOKEN | Yes, to run the bot | Bot token. Never commit it. |
| DISCORD_CLIENT_ID | Yes, to run or register commands | Application ID. |
| DATABASE_URL | Yes, to run the bot | Postgres URL. |
| SECRETS_KEY | Yes, to run the bot | 32-byte AES-256-GCM key; encrypts per-guild Ollama keys. |
| DISCORD_GUILD_ID | For guild command registration | Server snowflake for commands:register. |
| PORT | Optional | Enables the /healthz + /readyz health server for container hosts. |
| AI_DAILY_REQUEST_CAP | Optional | Daily Ollama request cap on new servers. Default 200. |
What ships
Everything below is live today — no roadmap hand-waving; each group lists the slash commands that ship it.
Staff AI co-pilot
A plan-first AI that proposes actions; nothing executes until a staff member presses Confirm in Discord.
/ai /summarise /translate /kb
Tickets
Members open private staff tickets; staff claim, reply and close them with a full transcript on file.
/ticket
Reviews & appeals
Ban appeals and staff-application reviews route through a clean approve/deny flow.
/appeal /staffform /report
Moderation suite
Warn, timeout, kick, ban, tempban, softban, purge, quarantine — every case logged and searchable.
/moderation /ban /kick /warn /timeout /tempban /softban /unban /purge /quarantine /note /case /cases /case-admin /blacklist /lockdown /unlock /slowmode /nick
Automod & security
Keyword automod, raid holds, account-age gating and a security panel keep the raiders out.
/automod /autoreply /security /report-message /blacklist
Welcome & roles
Welcome cards, self-assignable roles and sticky messages greet new members and keep channels tidy.
/welcome /selfrole /sticky /rules
Levels & invites
An XP leaderboard, invite tracking and rank cards reward the members who build the server.
/level /leaderboard /rank /invites
Community & fun
Polls, suggestions, giveaways, a starboard, custom commands, tags and voice hubs.
/poll /suggestion /giveaway /starboard /customcmd /tag /voicehub
Announcements & digests
Scheduled announcements, stream alerts and recurring staff digests keep everyone in the loop.
/announce /streamalert /digest
Backups & health
One-command server backups with restore, plus live health and readiness endpoints for hosts.
/backup /restore /health
Onboarding wizard
A guided template wizard sets up the common modules in minutes.
/wizard /setup
Rather not run anything?
The hosted bot is the same software — invite it, run /setup, done.