@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
24 lines (22 loc) • 695 B
JavaScript
;
const require_lib_errors_UserError = require('./UserError.cjs');
//#region src/lib/errors/PreconditionError.ts
/**
* Errors thrown by preconditions
* @property name This will be `'PreconditionError'` and can be used to distinguish the type of error when any error gets thrown
*/
var PreconditionError = class extends require_lib_errors_UserError.UserError {
constructor(options) {
super({
...options,
identifier: options.identifier ?? options.precondition.name
});
this.precondition = options.precondition;
}
get name() {
return "PreconditionError";
}
};
//#endregion
exports.PreconditionError = PreconditionError;
//# sourceMappingURL=PreconditionError.cjs.map