Skip to content

Commit

Permalink
feat(Subscription): add renewalSkuIds (#10662)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza authored Dec 21, 2024
1 parent f1bce54 commit c484e3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/discord.js/src/structures/Subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ class Subscription extends Base {
*/
this.status = data.status;

if ('renewal_sku_ids' in data) {
/**
* The SKU ids that this user will be subscribed to at renewal
* @type {?Snowflake[]}
*/
this.renewalSkuIds = data.renewal_sku_ids;
}

if ('canceled_at' in data) {
/**
* The timestamp of when the subscription was canceled
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3132,6 +3132,7 @@ export class Subscription extends Base {
public userId: Snowflake;
public skuIds: Snowflake[];
public entitlementIds: Snowflake[];
public renewalSkuIds: Snowflake[] | null;
public currentPeriodStartTimestamp: number;
public currentPeriodEndTimestamp: number;
public status: SubscriptionStatus;
Expand Down

0 comments on commit c484e3d

Please sign in to comment.