@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
29 lines (27 loc) • 832 B
JavaScript
import { __name } from '../../chunk-PAWJFY3S.mjs';
import { AliasPiece } from '@sapphire/pieces';
import { Args } from '../parsers/Args.mjs';
var _Argument = class _Argument extends AliasPiece {
constructor(context, options = {}) {
super(context, options);
}
/**
* Wraps a value into a successful value.
* @param value The value to wrap.
*/
ok(value) {
return 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.error({ argument: this, identifier: this.name, ...options });
}
};
__name(_Argument, "Argument");
var Argument = _Argument;
export { Argument };
//# sourceMappingURL=Argument.mjs.map
//# sourceMappingURL=Argument.mjs.map