EventSubChannelChatMessageEvent
An EventSub event representing a notification being sent to a channel's chat.
Overview
Properties
- badges
- bits
- broadcasterDisplayName
- broadcasterId
- broadcasterName
- chatterDisplayName
- chatterId
- chatterName
- color
- isCheer
- isRedemption
- messageId
- messageParts
- messageText
- messageType
- parentMessageId
- parentMessageText
- parentMessageUserDisplayName
- parentMessageUserId
- parentMessageUserName
- rewardId
- threadMessageId
- threadMessageUserDisplayName
- threadMessageUserId
- threadMessageUserName
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.
isRedemption
Type: boolean
Whether the message represents a redemption of a custom channel points reward.
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.
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.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
name | string | none | The name of the badge to get info for. |