Constructors

  • Create a new command handler instance

    import { CommandHandler } from "@mengkodingan/ckptw";
    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
_fileToCommand: Map<string, { name: string; type: "command" | "hears" }>
_path: string
consolefy?: Consolefy

Methods

  • Parameters

    • filepath: string
    • isShowLog: boolean = true

    Returns Promise<void>