From 7c0a9e901d7162f82dda46915e54b437af3beeda Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 16 Mar 2022 05:51:25 -0400 Subject: [PATCH] Fully initialise asyncio state in __aenter__ --- discord/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/client.py b/discord/client.py index e8d19024c..b7e6f77d7 100644 --- a/discord/client.py +++ b/discord/client.py @@ -232,7 +232,7 @@ class Client: _log.warning("PyNaCl is not installed, voice will NOT be supported") async def __aenter__(self) -> Self: - self.loop = asyncio.get_running_loop() + await self._async_setup_hook() return self async def __aexit__(