A registered command.

Type Parameters

Constructors

Properties

"#execute": (
    player: Globals.modules.cmds.executeCommandPlayerW,
    event: ChatSendBeforeEvent,
) => CommandResponse

The callback function of the command.

This function will be called in read-only mode.

Type declaration

If the command throws an error.

"#requiredTags": string[]

The tags required to execute the command.

Only applies when Ultra Security Mode is disabled.

[]
"#ultraSecurityModeSecurityLevel":
    | "WorldEdit"
    | "owner"
    | "headAdmin"
    | "admin"
    | "moderator"
    | "everyone" = "everyone"

The ultra security mode security level required to execute the command.

Only applies when Ultra Security Mode is enabled.

"everyone"
accessType: CommandType["accessType"]

The type of access to the command.

The aliases of the command.

[]
categories: commandCategory[]

The categories of the command.

[]
command_version: string

The version of the command.

"1.0.0"
commandData: CommandType

The data of the command.

commandName: CommandType extends NameAccessibleCommandType
    ? string
    : CommandType extends RegExpAccessibleCommandType
        ? undefined
        : undefined
        | string

The name used to access the command.

This is only defined if the accessType is named.

commands_format_version: string = commands_format_version

The commands format version that the custom command was created in.

commands_format_version
commandSettingsId?: string

The ID of the dynamic property that holds the command settings.

customPrefix: undefined | string

The custom prefix of the command.

deprecated: boolean

Whether or not the command is deprecated.

false
description: string

The description of the command.

"Description Missing"
enabled: boolean

Whether or not the command is enabled.

true
flagsDocs: undefined | string

The documentation on the flags parameters of the command.

formatting_code: string = "§f"

The formatting code to display the command with.

"§f"
functional: boolean

Whether or not the command is functional.

true
hidden: boolean

Whether or not the command is hidden.

false
id: string

The ID of the command.

name: string

The name of the command.

regexp: CommandType extends NameAccessibleCommandType
    ? undefined
    : CommandType extends RegExpAccessibleCommandType
        ? RegExp
        : undefined
        | RegExp

The regular expression used to access the command.

This is only defined if the accessType is regexp.

syntax: string

The syntax of the command.

"Syntax Missing"
type: "built-in" | "custom" | "unknown"

The type of command.

Accessors

  • get defaultRequiredTags(): string[]

    The tags required to execute the command.

    Only applies when Ultra Security Mode is disabled.

    Returns string[]

    []
    
  • get ultraSecurityModeSecurityLevel(): | "WorldEdit"
    | "owner"
    | "headAdmin"
    | "admin"
    | "moderator"
    | "everyone"

    The ultra security mode security level required to execute the command.

    Only applies when Ultra Security Mode is enabled.

    • owner: Only the owner or people with the andexdb.fullControl or andexdb.useOwnerLevelCommands permissions can execute the command.
    • headAdmin: Only players with the andexdb.headAdmin or andexdb.useHeadAdminLevelCommands permissions can execute the command.
    • admin: Only players with the andexdb.admin or andexdb.useAdminLevelCommands permissions can execute the command.
    • moderator: Only players with the andexdb.moderator or andexdb.useModeratorLevelCommands permissions can execute the command.
    • WorldEdit: Only players with the andexdb.WorldEdit permission can execute the command.
    • everyone: Everyone can execute the command.

    Returns "WorldEdit" | "owner" | "headAdmin" | "admin" | "moderator" | "everyone"

    "everyone"
    

Methods

  • Checks if the player can execute the command.

    Parameters

    Returns boolean

    True if the player can execute the command, false otherwise.

    Finish the method.

  • Unregisters the command.

    Returns void