◦ A Discord bot built with Python, Discord.py and FFmpeg for enhanced music experiences within Discord servers.
- 📍 Overview
- 📦 Features
- 📂 Repository Structure
- 💻 Installation
- 🏗️ Usage
- 🌐 Hosting
- 📄 License
- 👏 Authors and Acknowledgments
This repository contains a project called "Discord-Music-Bot" which is a Python-based Discord bot designed to enhance music experiences within Discord servers. The bot utilizes the Discord.py library and FFmpeg for seamless music playback, queue management, and a range of interactive features.
- Music Playback: Plays music from various sources like YouTube, SoundCloud, Spotify, and local audio files.
- Voice Channel Integration: Connects to voice channels to play music for all members.
- User Interaction: Users can interact with the bot using commands to search for music, manage the queue, and provide feedback.
- Queue Management: Provides commands to add, remove, list, and clear songs from the playback queue.
- Advanced Controls: Offers features like looping, shuffling, and equalizer settings for customized music playback.
- Database Integration: Uses SQLite (or optionally other databases like MySQL/PostgreSQL/MongoDB) to store data, server settings, and queue information.
- Customizable Commands: Server administrators can customize command prefixes and aliases.
Discord-Music-Bot
├── bot.py
├── cogs
│ ├── music.py
│ └── admin.py
├── utils
│ ├── config.py
│ ├── errors.py
│ ├── database.py
│ └── checks.py
├── main.py
├── requirements.txt
└── .env
- Python 3.7 or higher
- pip (Python package installer)
- Clone the repository:
- Navigate to the project directory:
- 'cd Discord-Music-Bot'
- Install dependencies:
- 'pip install -r requirements.txt'
- Create a
.env
file (if it doesn't exist) and add the following environment variables:DISCORD_TOKEN=YOUR_BOT_TOKEN
YOUTUBE_API_KEY=YOUR_YOUTUBE_API_KEY
(optional, if you want to use YouTube)SOUNDCLOUD_CLIENT_ID=YOUR_SOUNDCLOUD_CLIENT_ID
(optional, if you want to use SoundCloud)SOUNDCLOUD_CLIENT_SECRET=YOUR_SOUNDCLOUD_CLIENT_SECRET
(optional, if you want to use SoundCloud)SPOTIFY_CLIENT_ID=YOUR_SPOTIFY_CLIENT_ID
(optional, if you want to use Spotify)SPOTIFY_CLIENT_SECRET=YOUR_SPOTIFY_CLIENT_SECRET
(optional, if you want to use Spotify)GENIUS_ACCESS_TOKEN=YOUR_GENIUS_ACCESS_TOKEN
(optional, if you want to display lyrics)MUSIXMATCH_API_KEY=YOUR_MUSIXMATCH_API_KEY
(optional, if you want to display lyrics)TUNEIN_API_KEY=YOUR_TUNEIN_API_KEY
(optional, if you want to use TuneIn Radio)IHEARTRADIO_API_KEY=YOUR_IHEARTRADIO_API_KEY
(optional, if you want to use iHeartRadio)DATABASE_URI=sqlite:///music.db
(for SQLite) or your preferred database URI
- Run the bot:
- 'python main.py'
- Invite the bot to your Discord server.
- Docker:
- Build a Docker image: 'docker build -t discord-music-bot .'
- Run the Docker container: 'docker run -d -p 80:80 discord-music-bot'
- Cloud Platforms (e.g., Heroku):
- Create a new Heroku app.
- Set environment variables (as in the
.env
file). - Deploy the bot using Git (refer to Heroku documentation for details).
This project is licensed under the GNU AGPLv3.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!