diff --git a/lib/Client.js b/lib/Client.js index 02caf85e6..21712195f 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -359,6 +359,8 @@ class Client extends EventEmitter { async connect() { try { const data = await (this.options.maxShards === "auto" ? this.getBotGateway() : this.getGateway()); + this.shards.maxConcurrency = this.options.maxShards === "auto" ? data.session_start_limit.max_concurrency : 1; + this._client.options.useMaxConcurrency = this._client.options.useMaxConcurrency && this.shards.maxConcurrency !== 1; if(!data.url || (this.options.maxShards === "auto" && !data.shards)) { throw new Error("Invalid response from gateway REST call"); }