renamed ErisError to DiscordJSError, use rateLimit event instead of debug, renamed the TOKEN variable back
This commit is contained in:
parent
1e69da7cbc
commit
77b33c1858
2 changed files with 8 additions and 13 deletions
16
backend/src/DiscordJSError.ts
Normal file
16
backend/src/DiscordJSError.ts
Normal 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}`;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue