From bcaa43ab7d4b8f58c24d3a73669181a7dc6f4e90 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Thu, 31 Mar 2022 01:28:03 +0000 Subject: [PATCH] fix: lastShardId on startBot --- bot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.ts b/bot.ts index d5dbdfc06..e0de5d662 100644 --- a/bot.ts +++ b/bot.ts @@ -264,7 +264,7 @@ export async function startBot(bot: Bot) { bot.gateway.sessionStartLimitRemaining = bot.botGatewayData.sessionStartLimit.remaining; bot.gateway.sessionStartLimitResetAfter = bot.botGatewayData.sessionStartLimit.resetAfter; bot.gateway.maxConcurrency = bot.botGatewayData.sessionStartLimit.maxConcurrency; - bot.gateway.lastShardId = bot.botGatewayData.shards; + bot.gateway.lastShardId = bot.botGatewayData.shards === 1 ? 0 : bot.botGatewayData.shards - 1; bot.gateway.maxShards = bot.botGatewayData.shards; bot.gateway.spawnShards(bot.gateway);