Options
All
  • Public
  • Public/Protected
  • All
Menu

Module server/manager/command/handler

Index

Classes

Type aliases

Type aliases

Config: { argsDescription?: { help: string; name: string }[]; argsRequired?: boolean | number; caseInsensitive?: boolean; consoleOnly?: boolean; cooldown?: number; cooldownExclusions?: { userIDs?: number[] }; description?: string; requirements?: { userIDs?: number[]; custom?: any }; restricted?: boolean }
description

Set a configuration on a command

arg

description Description of a command

arg

argsDescription Description of every arguments required

arg

restricted If you want to limit your command with an ace permission automatically

arg

cooldown Cooldown of the command usage

arg

consoleOnly Whether if the command can only be used on the console

arg

requirements User requirements before using the command

arg

caseInsensitive Whether the command is case sensitive or not

arg

cooldownExclusions Set the cooldown bypass for some users or groups

example
{
description: "Set Weather Status",
argsDescription: [
{ name: "Weather Condition", help: "clear | rain | thunder" } // Argument 1
// Argument 2, 3, ...
]
}

Type declaration

  • Optional argsDescription?: { help: string; name: string }[]
  • Optional argsRequired?: boolean | number
  • Optional caseInsensitive?: boolean
  • Optional consoleOnly?: boolean
  • Optional cooldown?: number
  • Optional cooldownExclusions?: { userIDs?: number[] }
    • Optional userIDs?: number[]
  • Optional description?: string
  • Optional requirements?: { userIDs?: number[]; custom?: any }
  • Optional restricted?: boolean
Handler: (src: number, args: any[], raw: string) => any

Type declaration

    • (src: number, args: any[], raw: string): any
    • description

      A Handler to execute function when called.

      Parameters

      • src: number

        (Source) return the player id whose triggering it.

      • args: any[]

        (Arguments) return text after command in Array, example, if you're triggering the command like this "/hello all people", the arguments returns was ["all", "people"].

      • raw: string

        (Raw) return raw version of the command triggered.

      Returns any

Generated using TypeDoc