Skip to content
On this page

AthenaClient.systems.messenger

Type Aliases

HistoryCallback

Ƭ HistoryCallback: (msgs: MessageInfo[]) => void

Type declaration

Usage

AthenaClient.systems.messenger.(msgs): void

Parameters
NameType
msgsMessageInfo[]
Returns

void

Defined in

client/systems/messenger.ts:9


MessageCallback

Ƭ MessageCallback: (msg: string) => void

Type declaration

Usage

AthenaClient.systems.messenger.(msg): void

Parameters
NameType
msgstring
Returns

void

Defined in

client/systems/messenger.ts:8


MessageInfo

Ƭ MessageInfo: Object

Type declaration

NameType
msgstring
timestampnumber

Defined in

client/systems/messenger.ts:7

Functions

emit

Usage

AthenaClient.systems.messenger.emit(msg): void

Emits a message to all callbacks.

Parameters

NameType
msgstring

Returns

void

Defined in

client/systems/messenger.ts:43


getCommands

Usage

AthenaClient.systems.messenger.getCommands(): Omit<player<alt.Player>, "callback">[]

Get the commands that this client has permission for.

Returns

Omit<player<alt.Player>, "callback">[]

Defined in

client/systems/messenger.ts:101


getHistory

Usage

AthenaClient.systems.messenger.getHistory(): { msg: string ; timestamp: number }[]

Return current chat history. Newest message is always first element in array.

Returns

{ msg: string ; timestamp: number }[]

Defined in

client/systems/messenger.ts:71


registerHistoryCallback

Usage

AthenaClient.systems.messenger.registerHistoryCallback(callback): void

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
callbackHistoryCallback

Returns

void

Defined in

client/systems/messenger.ts:34


registerMessageCallback

Usage

AthenaClient.systems.messenger.registerMessageCallback(callback): void

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

void

Defined in

client/systems/messenger.ts:23


send

Usage

AthenaClient.systems.messenger.send(msg): void

Takes a message, or command and processes it from an input. Commands must start with a forward slash. Such as '/'.

Parameters

NameType
msgstring

Returns

void

Defined in

client/systems/messenger.ts:81


setCommands

Usage

AthenaClient.systems.messenger.setCommands(_commands): void

Populates the local command list for the client. Which can be used to

Parameters

NameType
_commandsOmit<MessageCommand<Player>, "callback">[]

Returns

void

Defined in

client/systems/messenger.ts:91

Created by Stuyk | Est. 2020