Athena.systems.messenger.commands ​
Variables ​
default ​
• default: Object
Type declaration ​
Name | Type |
---|---|
execute | (player : Player , commandName : string , args : any []) => any |
get | (commandName : string ) => any |
getCommands | (player : Player ) => player [] |
populateCommands | (player : Player ) => any |
register | (name : string , desc : string , perms : string [], callback : CommandCallback <Player >, isCharacterPermission : boolean ) => any |
Defined in ​
server/systems/messenger/commands.ts:176
Functions ​
execute ​
Usage
Athena.systems.messenger.commands.execute(player
, commandName
, args
): any
Used to execute a command by name.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
commandName | string | |
args | any [] |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:19
get ​
Usage
Athena.systems.messenger.commands.get(commandName
): any
Get command information by command name.
Parameters ​
Name | Type |
---|---|
commandName | string |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:46
getCommands ​
Usage
Athena.systems.messenger.commands.getCommands(player
): player
[]
Get all commands the player has access to. Includes names of individual parameters for each callback function as well. Excludes callbacks.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
Returns ​
player
[]
Defined in ​
server/systems/messenger/commands.ts:135
override ​
Usage
Athena.systems.messenger.commands.override(functionName
, callback
): any
Used to override command functionality
Parameters ​
Name | Type |
---|---|
functionName | "execute" |
callback | (player : Player , commandName : string , args : any []) => any |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:188
Usage
Athena.systems.messenger.commands.override(functionName
, callback
): any
Used to override command functionality
Parameters ​
Name | Type |
---|---|
functionName | "get" |
callback | (commandName : string ) => any |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:189
Usage
Athena.systems.messenger.commands.override(functionName
, callback
): any
Used to override command functionality
Parameters ​
Name | Type |
---|---|
functionName | "getCommands" |
callback | (player : Player ) => player [] |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:190
Usage
Athena.systems.messenger.commands.override(functionName
, callback
): any
Used to override command functionality
Parameters ​
Name | Type |
---|---|
functionName | "populateCommands" |
callback | (player : Player ) => any |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:191
Usage
Athena.systems.messenger.commands.override(functionName
, callback
): any
Used to override command functionality
Parameters ​
Name | Type |
---|---|
functionName | "register" |
callback | (name : string , desc : string , perms : string [], callback : CommandCallback <Player >, isCharacterPermission : boolean ) => any |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:192
populateCommands ​
Usage
Athena.systems.messenger.commands.populateCommands(player
): any
Get all commands that are associated with a player's current permission level.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
Returns ​
any
Defined in ​
server/systems/messenger/commands.ts:94
register ​
Usage
Athena.systems.messenger.commands.register(name
, desc
, perms
, callback
, isCharacterPermission?
): any
Register a new command that can be called.
Parameters ​
Name | Type | Default value |
---|---|---|
name | string | undefined |
desc | string | undefined |
perms | string [] | undefined |
callback | CommandCallback <Player > | undefined |
isCharacterPermission | boolean | false |
Returns ​
any