aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-11-20 02:30:19 -0500
committerRapptz <[email protected]>2019-11-20 02:30:19 -0500
commita6f61dcbdecb4badb47040925f29f157da47bf95 (patch)
treeeb69d643e9b7e57c76d409cc8b5893bb547cf3bb /discord/state.py
parentTrailing whitespace in documentation. (diff)
downloaddiscord.py-a6f61dcbdecb4badb47040925f29f157da47bf95.tar.xz
discord.py-a6f61dcbdecb4badb47040925f29f157da47bf95.zip
Fix all deprecation warnings for 3.8
Diffstat (limited to 'discord/state.py')
-rw-r--r--discord/state.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/discord/state.py b/discord/state.py
index ca7afcbe..210408b2 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -304,7 +304,7 @@ class ConnectionState:
# wait for the chunks
if chunks:
try:
- await utils.sane_wait_for(chunks, timeout=len(chunks) * 30.0, loop=self.loop)
+ await utils.sane_wait_for(chunks, timeout=len(chunks) * 30.0)
except asyncio.TimeoutError:
log.info('Somehow timed out waiting for chunks.')
@@ -323,7 +323,7 @@ class ConnectionState:
try:
# start the query operation
await ws.request_chunks(guild_id, query, limit)
- members = await asyncio.wait_for(future, timeout=5.0, loop=self.loop)
+ members = await asyncio.wait_for(future, timeout=5.0)
if cache:
for member in members:
@@ -344,7 +344,7 @@ class ConnectionState:
# this snippet of code is basically waiting 2 seconds
# until the last GUILD_CREATE was sent
launch.set()
- await asyncio.sleep(2, loop=self.loop)
+ await asyncio.sleep(2)
guilds = next(zip(*self._ready_state.guilds), [])
if self._fetch_offline:
@@ -694,7 +694,7 @@ class ConnectionState:
await self.chunker(guild)
if chunks:
try:
- await utils.sane_wait_for(chunks, timeout=len(chunks), loop=self.loop)
+ await utils.sane_wait_for(chunks, timeout=len(chunks))
except asyncio.TimeoutError:
log.info('Somehow timed out waiting for chunks.')
@@ -1006,7 +1006,7 @@ class AutoShardedConnectionState(ConnectionState):
# wait for the chunks
if chunks:
try:
- await utils.sane_wait_for(chunks, timeout=len(chunks) * 30.0, loop=self.loop)
+ await utils.sane_wait_for(chunks, timeout=len(chunks) * 30.0)
except asyncio.TimeoutError:
log.info('Somehow timed out waiting for chunks.')
@@ -1016,7 +1016,7 @@ class AutoShardedConnectionState(ConnectionState):
# this snippet of code is basically waiting 2 seconds
# until the last GUILD_CREATE was sent
launch.set()
- await asyncio.sleep(2.0 * self.shard_count, loop=self.loop)
+ await asyncio.sleep(2.0 * self.shard_count)
if self._fetch_offline:
guilds = sorted(self._ready_state.guilds, key=lambda g: g[0].shard_id)