CommandBuilder

Constructor

new CommandBuilder(name)

The CommandBuilder class: allows you to simply generate a Command.

name

The name of the generated command

{String}
arrow_forward
No value returned
Example
  •           const kimiko = require("kimiko");
    
    let myCommand = new kimiko.CommandBuilder("josh:help")
      .setUsage("<command> [command]")
      .setDescription("Prints out all of the help you'd need to use my nice bot!")
      .setAliases("help", "joshelp")
      .setExecutor(require("commands/josh/help"))
      .build();
            

Methods

  • build() → {Command}

    Builds the CommandBuilder into a Command

    No arguments
    arrow_forward

    The built command

  • setAliases(…aliases) → {CommandBuilder}

    Sets the aliases for the command

    aliases
    {String}
    arrow_forward

    This CommandBuilder instance

  • setDescription(description) → {CommandBuilder}

    Sets the description for the command

    description
    {String}
    arrow_forward

    This CommandBuilder instance

  • setExecutor(executor) → {CommandBuilder}

    Sets the executor for the command

    executor
    arrow_forward

    This CommandBuilder instance

  • setPermissionRequired(permissionRequired) → {CommandBuilder}

    Sets the required permission for the command

    permissionRequired
    {String}
    arrow_forward

    This CommandBuilder instance

  • setTabCompleter(tabCompleter) → {CommandBuilder}

    Sets the tab completer for the command

    tabCompleter
    arrow_forward

    This CommandBuilder instance

  • setUsage(usage) → {CommandBuilder}

    Sets the usage for the command

    usage
    {String}
    arrow_forward

    This CommandBuilder instance

` : '' ?>