diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f94bd51ec..633799b7ab 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 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"])