detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
30 lines (29 loc) • 754 B
TypeScript
import { CommandAttributes } from '../commandclient';
import { Argument, ArgumentOptions } from './argument';
import { Context } from './context';
/**
* @category Command
*/
export declare type ParsedArgs = {
[key: string]: any;
} | any;
/**
* @category Command
*/
export declare type ParsedErrors = {
[key: string]: Error;
} | any;
/**
* Command Argument
* @category Command
*/
export declare class ArgumentParser {
readonly args: Array<Argument>;
positional: boolean;
constructor(args?: Array<ArgumentOptions>, positional?: boolean);
initialize(args?: Array<ArgumentOptions>): void;
parse(attributes: CommandAttributes, context: Context): Promise<{
errors: ParsedErrors;
parsed: ParsedArgs;
}>;
}