Skip to content

@mastondzn/dank-twitch-irc / UsernoticeMessage

Class: UsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:256

Extends

Implements

Constructors

new UsernoticeMessage()

new UsernoticeMessage(message): UsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:331

Parameters

message

IRCMessageData

Returns

UsernoticeMessage

Overrides

ChannelIRCMessage.constructor

Properties

badgeInfo

readonly badgeInfo: TwitchBadgesList

Defined in: src/message/twitch-types/usernotice.ts:272


badgeInfoRaw

readonly badgeInfoRaw: string

Defined in: src/message/twitch-types/usernotice.ts:273


badges

readonly badges: TwitchBadgesList

Defined in: src/message/twitch-types/usernotice.ts:275


badgesRaw

readonly badgesRaw: string

Defined in: src/message/twitch-types/usernotice.ts:276


bits

readonly bits: undefined | number

Defined in: src/message/twitch-types/usernotice.ts:278


bitsRaw

readonly bitsRaw: undefined | string

Defined in: src/message/twitch-types/usernotice.ts:279


channelID

readonly channelID: string

Defined in: src/message/twitch-types/usernotice.ts:260


channelName

readonly channelName: string

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

Inherited from

ChannelIRCMessage.channelName


color

readonly color: undefined | Color

Defined in: src/message/twitch-types/usernotice.ts:281


colorRaw

readonly colorRaw: string

Defined in: src/message/twitch-types/usernotice.ts:282


displayName

readonly displayName: string

Defined in: src/message/twitch-types/usernotice.ts:284


emotes

readonly emotes: TwitchEmoteList

Defined in: src/message/twitch-types/usernotice.ts:286


emotesRaw

readonly emotesRaw: string

Defined in: src/message/twitch-types/usernotice.ts:287


eventParams

readonly eventParams: EventParameters

Defined in: src/message/twitch-types/usernotice.ts:321


flags

readonly flags: undefined | TwitchFlagList

Defined in: src/message/twitch-types/usernotice.ts:300

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/usernotice.ts:311

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

ChannelIRCMessage.ircCommand


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

ChannelIRCMessage.ircPrefix


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

ChannelIRCMessage.ircTags


isMod

readonly isMod: boolean

Defined in: src/message/twitch-types/usernotice.ts:315


isModRaw

readonly isModRaw: string

Defined in: src/message/twitch-types/usernotice.ts:316


messageID

readonly messageID: string

Defined in: src/message/twitch-types/usernotice.ts:313


messageText

readonly messageText: undefined | string

Defined in: src/message/twitch-types/usernotice.ts:262


messageType

readonly messageType: string

Defined in: src/message/twitch-types/usernotice.ts:267


messageTypeID

readonly messageTypeID: string

Defined in: src/message/twitch-types/usernotice.ts:266

sub, resub, subgift, etc..., or the uuid of the message if its a shared chat


rawSource

readonly rawSource: string

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

Inherited from

ChannelIRCMessage.rawSource


senderUserID

readonly senderUserID: string

Defined in: src/message/twitch-types/usernotice.ts:270


senderUsername

readonly senderUsername: string

Defined in: src/message/twitch-types/usernotice.ts:269


serverTimestamp

readonly serverTimestamp: Date

Defined in: src/message/twitch-types/usernotice.ts:318


serverTimestampRaw

readonly serverTimestampRaw: string

Defined in: src/message/twitch-types/usernotice.ts:319


sourceBadges

readonly sourceBadges: undefined | TwitchBadgesList

Defined in: src/message/twitch-types/usernotice.ts:325

Implementation of

Partial.sourceBadges


sourceBadgesInfo

readonly sourceBadgesInfo: undefined | TwitchBadgesList

Defined in: src/message/twitch-types/usernotice.ts:327

Implementation of

Partial.sourceBadgesInfo


sourceBadgesInfoRaw

readonly sourceBadgesInfoRaw: undefined | string

Defined in: src/message/twitch-types/usernotice.ts:328

Implementation of

Partial.sourceBadgesInfoRaw


sourceBadgesRaw

readonly sourceBadgesRaw: undefined | string

Defined in: src/message/twitch-types/usernotice.ts:326

Implementation of

Partial.sourceBadgesRaw


sourceChannelID

readonly sourceChannelID: undefined | string

Defined in: src/message/twitch-types/usernotice.ts:324

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/usernotice.ts:323

The msg-id of the source message.

Implementation of

Partial.sourceID


sourceMessageTypeId

readonly sourceMessageTypeId: undefined | string

Defined in: src/message/twitch-types/usernotice.ts:329


systemMessage

readonly systemMessage: string

Defined in: src/message/twitch-types/usernotice.ts:263

Methods

isAnnouncement()

isAnnouncement(): this is AnnouncementUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:441

Returns

this is AnnouncementUsernoticeMessage


isAnonGiftPaidUpgrade()

isAnonGiftPaidUpgrade(): this is AnonGiftPaidUpgradeUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:425

Returns

this is AnonGiftPaidUpgradeUsernoticeMessage


isAnonSubgift()

isAnonSubgift(): this is AnonSubgiftUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:421

Returns

this is AnonSubgiftUsernoticeMessage


isBitsBadgeTier()

isBitsBadgeTier(): this is BitsBadgeTierUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:437

Returns

this is BitsBadgeTierUsernoticeMessage


isCheer()

isCheer(): this is CheerUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:397

Returns

this is CheerUsernoticeMessage


isGiftPaidUpgrade()

isGiftPaidUpgrade(): this is GiftPaidUpgradeUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:429

Returns

this is GiftPaidUpgradeUsernoticeMessage


isMassSubgift()

isMassSubgift(): this is MassSubgiftParameters

Defined in: src/message/twitch-types/usernotice.ts:417

Returns

this is MassSubgiftParameters


isRaid()

isRaid(): this is RaidUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:409

Returns

this is RaidUsernoticeMessage


isResub()

isResub(): this is ResubUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:405

Returns

this is ResubUsernoticeMessage


isRitual()

isRitual(): this is RitualUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:433

Returns

this is RitualUsernoticeMessage


isSharedChat()

isSharedChat(): this is UsernoticeMessage & SharedChatFields & { sourceMessageTypeID: string }

Defined in: src/message/twitch-types/usernotice.ts:455

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 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:401

Returns

this is SubUsernoticeMessage


isSubgift()

isSubgift(): this is SubgiftUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:413

Returns

this is SubgiftUsernoticeMessage


isViewerMilestone()

isViewerMilestone(): this is ViewerMilestoneUsernoticeMessage

Defined in: src/message/twitch-types/usernotice.ts:445

Returns

this is ViewerMilestoneUsernoticeMessage