UNPKG

@guildedts/framework

Version:

A framework for creating a Guilded bot.

31 lines 1.01 kB
import { Command } from '../Command'; /** * Represents a command argument. * @example * class MyArgument extends Argument { * name = 'my-argument'; * } */ export declare abstract class Argument { readonly command: Command; /** The name of the argument. */ abstract name: string; /** The description of the argument. */ description?: string; /** Whether the argument is required. */ required: boolean; /** @param command The command the argument belongs to. */ constructor(command: Command); /** The usage of the argument. */ get usage(): string; /** * Validates the argument. * @param value The value of the argument. * @returns The validated value, or error. * @example argument.validate('hello'); // 'hello' */ validate(value: string): Promise<unknown>; } /** The constructor for a command argument. */ export declare type ArgumentConstructor = new (command: Command) => Argument; //# sourceMappingURL=Argument.d.ts.map