diff options
| author | Rapptz <[email protected]> | 2019-07-15 07:56:35 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-07-15 07:56:48 -0400 |
| commit | 5b2f630848f42940d62ce7af5ee1484a39259ceb (patch) | |
| tree | 81302fa9ad7c7282b9c0fb76b246a2b9772db2b9 /discord/utils.py | |
| parent | Allow complete disabling of the member cache. (diff) | |
| download | discord.py-5b2f630848f42940d62ce7af5ee1484a39259ceb.tar.xz discord.py-5b2f630848f42940d62ce7af5ee1484a39259ceb.zip | |
Add Guild.query_members to fetch members from the gateway.
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/utils.py b/discord/utils.py index 48942a13..490ab767 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -323,11 +323,13 @@ async def async_all(gen, *, check=_isawaitable): return True async def sane_wait_for(futures, *, timeout, loop): - _, pending = await asyncio.wait(futures, timeout=timeout, loop=loop) + done, pending = await asyncio.wait(futures, timeout=timeout, return_when=asyncio.ALL_COMPLETED, loop=loop) if len(pending) != 0: raise asyncio.TimeoutError() + return done + def valid_icon_size(size): """Icons must be power of 2 within [16, 4096].""" return not size & (size - 1) and size in range(16, 4097) |