A small, single-file, fully featured [Discordapp]( discord.iohttps://discordapp.com) library for Node.js and browsers.
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"
});
}
});