TwurpleAuthenticationGetting dataExamplesFAQMigration

SubEvent

An event representing a user subscribing to a channel.

Overview

Properties

broadcasterId

Type: string

The ID of the broadcaster.

broadcasterName

Type: string

The name of the broadcaster.

giftRedeemedMonth

Type: number | null

The number of the month out of the total gift duration that was just redeemed, or null if the subscription is not a continuation of a multi-month subscription.

isPrime

Type: boolean

Whether the subscription was "paid" for using Prime Gaming.

message

Type: string | null

The message sent with the subscription, or null if there is none.

messageObject

Type: UserNotice

The full object that contains all the message information.

months

Type: number

The number of total months of subscriptions for the channel.

originalGiftDuration

Type: number | null

The total duration of the current multi-month subscription, or null if the subscription is not a continuation of a multi-month subscription.

originalGifterDisplayName

Type: string | null

The display name of the user who originally gifted the current multi-month subscription, or null if they were anonymous or the subscription is not a continuation of a multi-month subscription.

originalGifterId

Type: string | null

The ID of the user who originally gifted the current multi-month subscription, or null if they were anonymous or the subscription is not a continuation of a multi-month subscription.

originalGifterName

Type: string | null

The name of the user who originally gifted the current multi-month subscription, or null if they were anonymous or the subscription is not a continuation of a multi-month subscription.

plan

Type: string

The plan of the subscription.

planName

Type: string

The display name of the plan of the subscription.

streak

Type: number | null

The number of consecutive months of subscriptions for the channel, or null if the user resubscribing does not choose to share that information.

userDisplayName

Type: string

The display name of the user subscribing to the channel.

userId

Type: string

The ID of the user subscribing to the channel.

userName

Type: string

The name of the user subscribing to the channel.

wasAnonymousGift

Type: boolean

Whether the announced subscription is a continuation of a previously anonymously gifter multi-month subscription.

wasGift

Type: boolean

Whether the announced subscription is a continuation of a previously gifted multi-month subscription.

Methods

getBroadcaster()

async

Gets more information about the broadcaster.

Return type: HelixUser

getOriginalGifter()

async

Gets more information about the user who originally gifted the current multi-month subscription, or null if they were anonymous or the subscription is not a continuation of a multi-month subscription.

Return type: HelixUser | null

getUser()

async

Gets more information about the user subscribing to the channel.

Return type: HelixUser