Skip to content

Chat

This page documents hooks in the chat category.


ChatAddText(text)View Source

Purpose

Allows modules to adjust the opening markup prefix used when the custom chatbox builds a rendered message from chat arguments.

Category

Chat

Realm

Client

Parameters

string text The current opening markup prefix that will be prepended before chat arguments are converted into markup.

Returns

string|nil Return a markup prefix string to replace the default opening markup. Return nil to keep the current prefix.

Example Usage

  hook.Add("ChatAddText", "liaExampleChatAddText", function(text, ...)
      return "<font=LiliaFont.24>"
  end)

ChatboxPanelCreated(panel)View Source

Purpose

Runs immediately after the custom chatbox panel is created so modules can attach post-creation behavior before persisted messages are replayed.

Category

Chat

Realm

Client

Parameters

Panel panel The newly created `liaChatBox` panel instance.

Example Usage

  hook.Add("ChatboxPanelCreated", "liaExampleChatboxPanelCreated", function(panel)
      panel:SetAlpha(255)
  end)

CreateChatboxPanel()View Source

Purpose

Ensures the custom chatbox panel exists so persisted messages, message-mode input, and chat synchronization can target a live UI panel.

Category

Chat

Realm

Client

Example Usage

  hook.Add("CreateChatboxPanel", "liaExampleCreateChatboxPanel", function()
      print("Chatbox creation requested")
  end)