aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-12 05:28:18 -0400
committerRapptz <[email protected]>2021-04-12 05:28:18 -0400
commita8da7d03b91e4a7f8639184df329364b05240ff5 (patch)
tree35033bf59479455a95ac5fef210837680b6f3c56
parentAdd support for role objects in GuildChannel.permissions_for (diff)
downloaddiscord.py-a8da7d03b91e4a7f8639184df329364b05240ff5.tar.xz
discord.py-a8da7d03b91e4a7f8639184df329364b05240ff5.zip
Remove AutoShardedClient.request_offline_members
-rw-r--r--discord/shard.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/discord/shard.py b/discord/shard.py
index 9b900338..faa56bc7 100644
--- a/discord/shard.py
+++ b/discord/shard.py
@@ -359,42 +359,6 @@ class AutoShardedClient(Client):
"""Mapping[int, :class:`ShardInfo`]: Returns a mapping of shard IDs to their respective info object."""
return { shard_id: ShardInfo(parent, self.shard_count) for shard_id, parent in self.__shards.items() }
- @utils.deprecated('Guild.chunk')
- async def request_offline_members(self, *guilds):
- r"""|coro|
-
- Requests previously offline members from the guild to be filled up
- into the :attr:`Guild.members` cache. This function is usually not
- called. It should only be used if you have the ``fetch_offline_members``
- parameter set to ``False``.
-
- When the client logs on and connects to the websocket, Discord does
- not provide the library with offline members if the number of members
- 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. Use :meth:`Guild.chunk` instead.
-
- Parameters
- -----------
- \*guilds: :class:`Guild`
- An argument list of guilds to request offline members for.
-
- Raises
- -------
- InvalidArgument
- If any guild is unavailable in the collection.
- """
- if any(g.unavailable for g in guilds):
- raise InvalidArgument('An unavailable or non-large guild was passed.')
-
- _guilds = sorted(guilds, key=lambda g: g.shard_id)
- for shard_id, sub_guilds in itertools.groupby(_guilds, key=lambda g: g.shard_id):
- for guild in sub_guilds:
- await self._connection.chunk_guild(guild)
-
async def launch_shard(self, gateway, shard_id, *, initial=False):
try:
coro = DiscordWebSocket.from_client(self, initial=initial, gateway=gateway, shard_id=shard_id)