twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks

PubSubSubscriptionMessage

A message that informs about a user subscribing to a channel.

Overview

Properties

cumulativeMonths

Type: number

The cumulative amount of months the user has been subscribed for.

Returns the months if a gift sub or the cumulative months.

giftDuration

Type: number | null

The duration of the gifted subscription, in months.

Returns null if the subscription is not a gift.

gifterDisplayName

Type: string | null

The display name of the user gifting the subscription.

Returns null if the subscription is not a gift.

gifterId

Type: string | null

The ID of the user gifting the subscription.

Returns null if the subscription is not a gift.

gifterName

Type: string | null

The name of the user gifting the subscription.

Returns null if the subscription is not a gift.

isAnonymous

Type: boolean

Whether the subscription is from an anonymous gifter.

isGift

Type: boolean

Whether the subscription is a gift.

isResub

Type: boolean

Whether the subscription is a resub.

message

Type: PubSubChatMessage | null

The message sent with the subscription.

Returns null if the subscription is a gift subscription.

months

Type: number

The cumulative amount of months the user has been subscribed for.

Returns the months if a gift sub or the cumulative months.

streakMonths

Type: number

The streak amount of months the user has been subscribed for.

Returns 0 if a gift sub or the streaks months.

subPlan

Type: string

The plan of the subscription.

time

Type: Date

The time the user subscribed.

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.

Methods

getGifter()

async
Deprecated.

Use HelixUserApi#getUserById instead.

Retrieves more information about the gifting user.

Returns null if the subscription is not a gift.

Return type: HelixUser | null

getUser()

async
Deprecated.

Use HelixUserApi#getUserById instead.

Retrieves more information about the subscribing user.

Return type: HelixUser | null