Skip to content
Version 2.32.0
↓ Get the launcher

IChat interface

Plugin-facing chat service. MessageReceived fires on the main (Unity) thread; Send is fire-and-forget — failures are logged, never thrown.

public interface IChat
name description
RecentMessages { get; } Most recent messages received since the last login (emptied at logout), in arrival order (capped by framework; exact cap may vary). The game’s client system notices (SystemLabel set) are capped SEPARATELY, so a burst of them never pushes real chat out; they still appear interleaved where they arrived.
event MessageReceived Fires on the Unity main thread each time a new chat message is received.
event SendResult Fires on the Unity main thread with the server’s reply to each chat send — accepted or refused (e.g. ErrorTooFrequent), with the channel’s new cooldown end.
Send(…) Sends text to the specified target channel. Fire-and-forget; failures are logged, never thrown. A send that never left the client (e.g. no live chat connection) raises SendResult with ErrorNotSent — before this returns, when called on the main thread.
SendSticker(…) Sends the picture-emoji / sticker identified by stickerConfigId (a ChatStickersTable config_id — see !:IGameAssets.GetSendableStickers) to target. Fire-and-forget; failures are logged, never thrown.
TryGetSendCooldown(…) Remaining SERVER-driven send cooldown on channel, from the last send reply’s cooldown end (sends through this service or the game’s own chat box) measured against the framework’s interpolated server clock. Returns false (0 s) when the channel is free or no cooldown has been seen yet — the server is still the authority, so a send can still be refused (watch SendResult for ErrorTooFrequent). Any thread.