MusicBot is a for music on discord
Music Playback – Play songs from YouTube with seeking, skipping, pausing, and stopping support.
Queue Management – Add, remove, and view songs in the queue.
Playback Controls – Pause, resume, skip, stop, and seek forward/backward.
Volume Control – Adjust volume from 0 to 100%.
Auto-Reconnect – Recovers from unexpected disconnects and resumes playback.
Performance Optimizations – Uses buffered audio and ffmpeg process monitoring for smooth playback.
Logging & Debugging – Provides real-time logs for easier troubleshooting.
/play <url> - Plays a song from YouTube.
/queue - Displays the current queue.
/remove <position> -Removes a song from the queue.
/volume <level> - Sets the volume (0-100).
/ping - Checks bot latency.
- Python 3.8 or later
ffmpeginstalled and accessible from the system path- The following Python libraries:
Run the following command to install dependencies:
pip install discord.py yt-dlp psutil asyncio- Windows: Download from FFmpeg.org and add it to your system path.
- Linux (Debian/Ubuntu):
sudo apt install ffmpeg
- Mac:
brew install ffmpeg
git clone https://github.com/your-repo/musicbot.git
cd musicbot- Open
musicbot.pyand replace"Post ur token here"with your Discord bot token. - Start the bot:
python musicbot.py
- Go to the Discord Developer Portal.
- Create an application and add a bot.
- Copy the bot token and paste it in
bot.run("YOUR_BOT_TOKEN").