0.0.0 • Published 8 years ago
alicebot v0.0.0
Installation
npm install discord.io
Documentation / Gitbooks
Example
var Discord = require('discord.io');
var bot = new Discord.Client({
token: "",
autorun: true
});
bot.on('ready', function() {
console.log(bot.username + " - (" + bot.id + ")");
});
bot.on('message', function(user, userID, channelID, message, event) {
if (message === "ping") {
bot.sendMessage({
to: channelID,
message: "pong"
});
}
});