Appearance
@mastondzn/dank-twitch-irc / UsernoticeMessage
Class: UsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:254
Extends
Implements
Partial<SharedChatFields&object>
Constructors
Constructor
new UsernoticeMessage(
message):UsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:547
Parameters
message
Returns
UsernoticeMessage
Overrides
Properties
_channelLogin
protectedreadonly_channelLogin:string
Defined in: src/message/irc/channel-irc-message.ts:41
Inherited from
ChannelIRCMessage._channelLogin
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:IRCMessagePrefix|undefined
Defined in: src/message/irc/irc-message.ts:23
Inherited from
ircPrefixRaw
readonlyircPrefixRaw:string|undefined
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
rawSource
readonlyrawSource:string
Defined in: src/message/irc/irc-message.ts:20
Inherited from
Accessors
badgeInfo
Get Signature
get badgeInfo():
TwitchBadgesList
Defined in: src/message/twitch-types/usernotice.ts:448
Deprecated
Use sender.badgeInfo instead.
Returns
badgeInfoRaw
Get Signature
get badgeInfoRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:453
Deprecated
Use sender.badgeInfoRaw instead.
Returns
string
badges
Get Signature
get badges():
TwitchBadgesList
Defined in: src/message/twitch-types/usernotice.ts:458
Deprecated
Use sender.badges instead.
Returns
badgesRaw
Get Signature
get badgesRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:463
Deprecated
Use sender.badgesRaw instead.
Returns
string
bits
Get Signature
get bits():
number|undefined
Defined in: src/message/twitch-types/usernotice.ts:335
Returns
number | undefined
bitsRaw
Get Signature
get bitsRaw():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:339
Returns
string | undefined
channel
Get Signature
get channel():
Channel&object
Defined in: src/message/twitch-types/usernotice.ts:379
Returns
Channel & object
Overrides
channelID
Get Signature
get channelID():
string
Defined in: src/message/twitch-types/usernotice.ts:423
Deprecated
Use channel.id instead.
Returns
string
channelName
Get Signature
get channelName():
string
Defined in: src/message/irc/channel-irc-message.ts:51
Deprecated
Use channel.login instead.
Returns
string
Inherited from
color
Get Signature
get color():
Color|undefined
Defined in: src/message/twitch-types/usernotice.ts:468
Deprecated
Use sender.color instead.
Returns
Color | undefined
colorRaw
Get Signature
get colorRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:473
Deprecated
Use sender.colorRaw instead.
Returns
string
content
Get Signature
get content():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:293
Returns
string | undefined
displayName
Get Signature
get displayName():
string
Defined in: src/message/twitch-types/usernotice.ts:478
Deprecated
Use sender.displayName instead.
Returns
string
emotes
Get Signature
get emotes():
TwitchEmoteList
Defined in: src/message/twitch-types/usernotice.ts:343
Returns
emotesRaw
Get Signature
get emotesRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:347
Returns
string
eventParams
Get Signature
get eventParams():
EventParameters
Defined in: src/message/twitch-types/usernotice.ts:331
Returns
flags
Get Signature
get flags():
TwitchFlagList|undefined
Defined in: src/message/twitch-types/usernotice.ts:362
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.
Returns
TwitchFlagList | undefined
flagsRaw
Get Signature
get flagsRaw():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:375
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.
Returns
string | undefined
id
Get Signature
get id():
string
Defined in: src/message/twitch-types/usernotice.ts:315
Returns
string
isMod
Get Signature
get isMod():
boolean
Defined in: src/message/twitch-types/usernotice.ts:493
Deprecated
Use sender.isMod instead.
Returns
boolean
isModRaw
Get Signature
get isModRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:498
Deprecated
Use sender.isModRaw instead.
Returns
string
messageId
Get Signature
get messageId():
string
Defined in: src/message/twitch-types/usernotice.ts:488
Deprecated
Use id instead.
Returns
string
messageID
Get Signature
get messageID():
string
Defined in: src/message/twitch-types/usernotice.ts:483
Deprecated
Use id instead.
Returns
string
messageText
Get Signature
get messageText():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:428
Deprecated
Use content instead.
Returns
string | undefined
messageType
Get Signature
get messageType():
string
Defined in: src/message/twitch-types/usernotice.ts:311
Returns
string
messageTypeId
Get Signature
get messageTypeId():
string
Defined in: src/message/twitch-types/usernotice.ts:302
sub, resub, subgift, etc..., or the uuid of the message if its a shared chat
Returns
string
messageTypeID
Get Signature
get messageTypeID():
string
Defined in: src/message/twitch-types/usernotice.ts:307
Deprecated
Use messageTypeId instead.
Returns
string
sender
Get Signature
get sender():
MessageSender
Defined in: src/message/twitch-types/usernotice.ts:387
Returns
senderUserId
Get Signature
get senderUserId():
string
Defined in: src/message/twitch-types/usernotice.ts:443
Deprecated
Use sender.id instead.
Returns
string
senderUserID
Get Signature
get senderUserID():
string
Defined in: src/message/twitch-types/usernotice.ts:438
Deprecated
Use sender.id instead.
Returns
string
senderUsername
Get Signature
get senderUsername():
string
Defined in: src/message/twitch-types/usernotice.ts:433
Deprecated
Use sender.login instead.
Returns
string
serverTimestamp
Get Signature
get serverTimestamp():
Date
Defined in: src/message/twitch-types/usernotice.ts:503
Deprecated
Use timestamp instead.
Returns
Date
serverTimestampRaw
Get Signature
get serverTimestampRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:508
Deprecated
Use timestampRaw instead.
Returns
string
source
Get Signature
get source():
SharedChatSource|undefined
Defined in: src/message/twitch-types/usernotice.ts:404
Returns
SharedChatSource | undefined
sourceBadges
Get Signature
get sourceBadges():
TwitchBadgesList|undefined
Defined in: src/message/twitch-types/usernotice.ts:523
Deprecated
Use source.badges instead.
Returns
TwitchBadgesList | undefined
Implementation of
sourceBadgesInfo
Get Signature
get sourceBadgesInfo():
TwitchBadgesList|undefined
Defined in: src/message/twitch-types/usernotice.ts:533
Deprecated
Use source.badgeInfo instead.
Returns
TwitchBadgesList | undefined
Implementation of
SharedChatFields.sourceBadgesInfo
sourceBadgesInfoRaw
Get Signature
get sourceBadgesInfoRaw():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:538
Deprecated
Use source.badgeInfoRaw instead.
Returns
string | undefined
Implementation of
SharedChatFields.sourceBadgesInfoRaw
sourceBadgesRaw
Get Signature
get sourceBadgesRaw():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:528
Deprecated
Use source.badgesRaw instead.
Returns
string | undefined
Implementation of
SharedChatFields.sourceBadgesRaw
sourceChannelID
Get Signature
get sourceChannelID():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:518
Deprecated
Use source.channelID instead.
Returns
string | undefined
Implementation of
SharedChatFields.sourceChannelID
sourceID
Get Signature
get sourceID():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:513
Deprecated
Use source.id instead.
Returns
string | undefined
Implementation of
sourceMessageTypeId
Get Signature
get sourceMessageTypeId():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:416
Returns
string | undefined
Implementation of
Partial.sourceMessageTypeId
sourceMessageTypeID
Get Signature
get sourceMessageTypeID():
string|undefined
Defined in: src/message/twitch-types/usernotice.ts:543
Deprecated
Use sourceMessageTypeId instead.
Returns
string | undefined
systemMessage
Get Signature
get systemMessage():
string
Defined in: src/message/twitch-types/usernotice.ts:297
Returns
string
timestamp
Get Signature
get timestamp():
Date
Defined in: src/message/twitch-types/usernotice.ts:323
The timestamp of when the message was sent, as reported by Twitch. This is not necessarily the same as the time the message was received by your client.
Returns
Date
timestampRaw
Get Signature
get timestampRaw():
string
Defined in: src/message/twitch-types/usernotice.ts:327
Returns
string
Methods
isAnnouncement()
isAnnouncement():
this is AnnouncementUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:658
Returns
this is AnnouncementUsernoticeMessage
isAnonGiftPaidUpgrade()
isAnonGiftPaidUpgrade():
this is AnonGiftPaidUpgradeUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:642
Returns
this is AnonGiftPaidUpgradeUsernoticeMessage
isAnonSubgift()
isAnonSubgift():
this is AnonSubgiftUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:638
Returns
this is AnonSubgiftUsernoticeMessage
isBitsBadgeTier()
isBitsBadgeTier():
this is BitsBadgeTierUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:654
Returns
this is BitsBadgeTierUsernoticeMessage
isCheer()
isCheer():
this is CheerUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:614
Returns
this is CheerUsernoticeMessage
isGiftPaidUpgrade()
isGiftPaidUpgrade():
this is GiftPaidUpgradeUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:646
Returns
this is GiftPaidUpgradeUsernoticeMessage
isMassSubgift()
isMassSubgift():
this is MassSubgiftParameters
Defined in: src/message/twitch-types/usernotice.ts:634
Returns
this is MassSubgiftParameters
isRaid()
isRaid():
this is RaidUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:626
Returns
this is RaidUsernoticeMessage
isResub()
isResub():
this is ResubUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:622
Returns
this is ResubUsernoticeMessage
isRitual()
isRitual():
this is RitualUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:650
Returns
this is RitualUsernoticeMessage
isSharedChat()
isSharedChat():
this is UsernoticeMessage & SharedChatFields & { sourceMessageTypeId: string }
Defined in: src/message/twitch-types/usernotice.ts:672
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.source.channelId !== message.channel.id for that
Returns
this is UsernoticeMessage & SharedChatFields & { sourceMessageTypeId: string }
See
https://dev.twitch.tv/docs/chat/irc/#shared-chat
isSub()
isSub():
this is SubUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:618
Returns
this is SubUsernoticeMessage
isSubgift()
isSubgift():
this is SubgiftUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:630
Returns
this is SubgiftUsernoticeMessage
isViewerMilestone()
isViewerMilestone():
this is ViewerMilestoneUsernoticeMessage
Defined in: src/message/twitch-types/usernotice.ts:662
Returns
this is ViewerMilestoneUsernoticeMessage