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 152a3fb commit 94d0042Copy full SHA for 94d0042
lib/Client.js
@@ -421,6 +421,8 @@ class Client extends EventEmitter {
421
async connect() {
422
try {
423
const data = await (this.options.maxShards === "auto" ? this.getBotGateway() : this.getGateway());
424
+ this.shards.maxConcurrency = this.options.maxShards === "auto" ? data.session_start_limit.max_concurrency : 1;
425
+ this._client.options.useMaxConcurrency = this._client.options.useMaxConcurrency && this.shards.maxConcurrency !== 1;
426
if(!data.url || (this.options.maxShards === "auto" && !data.shards)) {
427
throw new Error("Invalid response from gateway REST call");
428
}
0 commit comments