mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 06:51:51 +00:00
16 lines
420 B
TypeScript
16 lines
420 B
TypeScript
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}`;
|
|
}
|
|
}
|