nhandler
Version:
The easy to use, all-in-one command, event and component handler.
16 lines (15 loc) • 728 B
TypeScript
import { Event } from "../interfaces/Event";
import { BaseHandler } from "./BaseHandler";
export declare class EventHandler extends BaseHandler {
events: Event[];
register(...events: Event[]): EventHandler;
/**
* registerFromDir automatically loads files & creates class instances in the directory specified.
* If recurse is true, it will also load commands from subdirectories.
* Auto-load commands need to have a __default__ export. Otherwise they will be ignored.
* @param dir The directory to load files from.
* @param recurse Whether to load files from subdirectories.
* */
registerFromDir(dir: string, recurse?: boolean): EventHandler;
private static isInstanceOfEvent;
}