We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4592168 commit a59e84cCopy full SHA for a59e84c
lib/Client.js
@@ -423,6 +423,8 @@ class Client extends EventEmitter {
423
async connect() {
424
try {
425
const data = await (this.options.maxShards === "auto" ? this.getBotGateway() : this.getGateway());
426
+ this.shards.maxConcurrency = this.options.maxShards === "auto" ? data.session_start_limit.max_concurrency : 1;
427
+ this._client.options.useMaxConcurrency = this._client.options.useMaxConcurrency && this.shards.maxConcurrency !== 1;
428
if(!data.url || (this.options.maxShards === "auto" && !data.shards)) {
429
throw new Error("Invalid response from gateway REST call");
430
}
0 commit comments