TwurpleAuthenticationGetting dataExamplesFAQMigration

Classes

EventSubChannelAdBreakBeginEventEventSubChannelBanEventEventSubChannelCharityAmountEventSubChannelCharityCampaignProgressEventEventSubChannelCharityCampaignStartEventEventSubChannelCharityCampaignStopEventEventSubChannelCharityDonationEventEventSubChannelChatClearEventEventSubChannelChatClearUserMessagesEventEventSubChannelChatMessageDeleteEventEventSubChannelChatMessageEventEventSubChannelChatSettingsUpdateEventEventSubChannelCheerEventEventSubChannelFollowEventEventSubChannelGoalBeginEventEventSubChannelGoalEndEventEventSubChannelGoalProgressEventEventSubChannelHypeTrainBeginEventEventSubChannelHypeTrainContributionEventSubChannelHypeTrainEndEventEventSubChannelHypeTrainProgressEventEventSubChannelModeratorEventEventSubChannelPollBeginChoiceEventSubChannelPollBeginEventEventSubChannelPollChoiceEventSubChannelPollEndEventEventSubChannelPollProgressEventEventSubChannelPredictionBeginEventEventSubChannelPredictionBeginOutcomeEventSubChannelPredictionEndEventEventSubChannelPredictionLockEventEventSubChannelPredictionOutcomeEventSubChannelPredictionPredictorEventSubChannelPredictionProgressEventEventSubChannelRaidEventEventSubChannelRedemptionAddEventEventSubChannelRedemptionUpdateEventEventSubChannelRewardEventEventSubChannelShieldModeBeginEventEventSubChannelShieldModeEndEventEventSubChannelShoutoutCreateEventEventSubChannelShoutoutReceiveEventEventSubChannelSubscriptionEndEventEventSubChannelSubscriptionEventEventSubChannelSubscriptionGiftEventEventSubChannelSubscriptionMessageEventEventSubChannelUnbanEventEventSubChannelUpdateEventEventSubDropEntitlementGrantEventEventSubExtensionBitsTransactionCreateEventEventSubStreamOfflineEventEventSubStreamOnlineEventEventSubSubscriptionEventSubUserAuthorizationGrantEventEventSubUserAuthorizationRevokeEventEventSubUserUpdateEvent

EventSubChannelChatMessageEvent

An EventSub event representing a notification being sent to a channel's chat.

Overview

Properties

badges

Type: Record<string, string>

The badges the chatter has.

The returned object contains the badge names as keys and the badge versions as the respective values.

bits

Type: number

The number of bits cheered with this message.

broadcasterDisplayName

Type: string

The display name of the broadcaster.

broadcasterId

Type: string

The ID of the broadcaster.

broadcasterName

Type: string

The name of the broadcaster.

chatterDisplayName

Type: string

The display name of the chatter.

chatterId

Type: string

The ID of the chatter.

chatterName

Type: string

The name of the chatter.

color

Type: string | null

The color of the chatter, or null if they didn't choose a color.

isCheer

Type: boolean

Whether the message is a cheer.

isRedemption

Type: boolean

Whether the message represents a redemption of a custom channel points reward.

messageId

Type: string

The ID of the notification message.

messageParts

Type: EventSubChatMessagePart[]

The text that was sent with the notification, structured into pre-parsed parts.

messageText

Type: string

The text that was sent with the notification, e.g. the resub message or announcement text.

messageType

Type: string

The type of the message.

parentMessageId

Type: string | null

The ID of the message that this message is a reply to, or null if it's not a reply.

parentMessageText

Type: string | null

The text of the message that this message is a reply to, or null if it's not a reply.

parentMessageUserDisplayName

Type: string | null

The display name of the user that wrote the message that this message is a reply to, or null if it's not a reply.

parentMessageUserId

Type: string | null

The ID of the user that wrote the message that this message is a reply to, or null if it's not a reply.

parentMessageUserName

Type: string | null

The name of the user that wrote the message that this message is a reply to, or null if it's not a reply.

rewardId

Type: string | null

The ID of the redeemed reward, or null if the message does not represent a redemption.

threadMessageId

Type: string | null

The ID of the message that is the thread starter of this message, or null if it's not a reply.

threadMessageUserDisplayName

Type: string | null

The display name of the user that wrote the thread starter message of this message, or null if it's not a reply.

threadMessageUserId

Type: string | null

The ID of the user that wrote the thread starter message of this message, or null if it's not a reply.

threadMessageUserName

Type: string | null

The name of the user that wrote the thread starter message of this message, or null if it's not a reply.

Methods

getBadgeInfo(name)

Gets the badge info for a specified badge, or null if the badge does not exist.

ParameterTypeRequiredDefaultDescription
namestringnone

The name of the badge to get info for.

Return type: string | null

getBroadcaster()

async

Gets more information about the broadcaster.

Return type: HelixUser

getChatter()

async

Gets more information about the chatter.

Return type: HelixUser

hasBadge(name)

Checks whether the chatter has the specified badge.

ParameterTypeRequiredDefaultDescription
namestringnone

The name of the badge to check.

Return type: boolean