# eris

> A NodeJS Discord library

Latest version **0.18.0** (published 2024-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install eris
pnpm add eris
yarn add eris
bun add eris
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.18.0 |
| Published | 2024-09-22 |
| First published | 2013-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.4.0 |
| Dependencies | 1 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1516 |
| Author | abalabahaha |
| Maintainers | abalabahaha |
| Keywords | api, discord, discordapp, eris, wrapper |

## Links

- npm: https://www.npmjs.com/package/eris
- Repository: https://github.com/abalabahaha/eris
- Homepage: https://abal.moe/Eris/
- Issues: https://github.com/abalabahaha/eris/issues
- npm.io page: https://npm.io/package/eris

## Dependencies (1)

- [ws](https://npm.io/package/ws.md) ^8.2.3

## Recent versions

- 0.18.0 (latest) — 2024-09-22
- 0.16.2 — 2023-03-09
- 0.17.2 — 2023-03-09
- 0.17.1 — 2022-06-30
- 0.14.2 — 2022-06-15
- 0.17.0 — 2022-06-03
- 0.16.1 — 2021-11-17
- 0.16.0 — 2021-11-15
- 0.15.1 — 2021-05-03
- 0.15.0 — 2021-04-05
- 0.14.1 — 2021-04-02
- 0.8.7 — 2020-11-05
- 0.11.3 — 2020-11-05
- 0.12.1 — 2020-11-05
- 0.13.4 — 2020-11-05
- … 31 more at https://npm.io/package/eris/versions

## README

Eris [![NPM version](https://img.shields.io/npm/v/eris.svg?style=flat-square&color=informational)](https://npmjs.com/package/eris)
====

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](https://abal.moe/Eris/docs) for more details.

```
npm install --no-optional eris
```

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

Ping Pong Example
-----------------

```js
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](https://github.com/abalabahaha/eris/tree/master/examples).

Useful Links
------------

- [The website](https://abal.moe/Eris/) has more details and documentation.
- [The official Eris server](https://abal.moe/Eris/invite) is the best place to get support.
- [The GitHub repo](https://github.com/abalabahaha/eris) is where development primarily happens.
- [The NPM package webpage](https://npmjs.com/package/eris) is, well, the webpage for the NPM package.

License
-------

Refer to the [LICENSE](LICENSE) file.

---
_Source: https://npm.io/package/eris · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
