mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix(bot): bug with overriding lastShardId if it's not provided in createBot() options (#3141)
* fix(gateway): bug with overriding lastShardId if it's not provided in createBot() options * fix the fix
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user