Mochi
Mochi is a lightweight Discord invite-tracking bot with a live web dashboard, built for Bun and SQLite.
Quick start
Requirements:
- Bun 1.3 or later
- A Discord bot application from the Discord Developer Portal
git clone https://github.com/SodaSyrup/mochi-bot.git
cd mochi-bot
bun install
cp .env.example .env
bun run deploy-commands
bun dev
The dashboard is available at http://localhost:3000. Configure .env before deploying; production has stricter startup validation than development.
What Mochi provides
- Invite attribution, net-invite tracking, campaign labels, leaves, rejoins, vanity URLs, and suspicious-account handling
- Configurable invite logs for joins, leaves, and bot add/remove activity
- A dashboard with live events, analytics, invite management, AutoMod controls, grouped category permissions, a honeypot, and plugin settings
- Optional global protection using a centrally managed Cloudflare D1 registry, local caching, per-guild alert/enforcement modes, and exemptions
- Discord OAuth, per-guild authorization, authenticated realtime rooms, and server-side sessions
- Explicit built-in plugins for utility commands, invites, invite logs, safety, grouped category permissions, and honeypot moderation
Documentation
Read the documentation home for the full guides:
- Getting started — installation, environment configuration, and application modes
- Deployment and operations — PM2, database maintenance, migrations, projections, and tests
- Invite tracking — attribution, invite math, invite logs, and Discord permissions
- Moderation features — AutoMod and the honeypot
- Global protection — Cloudflare D1 registry synchronization and per-guild enforcement
- Permission groups — shared role permissions across project categories
- Dashboard — pages, access, and dashboard behavior
- Plugins — built-in catalog, lifecycle, dependencies, and per-guild settings
- Slash commands — command reference and native Discord permissions
- Architecture and contracts — security model, database design, and realtime DTOs