diff options
| author | Rapptz <[email protected]> | 2020-09-10 05:26:35 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-09-23 03:21:19 -0400 |
| commit | 055fe7624193a3271ebfb2e9e32f90e148fdcbf2 (patch) | |
| tree | b540316cd3dc91269a19ca9abe2729b49a55af4c /discord/client.py | |
| parent | Add versionadded for intents enum (diff) | |
| download | discord.py-055fe7624193a3271ebfb2e9e32f90e148fdcbf2.tar.xz discord.py-055fe7624193a3271ebfb2e9e32f90e148fdcbf2.zip | |
Fix Client.request_offline_members no longer working
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py index 91d83da4..dc8b360d 100644 --- a/discord/client.py +++ b/discord/client.py @@ -395,6 +395,10 @@ class Client: in the guild is larger than 250. You can check if a guild is large if :attr:`.Guild.large` is ``True``. + .. warning:: + + This method is deprecated. + Parameters ----------- \*guilds: :class:`.Guild` @@ -403,12 +407,13 @@ class Client: Raises ------- :exc:`.InvalidArgument` - If any guild is unavailable or not large in the collection. + If any guild is unavailable in the collection. """ - if any(not g.large or g.unavailable for g in guilds): - raise InvalidArgument('An unavailable or non-large guild was passed.') + if any(g.unavailable for g in guilds): + raise InvalidArgument('An unavailable guild was passed.') - await self._connection.request_offline_members(guilds) + for guild in guilds: + await self._connection.chunk_guild(guild) # hooks |