Appearance
@mastondzn/dank-twitch-irc / PrivmsgMessage
Class: PrivmsgMessage
Defined in: src/message/twitch-types/privmsg.ts:53
Extends
Implements
PrivmsgUserStatePartial<SharedChatFields>
Constructors
new PrivmsgMessage()
new PrivmsgMessage(
ircMessage):PrivmsgMessage
Defined in: src/message/twitch-types/privmsg.ts:127
Parameters
ircMessage
Returns
Overrides
Properties
badgeInfo
readonlybadgeInfo:TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:63
Implementation of
PrivmsgUserState.badgeInfo
badgeInfoRaw
readonlybadgeInfoRaw:string
Defined in: src/message/twitch-types/privmsg.ts:64
Implementation of
PrivmsgUserState.badgeInfoRaw
badges
readonlybadges:TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:66
Implementation of
PrivmsgUserState.badges
badgesRaw
readonlybadgesRaw:string
Defined in: src/message/twitch-types/privmsg.ts:67
Implementation of
PrivmsgUserState.badgesRaw
bits
readonlybits:undefined|number
Defined in: src/message/twitch-types/privmsg.ts:69
bitsRaw
readonlybitsRaw:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:70
channelID
readonlychannelID:string
Defined in: src/message/twitch-types/privmsg.ts:115
channelName
readonlychannelName:string
Defined in: src/message/irc/channel-irc-message.ts:35
Inherited from
color
readonlycolor:undefined|Color
Defined in: src/message/twitch-types/privmsg.ts:72
Implementation of
PrivmsgUserState.color
colorRaw
readonlycolorRaw:string
Defined in: src/message/twitch-types/privmsg.ts:73
Implementation of
PrivmsgUserState.colorRaw
displayName
readonlydisplayName:string
Defined in: src/message/twitch-types/privmsg.ts:75
Implementation of
PrivmsgUserState.displayName
emotes
readonlyemotes:TwitchEmoteList
Defined in: src/message/twitch-types/privmsg.ts:77
emotesRaw
readonlyemotesRaw:string
Defined in: src/message/twitch-types/privmsg.ts:78
flags
readonlyflags: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
readonlyflagsRaw: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
readonlyircCommand:string
Defined in: src/message/irc/irc-message.ts:28
The parser ensures this is always uppercase
Inherited from
ircParameters
readonlyircParameters:string[]
Defined in: src/message/irc/irc-message.ts:29
Inherited from
ChannelIRCMessage.ircParameters
ircPrefix
readonlyircPrefix:undefined|IRCMessagePrefix
Defined in: src/message/irc/irc-message.ts:23
Inherited from
ircPrefixRaw
readonlyircPrefixRaw:undefined|string
Defined in: src/message/irc/irc-message.ts:22
Inherited from
ChannelIRCMessage.ircPrefixRaw
ircTags
readonlyircTags:IRCMessageTags
Defined in: src/message/irc/irc-message.ts:30
Inherited from
isAction
readonlyisAction:boolean
Defined in: src/message/twitch-types/privmsg.ts:58
isMod
readonlyisMod:boolean
Defined in: src/message/twitch-types/privmsg.ts:112
Implementation of
PrivmsgUserState.isMod
isModRaw
readonlyisModRaw:string
Defined in: src/message/twitch-types/privmsg.ts:113
Implementation of
PrivmsgUserState.isModRaw
messageID
readonlymessageID:string
Defined in: src/message/twitch-types/privmsg.ts:110
messageText
readonlymessageText:string
Defined in: src/message/twitch-types/privmsg.ts:57
rawSource
readonlyrawSource:string
Defined in: src/message/irc/irc-message.ts:20
Inherited from
replyParentDisplayName
readonlyreplyParentDisplayName:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:104
replyParentMessageBody
readonlyreplyParentMessageBody:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:105
replyParentMessageID
readonlyreplyParentMessageID:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:106
replyParentUserID
readonlyreplyParentUserID:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:107
replyParentUserLogin
readonlyreplyParentUserLogin:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:108
senderUserID
readonlysenderUserID:string
Defined in: src/message/twitch-types/privmsg.ts:61
senderUsername
readonlysenderUsername:string
Defined in: src/message/twitch-types/privmsg.ts:60
serverTimestamp
readonlyserverTimestamp:Date
Defined in: src/message/twitch-types/privmsg.ts:117
serverTimestampRaw
readonlyserverTimestampRaw:string
Defined in: src/message/twitch-types/privmsg.ts:118
sourceBadges
readonlysourceBadges:undefined|TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:122
Implementation of
Partial.sourceBadges
sourceBadgesInfo
readonlysourceBadgesInfo:undefined|TwitchBadgesList
Defined in: src/message/twitch-types/privmsg.ts:124
Implementation of
Partial.sourceBadgesInfo
sourceBadgesInfoRaw
readonlysourceBadgesInfoRaw:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:125
Implementation of
Partial.sourceBadgesInfoRaw
sourceBadgesRaw
readonlysourceBadgesRaw:undefined|string
Defined in: src/message/twitch-types/privmsg.ts:123
Implementation of
Partial.sourceBadgesRaw
sourceChannelID
readonlysourceChannelID: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
readonlysourceID: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