From f47568ee71891d39449a3e64af1e6e7840a38f84 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 1 Apr 2022 11:47:27 -0400 Subject: [PATCH] Document Guild.bans breaking change in the migrating guide --- docs/migrating.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/migrating.rst b/docs/migrating.rst index f78a15853..35cbf74b0 100644 --- a/docs/migrating.rst +++ b/docs/migrating.rst @@ -921,6 +921,22 @@ This removes the following: - ``commands.StoreChannelConverter`` - ``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 ----------------------------