mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Document Guild.bans breaking change in the migrating guide
This commit is contained in:
parent
e79895d824
commit
f47568ee71
@ -921,6 +921,22 @@ This removes the following:
|
|||||||
- ``commands.StoreChannelConverter``
|
- ``commands.StoreChannelConverter``
|
||||||
- ``ChannelType.store``
|
- ``ChannelType.store``
|
||||||
|
|
||||||
|
Change in ``Guild.bans`` endpoint
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Due to a breaking API change by Discord, :meth:`Guild.bans` no longer returns a list of every ban in the guild but instead is paginated using an asynchronous iterator.
|
||||||
|
|
||||||
|
.. code-block:: python3
|
||||||
|
|
||||||
|
# before
|
||||||
|
|
||||||
|
bans = await guild.bans()
|
||||||
|
|
||||||
|
# after
|
||||||
|
async for ban in guild.bans(limit=1000):
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
Function Signature Changes
|
Function Signature Changes
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user