From 49cbf46c4414151930905df4d6c112c2cbdcdc36 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 7f8a92900..e338602cf 100644 --- a/discord/client.py +++ b/discord/client.py @@ -661,7 +661,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() state = self._connection data = await state.http.static_login(token.strip())