1.0.1 • Published 6 years ago
eris-errors v1.0.1
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
const EE = require("eris-errors");
const Eris = require("./index");
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 A full list of discord errors and their descriptions can be found here