0.4.5 • Published 8 years ago
simple-discord-bot v0.4.5
simple-discord-bot
// app.js
var discordbot = require('simple-discord-bot'),
auth = require('./auth.json');
var commands = [{
name: 'greet',
description: 'description for greet',
help: 'help for greet',
handle: greet
}];
function greet (message) {
bot.sendMessage(message, 'Hey, '+ message.author.username +'! Wazzup!?');
}
var bot = new discordbot({ commands: commands });
bot.connect(auth);
// auth.json
{
"email" : "your@email.com",
"password" : "yoursecretpassword"
}