Skip to content
/ boombox Public

Minimal Python self-hosted Discord MP3 music player streaming bot for your own server

License

Notifications You must be signed in to change notification settings

pugzly/boombox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BoomBox

Minimal Python self-hosted Discord MP3 music streaming BOT for your own Discord server.

Designed to run on Linux systems. It may or may not run on your Windows and Apple machines, addapting it for that is on you entirely.

Feature list:

'.play' - join 'General' voice channel and start streaming (Admin only).

'.stop' - stop playing and disconnect from voice channel (Admin only)

'.skip' - skip to next random mp3 file (Admin only)

'.quit' - stop bot and exit progma (Creator only, if you add your Discord ID to boombox.py)

Limits

Not designed for and not intended use case, but it will run fine on multiple servers at the same time, but with some eastetic issues: Status "playing" will update globaly every time it's shuffling for any of the servers - I have no plans to do anything about that.

Requirements (on my Debian VPS at least):

sudo apt install ffmpeg
python3 -m pip install -U discord.py
python3 -m pip install -U pynacl

Install & Run

  1. Create Bot in Discord Developer Portal and get API TOKEN: https://discord.com/developers/applications

  2. Clone repository

git clone https://github.com/pugzly/boombox
cd boombox
  1. Edit file 'boombox.py' to add API TOKEN and change other preferences (feel free to change code to store token in env, encypted on blockchain, or under your mom's pillow)
# Edit bellow to add your own details

DISCORD_API_TOKEN = 'M2391576SZD-------REPLACE-THIS-WITH-DISCORD-API-TOKEN-OF-YOUR-BOT------Nj02947wND'
CREATOR_ID = 1000006900000001   # YOUR Discord User ID, only for command '.quit'
MUSIC_DIR = '/home/user/mp3'    # Path to where your MP3's are stored
PREFIX = '.'                    # Replace this, if you want all your commands start with anything other than '.'
  1. Run
python3 boombox.py

Bonus: To keep it running even with terminal closed, start it with 'nohup'

nohup python3 boombox.py

About

Minimal Python self-hosted Discord MP3 music player streaming bot for your own server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages