Erislite [v0.18.0]
A Node.js wrapper for interfacing with Discord.
Installing
You will need NodeJS 10.4+. If you need voice support you will also need Python 2.7 and a C++ compiler. Refer to the Getting Started section of the docs for more details.
npm install erislite@latest
Ping Pong Example
const { Erislite } = require("erislite");
const bot = new Erislite("Bot TOKEN", {
intents: [
"guildMessages"
]
});
bot.on("ready", () => {
console.log("Ready!");
});
bot.on("error", (err) => {
console.error(err);
});
bot.on("messageCreate", (msg) => {
if(msg.content === "!ping") {
bot.createMessage(msg.channel.id, "Pong!");
} else if(msg.content === "!pong") {
bot.createMessage(msg.channel.id, "Ping!");
}
});
bot.connect();
Useful Links