mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Move all async object creation to a proper initialisation point
This should make it so no object is created with another loop
This commit is contained in:
@ -424,8 +424,11 @@ class AutoShardedClient(Client):
|
||||
|
||||
self._connection.shards_launched.set()
|
||||
|
||||
async def connect(self, *, reconnect: bool = True) -> None:
|
||||
async def _async_setup_hook(self) -> None:
|
||||
await super()._async_setup_hook()
|
||||
self.__queue = asyncio.PriorityQueue()
|
||||
|
||||
async def connect(self, *, reconnect: bool = True) -> None:
|
||||
self._reconnect = reconnect
|
||||
await self.launch_shards()
|
||||
|
||||
|
Reference in New Issue
Block a user