@jadl/cmd
Version:
A command handler for JADL
23 lines (22 loc) • 898 B
TypeScript
import { BaseSymbols } from '../utils/Decorators';
export declare class CommandFactory {
commands: BaseSymbols[];
static commandToJson(cmd: BaseSymbols): {
name: string;
aliases: string[];
interaction: import("discord-api-types/v9").RESTPostAPIApplicationCommandsJSONBody;
commands: {
name: string | symbol;
canRun: string[];
onRun: import("../utils/Decorators").RunningFunction<void>[];
params: import("../utils/Decorators").ParamResolver[];
interactionOptions?: import("discord-api-types/v9").APIApplicationCommandOption[] | undefined;
indexToOption: {
[key: number]: string;
};
method: string;
}[];
};
constructor(commands: Array<new () => any>);
findCommand(name: string): BaseSymbols | undefined;
}