djBot is a simple Discord Bot that plays desired music in voice channels. djBot works by searching for the requested song names on YouTube.com and streaming the audio of the first result to the voice channel.
- Download the repo
- Download Node.js and npm (website link)
- Install Dependencies:
- Open terminal/command prompt and go to the project directory (this directory should contain a src folder)
- Type the following command into the terminal:
npm install
- Setup Discord Application
- Visit Discord Dev Protal and make a new application
- Go to the Bot tab once your in the Application page and add a bot
- Copy the Bot Token and set the 'DISCORDJS_BOT_TOKEN' variable equal to that token in your .env file
- Add the Discord bot from you Discord Application to your server
- Run the program
- Open terminal/command prompt
- Go to the project directory
- Enter the following command:
node ./src/client.js - djBot will only execute commands if the user is in a voice channel
- '![command]'
- '![command] [parameter]'
Example Command: '!add Darude Sandstorm'
Example Command: '!pause'
-
Add
- Adds the requested song to the end of the queue.
- Invoke Tags: 'add', 'play'
- Shortcut Tags: 'a', 'p'
- Needs Parameter (song name)
-
Skip
- Skips the current song in the queue.
- Invoke Tags: 'skip'
- Shortcut Tags: 's'
-
Pause
- Pauses the current song; song won't play again until Resume command is called.
- Invoke Tags: 'pause', 'halt'
- Shortcut Tags: 'ps', 'h'
-
Resume
- Resumes playing the current song.
- Invoke Tags: 'resume', 'start'
- Shortcut Tags: 'r', 'st'
-
8D filter
- Streams all remaining songs in the queue with 8D audio filter (learn about 8D audio).
- Invoke Tags: '8d'
- Needs Parameter = 'off' to turn off 8D audio filter
djBot is abled to be controlled in natural language. To do so, call the bot's name and desire command (and parameter) afterwards.
Example Command: 'Hey djBot can you please add the song Darude Sandstorm please?'
Example Command: 'djbot skip the current song now!'
-
Discord.js (documentation): Used to interface with Discord API
-
discord-player (documentation): Used to get songs and handle queue
Author: Rishabh Mehta