Class CommandHandler

Hierarchy

  • CommandHandler

Constructors

Properties

Methods

Constructors

  • 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();

    Parameters

    • bot: any

      The bot instance

    • path: string

      A string that represent a path to commands directory. Recomended using path library.

      import path from "path";
      const cmd = new CommandHandler(bot, path.resolve() + '/path/to/dir');

    Returns CommandHandler

Properties

_bot: any
_path: string

Methods

Generated using TypeDoc