PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Lua Chat System — Server API — ChatMessage

Lua Chat System — Server API — ChatMessage

Oct 31 2018, 12:07 AM 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.

Properties

ID

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

FromSpeaker

OriginalChannel

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

IsFiltered

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

MessageLength

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

Message

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

MessageType

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

Time

  • Type: int
  • Description: A timestamp; the value of [os.time()][/articles/Built-in-Functions-and-Variables/Lua] at the time of the message’s creation.

ExtraData

  • 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: