renamed ErisError to DiscordJSError, use rateLimit event instead of debug, renamed the TOKEN variable back

This commit is contained in:
almeidx 2021-07-28 16:43:31 +01:00
parent 1e69da7cbc
commit 77b33c1858
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
2 changed files with 8 additions and 13 deletions

View file

@ -0,0 +1,16 @@
import util from "util";
export class DiscordJSError extends Error {
code: number | string | undefined;
shardId: number;
constructor(message: string, code: number | string | undefined, shardId: number) {
super(message);
this.code = code;
this.shardId = shardId;
}
[util.inspect.custom]() {
return `[DISCORDJS] [ERROR CODE ${this.code ?? "?"}] [SHARD ${this.shardId}] ${this.message}`;
}
}