WidenBot is your private music bot for Discord.
Disclaimer: Due to the nature of what a music bot is trying to accomplish, it can be prone to occasional breakage.
A WidenBot instance consists of three components:
- A discord bot, configured via the Discord developer portal
- The audio server (Lavalink), a standalone Java application
- The client, a .NET service
- Python 3
- Docker
Make sure the outputs of python3 --version
, docker version
, and
docker compose version
each look correct before continuing. Most OSes come
with Python, see Docker install for
instructions on installing Docker.
-
Go to the Discord Developer Portal, login as the Discord account that should own the bot, and create a new application
-
Within the Bot settings:
a. Disable "Public Bot" (optional, but recommended)
b. Enable "Server Members Intent" and "Message Content Intent"
c. Click the "Reset Token" button and save the resulting token for later
-
Within the OAuth settings:
a. Add a redirect for
https://discord.com
(Under "General" sub-category)b. Generate an invite URL with the
application.commands
andbot
scopes, and the following permissions:- Read Messages/View Channels
- Send Messages
- Manage Messages
- Use Slash Commands
- Connect
- Speak
-
Use the generated URL to invite the bot to a server of your choice
-
Go to the Spotify developer dashboard and sign in with whatever Spotify account you want to use
-
Create a new app (Development mode, other defaults should be sufficient), and save the client ID and secret for later
-
Clone this repository
-
Copy the contents of
config.template.json
into a new file calledconfig.json
-
For each instance of WidenBot you want to run, add an object to the array like so:
{ "label": "An arbitrary label for this instance of WidenBot", "isEnabled": true, "useSponsorBlock": true, "discord": { "serverID": "Right-click on server in Discord and select 'Copy Server ID'", "botToken": "Bot token from Discord Developer Portal", "requiredChannel": "Right-click on channel and select 'Copy Channel ID' to restrict channel usage, set to null if you want to handle via server roles instead" }, "spotify": { "clientID": "Client ID from Spotify developer dashboard", "clientSecret": "Client secret from Spotify developer dashboard" } }
NOTE: The useSponsorBlock
flag optionally enables integration with SponsorBlock
for YouTube. Mileage may vary, disable if you are having issues.
-
If on a Linux host, ensure the
Server/plugins
directory has sufficient permissions. -
From the root of the repository, execute:
python3 run.py start
The bot can be hosted from any machine that can install the dependencies. If you need a hosting platform, DigitalOcean makes it easy to set up a server, feel free to use the referral badge below which apparently provides a credit: