mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
fix: set last shard id
This commit is contained in:
@@ -31,6 +31,8 @@ export async function startBot(config: BotConfig) {
|
||||
// Initial API connection to get info about bots connection
|
||||
ws.botGatewayData = await getGatewayBot();
|
||||
ws.maxShards = ws.maxShards || ws.botGatewayData.shards;
|
||||
ws.lastShardId =
|
||||
ws.lastShardId === 1 ? ws.botGatewayData.shards : ws.lastShardId;
|
||||
|
||||
// Explicitly append gateway version and encoding
|
||||
ws.botGatewayData.url += `?v=${GATEWAY_VERSION}&encoding=json`;
|
||||
|
||||
Reference in New Issue
Block a user