a bot that plays music in discord,
based on discord.js.
this bot is WIP so expect some crashes, when it does crash, you can create a new issue on the github page, please provide instructions on how to recreate the crash
arguments in square brackets are optional
summon: makes the bot join a voicechannel. arguments: [voicechannelName]
leave: makes the bot leave the voicechannel. agruments: none
add: adds a song to the queue. arguments: url
queue: prints the queue to the text channel. arguments: none
plist: add the first 50 videos of a playlist to the queue. arguments: url
skip: skips to another song. arguments: [positioninqueue]
help: prints help to chat. arguments: none
repeat: plays the current song again after the end of this song. arguments: [amountofrepeats]
replay: restarts the current song. arguments: none
playlast: Plays the song that was played before the current song. arguments: [positioninhistory]
history: prints the song history to chat. arguments: none
clear: clears the queue. arguments: none
util: prints all channel ids and all role ids. arguments: none
the bot can be set to automatically play a random song from a set playlist when the queue ends, for this feature to work, fill in the fillPlaylist option
MusicDerp is easiest to install on ubuntu or similar linux distro's
download the latest release from here
because i don't have windows i cannot provide installation instructions for windows. the following instructions should work for linux and mac
if you're running osx or ubuntu 15.x.x this will probably already be installed, but check to make sure.
ffmpeg in the terminal. if it's not installed, type
$ sudo apt-get install ffmpeg. If you are on Ubuntu 14.04, install https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/
mac users can use brew to install ffmpeg
this is needed for installing the libraries with npm, on linux, type
$ sudo apt-get install python2.7. make sure u set the
$ python command to python 2.7, you can do this by adding this line to your
This is the codec that is used to stream to discord, most linux installs already have it but if you get an error saying you don't have opus when trying to play a song. you need to install opus, check out this link: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/opus.html
for linux, install build-essential:
sudo apt-get install build-essential.
for OSX install Xcode command line tools
once you've installed all the dependencies, download this source, and put it in a nice place. run
sudo npm install in the folder where index.js and package.json are. if you are getting any errors with
node-gyp while installing there's probably something wrong with your python install.
if the install ran succesfully:
options.json and fill in all the details.
after you've done this try to run the bot with:
make sure to create a music role if you want to use the whitelist feature, everyone with this role will be able to use the bot.
util command to get the music role id and then fill this in in the options.
also, add a commandChannel in the form of the id of the channel to listen to commands to. you can get the id with the