Music Box is a music player widget in a Discord message.
Uses SponsorBlock data licensed used under CC BY-NC-SA 4.0. More details: https://sponsor.ajay.app/
Features:
- Play music from Youtube.
- Search Youtube & Youtube Music from the bot.
- Skip non-music sections of the bot based on crowdsourced data.
- Discord slash commands eg. /play, /pause
-
Install required software.
- Install Python 3.7 or greater from https://www.python.org/
- If you do not already Git install, install Git from git-scm.
-
Clone this repository and navigate to project directory
git clone https://github.com/borisliao/mbox.git cd mbox/
-
Install Poetry. To learn more on how to install or use Poetry, check out the Poetry documentation here.
# For OSX / Linux / Bash on Windows install instructions curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - # For Windows PowerShell install instructions (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
-
Install project dependencies.
poetry install
-
Activate virtual environment.
poetry shell
-
Install pre-commit to identify issues in code before committing changes.
pre-commit install
-
Follow FFmpeg Installation guide.
-
Install Opus dependency.
- For MacOS users, the easiest way is to setup Homebrew and then do a
brew install opus
. - For Linux/Unix users, use
sudo apt-get install libopus
.
- For MacOS users, the easiest way is to setup Homebrew and then do a
-
Follow Setting up Bot on Discord Developer Portal guide.
-
Invite bot to server.
- Go to Discord Developer Portal, if not already there.
- Click on General Information tab
- Copy the application id
- Replace the APPLICATION_ID portion of https://discord.com/api/oauth2/authorize?client_id=APPLICATION_ID&permissions=8&scope=bot%20applications.commands link
To run the application.
# For Windows users
python main.py
# For MacOS/Linux users
python3 main.py
To run the application in debug mode.
# For Windows users
python main.py debug
# For MacOS/Linux users
python3 main.py debug
Instead of running the commands above in the terminal, you can use the Run and Debug feature already built into VSCode. The following profiles has been included within the project: Normal Mode, Debug Mode
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.