ChatMessage

Methods
12
Fields
1

Methods

MethodReturnsDescription
getMessageNode()MessageNode?The message in the chatbox: edit it with setValue, setName, setClientFormatMessage. nil for a message the differ reported.
getType()ChatMessageTypeThe message's type: CLAN_GIM_CHAT / CLAN_GIM_MESSAGE for a line of your group-ironman channel.
getName()stringThe sender's name as received (icon tags included), "" for a game message.
getMessage()stringThe message's text (a group-ironman line's without the | the game stores before it).
getSender()string?The friends-chat or clan channel it came through, or nil.
getTimestamp()numberWhen it was added, in seconds since the Unix epoch.
setMessageNode(MessageNode?)()Set the node later subscribers read (not the chatbox).
setType(ChatMessageType)()Set the type later subscribers read.
setName(string?)()Set the name later subscribers read.
setMessage(string?)()Set the text later subscribers read (the chatbox keeps its own: use the node's setValue for that).
setSender(string?)()Set the channel later subscribers read.
setTimestamp(number)()Set the timestamp later subscribers read.

Fields

FieldTypeDescription
__eventClassstring"ChatMessage": the class's name, which host APIs that take the class itself read.

Method details

getMessageNode

getMessageNode: (ChatMessage) -> MessageNode?

The message in the chatbox: edit it with setValue, setName, setClientFormatMessage. nil for a message the differ reported.

getName

getName: (ChatMessage) -> string

The sender's name as received (icon tags included), "" for a game message.

getMessage

getMessage: (ChatMessage) -> string

The message's text (a group-ironman line's without the | the game stores before it).

getSender

getSender: (ChatMessage) -> string?

The friends-chat or clan channel it came through, or nil.

setMessage

setMessage: (ChatMessage, string?) -> ()

Set the text later subscribers read (the chatbox keeps its own: use the node's setValue for that).