0.17.2 • Published 1 year ago

eris v0.17.2

Weekly downloads
6,617
License
MIT
Repository
github
Last release
1 year ago

Eris NPM version

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 --no-optional eris

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

Ping Pong Example

const Eris = require("eris");

// Replace TOKEN with your bot account's token
const bot = new Eris("Bot TOKEN", {
    intents: [
        "guildMessages"
    ]
});

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

bot.on("error", (err) => {
  console.error(err); // or your preferred logger
});

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.

Useful Links

License

Refer to the LICENSE file.

0.17.2

1 year ago

0.16.2

1 year ago

0.14.2

2 years ago

0.17.0

2 years ago

0.17.1

2 years ago

0.16.0

2 years ago

0.16.1

2 years ago

0.15.1

3 years ago

0.15.0

3 years ago

0.14.1

3 years ago

0.8.7

3 years ago

0.12.1

3 years ago

0.11.3

3 years ago

0.14.0

3 years ago

0.13.4

3 years ago

0.13.3

4 years ago

0.13.2

4 years ago

0.13.1

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.11.2

4 years ago

0.11.1

4 years ago

0.11.0

5 years ago

0.10.1

5 years ago

0.10.0

5 years ago

0.9.0

6 years ago

0.8.6

6 years ago

0.8.5

6 years ago

0.8.4

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.5

11 years ago

0.2.4

11 years ago

0.2.2

11 years ago