getId
getId: (MessageNode) -> numberThe message's id: what client:getMessages():get(id) finds it by, and what the chat-build script callbacks pass as its uid.
client:addChatMessage(…)
client:getMessages():get(…)| Method | Returns | Description |
|---|---|---|
getId() | number | The message's id: what client:getMessages():get(id) finds it by, and what the chat-build script callbacks pass as its uid. |
getType() | ChatMessageType | The message's type: CLAN_GIM_CHAT / CLAN_GIM_MESSAGE for a line of your group-ironman channel (the game stores those as clan lines whos… |
getName() | string | The name of the player that sent it, as received: icon tags (<img=N>) and no-break spaces included; "" for a game message. |
setName(string?) | () | Set the name the chatbox shows; the line's right-click options act on the new name too (the game's username is rebuilt from it). |
getSender() | string? | The friends-chat or clan channel it came through, or nil outside one. |
setSender(string?) | () | Set the channel the chatbox shows; nil clears it. |
getValue() | string | The message's text, tags included (a group-ironman line's without the | the game stores before it). |
setValue(string?) | () | Set the message's text (the chatbox's display text is rebuilt from it); a group-ironman line keeps its |. |
getClientFormatMessage() | string? | The client format that replaces the text when the chatbox builds the line (<colNORMAL>, <colHIGHLIGHT> resolved for the chat type and t… |
setClientFormatMessage(string?) | () | Set the client format the chatbox shows in place of the text; nil shows the text again. |
getTimestamp() | number | When it was added, in seconds since the Unix epoch. A message added before Bento attached answers the game's own minute stamp. |
setTimestamp(number) | () | Set its timestamp (seconds since the Unix epoch). |
| Method | Returns | Description |
|---|---|---|
ChatLineBuffer.getLines | {MessageNode} | The lines, newest first. A buffer has 100 slots; this array holds only the getLength() lines in use, and lines[k] past them is nil (`… |
ChatMessage.getMessageNode | MessageNode? | The message in the chatbox: edit it with setValue, setName, setClientFormatMessage. nil for a message the differ reported. |
ChatMessageTable.get | MessageNode? | The message with id id, or nil: what the chat-build script callbacks' uid names. |
Client.addChatMessage | MessageNode | (Client, ChatMessageType, string, string, string?) -> MessageNode: Add a line to the chatbox through the client's own message add (a `Cha… |
getIdgetId: (MessageNode) -> numberThe message's id: what client:getMessages():get(id) finds it by, and what the chat-build script callbacks pass as its uid.
getTypegetType: (MessageNode) -> ChatMessageTypeThe message's type: CLAN_GIM_CHAT / CLAN_GIM_MESSAGE for a line of your group-ironman channel (the game stores those as clan lines whose text starts with |).
getNamegetName: (MessageNode) -> stringThe name of the player that sent it, as received: icon tags (<img=N>) and no-break spaces included; "" for a game message.
setNamesetName: (MessageNode, string?) -> ()Set the name the chatbox shows; the line's right-click options act on the new name too (the game's username is rebuilt from it).
getSendergetSender: (MessageNode) -> string?The friends-chat or clan channel it came through, or nil outside one.
setSendersetSender: (MessageNode, string?) -> ()Set the channel the chatbox shows; nil clears it.
getValuegetValue: (MessageNode) -> stringThe message's text, tags included (a group-ironman line's without the | the game stores before it).
setValuesetValue: (MessageNode, string?) -> ()Set the message's text (the chatbox's display text is rebuilt from it); a group-ironman line keeps its |.
getClientFormatMessagegetClientFormatMessage: (MessageNode) -> string?The client format that replaces the text when the chatbox builds the line (<colNORMAL>, <colHIGHLIGHT> resolved for the chat type and the chatbox's transparency), or nil. Messages queued with clientFormattedMessage carry one.
setClientFormatMessagesetClientFormatMessage: (MessageNode, string?) -> ()Set the client format the chatbox shows in place of the text; nil shows the text again.
getTimestampgetTimestamp: (MessageNode) -> numberWhen it was added, in seconds since the Unix epoch. A message added before Bento attached answers the game's own minute stamp.
setTimestampsetTimestamp: (MessageNode, number) -> ()Set its timestamp (seconds since the Unix epoch).