Mozart is a powerful, hybrid Discord bot designed to bring high-quality music and automated moderation to your server, coupled with a sleek Web Dashboard for real-time control.
- Slash Commands: Modern interaction using
/play,/skip,/stop, etc. - Multi-Platform Support: Stream audio from YouTube, SoundCloud, and more via
yt-dlp. - Interactive UI: Control playback with beautiful Discord buttons (Pause, Skip, Stop).
- Persistent Queue: Queue data is stored in a SQLite database, ensuring stability.
- Strike System: Automated profanity filtering with a "3-strikes and you're out" policy.
- Auto-Ban: Users are automatically banned from the server upon reaching their 3rd warning.
- Safe Handling: Respects Discord permissions and provides feedback when actions cannot be performed.
- OAuth2 Integration: Secure login using your Discord account.
- Real-time Controls: Pause, resume, skip, and manage volume directly from your browser.
- Status Monitoring: View bot latency, uptime, and current server counts at a glance.
- Partial Updates: High-performance dashboard using HTMX-style partial refreshes for a smooth experience.
- Language: Python 3.11+
- Bot Framework: discord.py
- Web Framework: Flask + Waitress
- Audio Engine: yt-dlp + FFmpeg
- Database: SQLite (Persistent storage for warnings and queues)
- DevOps: Docker, GitHub Actions
Mozart/
├── src/
│ ├── cogs/ # Bot modules (Music, Moderation)
│ ├── utils/ # Database and helper functions
│ ├── web/ # Flask app, templates, and static assets
│ └── main.py # Discord bot entry point
├── run.py # Main application orchestrator (Flask + Bot)
├── Dockerfile # Multi-stage Alpine-based Docker image
└── compose.yaml # Docker Compose configuration
- Python 3.11 or higher
- FFmpeg installed on your system
- A Discord Bot Token (Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/RenX86/Mozart.git cd Mozart -
Install dependencies:
pip install -r requirements.txt
-
Configure Environment: Create a
.envfile in the root directory:DISCORD_TOKEN=your_bot_token_here DISCORD_CLIENT_ID=your_client_id DISCORD_CLIENT_SECRET=your_client_secret FLASK_SECRET_KEY=something_very_secret OAUTH2_REDIRECT_URI=http://localhost:5000/callback
-
Run the application:
python run.py
docker compose up -d| Command | Description |
|---|---|
/play <query> |
Searches and plays a song or adds it to the queue. |
/pause |
Pauses the current track. |
/resume |
Resumes a paused track. |
/skip |
Skips to the next song in the queue. |
/stop |
Stops the music and clears the session. |
!sync |
(Admin) Syncs slash commands to the current server. |
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.