Create a new command handler instance
import { CommandHandler } from "whasapi";import path from "path";const cmd = new CommandHandler(bot, path.resolve() + '/path/to/dir');cmd.load(); Copy
import { CommandHandler } from "whasapi";import path from "path";const cmd = new CommandHandler(bot, path.resolve() + '/path/to/dir');cmd.load();
The bot instance
A string that represent a path to commands directory. Recomended using path library.
path
import path from "path";const cmd = new CommandHandler(bot, path.resolve() + '/path/to/dir'); Copy
import path from "path";const cmd = new CommandHandler(bot, path.resolve() + '/path/to/dir');
Generated using TypeDoc
Create a new command handler instance