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 59b3496 commit f4ce449Copy full SHA for f4ce449
lib/Client.js
@@ -359,6 +359,8 @@ class Client extends EventEmitter {
359
async connect() {
360
try {
361
const data = await (this.options.maxShards === "auto" ? this.getBotGateway() : this.getGateway());
362
+ this.shards.maxConcurrency = this.options.maxShards === "auto" ? data.session_start_limit.max_concurrency : 1;
363
+ this._client.options.useMaxConcurrency = this._client.options.useMaxConcurrency && this.shards.maxConcurrency !== 1;
364
if(!data.url || (this.options.maxShards === "auto" && !data.shards)) {
365
throw new Error("Invalid response from gateway REST call");
366
}
0 commit comments