A Discord Music and Utility Bot written in TypeScript using Sapphire, discord.js, Next.js, and React.
- Node.js LTS (
>= 20.0.0) - pnpm (
npm install -g pnpm) - Java 17+ (required to run the Lavalink audio server)
-
Clone the repository:
git clone https://github.com/galnir/Master-Bot.git cd Master-Bot -
Configure environment variables:
cp .env.example .env
-
Install dependencies:
pnpm install
(Generates the Prisma client and initializes the SQLite database automatically.)
-
Run the bot and dashboard:
pnpm dev
For production:
pnpm build && pnpm start
Create a .env file in the root directory by copying .env.example.
# Database (URI string: SQLite stored at /data/db.sqlite, or external PostgreSQL)
DB_URI="file:/data/db.sqlite"
# Dashboard URLs
# INTERNAL_URL binds to 0.0.0.0:3000 to listen on all interfaces, allowing public connections
INTERNAL_URL="0.0.0.0:3000"
PUBLIC_URL="https://your-domain.com"
DISCORD_CALLBACK_URL="https://discord.com/api/oauth2/authorize?client_id=your_client_id&permissions=8&scope=bot"
# Discord Bot & OAuth Credentials
DISCORD_TOKEN=""
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""
# Lavalink Audio Engine
LAVA_HOST="localhost"
LAVA_PASS="youshallnotpass"
LAVA_PORT=2333
LAVA_SECURE=false
LAVA_EXTERNAL=false
# Optional Integrations (YouTube, Spotify, Twitch, News, Genius, Klipy)
YOUTUBE_CLIENT_ID=""
YOUTUBE_CLIENT_SECRET=""
YOUTUBE_REFRESH_TOKEN=""
SPOTIFY_CLIENT_ID=""
SPOTIFY_CLIENT_SECRET=""
TWITCH_CLIENT_ID=""
TWITCH_CLIENT_SECRET=""📖 Full Configuration Guide: Detailed documentation for all optional APIs, Lavalink nodes, and feature toggles is in the Configuration Wiki.
Master-Bot features slash commands across Music, Moderation, Utility, Entertainment, and Notifications.
| Category | Highlights | Example |
|---|---|---|
| 🎵 Music | /play, /queue, /shuffle, /pause, /resume, /skip, /volume, /lyrics, /bassboost, custom playlists |
/play song-name |
| 🔨 Moderation | /ban, /kick, /timeout, /slowmode, /purge |
/timeout user: @member duration: 10m |
| ⚙️ Settings | /set (unified server settings, logging, tickets, stream alerts) |
/set option: view |
| 🔔 Alerts | YouTube live/upload notifications, Twitch live alerts | /set option: youtube channel: @creator |
| 😂 Fun & GIFs | Consolidated /gif command with modular tag options (/gif [tag] [query] [target]), /8ball, /rps, /urban |
/gif tag: hug target: @friend |
| ℹ️ General | /help, /dashboard, /reminder, /poll, /weather, /translate, /game-search, /world-news |
/help |
📖 Complete Command Reference: See the Commands Wiki for full descriptions, arguments, and permission requirements.
Comprehensive guides and architectural documentation are available in the Wiki:
- 🚀 Getting Started — Prerequisites, installation, and first boot
- ⚙️ Configuration — Environment variables, API keys, and feature flags
- 🏗️ Architecture — Monorepo design, zero-ops SQLite fallback, and Redis caching
- ⌨️ Commands Reference — Detailed breakdown of all commands and
/setoptions - 🎵 Music & Lavalink — Embedded Lavalink v4, YouTube OAuth, and audio filters
- 🌐 Web Dashboard — Next.js 15 App Router features and Discord OAuth2 setup
- 🛠️ Developer Guide — Extending commands, listeners, and background monitors
- 🚀 Deployment — Docker, Linux VPS (PM2/Caddy), and hosting options
- ❓ FAQ & Troubleshooting — Solutions to common issues and questions
Fork it and submit a pull request!
Contributions, bug fixes, and feature proposals are warmly welcomed. Please see CONTRIBUTING.md for guidelines and development workflows.
⭐ Bacon Fixation ⭐ — Countless contributions
- ModoSN —
resolve-ip,rps,8ball,bored,trump,advice,kanye,urban dictionarycommands and visual updates - PhantomNimbi — GIF consolidation, Lavalink v4 engine, Next.js 15 migration, moderation suite, support ticket system, live ASCII progress bar & auto-updater
- Natemo6348 —
mute,unmute - kfirmeg — play command flags, dockerization, docker wiki
- rafaeldamasceno —
music-triviaand Dockerfile improvements - navidmafi —
LeaveTimeOutandMaxResponseTimeoptions, update issue template, fix leave command - Kyoyo — brought back
now-playing - MontejoJorge — brought back
remind - malokdev —
uptimecommand - chimaerra — minor command tweaks
Distributed under the MIT License. See LICENSE.md for more information.