From 987235d5649e7c2b1a927637bab6547244ecb2cf Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 19 Apr 2022 04:27:52 -0400 Subject: [PATCH] Only call async setup if the loop sentinel hasn't been changed --- discord/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/client.py b/discord/client.py index 1dbd41f50..e91b4dd35 100644 --- a/discord/client.py +++ b/discord/client.py @@ -537,7 +537,8 @@ class Client: _log.info('logging in using static token') - await self._async_setup_hook() + if self.loop is _loop: + await self._async_setup_hook() data = await self.http.static_login(token.strip()) self._connection.user = ClientUser(state=self._connection, data=data)