Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/macdja38/eris-errors
https://github.com/macdja38/eris-errors
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/macdja38/eris-errors
- Owner: macdja38
- Created: 2017-12-07T10:54:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-07T11:30:22.000Z (about 7 years ago)
- Last Synced: 2024-11-22T17:05:33.544Z (about 1 month ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Constants companion for eris including the error codes expressed by the .code property of an error.
This library allows for human readable and IDE completed error codes.
For example
```js
const EE = require("eris-errors");
const Eris = require("eris");
const eris = new Eris("token", {restMode: true});
eris.getRESTChannel("117454468076797959").catch(error => {
if (error.code === EE.DISCORD_RESPONSE_UNKNOWN_CHANNEL) {
// handle error
}
});
```A full list of implemented errors can be found [here](https://github.com/macdja38/eris-errors/blob/master/errors.js)
A full list of discord errors and their descriptions can be found [here](https://discordapp.com/developers/docs/topics/response-codes)