@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
32 lines (29 loc) • 956 B
JavaScript
;
var pieces = require('@sapphire/pieces');
var Args_cjs = require('../parsers/Args.cjs');
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var _Argument = class _Argument extends pieces.AliasPiece {
constructor(context, options = {}) {
super(context, options);
}
/**
* Wraps a value into a successful value.
* @param value The value to wrap.
*/
ok(value) {
return Args_cjs.Args.ok(value);
}
/**
* Constructs an {@link Err} result containing an {@link ArgumentError} with a custom type.
* @param options The options to pass to the ArgumentError.
*/
error(options) {
return Args_cjs.Args.error({ argument: this, identifier: this.name, ...options });
}
};
__name(_Argument, "Argument");
var Argument = _Argument;
exports.Argument = Argument;
//# sourceMappingURL=Argument.cjs.map
//# sourceMappingURL=Argument.cjs.map