Your Ultimate Programming Companion 🚀
Multipurpose Discord bot for developers, built with Discord.js v14+ and Supabase. Mocci combines powerful coding tools, AI assistance, community features, and moderation to create the ultimate server experience.
- /run - Execute code in 11+ languages (Python, JavaScript, Java, C++, Go, Rust, etc.)
- /explain - AI-powered code explanation
- /format - Format/prettify code (JavaScript, JSON, SQL)
- /regex - Test regex patterns with live matching
- /leetcode - Random LeetCode problems for practice
- /cron - Cron expression helper and explainer
- /docs - Quick documentation lookup (MDN, Python, Discord.js, Node.js)
- /npm - Search NPM packages with full details
- /pypi - Search Python packages on PyPI
- /github - Search GitHub repositories and users
- /stackoverflow - Find Stack Overflow solutions
- /json - Format, minify, and validate JSON
- /base64 - Encode/decode Base64
- /hash - Generate MD5, SHA1, SHA256, SHA512 hashes
- /uuid - Generate UUIDs (v4)
- /paste - Create temporary code pastes (7-day expiry)
- /snippet - Save and manage personal code snippets (Supabase-backed)
- /commit - AI-generated git commit messages
- /rank - View your rank card with beautiful graphics
- /leaderboard - Server XP leaderboard
- Automatic XP - Earn XP for chatting (with anti-spam cooldown)
- Level Up Notifications - Celebrate achievements
- /warn - Warn users with reason tracking
- /warnings - View user warning history
- /clearwarnings - Clear all warnings for a user
- /modlogs - Complete moderation action logs
- /starboard - Highlight best messages (⭐ reaction-based)
- /giveaway - Host giveaways with automatic winner selection
- /welcome - Beautiful welcome messages with dynamic images
- /afk - Set AFK status with auto-response
- /ai - Chat with MocciAI assistant
- AI Channel - Set a channel for continuous AI conversations with 1-hour memory per user (Supabase-backed)
- /serverstats - Detailed server statistics
- /serverinfo - Server information
- /userinfo - User information
- /about - Bot information and system stats
- /dbstatus - Check database connection status
- /joke - Random jokes (7 categories including Programming)
- /cat - Random cat pictures or facts
- /dog - Random dog pictures or facts
- /meme - Random memes from Reddit
- /anime - Random anime quotes or pictures
- /advice - Random life advice
- /trivia - Trivia questions with multiple categories
- /8ball - Ask the magic 8-ball
- /quote - Random inspirational quotes
- /weather - Weather information
- /poll - Create interactive polls
- /random - Random number generator
- /enchant - Minecraft enchanting table text
- /avatar - Get user avatars
- /screenshot - Take website screenshots
- /setactivity - Change bot activity with persistence (supports streaming, images, and more!)
- /setaichannel - Set AI conversation channel (server owner)
- /reload - Hot-reload commands without restart (owner only)
- Node.js 18+ or Bun 1.0+
- npm or bun
- Supabase account (free tier works great!)
- System dependencies for Canvas (required for rank cards and welcome images):
- Ubuntu/Debian:
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev - macOS:
pkg-config cairo pango libpng jpeg giflib librsvg pixman(via Homebrew) - Windows: GTK for Windows
- Ubuntu/Debian:
# Clone this repository
git clone <repo-url>
cd Mocci
# Install system dependencies for Canvas (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
# Or use the automated script
./scripts/setup-canvas.sh
# Install Node.js dependencies
npm install
# or
bun install
# Rebuild Canvas (if needed)
npm rebuild canvas💡 Troubleshooting Canvas? See docs/CANVAS_TROUBLESHOOTING.md
🚨 CRITICAL: You MUST run the database schema manually!
The bot will detect missing tables but CANNOT create them automatically.
Option A: Automatic Check + Manual Setup (Recommended)
# Start the bot - it will check for missing tables
npm start
# If tables are missing, you'll see clear instructions
# Then follow the manual setup steps belowOption B: Manual Setup (Required for first-time setup)
- Go to supabase.com and create a free account
- Create a new project
- Go to SQL Editor in your Supabase dashboard (left sidebar)
- Click "New query"
- Open
supabase-schema.sqlfrom this project - Copy ALL contents (all 270 lines) → Paste in SQL Editor
- Click "Run" (Ctrl+Enter)
- Wait for "Success. No rows returned"
- Go to Project Settings → API and copy:
- Project URL
- anon/public key
💡 The bot will NOT work until you run the schema! Features like XP, warnings, starboard, etc. require database tables.
# Copy the sample environment file
cp sample.env .env
# Edit .env and fill in:Required variables:
BOT_TOKEN- Your Discord bot tokenSUPABASE_URL- Your Supabase project URLSUPABASE_KEY- Your Supabase anon/public key
Optional variables:
OPENROUTER_API_KEY- For AI features (/ai, /explain, /commit)OPENWEATHER_API_KEY- For weather commandTEST_GUILD_ID- Guild ID for development commandsOWNER_USER_ID- Your Discord user ID for owner-only commandsDEBUG- Set to1ortruefor debug logs
# Production
npm start
# Development (with Bun)
bun run devMocci uses Supabase (PostgreSQL) for storing:
- Personal code snippets
- AI conversation memory (per user, 1-hour retention)
- AI channel configurations
- User preferences & levels
- Warnings & moderation logs
- Starboard messages
- Giveaways & welcome configurations
- AFK status
- LeetCode problem cache
🔄 Auto Schema Initialization: The bot automatically checks for required database tables on startup. If any tables are missing, it will guide you through the setup process or you can run:
npm run init-schemaSee supabase-schema.sql for the complete database schema.
Check out PROPOSED_FEATURES.md for 12+ additional features you can implement:
- 🎖️ Leveling & XP System
- ⏰ Reminders
- 🎨 Custom Commands
- ⚖️ Moderation & Warnings
- ⭐ Starboard
- 🎁 Giveaways
- 💡 Suggestions System
- 🎭 Reaction Roles
- And more!
All features are designed to work with Supabase and require no external paid APIs!
Pull requests and suggestions are welcome! Please open an issue or PR.
- animenbo.com
Licensed under ISC.