We use cookies on this site to enhance your user experience

Lua Chat System — Server API — ChatMessage

Lua Chat System — Server API — ChatMessage

Oct 23 2019, 12:58 PM PST 10 min

< Return to Lua Chat System

A ChatMessage is a data structure representing a message sent from a ChatSpeaker. It contains data about the message, including the length of the text, whether the text has been filtered by Roblox, and extra data about the message’s appearance.



  • Type: int
  • Description: A unique numerical identifier for the message.



  • Type: string
  • Description: The name of the ChatChannel from which the message originated.


  • Type: bool
  • Description: Describes whether the message is filtered by Roblox (if true, Message will be nil)


  • Type: int
  • Description: The length of the message. You can use this to generate a hashed-out string if the message was filtered.


  • Type: string or nil
  • Description: The text of the message. This property will be nil if IsFiltered is true.


  • Type: string
  • Description: The type of the message. These types are described in the ChatConstants module:
  • Possible values: "Message", "System", "MeCommand", "Welcome", "SetCore", "Whisper"


  • Type: int
  • Description: A timestamp; the value of os.time() at the time of the message’s creation.


  • Type: dictionary<string, Variant>
  • Description: A dictionary of metadata for this message. This is used to alter the appearance of the message. The following keys may be present: