From c484e3de250e2ed52f9651b1fc7f2b27990ef632 Mon Sep 17 00:00:00 2001 From: Danial Raza Date: Sat, 21 Dec 2024 23:19:36 +0100 Subject: [PATCH] feat(Subscription): add `renewalSkuIds` (#10662) --- packages/discord.js/src/structures/Subscription.js | 8 ++++++++ packages/discord.js/typings/index.d.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/packages/discord.js/src/structures/Subscription.js b/packages/discord.js/src/structures/Subscription.js index 9a1766024d5c..c46bb8f0c811 100644 --- a/packages/discord.js/src/structures/Subscription.js +++ b/packages/discord.js/src/structures/Subscription.js @@ -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 diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 9baa4c2e4e03..b9e4fb4e20e0 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -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;