UNPKG

magmastream

Version:

A user-friendly Lavalink client designed for NodeJS.

20 lines (19 loc) 585 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MagmaStreamError = void 0; const Enums_1 = require("./Enums"); class MagmaStreamError extends Error { code; number; context; constructor({ code, message, cause, context }) { super(message || code); this.name = "MagmaStreamError"; this.code = code; this.number = Enums_1.MagmaStreamErrorNumbers[code]; // auto-lookup this.context = context; if (cause) this.cause = cause; } } exports.MagmaStreamError = MagmaStreamError;