@pubby/sdk
Version:
Pubby Development Kit
27 lines (26 loc) • 914 B
TypeScript
import { Pubby } from "../../client";
import { Constructor } from "../../lib/types";
import { PubbyModule } from "../../module";
import { Command, CommandOptions } from "./command";
import { ParamsString } from "./params-string";
declare module "../../client" {
interface Pubby {
commands: CommandsModule;
}
}
interface CommandsModuleOptions {
prefix: string;
helpCommand: string | string[];
}
declare const $commands: unique symbol;
export declare class CommandsModule extends PubbyModule<CommandsModuleOptions> {
[$commands]: Map<string, Command<any>>;
params: ParamsString;
constructor(pubby: Pubby, options: CommandsModuleOptions);
init(): void;
private messageListener;
register<T extends object, R>(cmd: Constructor<Command<any>> | CommandOptions<T, R>): any;
get(command: string): Command<any>;
dispose(): void;
}
export {};