mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Fix SessionStartLimits and SKU.subscriptions docstrings
This commit is contained in:
parent
eb15aa8ca4
commit
6214942f86
@ -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")
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user