ChatBox

Hook Documentation for ChatBox Module.

Functions

MODULE:ChatAddText(text, ...)

Called to add text to the chat. This hook allows for customization of the text being added to the chat. It can be used to modify or format the text before it is displayed.

Parameters

  • text

    The initial text markup string.

  • ...

    Additional arguments containing the text elements to be added to the chat.

Returns

  • string

    The modified text markup string to be displayed in the chat.

MODULE:ChatTextChanged(text)

Called when the text in the chat input box changes. This hook allows for additional actions or modifications to be made whenever the chat input text changes.

Parameters

  • text String

    The current text in the chat input box.

MODULE:FinishChat()

Called when the chat input box is closed. This hook allows for any cleanup or additional actions to be performed when the chat input box is closed.

MODULE:OnChatReceived(client, message, chatType, anonymous)

Called after a player sends a chat message.

Parameters

  • client

    (Player) The player entity who sent the message.

  • message

    (string) The message sent by the player.

  • chatType

    (string) The type of chat message (e.g., "ic" for in-character, "ooc" for out-of-character).

  • anonymous

    (bool) Whether the message was sent anonymously (true) or not (false).

MODULE:PostPlayerSay(client, message, chatType, anonymous)

Called after a player sends a chat message.

Parameters

  • client Player

    The player entity who sent the message.

  • message String

    The message sent by the player.

  • chatType String

    The type of chat message (e.g., "ic" for in-character, "ooc" for out-of-character).

  • anonymous Boolean

    Whether the message was sent anonymously (true) or not (false).

MODULE:StartChat()

Called when the chat input box is opened. This hook allows for any setup or additional actions to be performed when the chat input box is opened.