Skip to content
On this page

Athena.systems.messenger.messaging

Type Aliases

MessageCallback

Ƭ MessageCallback: (player: alt.Player, msg: string) => void

Type declaration

Usage

Athena.systems.messenger.messaging.(player, msg): void

Parameters
NameType
playeralt.Player
msgstring
Returns

void

Defined in

server/systems/messenger/messaging.ts:8

Variables

default

default: Object

Type declaration

NameType
addCallback(callback: MessageCallback) => any
cleanMessage(msg: string) => string
emit(player: Player, msg: string) => any
send(player: Player, msg: string) => any
sendToPlayers(players: Player[], msg: string) => any

Defined in

server/systems/messenger/messaging.ts:134

Functions

addCallback

Usage

Athena.systems.messenger.messaging.addCallback(callback): any

Register a callback that handles messages. The messages from other clients, and Athena itself will be pushed through all callbacks registered. Useful for plugin creators.

Parameters

NameType
callbackMessageCallback

Returns

any

Defined in

server/systems/messenger/messaging.ts:83


emit

Usage

Athena.systems.messenger.messaging.emit(player, msg): any

Emits a message to all callbacks.

Parameters

NameType
playerPlayer
msgstring

Returns

any

Defined in

server/systems/messenger/messaging.ts:96


override

Usage

Athena.systems.messenger.messaging.override(functionName, callback): any

Used to override messaging functionality

Parameters

NameType
functionName"addCallback"
callback(callback: MessageCallback) => any

Returns

any

Defined in

server/systems/messenger/messaging.ts:146

Usage

Athena.systems.messenger.messaging.override(functionName, callback): any

Used to override messaging functionality

Parameters

NameType
functionName"cleanMessage"
callback(msg: string) => string

Returns

any

Defined in

server/systems/messenger/messaging.ts:147

Usage

Athena.systems.messenger.messaging.override(functionName, callback): any

Used to override messaging functionality

Parameters

NameType
functionName"emit"
callback(player: Player, msg: string) => any

Returns

any

Defined in

server/systems/messenger/messaging.ts:148

Usage

Athena.systems.messenger.messaging.override(functionName, callback): any

Used to override messaging functionality

Parameters

NameType
functionName"send"
callback(player: Player, msg: string) => any

Returns

any

Defined in

server/systems/messenger/messaging.ts:149

Usage

Athena.systems.messenger.messaging.override(functionName, callback): any

Used to override messaging functionality

Parameters

NameType
functionName"sendToPlayers"
callback(players: Player[], msg: string) => any

Returns

any

Defined in

server/systems/messenger/messaging.ts:150


send

Usage

Athena.systems.messenger.messaging.send(player, msg): any

Send a message to an individual player.

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
msgstring

Returns

any

Defined in

server/systems/messenger/messaging.ts:54


sendToPlayers

Usage

Athena.systems.messenger.messaging.sendToPlayers(players, msg): any

Send a message to a group of players.

Parameters

NameType
playersPlayer[]
msgstring

Returns

any

Defined in

server/systems/messenger/messaging.ts:68

Created by Stuyk | Est. 2020