mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-11 04:17:58 +00:00
Fix return value of Guild.chunk
This commit is contained in:
parent
8d86ee3fe3
commit
4a76464ac9
@ -3390,7 +3390,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) -> None:
|
async def chunk(self, *, cache: bool = True) -> List[Member]:
|
||||||
"""|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,
|
||||||
@ -3409,13 +3409,20 @@ class Guild(Hashable):
|
|||||||
-------
|
-------
|
||||||
ClientException
|
ClientException
|
||||||
The members intent is not enabled.
|
The members intent is not enabled.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
--------
|
||||||
|
List[:class:`Member`]
|
||||||
|
The list of 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):
|
||||||
await self._state.chunk_guild(self, cache=cache)
|
return await self._state.chunk_guild(self, cache=cache)
|
||||||
|
|
||||||
|
return []
|
||||||
|
|
||||||
async def query_members(
|
async def query_members(
|
||||||
self,
|
self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user