Don't try to close shards if there are none yet.
This commit is contained in:
parent
77239e4f15
commit
e29e3438ec
@ -286,7 +286,9 @@ class AutoShardedClient(Client):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
to_close = [shard.ws.close() for shard in self.shards.values()]
|
to_close = [shard.ws.close() for shard in self.shards.values()]
|
||||||
await asyncio.wait(to_close, loop=self.loop)
|
if to_close:
|
||||||
|
await asyncio.wait(to_close, loop=self.loop)
|
||||||
|
|
||||||
await self.http.close()
|
await self.http.close()
|
||||||
|
|
||||||
async def change_presence(self, *, activity=None, status=None, afk=False, shard_id=None):
|
async def change_presence(self, *, activity=None, status=None, afk=False, shard_id=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user