TwurpleAuthenticationGetting dataExamplesFAQMigration

parseChatMessage

Definition

parseChatMessage(text, emoteOffsets, cheermoteNames)

Parse a chat message with emotes and optionally cheermotes.

ParameterTypeRequiredDefaultDescription
textstringnone

The message text.

emoteOffsetsMap<string, string[]>none

The emote offsets. An emote name maps to a list of text ranges.

cheermoteNamesstring[]none

The names of the cheermotes to find. Will not do cheermote parsing if not given.

Return type: ParsedMessagePart[]