Skip to content

Latest commit

 

History

History
114 lines (64 loc) · 4.16 KB

File metadata and controls

114 lines (64 loc) · 4.16 KB

Latite Scripting Documentation (Exports)


Exports > latite > Latite

Latite

Interface

Source: latite.d.ts:249

Properties

version

readonly version: string

The Latite Client version. Example: "v2.0.0"

Source: latite.d.ts:284

Methods

getCommandManager()

getCommandManager(): CommandManager

Gets the command manager. Use this to register commands.

Source: latite.d.ts:279

Returns

CommandManager

getModuleManager()

getModuleManager(): ModuleManager

Gets the module manager. Use this to register modules.

Source: latite.d.ts:274

Returns

ModuleManager

on()

on<K>( eventName: K, listener: Function, priority?: number): void

Listens to a client-side event.

Source: latite.d.ts:256

Type parameters

Parameter
K extends keyof ClientEvents

Parameters

Parameter Type Description
eventName K The event to listen to
listener (event: ClientEvents[K]) => void The event callback
priority? number Positive or negative integer. The priority in which the event listener should have over other events globally. The default is 0. Greater = called first, less = called later.

Returns

void

runCommand()

runCommand(cmd: string): boolean

Runs a Latite command.

Source: latite.d.ts:269

Parameters

Parameter Type Description
cmd string The command to run. Do not add the prefix (.)

Returns

boolean

The success of the command.

showNotification()

showNotification(notif: string): void

Shows a Latite toast on the top of the screen.

Source: latite.d.ts:262

Parameters

Parameter Type Description
notif string The notification to show.

Returns

void