import { Evogram } from '../Client'; import { CommandContext } from '../contexts'; import { Command } from './Command'; export type CommandInstance = new (client: Evogram) => Command; export declare class CommandManager { private client; private logger; constructor(client: Evogram); /** * Static array to store registered commands and their parameters. * @static */ static commands: CommandInstance[]; /** * Instance array to hold loaded Command objects. */ commands: Command[]; /** * Automatically imports command files with .command.ts extension from the root directory. * @param {string} [rootDir] - Root directory to search for command files. Defaults to process.cwd(). * @returns {Promise} Array of imported command constructors. */ static autoImportCommands(rootDir?: string): Promise; /** * Loads commands into the `commands` array for the current instance. * * If a list of `CommandInstance` constructors is provided, the method creates instances * of each command using the associated `Evogram` client. * If no list is provided, it uses the commands from the static registry (`CommandManager.commands`). * If autoImport is true, it will automatically import .command.ts files from the root directory. * * @param {CommandInstance[]} [commands] - An optional array of command constructors to load. * @param {boolean} [autoImport] - Whether to automatically import .command.ts files from root directory. */ loadCommands(commands?: CommandInstance[], autoImport?: boolean): Promise; /** Sets the bot commands for the client. */ setBotCommands(): Promise; /** * Gets a command from the list given a command context. * @param {CommandContext} context The command context to search for * @returns {(Command | undefined)} Returns the command or undefined if not found */ getCommand(context: CommandContext): Promise; getCommandByName(name: string): Command | undefined; static getCommandByName(name: string): Command | undefined; }