From a6f61dcbdecb4badb47040925f29f157da47bf95 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 20 Nov 2019 02:30:19 -0500 Subject: Fix all deprecation warnings for 3.8 --- discord/client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index 643bc606..67f6fd83 100644 --- a/discord/client.py +++ b/discord/client.py @@ -223,7 +223,7 @@ class Client: self._connection.shard_count = self.shard_count self._closed = False - self._ready = asyncio.Event(loop=self.loop) + self._ready = asyncio.Event() self._connection._get_websocket = lambda g: self.ws if VoiceClient.warn_nacl: @@ -457,7 +457,7 @@ class Client: async def _connect(self): coro = DiscordWebSocket.from_client(self, shard_id=self.shard_id) - self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop) + self.ws = await asyncio.wait_for(coro, timeout=180.0) while True: try: await self.ws.poll_event() @@ -466,7 +466,7 @@ class Client: self.dispatch('disconnect') coro = DiscordWebSocket.from_client(self, shard_id=self.shard_id, session=self.ws.session_id, sequence=self.ws.sequence, resume=True) - self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop) + self.ws = await asyncio.wait_for(coro, timeout=180.0) async def connect(self, *, reconnect=True): """|coro| @@ -528,7 +528,7 @@ class Client: retry = backoff.delay() log.exception("Attempting a reconnect in %.2fs", retry) - await asyncio.sleep(retry, loop=self.loop) + await asyncio.sleep(retry) async def close(self): """|coro| @@ -866,7 +866,7 @@ class Client: self._listeners[ev] = listeners listeners.append((future, check)) - return asyncio.wait_for(future, timeout, loop=self.loop) + return asyncio.wait_for(future, timeout) # event registration -- cgit v1.2.3