Skip to content

@mastondzn/dank-twitch-irc / PrivmsgMessage

Class: PrivmsgMessage

Extends

Implements

Constructors

new PrivmsgMessage(ircMessage)

new PrivmsgMessage(ircMessage): PrivmsgMessage

Parameters

ircMessage: IRCMessage

Returns

PrivmsgMessage

Overrides

ChannelIRCMessage.constructor

Source

src/message/twitch-types/privmsg.ts:119

Properties

badgeInfo

readonly badgeInfo: TwitchBadgesList

Implementation of

PrivmsgUserState.badgeInfo

Source

src/message/twitch-types/privmsg.ts:62


badgeInfoRaw

readonly badgeInfoRaw: string

Implementation of

PrivmsgUserState.badgeInfoRaw

Source

src/message/twitch-types/privmsg.ts:63


badges

readonly badges: TwitchBadgesList

Implementation of

PrivmsgUserState.badges

Source

src/message/twitch-types/privmsg.ts:65


badgesRaw

readonly badgesRaw: string

Implementation of

PrivmsgUserState.badgesRaw

Source

src/message/twitch-types/privmsg.ts:66


bits

readonly bits: undefined | number

Source

src/message/twitch-types/privmsg.ts:68


bitsRaw

readonly bitsRaw: undefined | string

Source

src/message/twitch-types/privmsg.ts:69


channelID

readonly channelID: string

Source

src/message/twitch-types/privmsg.ts:114


channelName

readonly channelName: string

Inherited from

ChannelIRCMessage.channelName

Source

src/message/irc/channel-irc-message.ts:35


color

readonly color: undefined | Color

Implementation of

PrivmsgUserState.color

Source

src/message/twitch-types/privmsg.ts:71


colorRaw

readonly colorRaw: string

Implementation of

PrivmsgUserState.colorRaw

Source

src/message/twitch-types/privmsg.ts:72


displayName

readonly displayName: string

Implementation of

PrivmsgUserState.displayName

Source

src/message/twitch-types/privmsg.ts:74


emotes

readonly emotes: TwitchEmoteList

Source

src/message/twitch-types/privmsg.ts:76


emotesRaw

readonly emotesRaw: string

Source

src/message/twitch-types/privmsg.ts:77


flags

readonly flags: undefined | TwitchFlagList

Can be an array of Twitch AutoMod flagged words, for use in moderation and/or filtering purposes.

If the flags tag is missing or of a unparseable format, this will be undefined. This is unlike most other attributes which when missing or malformed will fail the message parsing. However since this attribute is completely undocumented we cannot rely on the flags tag being stable, so this soft fallback is used instead. While it will be a major version release if this attribute changes format in dank-twitch-irc, using this is still at your own risk since it may suddenly contain unexpected data or turn undefined one day as Twitch changes something. In short: Use at your own risk and make sure your implementation can handle the case where this is undefined.

Source

src/message/twitch-types/privmsg.ts:90


flagsRaw

readonly flagsRaw: undefined | string

Twitch AutoMod raw flags string.

If the flags tag is missing or of a unparseable format, this will be undefined. This is unlike most other attributes which when missing or malformed will fail the message parsing. However since this attribute is completely undocumented we cannot rely on the flags tag being stable, so this soft fallback is used instead. In short, ensure your implementation can handle the case where this is undefined or is in a format you don't expect.

Source

src/message/twitch-types/privmsg.ts:101


ircCommand

readonly ircCommand: string

The parser ensures this is always uppercase

Inherited from

ChannelIRCMessage.ircCommand

Source

src/message/irc/irc-message.ts:28


ircParameters

readonly ircParameters: string[]

Inherited from

ChannelIRCMessage.ircParameters

Source

src/message/irc/irc-message.ts:29


ircPrefix

readonly ircPrefix: undefined | IRCMessagePrefix

Inherited from

ChannelIRCMessage.ircPrefix

Source

src/message/irc/irc-message.ts:23


ircPrefixRaw

readonly ircPrefixRaw: undefined | string

Inherited from

ChannelIRCMessage.ircPrefixRaw

Source

src/message/irc/irc-message.ts:22


ircTags

readonly ircTags: IRCMessageTags

Inherited from

ChannelIRCMessage.ircTags

Source

src/message/irc/irc-message.ts:30


isAction

readonly isAction: boolean

Source

src/message/twitch-types/privmsg.ts:57


isMod

readonly isMod: boolean

Implementation of

PrivmsgUserState.isMod

Source

src/message/twitch-types/privmsg.ts:111


isModRaw

readonly isModRaw: string

Implementation of

PrivmsgUserState.isModRaw

Source

src/message/twitch-types/privmsg.ts:112


messageID

readonly messageID: string

Source

src/message/twitch-types/privmsg.ts:109


messageText

readonly messageText: string

Source

src/message/twitch-types/privmsg.ts:56


rawSource

readonly rawSource: string

Inherited from

ChannelIRCMessage.rawSource

Source

src/message/irc/irc-message.ts:20


replyParentDisplayName

readonly replyParentDisplayName: undefined | string

Source

src/message/twitch-types/privmsg.ts:103


replyParentMessageBody

readonly replyParentMessageBody: undefined | string

Source

src/message/twitch-types/privmsg.ts:104


replyParentMessageID

readonly replyParentMessageID: undefined | string

Source

src/message/twitch-types/privmsg.ts:105


replyParentUserID

readonly replyParentUserID: undefined | string

Source

src/message/twitch-types/privmsg.ts:106


replyParentUserLogin

readonly replyParentUserLogin: undefined | string

Source

src/message/twitch-types/privmsg.ts:107


senderUserID

readonly senderUserID: string

Source

src/message/twitch-types/privmsg.ts:60


senderUsername

readonly senderUsername: string

Source

src/message/twitch-types/privmsg.ts:59


serverTimestamp

readonly serverTimestamp: Date

Source

src/message/twitch-types/privmsg.ts:116


serverTimestampRaw

readonly serverTimestampRaw: string

Source

src/message/twitch-types/privmsg.ts:117

Methods

extractUserState()

extractUserState(): PrivmsgUserState

Extracts a plain object only containing the fields defined by the PrivmsgUserState interface.

Returns

PrivmsgUserState

Source

src/message/twitch-types/privmsg.ts:177


isCheer()

isCheer(): this is CheerPrivmsgMessage

Returns

this is CheerPrivmsgMessage

Source

src/message/twitch-types/privmsg.ts:191


isReply()

isReply(): this is ReplyPrivmsgMessage

Returns

this is ReplyPrivmsgMessage

Source

src/message/twitch-types/privmsg.ts:195