dubtrack.fm starter bot using DubAPI.
-
git clone https://github.com/NitroGhost/dubbot-starter.git
-
npm install
-
Setup your config.mine.js file. example:
module.exports = {
botName: "dubbot",
botPass: "justADubbotPassword",
roomURL: "dub-bot"
};
-
Add commands in the
/app/bot/commands
file with the name of the command. example:ping.js
. Any file added to the commands folder will be auto required on startup and caches the name of the file so that it can be called when sending the command in the chat. If you want the file to be called by more than just the file name, then you can define an array of extra commands by settingmodule.exports.extraCommands
to an array of strings. I have already added a few simple commands in the commands folder to get you started. -
You can add more events listeners in the events folder and add your code on what you want it to do on that event. The convention that I went for with my own bot was to name the file with the name of the event such as
room_playlist-update.js
so that you know what the file does. As far as the bot is concerned, the file name does not matter, unlike the file names in the commands folder. -
Run the bot with
npm run bot
. this willgulp mine
which copies your config.mine.js file to config.js thennode ./app/bot/index.js
to start the bot
write up how to host your bot using openshift which will explain why there is a "sever" side to the bot. Will also explain the extra scripts found in the package.json
files and how to use them.