From 5b2f630848f42940d62ce7af5ee1484a39259ceb Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 15 Jul 2019 07:56:35 -0400 Subject: Add Guild.query_members to fetch members from the gateway. --- discord/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'discord/utils.py') 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) -- cgit v1.2.3