eris

A NodeJS Discord library

Github stars Tracking Chart

Eris NPM version

A NodeJS wrapper for interfacing with Discord.

Installing

You will need NodeJS 8+. 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 --no-optional eris

If you need voice support, remove the --no-optional

Ping Pong Example

const Eris = require("eris");

var bot = new Eris("BOT_TOKEN");
// Replace BOT_TOKEN with your bot account's token

bot.on("ready", () => { // When the bot is ready
    console.log("Ready!"); // Log "Ready!"
});

bot.on("messageCreate", (msg) => { // When a message is created
    if(msg.content === "!ping") { // If the message content is "!ping"
        bot.createMessage(msg.channel.id, "Pong!");
        // Send a message in the same channel with "Pong!"
    } else if(msg.content === "!pong") { // Otherwise, if the message is "!pong"
        bot.createMessage(msg.channel.id, "Ping!");
        // Respond with "Ping!"
    }
});

bot.connect(); // Get the bot to connect to Discord

More examples can be found in the examples folder.

The website includes more detailed information on getting started, as well as documentation for the different components.

The Discord API channel (#js_eris) is the best place to get support/contact me.

The GitHub repo has the most updated code.

The NPM package

License

Refer to the LICENSE file.

Main metrics

Overview
Name With Ownerabalabahaha/eris
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2016-06-30 22:41:48
Pushed At2024-12-13 14:44:49
Last Commit At
Release Count48
Last Release Name0.18.0 (Posted on )
First Release Name0.0.1 (Posted on )
用户参与
Stargazers Count1.5k
Watchers Count36
Fork Count419
Commits Count1.4k
Has Issues Enabled
Issues Count379
Issue Open Count16
Pull Requests Count683
Pull Requests Open Count18
Pull Requests Close Count273
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private