fix: use last shard id not maxShards

This commit is contained in:
Skillz4Killz
2022-03-31 01:27:23 +00:00
committed by GitHub
parent 44aa645b67
commit cf61ed4d34
+1 -1
View File
@@ -88,7 +88,7 @@ export async function resharderIsPending(
gateway: GatewayManager,
oldGateway: GatewayManager,
) {
for (let i = gateway.firstShardId; i < gateway.maxShards; i++) {
for (let i = gateway.firstShardId; i < gateway.lastShardId; i++) {
const shard = gateway.shards.get(i);
if (!shard?.ready) {
return true;