A low-level library for creating a Discord client from Node.js. Come join the discussion!
npm install discord.io
var DiscordClient = require('discord.io');
var bot = new DiscordClient({
autorun: true,
email: "",
password: "",
//OR
token: ""
});
bot.on('ready', function() {
console.log(bot.username + " - (" + bot.id + ")");
});
bot.on('message', function(user, userID, channelID, message, rawEvent) {
if (message === "ping") {
bot.sendMessage({
to: channelID,
message: "pong"
});
}
});