fix: lastShardId on startBot

This commit is contained in:
Skillz4Killz
2022-03-31 01:28:03 +00:00
committed by GitHub
parent aaa2312ea2
commit bcaa43ab7d

2
bot.ts
View File

@@ -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);