- 0. Install Main Dependencies
- 1. Make a Discord Developer Application
- 2. Setup Repository & Dependencies
- 3. Configure the Bot
- 4. Setup Spotify Auth (Optional)
- 5. Setup YouTube Auth (Optional)
- 6. Run the Bot
You will need to manually install the following things on your system and add them to your path:
- Node JS v16 or higher. Non-LTS and versions below 16 will probably work, but haven't been tested.
- Test this by running
node -v
in a terminal.
- Test this by running
- pnpm, recommended but npm and yarn should still work fine.
- If you've properly installed Node JS, you should be able to install pnpm by simply running
npm i -g pnpm
in a terminal.
- If you've properly installed Node JS, you should be able to install pnpm by simply running
Head over to the Discord developer applications page and create a new application.
Make sure you copy the bot's token, you'll need it for a later step.
Now you can head to the OAuth2 > URL Generator page and create an invite link for your bot, use this to add it to any server(s) of your choice.
- Scopes:
bot
,applications.commands
- Permissions:
Send Messages
,Embed Links
,Connect
,Speak
Now you can set up the repository from a terminal:
git clone https://github.com/NachoToast/Jukebot.git Jukebot
cd Jukebot
pnpm install
cp config.example.json config.json
Enter your Discord bot token from step 1 into the config.json file you created in step 2.
There are a lot of other configuration options you can give to the bot, and a JSON schema for all the values can be found here.
If you want the bot to be able to queue songs from Spotify, you should do this step.
If you get stuck in the following steps, you can consult these instructions.
- Run the authorization script using
pnpm run auth
ornpm run auth
- Type "Yes" when prompted to save to file
- Type "sp" for Spotify
- Make a Spotify application from here, be sure to make a redirect URI for it in the
overview > edit settings
menu (this can be any valid URL). - Fill in your Spotify client ID, secret, and redirect URI when prompted
- Enter "NZ" or your preferred country code
- Follow the remaining instructions
If you want the bot to be able to queue age-restricted videos, you should do this step.
- Run the authorization script using
pnpm run auth
ornpm run auth
- Type "Yes" when prompted to save to file
- Type "yo" for YouTube
- Follow these instructions to get cookies
Now you can run the bot (and other scripts) using pnpm start
(or npm start
).