nestwhats
Version:
A whatsapp-web.js wrapper for NestJS to create WhatsApp bots
15 lines (14 loc) • 579 B
TypeScript
import { CommandDiscovery } from "./command.discovery";
export declare class CommandsRegistryService {
private readonly logger;
readonly cache: Map<string, CommandDiscovery>;
readonly prefixCache: Map<string, Map<string, CommandDiscovery>>;
add(command: CommandDiscovery): void;
private addToCache;
private addToPrefixCache;
getAll(): CommandDiscovery[];
get(name: string): CommandDiscovery;
getByPrefix(prefix: string, name: string): CommandDiscovery;
remove(name: string): void;
removeByPrefix(prefix: string, name: string): void;
}