SKU
A premium offering for the application. Discord returns two rows for each subscription offering and the docs say to use the one with type 5 for integration and testing, so callers that list should usually filter on {@link SKU.isSubscription}. https://docs.discord.com/developers/resources/sku#sku-object
Signature
export interface SKU extends DiscordBase, ObjectToLower<APISKU>Properties
23Methods
2Properties
type: SKUType;flags: SKUFlags;isDurableGetterget isDurable(): boolean;isConsumableGetterget isConsumable(): boolean;isSubscriptionGetterget isSubscription(): boolean;isSubscriptionGroupGetterget isSubscriptionGroup(): boolean;isAvailableGetterget isAvailable(): boolean;isGuildSubscriptionGetterget isGuildSubscription(): boolean;isUserSubscriptionGetterget isUserSubscription(): boolean;id: string;createdTimestampGetterget createdTimestamp(): number;Create a timestamp for the current object.
createdAtGetterget createdAt(): Date;createdAt gets the creation Date instace of the current object.
readonly client: UsingClient;applicationId: string;name: string;slug: string;dependentSkuId?: string | null | undefined;accessType?: number | undefined;manifestLabels?: string[] | null | undefined;features?: string[] | undefined;releaseDate?: string | null | undefined;premium?: boolean | undefined;showAgeGate?: boolean | undefined;Methods
subscriptions(query?: RESTGetAPISKUSubscriptionsQuery): Promise<SubscriptionStructure[]>;Lists subscriptions containing this SKU. Discord requires user_id here except for OAuth queries, so the query stays optional and Discord rejects what it does not accept. https://docs.discord.com/developers/resources/subscription#list-sku-subscriptions
hasUser(userId: string): Promise<boolean>;Checks whether a user currently holds access to this SKU. Uses entitlements for this since a subscription can stay active while Discord retries payment. Ended ones are skipped so only current access counts. Note this only sees user entitlements, guild-granted access needs a guild_id entitlement query instead.