Skip to main content

Play music in your Discord server with ease

MusicBot brings YouTube music to your voice channels with queue management, caching, and multi-server support. Simple commands, powerful features.

MusicBot icon

Quick Start

Get MusicBot running in your Discord server in minutes

1

Install dependencies

Install the required Python packages and ffmpeg on your server.
pip install discord.py yt-dlp pynacl python-dotenv
sudo apt install ffmpeg
2

Configure environment variables

Create a .env file with your Discord bot token and YouTube API key.
DISCORD_BOT_TOKEN=your_discord_bot_token_here
YOUTUBE_API_KEY=your_youtube_api_key_here
You’ll need to create a Discord bot application and obtain a YouTube Data API v3 key. See our configuration guide for details.
3

Run the bot

Start the bot and invite it to your server.
python bot.py
Make sure the bot has permissions to join voice channels and send messages in your Discord server.
4

Play your first song

Join a voice channel and use the !play command to start playing music.
!play never gonna give you up
The bot will search YouTube, download the audio, and start playing in your voice channel.

Key Features

Everything you need for a great music experience

YouTube Integration

Play music from YouTube URLs or search by song name with automatic video discovery.

Queue Management

Add multiple songs to a queue and skip tracks with simple commands.

Smart Caching

Downloaded songs are cached per server for faster playback next time.

Multi-Server Support

Run the bot on multiple Discord servers with isolated state and queues.

Auto-Disconnect

Bot automatically leaves after 5 minutes of inactivity to save resources.

Low Latency

Check voice connection latency with the !ping command.

Explore the Documentation

Learn how to set up, use, and customize MusicBot

Installation

Install MusicBot and its dependencies

Configuration

Set up API keys and environment variables

Discord Bot Setup

Create and configure your Discord bot application

Commands Reference

Complete list of all bot commands

Architecture

Understand how MusicBot works internally

Troubleshooting

Solutions to common problems

Ready to bring music to your server?

Follow our quickstart guide to get MusicBot up and running in your Discord server in just a few minutes.

Get Started Now