PremiumFeature: {
    bit: string | null;
    category: string;
    description: string;
    flag: string | null;
    key: string;
    limitKeys: string[];
    planField?: string;
    platform: string | null;
    provider?: string;
    providerEnabled: boolean;
    scope?: "guild" | "user";
    showOnPricing?: boolean;
    status: "off" | "beta" | "public";
    tiers: Record<string, PremiumFeatureTierValue>;
    title: string;
    type: PremiumFeatureType;
}

Type declaration

  • bit: string | null

    The bit as a decimal string - a bigint does not survive JSON, so parse with BigInt(bit) before comparing against GuildFeatures. Null on plan/free rows, which have no bit.

  • category: string
  • description: string
  • flag: string | null

    The launch flag gating this feature, or null when ungated.

  • key: string

    GuildFeatures key on type: 'bit' rows - or UserFeatures when scope is 'user'; otherwise a stable slug such as drops.

    NOT unique on its own: LinkedRoles is a key in both bitfields (the guild one is sticky roles, the user one is Discord's Linked Roles). Key rows by ${scope}:${key} if you need identity.

  • limitKeys: string[]

    Per-tier numbers this feature owns. A feature may own several.

  • OptionalplanField?: string

    Only on type: 'plan' rows - the per-tier field whose presence ticks this feature.

  • platform: string | null

    kick, twitch, steam, roblox, ... or null when the feature is platform-agnostic.

  • Optionalprovider?: string

    The notification provider that can switch this feature off at runtime, if any.

    A second kill switch, independent of the launch flag: the flag answers "has it shipped", the provider answers "is it running right now". A platform pulled for maintenance is switched off here, not un-launched.

  • providerEnabled: boolean

    False when provider is set and that provider is currently disabled.

  • Optionalscope?: "guild" | "user"

    Which bitfield and tier family this row describes. Absent means 'guild', so rows emitted before user tiers existed keep their meaning.

    tiers is keyed by tier id from the matching family, so a 'user' row carries user tier ids and a 'guild' row carries guild tier ids. Decoding a bitfield client-side is no longer necessary for either - that path could only ever show the bits this package happens to list.

  • OptionalshowOnPricing?: boolean

    false means the row is deliberately kept off the pricing table (one row covers several bits).

  • status: "off" | "beta" | "public"

    Live launch status. Ungated features report public, but this is forced to off whenever providerEnabled is false, so a platform that is down stops being advertised.

  • tiers: Record<string, PremiumFeatureTierValue>

    Keyed by tierId.

  • title: string
  • type: PremiumFeatureType