Beatbob is a Discord music bot built with Python, discord.py, Wavelink, and Lavalink. It can play music from sources like YouTube and Spotify, manage queues, and keep the music going in your voice channel.
The project includes Docker support, so the bot and Lavalink can run together without too much setup.
Most commands are slash commands and need to be used in a Discord server. Music controls also require you to be in the same voice channel as Beatbob.
| Command | What it does |
|---|---|
/play <query> |
Searches for a song or playlist and adds it to the queue. Starts playback if nothing is playing. |
/skip |
Skips the current song. |
/stop |
Stops playback, clears the queue, and disconnects the bot from voice. |
/pause |
Pauses the current song. |
/resume |
Resumes paused playback. |
/queue [page] |
Shows the current queue. |
/current |
Shows the song currently playing and its progress. |
/volume <0-100> |
Sets the playback volume. Requires administrator permissions. |
/autoplay <mode> |
Turns autoplay on or off. |
/loop <mode> |
Sets loop mode to off, current track, or full queue. |
/shuffle |
Shuffles the current queue. This cannot be reversed. |
/nightcore <true/false> |
Turns the nightcore-style filter on or off. |
/pitch <0.1-5.0> |
Changes the pitch of the audio. |
/speed <0.1-5.0> |
Changes the playback speed. |
/rate <0.1-5.0> |
Changes the playback rate. |
/helloworld |
Makes the bot say hello. Mostly useful as a simple test command. |
/sync [guild_id] |
Syncs slash commands globally or to a specific server. Bot owner only. |
- Docker and Docker Compose, for the easiest setup
- A Discord bot token
- Spotify client credentials, if you want Spotify support
git clone https://github.com/blondberg/beatbob.git
cd beatbob
cp application.example.yml application.yml
cp .env.example .envFill in environment variables inside .env:
DISCORD_TOKEN=your_discord_bot_token
COMMAND_PREFIX=!
LAVALINK_PASSWORD=youshallnotpass
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secretdocker compose up -d --build-
Create and activate virtual environment (optional)
python -m venv venv source venv/scripts/activate (Windows) source venv/bin/activate (Linux/MacOS)
-
Install the Python dependencies:
pip install -r requirements.txt
-
Start Lavalink separately, then run the bot:
First download the lastest Lavalink.
java -jar Lavalink.jar python bot.py
Important! When running without Docker, make sure LAVALINK_URI is set in .env, for example:
LAVALINK_URI=http://localhost:2333-
/shuffleand/loopcommands. - Queue history and ability to play
/previoustracks. -
/removea song from queue. -
/seekthrough a song. -
/movea song in the queue.
- DJ-mode: playing a song from each user before repeating.
- Docker support.
- Persistent guild settings (database support).
- Queue.
- Autoplay, loop, and shuffle.
