@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
23 lines (21 loc) • 615 B
JavaScript
import { UserError } from "./UserError.mjs";
//#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 UserError {
constructor(options) {
super({
...options,
identifier: options.identifier ?? options.precondition.name
});
this.precondition = options.precondition;
}
get name() {
return "PreconditionError";
}
};
//#endregion
export { PreconditionError };
//# sourceMappingURL=PreconditionError.mjs.map