Update READY.ts

This commit is contained in:
ITOH
2021-05-13 18:40:59 +02:00
parent 076ff2b1d9
commit 460af98807
+2 -1
View File
@@ -67,7 +67,7 @@ function loaded(shard: DiscordenoShard) {
shard.ready = true; shard.ready = true;
// If it is not the last shard we can't go full ready // If it is not the last shard we can't go full ready
if (shard.id !== ws.maxShards - 1) return; if (shard.id !== ws.lastShardId) return;
// Still some shards are loading so wait another 2 seconds for them // Still some shards are loading so wait another 2 seconds for them
if (ws.shards.some((shard) => !shard.ready)) { if (ws.shards.some((shard) => !shard.ready)) {
@@ -78,6 +78,7 @@ function loaded(shard: DiscordenoShard) {
); );
loaded(shard); loaded(shard);
}, 2000); }, 2000);
return; return;
} }