twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks

TwitchPrivateMessage

An IRC PRIVMSG, with easy accessors for commonly used data from its tags.

Overview

Properties

bits

Type: number

The number of bits cheered with the message.

channelId

Type: string | null

The ID of the channel the message is in.

emoteOffsets

Type: Map<string, Array<string>>

The offsets of emote usages in the message.

id

Type: string

The ID of the message.

isCheer

Type: boolean

Whether the message is a cheer.

totalBits

Type: number

Deprecated.

Use TwitchPrivateMessage#bits instead.

The number of bits cheered with the message.

userInfo

Type: ChatUser

Info about the user that send the message, like their user ID and their status in the current channel.

Methods

parseEmotes()

Parses the message, separating text from emote usages.

Return type: Array<>

parseEmotesAndBits(cheermotes)

Parses the message, separating text from emote usages and cheers.

ParameterTypeRequiredDefaultDescription
cheermotesCheermoteListnone

A list of cheermotes

Return type: Array<>