From 6214942f860db2b3a41ff3b8aada5eef881d91e8 Mon Sep 17 00:00:00 2001 From: DA344 <108473820+DA-344@users.noreply.github.com> Date: Thu, 16 Jan 2025 00:22:04 +0100 Subject: [PATCH] Fix SessionStartLimits and SKU.subscriptions docstrings --- discord/shard.py | 4 ++-- discord/sku.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/shard.py b/discord/shard.py index eeb240c95..454fd5e28 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -299,6 +299,8 @@ class ShardInfo: class SessionStartLimits: """A class that holds info about session start limits + .. versionadded:: 2.5 + Attributes ---------- total: :class:`int` @@ -309,8 +311,6 @@ class SessionStartLimits: The number of milliseconds until the limit resets max_concurrency: :class:`int` The number of identify requests allowed per 5 seconds - - .. versionadded:: 2.5 """ __slots__ = ("total", "remaining", "reset_after", "max_concurrency") diff --git a/discord/sku.py b/discord/sku.py index f3e457505..46bdf94bf 100644 --- a/discord/sku.py +++ b/discord/sku.py @@ -146,12 +146,12 @@ class SKU: Usage :: - async for subscription in sku.subscriptions(limit=100): + async for subscription in sku.subscriptions(limit=100, user=user): print(subscription.user_id, subscription.current_period_end) Flattening into a list :: - subscriptions = [subscription async for subscription in sku.subscriptions(limit=100)] + subscriptions = [subscription async for subscription in sku.subscriptions(limit=100, user=user)] # subscriptions is now a list of Subscription... All parameters are optional.