diff --git a/bot.ts b/bot.ts index 90b7bcb39..7eb1a2396 100644 --- a/bot.ts +++ b/bot.ts @@ -260,7 +260,7 @@ export function createEventHandlers( } export async function startBot(bot: Bot) { - if (!bot.botGatewayData) { + if (!Object.keys(bot.botGatewayData ?? {}).length) { bot.gateway.gatewayBot = await bot.helpers.getGatewayBot(); bot.gateway.lastShardId = bot.gateway.gatewayBot.shards - 1; bot.gateway.manager.totalShards = bot.gateway.gatewayBot.shards; diff --git a/gateway/shard/handleClose.ts b/gateway/shard/handleClose.ts index e2ff6899a..59f8df485 100644 --- a/gateway/shard/handleClose.ts +++ b/gateway/shard/handleClose.ts @@ -7,7 +7,6 @@ export async function handleClose(shard: Shard, close: CloseEvent): Promise