diff --git a/packages/bot/src/bot.ts b/packages/bot/src/bot.ts index b110ae41f..5fbb66a65 100644 --- a/packages/bot/src/bot.ts +++ b/packages/bot/src/bot.ts @@ -75,7 +75,7 @@ export function createBot(options: CreateBotOptions): Bot { if (!options.gateway?.totalShards) bot.gateway.totalShards = bot.gateway.connection.shards - if (!options.gateway?.lastShardId) bot.gateway.lastShardId = bot.gateway.connection.shards - 1 + if (!options.gateway?.lastShardId && !options.gateway?.totalShards) bot.gateway.lastShardId = bot.gateway.connection.shards - 1 } await bot.gateway.spawnShards()