Add Guild.query_members to fetch members from the gateway.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user