A small project which showcases some different uses of the Discord.js package.
Make sure you have these two installed:
• NodeJS
• Discord.js (https://www.npmjs.com/package/discord.js)
Running the bot is easy:
cd /path && node bot.js
The bot has some basic functions:
• detect & reply to commands
• log messages to console
• detect & delete certain words
• play Roll: !roll high | !roll low | !roll
Adding commands is really easy, just add:
if(message.content.toLowerCase() === '!command'){ // code }
The !command part will be your command. Doesn't have to have the exclamation mark (!), but it does have to be lowercase, since it checks the user message in lowercase. Put this piece of code after/under any of the existing commands, like ping.
If you're having problems with the bot, post the issue