Chat
constChat:object
Defined in: server/api.d.ts:4050
Server-side delivery of structured chat messages to connected clients.
Type Declaration
Section titled “Type Declaration”sendToAll()
Section titled “sendToAll()”sendToAll(
text,options?):void
Broadcasts a structured chat message to all clients.
Parameters
Section titled “Parameters”string
Message body broadcast to every connected client.
options?
Section titled “options?”Optional author label and color: a Color or a packed 0xRRGGBBAA integer.
author?
Section titled “author?”string
color?
Section titled “color?”number | Color
Returns
Section titled “Returns”void
sendToPlayer()
Section titled “sendToPlayer()”sendToPlayer(
player,text,options?):void
Sends a structured chat message to one player’s owning connection.
Parameters
Section titled “Parameters”player
Section titled “player”Player-owned entity identifying the destination connection.
string
Message body sent to the player.
options?
Section titled “options?”Optional author label and color: a Color or a packed 0xRRGGBBAA integer.
author?
Section titled “author?”string
color?
Section titled “color?”number | Color
Returns
Section titled “Returns”void