diff --git a/lib/gateway/ShardManager.js b/lib/gateway/ShardManager.js index fc104fbcc..f2cc8c6da 100644 --- a/lib/gateway/ShardManager.js +++ b/lib/gateway/ShardManager.js @@ -2,7 +2,6 @@ const Base = require("../structures/Base"); const Collection = require("../util/Collection"); -const Endpoints = require("../rest/Endpoints"); const Shard = require("./Shard"); class ShardManager extends Collection { @@ -20,7 +19,7 @@ class ShardManager extends Collection { async connect(shard) { // fetch max_concurrency if needed if(!this.concurrency) { - const gateway = await this._client.requestHandler.request("GET", Endpoints.GATEWAY_BOT, true); + const gateway = await this._client.getBotGateway(); if(gateway.session_start_limit && gateway.session_start_limit.max_concurrency) { this.concurrency = gateway.session_start_limit.max_concurrency; } else { @@ -140,7 +139,7 @@ class ShardManager extends Collection { this.connectTimeout = setTimeout(() => { this.connectTimeout = null; this.tryConnect(); - }, 1000); + }, 500); } }