UNPKG

@sapphire/framework

Version:

Discord bot framework built for advanced and amazing bots.

32 lines (30 loc) 928 B
import { __name } from '../chunk-PAWJFY3S.mjs'; import { container } from '@sapphire/pieces'; import { resolveChannel } from '../lib/resolvers/channel.mjs'; import { Argument } from '../lib/structures/Argument.mjs'; var _CoreArgument = class _CoreArgument extends Argument { constructor(context) { super(context, { name: "channel" }); } run(parameter, context) { const resolved = resolveChannel(parameter, context.message); return resolved.mapErrInto( (identifier) => this.error({ parameter, identifier, message: "The argument did not resolve to a channel.", context }) ); } }; __name(_CoreArgument, "CoreArgument"); var CoreArgument = _CoreArgument; void container.stores.loadPiece({ name: "channel", piece: CoreArgument, store: "arguments" }); export { CoreArgument }; //# sourceMappingURL=CoreChannel.mjs.map //# sourceMappingURL=CoreChannel.mjs.map