An open-source TypeScript music bot for discord that runs on Node.
Next to listening to music you also can:
- Manage the channels the bot can't join
- Fully manageable roles and permissions
- Ability to blacklist songs
- Choose your own custom prefix
Commands (prefixed with your defined prefix)
help
List commandsjoin
Joins a channelplay <query|url>
Add song to queueforceplay <query|url>
Plays a song directly, skipping the current songpause
Pause current songresume
Resume current songqueue <page>
List queue, page command is optionalskip
Skip current songnp
Show the song that is currenty playingshuffle
Suffles the queueremove <index|range|user>
Remove a song from the playlist (index, range or mention a user)move <old index> <new index>
Move a songs from one index to anothervolume <0-100>
Set the volumemute
Mute the botunmute
Unmute the botclearqueue
Clears queue and stops playingdisconnect
Disconnect bot from channel and clear queuestatistics
See global, server and personal statisticsblacklist show
Lists blacklisted YouTube idsvoicechannel show
Lists blocked voice channels for the bot
Admin commands:
blacklist add <YouTube-url>
Adds a YouTube video to the blacklistblacklist remove <YouTube-id>
Removes a YouTube video from the blacklistvoicechannel disallow <channel-name>
Blocks the bot from joining a channelvoicechannel allow <channel-name>
Removes the channel from the blacklistdj role <role>
Set the DJ roledj require <command>
Set a command to DJ-only (help command is always public)dj remove <command>
Remove DJ-only from a commandprefix <char>
Set the prefix for commands
Note:
- Administrators can always run every command
- Admin commands can only be ran by administrators. When you give admin-only commands DJ-only, DJ's are also able to run this command.
- A discord bot
- A YouTube v3 api key
- Node.js (8.9.4 or higher, latest version recommended)
- ffmpeg (latest)
- Firebase (just the database)
- Install all pre requirements
- Clone this repository
- Copy config.json.example > config.json
- Copy youtube.config.json.example > youtube.config.json
- Run
npm install
to install all dependencies - Make sure all your credentials are correct
config.json example
{
"secret": "Your secret", // This password is used for the http
"http_port": 8000, (8000 by default)
"message_lifetime": 30000,
"token": "Discord api token",
"prefix": ".",
"queue_limit": 50, // -1 for unlimited
"firebase": {
"apiKey": "",
"authDomain": "",
"databaseURL": "",
"projectId": "",
"storageBucket": ""
}
}
config.youtube.json example
{
"API_KEY": "Paste your key here",
"default_stream_options": {
"seek": 0,
"volume": 1
}
}
- Run
npm start
in the installation directory