Browse Source

Fully initialise asyncio state in __aenter__

pull/7704/head
Rapptz 3 years ago
parent
commit
7c0a9e901d
  1. 2
      discord/client.py

2
discord/client.py

@ -232,7 +232,7 @@ class Client:
_log.warning("PyNaCl is not installed, voice will NOT be supported") _log.warning("PyNaCl is not installed, voice will NOT be supported")
async def __aenter__(self) -> Self: async def __aenter__(self) -> Self:
self.loop = asyncio.get_running_loop() await self._async_setup_hook()
return self return self
async def __aexit__( async def __aexit__(

Loading…
Cancel
Save