Chat
constChat:object
Defined in: client/api.d.ts:5029
Client chat transport and native chat-box controls.
Type Declaration
Section titled “Type Declaration”close()
Section titled “close()”close():
void
Closes the native chat input field without submitting its contents.
Returns
Section titled “Returns”void
isOpen()
Section titled “isOpen()”isOpen():
boolean
Checks whether the native chat input field is active.
Returns
Section titled “Returns”boolean
True while chat is capturing keyboard input.
isUIVisible()
Section titled “isUIVisible()”isUIVisible():
boolean
Checks whether the native chat overlay is visible.
Returns
Section titled “Returns”boolean
True when the overlay is currently rendered.
open()
Section titled “open()”open():
void
Opens and focuses the native chat input field.
Returns
Section titled “Returns”void
send()
Section titled “send()”send(
text):void
Sends a chat line to the server, bypassing the chatSend event; incoming lines arrive through the reserved chatMessage event.
Parameters
Section titled “Parameters”string
Player-authored chat text sent to the server.
Returns
Section titled “Returns”void
setUIVisible()
Section titled “setUIVisible()”setUIVisible(
visible):void
Changes visibility of the native chat overlay without opening its input field. Hidden, the overlay also stops opening on its key. The choice holds for the rest of the session and resets to visible on disconnect, so a resource that replaces the chat calls this once at startup.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
Whether the chat overlay is rendered.
Returns
Section titled “Returns”void