diff --git a/bot.ts b/bot.ts index 649972bc4..90b7bcb39 100644 --- a/bot.ts +++ b/bot.ts @@ -262,6 +262,8 @@ export function createEventHandlers( export async function startBot(bot: Bot) { if (!bot.botGatewayData) { bot.gateway.gatewayBot = await bot.helpers.getGatewayBot(); + bot.gateway.lastShardId = bot.gateway.gatewayBot.shards - 1; + bot.gateway.manager.totalShards = bot.gateway.gatewayBot.shards; } bot.gateway.spawnShards(); diff --git a/gateway/shard/handleClose.ts b/gateway/shard/handleClose.ts index a5c9ee446..e2ff6899a 100644 --- a/gateway/shard/handleClose.ts +++ b/gateway/shard/handleClose.ts @@ -6,12 +6,8 @@ export async function handleClose(shard: Shard, close: CloseEvent): Promise