From 58cfdeb82bee59c2a136e61137613695b347a356 Mon Sep 17 00:00:00 2001 From: Ice Wolfy Date: Thu, 6 Feb 2025 15:27:51 -0500 Subject: [PATCH 1/3] fix: Allow renewal_sku_ids To Handle None --- discord/monetization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/monetization.py b/discord/monetization.py index daa4bf0806..9a4dc9f05c 100644 --- a/discord/monetization.py +++ b/discord/monetization.py @@ -327,7 +327,7 @@ def __init__(self, *, state: ConnectionState, data: SubscriptionPayload) -> None self.user_id: int = int(data["user_id"]) self.sku_ids: list[int] = list(map(int, data["sku_ids"])) self.entitlement_ids: list[int] = list(map(int, data["entitlement_ids"])) - self.renewal_sku_ids: list[int] = list(map(int, data["renewal_sku_ids"])) + self.renewal_sku_ids: list[int] = list(map(int, data["renewal_sku_ids"] or [])) self.current_period_start: datetime = parse_time(data["current_period_start"]) self.current_period_end: datetime = parse_time(data["current_period_end"]) self.status: SubscriptionStatus = try_enum(SubscriptionStatus, data["status"]) From 95bdc5c2c90724d4182995fa18f31e94b5f192e5 Mon Sep 17 00:00:00 2001 From: Ice Wolfy Date: Thu, 6 Feb 2025 15:37:01 -0500 Subject: [PATCH 2/3] chore: Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f94bd51ec..ced7a531e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2656](https://github.com/Pycord-Development/pycord/pull/2656)) - Fixed `AttributeError` when trying to consume a consumable entitlement. ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) +- Fixed `Subscription.renewal_sku_ids` not accepting `None` from discord payload. + ([#2709](https://github.com/Pycord-Development/pycord/pull/2709)) ### Changed From 8372e31da6347f11695707140d7054ce9b04b469 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 20:38:01 +0000 Subject: [PATCH 3/3] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced7a531e6..633799b7ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,7 +93,7 @@ These changes are available on the `master` branch, but have not yet been releas ([#2656](https://github.com/Pycord-Development/pycord/pull/2656)) - Fixed `AttributeError` when trying to consume a consumable entitlement. ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) -- Fixed `Subscription.renewal_sku_ids` not accepting `None` from discord payload. +- Fixed `Subscription.renewal_sku_ids` not accepting `None` from discord payload. ([#2709](https://github.com/Pycord-Development/pycord/pull/2709)) ### Changed