UNPKG

player-engine

Version:

Play your Musics in Your Discord Music Bot | Discord.js V13 Only

19 lines (18 loc) 549 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class PlayerError extends Error { constructor(code, message) { super(); this.createdAt = new Date(); this.code = code; this.message = `[${code}]: ${message}`; this.createdTimestamp = this.createdAt.getTime(); } toJSON() { return { stack: this.stack, code: this.code, created: this.createdTimestamp }; } toString() { return `${this.message}\n${this.stack}`; } } exports.default = PlayerError;