Skip to main content

Prerequisites

Before installing MusicBot, ensure you have the following installed on your system:
  • Python 3.8 or higher
  • pip (Python package manager)
  • ffmpeg (audio processing library)

Install Python dependencies

Install the required Python packages using pip:
pip install discord.py yt-dlp pynacl python-dotenv
These packages provide:
  • discord.py: Discord API wrapper for building bots
  • yt-dlp: YouTube video/audio downloader
  • pynacl: Voice support for Discord
  • python-dotenv: Environment variable management

Install ffmpeg

ffmpeg is required for audio processing and playback. Install it based on your operating system:
sudo apt update
sudo apt install ffmpeg

Verify installation

Confirm ffmpeg is installed correctly:
ffmpeg -version
You should see version information if the installation was successful.

Clone the repository

Clone the MusicBot repository to your local machine:
git clone https://github.com/spyflow/musicbot.git
cd musicbot
Make sure all dependencies are installed before proceeding to configuration.

Next steps

After installing dependencies, you’ll need to:
  1. Create a Discord bot application
  2. Configure environment variables
  3. Run the bot with python bot.py

Build docs developers (and LLMs) love