mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-01 06:35:41 -05:00
16 lines
419 B
JavaScript
16 lines
419 B
JavaScript
const ChatMessage = require("prismarine-chat")("1.21.8");
|
|
const stringify = (message) => new ChatMessage(message)?.toString();
|
|
|
|
class CommandError extends Error {
|
|
constructor(message, filename, lineError) {
|
|
super(stringify(message), filename, lineError);
|
|
this.name = "CommandError";
|
|
this._message = message;
|
|
}
|
|
|
|
get message() {
|
|
return stringify(this._message);
|
|
}
|
|
}
|
|
module.exports = CommandError;
|