Options
All
  • Public
  • Public/Protected
  • All
Menu

Object returned by Commands.create used to describe a custom chat command, and then call its register method to register the command.

since

3.0

Hierarchy

  • CustomCommandBuilder

Index

Methods

  • Adds new overload of the following command.

    since

    3.0

    Parameters

    • args: Arguments[]

      list of argument descriptions of this overload

    • callback: ExecuteCallback

      function that will be called for the following command with given arguments

    Returns CustomCommandBuilder

    reference to itself to be used in sequential calls

  • register(): void
  • Registers the command after specifying all its needed data (overloads, description translations etc.)

    since

    3.0

    Returns void

  • Specifies command's description, that will be displayed above the chat input box when writing /your_command_name. In this overload, the given description is set as the English localization, which will be used by default if you don't add translations to other languages.

    since

    3.0

    Parameters

    • desc: string

    Returns CustomCommandBuilder

    reference to itself to be used in sequential calls

  • Specifies command's description, that will be displayed above the chat input box when writing /your_command_name.

    since

    3.0

    Parameters

    • translations: {}

      object with language codes as keys and translations of the command description to the corresponding language as values

      • [key: string]: string

    Returns CustomCommandBuilder

    reference to itself to be used in sequential calls

Generated using TypeDoc