@kamuridesu/whatframework
Version:
A simple WhatsApp Bot Framework on top of Baileys
12 lines (11 loc) • 551 B
TypeScript
import { IMessage, IBot } from "../@types/types.js";
import { ICommands } from "../@types/commands.js";
export declare class CommandHandler {
private commands;
register(...commands: ICommands[]): void;
handle(command: string, bot: IBot, message: IMessage, args: string[]): void | Promise<void>;
getCommandDescription(bot: IBot, command: string): string;
getCommandsMenu(bot: IBot): string;
getCommandsByCategory(bot: IBot, category: string): string | null;
getHelp(bot: IBot, command: string | undefined): string | null;
}