Appearance
@mastondzn/dank-twitch-irc / PrivmsgMessage
Class: PrivmsgMessage
Defined in: src/message/twitch-types/privmsg.ts:53
Extends
Implements
PrivmsgUserState
Partial
<SharedChatFields
>
Constructors
new PrivmsgMessage()
new PrivmsgMessage(
ircMessage
):PrivmsgMessage
Defined in: src/message/twitch-types/privmsg.ts:127
Parameters
ircMessage
Returns
Overrides
Properties
badgeInfo
readonly
badgeInfo:TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:63
Implementation of
PrivmsgUserState.badgeInfo
badgeInfoRaw
readonly
badgeInfoRaw:string
Defined in: src/message/twitch-types/privmsg.ts:64
Implementation of
PrivmsgUserState.badgeInfoRaw
badges
readonly
badges:TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:66
Implementation of
PrivmsgUserState.badges
badgesRaw
readonly
badgesRaw:string
Defined in: src/message/twitch-types/privmsg.ts:67
Implementation of
PrivmsgUserState.badgesRaw
bits
readonly
bits:undefined
|number
Defined in: src/message/twitch-types/privmsg.ts:69
bitsRaw
readonly
bitsRaw:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:70
channelID
readonly
channelID:string
Defined in: src/message/twitch-types/privmsg.ts:115
channelName
readonly
channelName:string
Defined in: src/message/irc/channel-irc-message.ts:35
Inherited from
color
readonly
color:undefined
|Color
Defined in: src/message/twitch-types/privmsg.ts:72
Implementation of
PrivmsgUserState.color
colorRaw
readonly
colorRaw:string
Defined in: src/message/twitch-types/privmsg.ts:73
Implementation of
PrivmsgUserState.colorRaw
displayName
readonly
displayName:string
Defined in: src/message/twitch-types/privmsg.ts:75
Implementation of
PrivmsgUserState.displayName
emotes
readonly
emotes:TwitchEmoteList
Defined in: src/message/twitch-types/privmsg.ts:77
emotesRaw
readonly
emotesRaw:string
Defined in: src/message/twitch-types/privmsg.ts:78
flags
readonly
flags:undefined
|TwitchFlagList
Defined in: src/message/twitch-types/privmsg.ts:91
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
.
flagsRaw
readonly
flagsRaw:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:102
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.
ircCommand
readonly
ircCommand:string
Defined in: src/message/irc/irc-message.ts:28
The parser ensures this is always uppercase
Inherited from
ircParameters
readonly
ircParameters:string
[]
Defined in: src/message/irc/irc-message.ts:29
Inherited from
ChannelIRCMessage
.ircParameters
ircPrefix
readonly
ircPrefix:undefined
|IRCMessagePrefix
Defined in: src/message/irc/irc-message.ts:23
Inherited from
ircPrefixRaw
readonly
ircPrefixRaw:undefined
|string
Defined in: src/message/irc/irc-message.ts:22
Inherited from
ChannelIRCMessage
.ircPrefixRaw
ircTags
readonly
ircTags:IRCMessageTags
Defined in: src/message/irc/irc-message.ts:30
Inherited from
isAction
readonly
isAction:boolean
Defined in: src/message/twitch-types/privmsg.ts:58
isMod
readonly
isMod:boolean
Defined in: src/message/twitch-types/privmsg.ts:112
Implementation of
PrivmsgUserState.isMod
isModRaw
readonly
isModRaw:string
Defined in: src/message/twitch-types/privmsg.ts:113
Implementation of
PrivmsgUserState.isModRaw
messageID
readonly
messageID:string
Defined in: src/message/twitch-types/privmsg.ts:110
messageText
readonly
messageText:string
Defined in: src/message/twitch-types/privmsg.ts:57
rawSource
readonly
rawSource:string
Defined in: src/message/irc/irc-message.ts:20
Inherited from
replyParentDisplayName
readonly
replyParentDisplayName:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:104
replyParentMessageBody
readonly
replyParentMessageBody:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:105
replyParentMessageID
readonly
replyParentMessageID:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:106
replyParentUserID
readonly
replyParentUserID:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:107
replyParentUserLogin
readonly
replyParentUserLogin:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:108
senderUserID
readonly
senderUserID:string
Defined in: src/message/twitch-types/privmsg.ts:61
senderUsername
readonly
senderUsername:string
Defined in: src/message/twitch-types/privmsg.ts:60
serverTimestamp
readonly
serverTimestamp:Date
Defined in: src/message/twitch-types/privmsg.ts:117
serverTimestampRaw
readonly
serverTimestampRaw:string
Defined in: src/message/twitch-types/privmsg.ts:118
sourceBadges
readonly
sourceBadges:undefined
|TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:122
Implementation of
Partial.sourceBadges
sourceBadgesInfo
readonly
sourceBadgesInfo:undefined
|TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:124
Implementation of
Partial.sourceBadgesInfo
sourceBadgesInfoRaw
readonly
sourceBadgesInfoRaw:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:125
Implementation of
Partial.sourceBadgesInfoRaw
sourceBadgesRaw
readonly
sourceBadgesRaw:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:123
Implementation of
Partial.sourceBadgesRaw
sourceChannelID
readonly
sourceChannelID:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:121
The channel id where the message originated from (can be the same channel we received the message from)
Implementation of
Partial.sourceChannelID
sourceID
readonly
sourceID:undefined
|string
Defined in: src/message/twitch-types/privmsg.ts:120
The msg-id of the source message.
Implementation of
Partial.sourceID
Methods
extractUserState()
extractUserState():
PrivmsgUserState
Defined in: src/message/twitch-types/privmsg.ts:192
Extracts a plain object only containing the fields defined by the PrivmsgUserState interface.
Returns
isCheer()
isCheer():
this is CheerPrivmsgMessage
Defined in: src/message/twitch-types/privmsg.ts:206
Returns
this is CheerPrivmsgMessage
isReply()
isReply():
this is ReplyPrivmsgMessage
Defined in: src/message/twitch-types/privmsg.ts:210
Returns
this is ReplyPrivmsgMessage
isSharedChat()
isSharedChat():
this is PrivmsgMessage & SharedChatFields
Defined in: src/message/twitch-types/privmsg.ts:220
Whether or not this message is during a shared chat session. This does NOT necessarily mean that the message is originating from another channel. Check if message.sourceChannelId !== message.channelId
for that
Returns
this is PrivmsgMessage & SharedChatFields