Documenting that guild.chunk() returns list of members

This commit is contained in:
Scrumpy (Jay)
2022-03-06 02:32:27 +00:00
committed by GitHub
parent 5c9605fc1b
commit 3d0309ca4a

View File

@@ -3325,7 +3325,7 @@ class Guild(Hashable):
await self._state.http.edit_widget(self.id, payload=payload)
async def chunk(self, *, cache: bool = True) -> None:
async def chunk(self, *, cache: bool = True) -> Optional[List[Member]]:
"""|coro|
Requests all members that belong to this guild. In order to use this,
@@ -3344,6 +3344,11 @@ class Guild(Hashable):
-------
ClientException
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: