diff options
| author | Steve C <[email protected]> | 2021-04-14 22:10:47 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-14 22:10:47 -0400 |
| commit | 65d48302ad69e334661c4579f63aaff0af92f63f (patch) | |
| tree | 7dfef90adc0c9c617ceff958abc9057523d61f7d /discord/guild.py | |
| parent | [commands] Add `clean_prefix` attribute to commands.Context (diff) | |
| download | discord.py-65d48302ad69e334661c4579f63aaff0af92f63f.tar.xz discord.py-65d48302ad69e334661c4579f63aaff0af92f63f.zip | |
Fix guild.chunk() not working on evicted guilds
If you're trying to chunk a guild that the bot is not in,
it'll just hang on the chunk coro forever. It's weird, I know.
Diffstat (limited to 'discord/guild.py')
| -rw-r--r-- | discord/guild.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/guild.py b/discord/guild.py index a0bcd237..3f63d873 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -2218,7 +2218,8 @@ class Guild(Hashable): if not self._state._intents.members: raise ClientException('Intents.members must be enabled to use this.') - return await self._state.chunk_guild(self, cache=cache) + if not self._state.is_guild_evicted(self): + return await self._state.chunk_guild(self, cache=cache) async def query_members(self, query=None, *, limit=5, user_ids=None, presences=False, cache=True): """|coro| |