Skip to content
M2O Scripting APIScripting reference
Global objectClient APIGenerated

Chat

const Chat: object

Defined in: client/api.d.ts:2530

Client chat transport and native chat-box controls.

close(): void

Closes the native chat input field without submitting its contents.

void

isOpen(): boolean

Checks whether the native chat input field is active.

boolean

True while chat is capturing keyboard input.

isUIVisible(): boolean

Checks whether the native chat overlay is visible.

boolean

True when the overlay is currently rendered.

open(): void

Opens and focuses the native chat input field.

void

send(text): void

Sends a chat line to the server, bypassing the chatSend event; incoming lines arrive through the reserved chatMessage event.

string

Player-authored chat text sent to the server.

void

setUIVisible(visible): void

Changes visibility of the native chat overlay without opening its input field.

boolean

Whether the chat overlay is rendered.

void