Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectClient APIGenerated

Chat

const Chat: object

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

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. 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.

boolean

Whether the chat overlay is rendered.

void