///
import { type CategoryChannel, type Collection, type DirectoryChannel, type Emoji, type ForumChannel, type Guild, type GuildBasedChannel, type GuildChannel, type GuildEmoji, type GuildMember, type Invite, type Message, type NewsChannel, type Role, type Snowflake, type StageChannel, type TextBasedChannel, type TextChannel, type ThreadChannel, type User, type VoiceBasedChannel, type VoiceChannel } from "discord.js";
import type { URL } from "node:url";
import { z } from "zod";
import { MessageSendResolvable, SyncOrAsync } from "../../../typings/Util.js";
import { ArgumentMatches } from "../../../util/Constants.js";
import type { AkairoClient } from "../../AkairoClient.js";
import type { ContextMenuCommand } from "../../contextMenuCommands/ContextMenuCommand.js";
import type { Inhibitor } from "../../inhibitors/Inhibitor.js";
import type { Listener } from "../../listeners/Listener.js";
import type { Task } from "../../tasks/Task.js";
import type { Command } from "../Command.js";
import type { CommandHandler } from "../CommandHandler.js";
import { Flag, FlagType } from "../Flag.js";
import type { TypeResolver } from "./TypeResolver.js";
type ATC = ArgumentTypeCaster;
type KBAT = keyof BaseArgumentType;
type ATCR = ArgumentTypeCasterReturn;
type AT = ArgumentType;
type BAT = BaseArgumentType;
type ATCATCR = ArgumentTypeCaster>;
type ATCBAT = ArgumentTypeCaster;
export declare class Argument {
command: Command;
default: DefaultValueSupplier | any;
description: string | any;
flag: string | string[] | null;
index: number | null;
limit: number;
match: ArgumentMatch;
modifyOtherwise: OtherwiseContentModifier | null;
multipleFlags: boolean;
otherwise: MessageSendResolvable | OtherwiseContentSupplier | null;
prompt: ArgumentPromptOptions | boolean | null;
type: ArgumentType | OmitThisParameter;
unordered: boolean | number | number[];
constructor(command: Command, options?: ArgumentOptions);
get client(): AkairoClient;
get handler(): CommandHandler;
cast(message: Message, phrase: string): Promise;
collect(message: Message, commandInput?: string, parsedInput?: any): Promise;
process(message: Message, phrase: string): Promise;
static cast(type: T, resolver: TypeResolver, message: Message, phrase: string): Promise>;
static cast(type: T, resolver: TypeResolver, message: Message, phrase: string): Promise;
static cast(type: AT | ATC, resolver: TypeResolver, message: Message, phrase: string): Promise;
static compose(...types: T[]): ATCATCR;
static compose(...types: T[]): ATCBAT;
static compose(...types: (AT | ATC)[]): ATC;
static composeWithFailure(...types: T[]): ATCATCR;
static composeWithFailure(...types: T[]): ATCBAT;
static composeWithFailure(...types: (AT | ATC)[]): ATC;
static isFailure(value: unknown): value is null | undefined | Flag;
static product(...types: T[]): ATCATCR;
static product(...types: T[]): ATCBAT;
static product(...types: (AT | ATC)[]): ATC;
static range(type: T, min: number, max: number, inclusive?: boolean): ATCATCR;
static range(type: T, min: number, max: number, inclusive?: boolean): ATCBAT;
static range(type: AT | ATC, min: number, max: number, inclusive?: boolean): ATC;
static tagged(type: T, tag?: any): ATCATCR;
static tagged(type: T, tag?: any): ATCBAT;
static tagged(type: AT | ATC, tag?: any): ATC;
static taggedUnion(...types: T[]): ATCATCR;
static taggedUnion(...types: T[]): ATCBAT;
static taggedUnion(...types: (AT | ATC)[]): ATC;
static taggedWithInput(type: T, tag?: any): ATCATCR;
static taggedWithInput(type: T, tag?: any): ATCBAT;
static taggedWithInput(type: AT | ATC, tag?: any): ATC;
static union(...types: T[]): ATCATCR;
static union(...types: T[]): ATCBAT;
static union(...types: (AT | ATC)[]): ATC;
static validate(type: T, predicate: ParsedValuePredicate): ATCATCR;
static validate(type: T, predicate: ParsedValuePredicate): ATCBAT;
static validate(type: AT | ATC, predicate: ParsedValuePredicate): ATC;
static withInput(type: T): ATC>;
static withInput(type: T): ATCBAT;
static withInput(type: AT | ATC): ATC;
}
export type ArgumentPromptData = {
retries: number;
infinite: boolean;
message: Message;
phrase: string;
failure: null | Flag;
};
export declare const ArgumentPromptData: z.ZodObject<{
retries: z.ZodNumber;
infinite: z.ZodBoolean;
message: z.ZodType, z.ZodTypeDef, Message>;
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}>;
export type PromptContentSupplier = (message: Message, data: ArgumentPromptData) => SyncOrAsync;
export declare const PromptContentSupplier: z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
retries: z.ZodNumber;
infinite: z.ZodBoolean;
message: z.ZodType, z.ZodTypeDef, Message>;
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>;
export type ArgumentPromptResponse = MessageSendResolvable | PromptContentSupplier;
export declare const ArgumentPromptResponse: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
retries: z.ZodNumber;
infinite: z.ZodBoolean;
message: z.ZodType, z.ZodTypeDef, Message>;
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>;
export type FailureData = {
phrase: string;
failure: null | Flag;
};
export declare const FailureData: z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>;
export type OtherwiseContentSupplier = (message: Message, data: FailureData) => SyncOrAsync;
export declare const OtherwiseContentSupplier: z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>;
export type PromptContentModifier = (this: Argument, message: Message, text: MessageSendResolvable | OtherwiseContentSupplier, data: ArgumentPromptData) => SyncOrAsync;
export declare const PromptContentModifier: z.ZodFunction, z.ZodTypeDef, Message>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>;
export type ArgumentPromptOptions = {
breakout?: boolean;
cancel?: ArgumentPromptResponse;
cancelWord?: string;
ended?: ArgumentPromptResponse;
infinite?: boolean;
limit?: number;
modifyCancel?: PromptContentModifier;
modifyEnded?: PromptContentModifier;
modifyRetry?: PromptContentModifier;
modifyStart?: PromptContentModifier;
modifyTimeout?: PromptContentModifier;
optional?: boolean;
retries?: number;
retry?: ArgumentPromptResponse;
start?: ArgumentPromptResponse;
stopWord?: string;
time?: number;
timeout?: ArgumentPromptResponse;
};
export declare const ArgumentPromptOptions: z.ZodObject<{
breakout: z.ZodOptional;
cancel: z.ZodOptional, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
retries: z.ZodNumber;
infinite: z.ZodBoolean;
message: z.ZodType, z.ZodTypeDef, Message>;
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>>;
cancelWord: z.ZodOptional;
ended: z.ZodOptional, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
retries: z.ZodNumber;
infinite: z.ZodBoolean;
message: z.ZodType, z.ZodTypeDef, Message>;
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}, {
message: Message;
failure: Flag | null;
phrase: string;
retries: number;
infinite: boolean;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>>;
infinite: z.ZodOptional;
limit: z.ZodOptional;
modifyCancel: z.ZodOptional, z.ZodTypeDef, Message>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>>;
modifyEnded: z.ZodOptional, z.ZodTypeDef, Message>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>>;
modifyRetry: z.ZodOptional, z.ZodTypeDef, Message>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>>;
modifyStart: z.ZodOptional, z.ZodTypeDef, Message>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>]>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord]>>]>>>;
modifyTimeout: z.ZodOptional, z.ZodTypeDef, Message>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodFunction, z.ZodTypeDef, Message>, z.ZodObject<{
phrase: z.ZodString;
failure: z.ZodNullable, z.ZodTypeDef, Flag>>;
}, "strip", z.ZodTypeAny, {
failure: Flag | null;
phrase: string;
}, {
failure: Flag | null;
phrase: string;
}>], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType, z.ZodRecord]>, z.ZodPromise, z.ZodRecord