A music-focused Discord bot for private servers with queue management, reaction-based playback controls and optional Ollama-powered chat support.
This project is a custom Discord bot built primarily for music playback on private servers. In addition to standard music features such as queue handling, pause/resume, skip, looping and shuffle, it also includes a few extra utilities like Watch2Gether integration, public IP retrieval and optional local LLM chat via Ollama.
- Music playback for private Discord servers
- Queue-based song management
- Embedded “now playing” message with thumbnail preview
- Pause, resume, stop, skip, move, remove and loop controls
- Shuffle support via reactions
- Optional Nightcore mode
- Optional Ollama-based chat command
- Watch2Gether helper command
- Public IP command for local/private hosting setups
- Automatic song request channel setup with reaction controls
- Python
- discord.py
- yt-dlp
- FFmpeg / ffprobe
- NumPy
- Ollama (optional)
- systemd / shell scripts for Linux deployment
Prefix: pot
pot help— show available commandspot setup— create the song request channel and control messagepot join— join your current voice channelpot chat [message]— chat with the bot through Ollamapot w2g— send a Watch2Gether room linkpot get_ip— return the public IP of the host system
pot play [url or search]pot stoppot pausepot resumepot skippot looppot move [from] [to]pot remove [index]pot counterpot get_song [index]
The bot also supports reaction-based control inside the configured songrequest channel:
⏯pause / resume⏹stop⏩skip🔁loop modes🔀shuffle👮toggle special mode😞toggle Nightcore mode🎅reserved / seasonal reaction
Before running the bot, make sure the following are installed:
- Python 3
- FFmpeg
- ffprobe
- A Discord bot token
- Required Python packages:
discord.pyyt-dlpnumpypublic-ipollama(optional, only if you want chat support)
Clone the repository:
git clone https://github.com/hoffmann-luca/Discord-Music-Bot.git
cd Discord-Music-BotInstall the required Python packages:
pip install discord.py yt-dlp numpy public-ip ollamaInstall FFmpeg on Linux:
sudo apt update
sudo apt install ffmpegThis project currently uses a few hardcoded values inside the Python script, so some manual configuration is required before starting the bot.
At the bottom of the script, replace the empty token string:
client.run("YOUR_DISCORD_BOT_TOKEN")The bot stores the created message and channel IDs in text files.
By default, the script expects the following files under:
/root/bot/
Used files:
/root/bot/message_id.txt/root/bot/channel_id.txt/root/bot/guild.txt
Create the directory first if it does not exist:
sudo mkdir -p /root/botIf you want to use a different location, update the file paths inside the Python script.
The chat command uses a locally reachable Ollama instance.
In the current script, the host is set to:
host='http://192.168.178.33:11434'and the model is set to:
model='deepseek-potato'If you want to use this feature, make sure:
- Ollama is installed and running
- the host IP is reachable from the bot
- the selected model exists locally
If you do not need the chat feature, you can simply leave it unused or remove the chat command section.
The w2g command currently sends an embed with an empty description.
Add your Watch2Gether room link inside the script where the embed is created.
Depending on your setup, you may also want to replace or review:
- the bot name placeholder
- the empty embed image placeholder
- hardcoded paths
- any private/local-only values
Start the bot with:
python3 PotatoeBot2.0.pyThis repository also includes a shell script and a systemd service file for Linux-based deployment.
A typical setup might look like this:
sudo cp myapp.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable myapp.service
sudo systemctl start myapp.serviceAdjust paths, Python locations and permissions to match your system.
- Invite the bot to your Discord server
- Join a voice channel
- Run
pot setup - Use the
songrequestchannel for playback control - Send song links or use commands to manage playback