Revert all Guild.chunk changes

This method should *not* return a list of members due to the way it is
used internally.
This commit is contained in:
Rapptz 2022-03-07 22:14:38 -05:00
parent e6a87e0782
commit 987e27dfce
2 changed files with 3 additions and 8 deletions

View File

@ -3375,7 +3375,7 @@ class Guild(Hashable):
await self._state.http.edit_widget(self.id, payload=payload, reason=reason) await self._state.http.edit_widget(self.id, payload=payload, reason=reason)
async def chunk(self, *, cache: bool = True) -> Optional[List[Member]]: async def chunk(self, *, cache: bool = True) -> None:
"""|coro| """|coro|
Requests all members that belong to this guild. In order to use this, Requests all members that belong to this guild. In order to use this,
@ -3394,18 +3394,13 @@ class Guild(Hashable):
------- -------
ClientException ClientException
The members intent is not enabled. The members intent is not enabled.
Returns
--------
Optional[List[:class:`Member`]]
Returns a list of all the members in the guild.
""" """
if not self._state._intents.members: if not self._state._intents.members:
raise ClientException('Intents.members must be enabled to use this.') raise ClientException('Intents.members must be enabled to use this.')
if not self._state.is_guild_evicted(self): if not self._state.is_guild_evicted(self):
return await self._state.chunk_guild(self, cache=cache) await self._state.chunk_guild(self, cache=cache)
async def query_members( async def query_members(
self, self,

View File

@ -1073,7 +1073,7 @@ class ConnectionState:
if wait: if wait:
return await request.wait() return await request.wait()
return await request.get_future() return request.get_future()
async def _chunk_and_dispatch(self, guild, unavailable): async def _chunk_and_dispatch(self, guild, unavailable):
try: try: