Browse Source

Fix SessionStartLimits and SKU.subscriptions docstrings

pull/10082/head
DA344 3 months ago
committed by GitHub
parent
commit
6214942f86
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      discord/shard.py
  2. 4
      discord/sku.py

4
discord/shard.py

@ -299,6 +299,8 @@ class ShardInfo:
class SessionStartLimits: class SessionStartLimits:
"""A class that holds info about session start limits """A class that holds info about session start limits
.. versionadded:: 2.5
Attributes Attributes
---------- ----------
total: :class:`int` total: :class:`int`
@ -309,8 +311,6 @@ class SessionStartLimits:
The number of milliseconds until the limit resets The number of milliseconds until the limit resets
max_concurrency: :class:`int` max_concurrency: :class:`int`
The number of identify requests allowed per 5 seconds The number of identify requests allowed per 5 seconds
.. versionadded:: 2.5
""" """
__slots__ = ("total", "remaining", "reset_after", "max_concurrency") __slots__ = ("total", "remaining", "reset_after", "max_concurrency")

4
discord/sku.py

@ -146,12 +146,12 @@ class SKU:
Usage :: 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) print(subscription.user_id, subscription.current_period_end)
Flattening into a list :: 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... # subscriptions is now a list of Subscription...
All parameters are optional. All parameters are optional.

Loading…
Cancel
Save