A powerful Discord Music Bot with comprehensive audio playback capabilities
- ✨ Features
- 📋 Prerequisites
- 🚀 Installation
- ⚙️ Configuration
- 🎯 Usage
⚠️ Known Issues- 🗺️ Roadmap
- 🤝 Contributing
- 👥 Contributors
- 📄 License
- 🙏 Credits
- YouTube Integration: Play music from URLs, playlists, and search results
- Multi-Guild Support: Individual settings and queues per Discord server
- Advanced Queue Management: Add, remove, shuffle, bump, and reorder tracks
- Playlist Support: Import entire YouTube playlists with automatic shuffling
- Interactive Search: Browse and select from YouTube search results
- Paginated Interfaces: Clean, navigable embeds for queues and search results
- Auto-Cleanup: Automatic message deletion to keep channels tidy
- Error Handling: Graceful error management with user-friendly messages
- Docker installed on your system
- Docker Compose (usually included with Docker)
- Python: 3.12 or higher
- FFmpeg: Download and install
- Python Dependencies: Choose one option:
- Use
requirements.txt
with pip - Use
pyproject.toml
with Poetry - Install manually:
discord.py 2.5.2+
,PyNaCl 1.5.0+
,python-dotenv 1.1.1+
,yt-dlp (latest)
- Use
-
Clone the repository
git clone https://github.com/giabb/DisMu.git cd DisMu
-
Create environment file
cp .env.sample .env
-
Get your Discord Bot Token
- Follow this comprehensive guide
- Ensure your bot has these Discord permissions:
- ✅ Connect to Voice Channels
- ✅ Speak in Voice Channels
- ✅ Send Messages
- ✅ Embed Links
- ✅ Read Message History
- ✅ Manage Messages (for cleanup)
-
Configure your
.env
file# Required BOT_TOKEN=your_discord_bot_token_here # Optional (defaults provided) DEFAULT_PREFIX=% DEFAULT_DELETE_TIME=15 EMBED_AUTODELETE=60 SEARCH_TIMEOUT=60
Quick Start:
docker compose up --build -d
Reference for other docker compose commands:
docker compose logs -f # View logs in real time
docker compose down # Stop and remove the container
docker compose stop # Stop the container
docker compose restart # Restart the container (if stopped)
-
Install Python dependencies
Using pip:
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
Using Poetry:
poetry config virtualenvs.in-project true # This will create the .venv folder inside the project poetry install --no-root source .venv/bin/activate
-
Run the bot
python -m src.main
Variable | Default | Description |
---|---|---|
BOT_TOKEN |
Required | Your Discord bot token |
DEFAULT_PREFIX |
% |
Command prefix for the bot |
DEFAULT_DELETE_TIME |
15 |
Seconds before auto-deleting messages |
EMBED_AUTODELETE |
60 |
Seconds before auto-deleting embeds |
SEARCH_TIMEOUT |
60 |
Seconds to wait for user search selection |
Once the bot is running and invited to your server:
- Test the bot: Type
%help
(or your configured prefix) - Join a voice channel and use
%join
to connect the bot - Play music:
%play <YouTube URL>
or%search <song name>
- Explore commands: Use
%help
to see all available commands
📚 For detailed command documentation, visit the Wiki
Currently, there are no known major issues.
If you encounter any problems:
- Check the Issues page
- Create a new issue with detailed information
- Include logs and steps to reproduce
- Enhanced Commands: Additional queue management and playback options
- Playlist Persistence: Save and load custom playlists
- Spotify Integration: Play tracks from Spotify playlists
We love contributions! Here's how you can help:
- Use the issue tracker
- Include detailed reproduction steps
- Provide error logs and environment details
- Describe the feature and its benefits
- Provide use cases and examples
- Discuss implementation approaches
- Fork the repository
- Create a feature branch
- Make your changes with proper documentation
- Commit your changes
- Push to the branch
- Open a Pull Request
- Improve README or Wiki pages
- Add code comments and docstrings
- Create tutorials and guides
Want to contribute? See the Contributing section above!
This project is licensed under the GNU General Public License v3.0.
This means you can:
- ✅ Use the software for any purpose
- ✅ Study and modify the source code
- ✅ Distribute copies of the software
- ✅ Distribute modified versions
Requirements:
- 📋 Include the original license
- 📋 State changes made to the code
- 📋 Make source code available when distributing
See the LICENSE.md file for complete details.
- README Template: Inspired by PurpleBooth
Made with ❤️ for the Discord community