An Eris Discord Bot Example on Glitch

As a 100% Eris user, i agree to this a lot. If documentation is presented in a good way, people will use it.

2 Likes

Its documented pretty well but its not very user friendly, it could be documented with examples etc and the documentation site could do with a re design

Yeah, I was thinking of making some tutorials on it, most of the tutorials on YT I’ve seen so far just include the basic ping command, and that’s about it.

The first page has an example:

Example: Ping Pong
Create a file called example.js. Add the following code to it:
var bot = new Eris(“BOT_TOKEN”);
bot.on(“ready”, () => {
console.log(“Ready!”);
});
bot.on(“messageCreate”, (msg) => {
if(msg.content === “!ping”) {
bot.createMessage(msg.channel.id, “Pong!”);
}
});
bot.connect();
Then, run the example with: node example.js