#[non_exhaustive]pub struct Sub {Show 13 fields
pub benefit_end_month: i64,
pub channel_id: UserId,
pub channel_name: UserName,
pub cumulative_months: i64,
pub is_gift: bool,
pub multi_month_duration: i64,
pub sub_message: SubMessage,
pub sub_plan: SubscriptionTier,
pub sub_plan_name: String,
pub time: Timestamp,
pub user_id: UserId,
pub user_name: UserName,
pub display_name: DisplayName,
/* private fields */
}use EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
pubsub only.Expand description
A subscription
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.benefit_end_month: i64use EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Unknown
channel_id: UserIduse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
ID of the channel that has been subscribed or subgifted
channel_name: UserNameuse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Name of the channel that has been subscribed or subgifted
cumulative_months: i64use EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Cumulative months that user has been subscribed
is_gift: booluse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Resubscription is a gift
multi_month_duration: i64use EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Duration of subscription, e.g 1, 3 or 6
sub_message: SubMessageuse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Message sent with this subscription
sub_plan: SubscriptionTieruse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Subscription plan
sub_plan_name: Stringuse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Name of subscription plan
time: Timestampuse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Time when pubsub message was sent
user_id: UserIduse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
ID of user that subscribed
user_name: UserNameuse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Username of user that subscribed
display_name: DisplayNameuse EventSub instead, see https://discuss.dev.twitch.com/t/legacy-pubsub-deprecation-and-shutdown-timeline/58043
Display name of user that subscribed