Files
sbox-public/engine/Sandbox.Engine/Platform/Stream/StreamGiftSubscriptionsMessage.cs
Garry Newman 62feec4b64 Twitch Api (#5016)
Engine: reworks Twitch IRC parsing/client + Streamer event surface (viewers roster, chat/sub/gift/raid messages) and removes older/broken Twitch API features.

Menu/Editor: adds service linking/stream-connect UI (new Services modal; pause/game modal + editor title button) gated by a project setting.

Services/utilities: introduces helper APIs for linking/listing services; adds unit tests for the IRC parser and subscription tier parsing.
2026-06-06 21:46:13 +01:00

42 lines
1.2 KiB
C#

namespace Sandbox;
public static partial class Streamer
{
/// <summary>
/// A viewer gifted a batch of subscriptions to the community at once (a "mystery" / community gift).
/// The individual recipients arrive separately as <see cref="GiftSubscribeMessage"/> events.
/// </summary>
public struct GiftSubscriptionsMessage
{
/// <summary>
/// The viewer who gifted the subs, or null if it was gifted anonymously (<see cref="IsAnonymous"/>).
/// </summary>
public Viewer Gifter { get; internal set; }
/// <summary>
/// Whether the gift was anonymous - in which case <see cref="Gifter"/> is null.
/// </summary>
public bool IsAnonymous { get; internal set; }
/// <summary>
/// How many subscriptions were gifted in this batch.
/// </summary>
public int Count { get; internal set; }
/// <summary>
/// The gifted subscriptions' tier.
/// </summary>
public SubscriptionTier Tier { get; internal set; }
/// <summary>
/// The gifter's lifetime total of subs gifted to this channel, or 0 if unknown.
/// </summary>
public int TotalGifts { get; internal set; }
/// <summary>
/// When we received the event.
/// </summary>
public DateTimeOffset Time { get; internal set; }
}
}