TwurpleAuthenticationGetting dataExamplesFAQMigration

Classes

EventSubAutoModMessageAutoModEventSubAutoModMessageAutoModBoundaryEventSubAutoModMessageBlockedTermEventSubAutoModMessageHoldEventEventSubAutoModMessageHoldV2EventEventSubAutoModMessageUpdateEventEventSubAutoModMessageUpdateV2EventEventSubAutoModSettingsUpdateEventEventSubAutoModTermsUpdateEventEventSubChannelAdBreakBeginEventEventSubChannelAutomaticRewardRedemptionAddEventEventSubChannelAutoModTermsModerationEventEventSubChannelBanEventEventSubChannelBanModerationEventEventSubChannelCharityAmountEventSubChannelCharityCampaignProgressEventEventSubChannelCharityCampaignStartEventEventSubChannelCharityCampaignStopEventEventSubChannelCharityDonationEventEventSubChannelChatAnnouncementNotificationEventEventSubChannelChatBitsBadgeTierNotificationEventEventSubChannelChatCharityDonationNotificationEventEventSubChannelChatClearEventEventSubChannelChatClearUserMessagesEventEventSubChannelChatCommunitySubGiftNotificationEventEventSubChannelChatGiftPaidUpgradeNotificationEventEventSubChannelChatMessageDeleteEventEventSubChannelChatMessageEventEventSubChannelChatPayItForwardNotificationEventEventSubChannelChatPrimePaidUpgradeNotificationEventEventSubChannelChatRaidNotificationEventEventSubChannelChatResubNotificationEventEventSubChannelChatSettingsUpdateEventEventSubChannelChatSharedChatAnnouncementNotificationEventEventSubChannelChatSharedChatCommunitySubGiftNotificationEventEventSubChannelChatSharedChatGiftPaidUpgradeNotificationEventEventSubChannelChatSharedChatPayItForwardNotificationEventEventSubChannelChatSharedChatPrimePaidUpgradeNotificationEventEventSubChannelChatSharedChatRaidNotificationEventEventSubChannelChatSharedChatResubNotificationEventEventSubChannelChatSharedChatSubGiftNotificationEventEventSubChannelChatSharedChatSubNotificationEventEventSubChannelChatSubGiftNotificationEventEventSubChannelChatSubNotificationEventEventSubChannelChatUnraidNotificationEventEventSubChannelChatUserMessageHoldEventEventSubChannelChatUserMessageUpdateEventEventSubChannelCheerEventEventSubChannelClearModerationEventEventSubChannelDeleteModerationEventEventSubChannelEmoteOnlyModerationEventEventSubChannelEmoteOnlyOffModerationEventEventSubChannelFollowersModerationEventEventSubChannelFollowersOffModerationEventEventSubChannelFollowEventEventSubChannelGoalBeginEventEventSubChannelGoalEndEventEventSubChannelGoalProgressEventEventSubChannelHypeTrainBeginEventEventSubChannelHypeTrainContributionEventSubChannelHypeTrainEndEventEventSubChannelHypeTrainProgressEventEventSubChannelModeratorEventEventSubChannelModModerationEventEventSubChannelPollBeginChoiceEventSubChannelPollBeginEventEventSubChannelPollChoiceEventSubChannelPollEndEventEventSubChannelPollProgressEventEventSubChannelPredictionBeginEventEventSubChannelPredictionBeginOutcomeEventSubChannelPredictionEndEventEventSubChannelPredictionLockEventEventSubChannelPredictionOutcomeEventSubChannelPredictionPredictorEventSubChannelPredictionProgressEventEventSubChannelRaidEventEventSubChannelRaidModerationEventEventSubChannelRedemptionAddEventEventSubChannelRedemptionUpdateEventEventSubChannelRewardEventEventSubChannelSharedChatBanModerationEventEventSubChannelSharedChatDeleteModerationEventEventSubChannelSharedChatSessionBeginEventEventSubChannelSharedChatSessionEndEventEventSubChannelSharedChatSessionParticipantEventSubChannelSharedChatSessionUpdateEventEventSubChannelSharedChatTimeoutModerationEventEventSubChannelSharedChatUnbanModerationEventEventSubChannelSharedChatUntimeoutModerationEventEventSubChannelShieldModeBeginEventEventSubChannelShieldModeEndEventEventSubChannelShoutoutCreateEventEventSubChannelShoutoutReceiveEventEventSubChannelSlowModerationEventEventSubChannelSlowOffModerationEventEventSubChannelSubscribersModerationEventEventSubChannelSubscribersOffModerationEventEventSubChannelSubscriptionEndEventEventSubChannelSubscriptionEventEventSubChannelSubscriptionGiftEventEventSubChannelSubscriptionMessageEventEventSubChannelSuspiciousUserMessageEventEventSubChannelSuspiciousUserUpdateEventEventSubChannelTimeoutModerationEventEventSubChannelUnbanEventEventSubChannelUnbanModerationEventEventSubChannelUnbanRequestCreateEventEventSubChannelUnbanRequestModerationEventEventSubChannelUnbanRequestResolveEventEventSubChannelUniqueChatModerationEventEventSubChannelUniqueChatOffModerationEventEventSubChannelUnmodModerationEventEventSubChannelUnraidModerationEventEventSubChannelUntimeoutModerationEventEventSubChannelUnvipModerationEventEventSubChannelUpdateEventEventSubChannelVipEventEventSubChannelVipModerationEventEventSubChannelWarningAcknowledgeEventEventSubChannelWarningSendEventEventSubDropEntitlementGrantEventEventSubExtensionBitsTransactionCreateEventEventSubStreamOfflineEventEventSubStreamOnlineEventEventSubSubscriptionEventSubUserAuthorizationGrantEventEventSubUserAuthorizationRevokeEventEventSubUserUpdateEventEventSubUserWhisperMessageEvent

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.

sourceBadges

Type: Record<string, string> | null

The chat badges for the chatter in the channel the message was sent from.

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

This only applies if a chatter sends a chat message in another channel's chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster.

sourceBroadcasterDisplayName

Type: string | null

The display name of the broadcaster from whose channel the message was sent.

This only applies if a chatter sends a chat message in another channel's chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster.

sourceBroadcasterId

Type: string | null

The ID of the broadcaster from whose channel the message was sent.

This only applies if a chatter sends a chat message in another channel's chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster.

sourceBroadcasterName

Type: string | null

The name of the broadcaster from whose channel the message was sent.

This only applies if a chatter sends a chat message in another channel's chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster.

sourceMessageId

Type: string | null

The UUID that identifies the source message from the channel the message was sent from.

This only applies if a chatter sends a chat message in another channel's chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster.

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

getSourceBadgeInfo(name)

Gets the badge info for a specified badge.

This only applies if a chatter sends a chat message in another channel's chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster, or if the badge does not exist.

ParameterTypeRequiredDefaultDescription
namestringnone

The name of the badge to get info for.

Return type: string | null

hasBadge(name)

Checks whether the chatter has the specified badge.

ParameterTypeRequiredDefaultDescription
namestringnone

The name of the badge to check.

Return type: boolean

hasSourceBadge(name)

Checks whether the chatter has the specified badge.

This only applies if a chatter sends a chat message to another chat during a shared chat session. Is null when the message happens in the same channel as the broadcaster.

ParameterTypeRequiredDefaultDescription
namestringnone

The name of the badge to check.

Return type: false | true | null