Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CommandManager

Index

Methods

Methods

  • register(source: number, name: string | string[], handler: Handler, config?: Config, isClientCommand?: boolean): boolean
  • description

    Registrating a command. If isClientCommand was set true, the handler would just triggering a client registered command

    example
    registerCommand(
    'hello',
    (src, args) => console.log('Hello!'),
    {
    description: "Say Hello"
    }
    });

    Parameters

    • source: number
    • name: string | string[]

      Name of the command

    • handler: Handler

      Function to executed

    • config: Config = {}

      Configuration of the command

    • isClientCommand: boolean = false

      Whether if the command was sent from client or not

    Returns boolean

Generated using TypeDoc