A feature-rich Discord music bot built with Python, supporting YouTube, Spotify, and SoundCloud playback with a modern, responsive UI.
- 🎵 High-quality music playback from multiple sources
- 🎨 Modern, responsive UI with progress bar
- 🔄 Queue management with loop modes
- ⏯️ Playback controls (play/pause, skip, previous)
- 📊 Track metadata and statistics
- 🎚️ Volume control and audio quality settings
- Python 3.8 or higher
- FFmpeg installed on your system
- Discord Bot Token
- Required Python packages (see
requirements.txt)
- Clone the repository:
git clone https://github.com/yourusername/discordbot.git
cd discordbot- Install required packages:
pip install -r requirements.txt- Install FFmpeg:
- Windows: Download from FFmpeg website and add to PATH
- Linux:
sudo apt-get install ffmpeg - macOS:
brew install ffmpeg
- Create a
.envfile in the project root:
DISCORD_TOKEN=your_discord_bot_token_here-
Fork this repository to your GitHub account
-
Create a new app on DigitalOcean App Platform:
- Go to DigitalOcean App Platform
- Click "Create App"
- Choose "GitHub" as the source
- Select your forked repository
- Choose the main branch
-
Configure the app:
- Name: discord-music-bot (or your preferred name)
- Region: Choose the closest to your users
- Plan: Basic ($5/month) is sufficient
- Instance Count: 1
- Instance Size: Basic XXS
-
Add environment variables:
- Add
DISCORD_TOKENas a secret - Add
PYTHONUNBUFFERED=1for better logging
- Add
-
Deploy:
- Review the settings
- Click "Create Resources"
- Wait for the deployment to complete
The bot will automatically redeploy when you push changes to the main branch.
- Start the bot:
python bot.py-
Invite the bot to your server using the OAuth2 URL generated in the Discord Developer Portal
-
Available Commands:
/play <query>- Play a song or add to queue- Use the music control buttons for playback control
discordbot/
├── bot.py # Main bot file
├── requirements.txt # Python dependencies
├── .env # Environment variables (local only)
├── .gitignore # Git ignore file
├── Procfile # DigitalOcean process file
├── runtime.txt # Python runtime version
├── do-app.yaml # DigitalOcean app configuration
└── README.md # This file
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- discord.py - Discord API wrapper
- yt-dlp - YouTube downloader
- FFmpeg - Audio processing
- DigitalOcean - Hosting platform