Skip to content
On this page

Athena.systems.messenger.commands

Variables

default

default: Object

Type declaration

NameType
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

NameTypeDescription
playerPlayerAn alt:V Player Entity
commandNamestring
argsany[]

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

NameType
commandNamestring

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

NameTypeDescription
playerPlayerAn 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

NameType
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

NameType
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

NameType
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

NameType
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

NameType
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

NameTypeDescription
playerPlayerAn 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

NameTypeDefault value
namestringundefined
descstringundefined
permsstring[]undefined
callbackCommandCallback<Player>undefined
isCharacterPermissionbooleanfalse

Returns

any

Defined in

server/systems/messenger/commands.ts:59

Created by Stuyk | Est. 2020