@guildedts/framework
Version:
A framework for creating a Guilded bot.
26 lines • 793 B
TypeScript
import { Argument } from './Argument';
/**
* Represents a string command argument.
* @example
* class MyArgument extends StringArgument {
* name = 'my-argument';
* }
*/
export declare abstract class StringArgument extends Argument {
/** The default value of the argument. */
default?: string;
/** The choices of the argument. */
choices: string[];
/** The max size of the argument. */
max?: number;
/** The min size of the argument. */
min?: number;
/**
* Validates the string argument.
* @param value The value of the argument.
* @returns The validated value, or error.
* @example stringArgument.validate('hello'); // 'hello'
*/
validate(value: string): Promise<string>;
}
//# sourceMappingURL=StringArgument.d.ts.map