A Discord music bot built with Python and Discord.py for seamless music playback experience on servers.
- 📍 Overview
- 📦 Features
- 📂 Structure
- 💻 Installation
- 🏗️ Usage
- 🌐 Hosting
- 📄 License
- 👏 Authors
This repository houses a Discord music bot project built to enhance user engagement within Discord communities. The bot provides a user-friendly interface for music playback, offering a robust and interactive experience.
This Discord music bot boasts a range of features designed for seamless and enjoyable music listening experiences on Discord servers:
Feature | Description |
---|---|
Music Playback | Play music from various sources like YouTube, Spotify, and SoundCloud. |
Queue Management | Manage a music queue: add, remove, reorder, shuffle, and loop songs. |
Playback Controls | Control music playback: play, pause, resume, skip, and stop. |
Voice Channel Integration | Join and leave voice channels to play music directly within your Discord community. |
User Interface | Intuitive command system with clear prompts and informative responses for easy interaction. |
Now Playing Information | Display information about the currently playing song. |
Search Functionality | Search for music from different sources. |
Advanced Queue Management | Utilize a robust queue management system to view, skip, loop, and manage queue priority. |
User-Specific Settings | Customize your experience with volume control, preferred sources, and custom commands. |
Web-based Interface | (Optional) Develop a web interface for managing settings, configuring playlists, and monitoring activity. |
Radio Mode | (Optional) Implement a radio mode for playing continuous streams from various sources. |
└── bot
├── commands
│ ├── music.js
│ ├── admin.js
│ ├── help.js
│ ├── info.js
│ ├── join.js
│ ├── leave.js
│ ├── play.js
│ ├── pause.js
│ ├── resume.js
│ ├── skip.js
│ ├── stop.js
│ ├── queue.js
│ ├── shuffle.js
│ ├── loop.js
│ ├── volume.js
│ └── nowplaying.js
├── events
│ ├── ready.js
│ ├── messageCreate.js
│ ├── voiceStateUpdate.js
│ └── interactionCreate.js
├── services
│ ├── musicService.js
│ ├── queueService.js
│ ├── playlistService.js
│ └── youtubeService.js
├── utils
│ ├── commandHandler.js
│ ├── logger.js
│ └── errorHandler.js
└── config
├── env.config.js
└── config.js
- Python 3.7 or higher
- pip (Python package installer)
- Discord Bot Token (Obtain one from the Discord Developer Portal: https://discord.com/developers/applications)
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/project-1722833603841-x66u2b.git
- Navigate to the project directory:
cd project-1722833603841-x66u2b
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory and add your Discord Bot Token:DISCORD_TOKEN=<your_discord_bot_token>
- Run the bot:
python bot/main.js
- Invite the bot to your Discord server:
- Go to the Discord Developer Portal and create a bot application.
- Obtain the bot's OAuth2 URL (with the "bot" scope) from the Developer Portal.
- Use the URL to invite the bot to your server.
- Use the following commands within a voice channel:
!play <song name>
: Plays a song from a supported music service.!pause
: Pauses the currently playing song.!resume
: Resumes playback after pausing.!skip
: Skips the current song.!stop
: Stops playback and clears the queue.!queue
: Shows the current music queue.!queue add <song name>
: Adds a song to the queue.!queue remove <song number>
: Removes a song from the queue.!shuffle
: Randomizes the order of songs in the queue.!loop
: Toggles looping the current song or the entire queue.!volume <number>
: Adjusts the playback volume.!info
: Displays information about the currently playing song.!join <channel name>
: Makes the bot join the specified voice channel.!leave
: Makes the bot leave the current voice channel.
- Install Docker:
- Follow instructions for your operating system: https://docs.docker.com/get-docker/
- Build a Docker Image:
docker build -t discord-music-bot .
- Run the Docker Container:
docker run -d -p 8080:8080 discord-music-bot
- Replace
8080
with a different port if necessary.
This project is licensed under the MIT License.
-
Drix10 - Spectra.codes - GitHub
Why only generate Code? When you can generate the whole Repository!