mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
fix(Client): apply shardId and shardCount to the correct options object (#1888)
This commit is contained in:
parent
70612d3a7c
commit
bb4fe256e0
1 changed files with 4 additions and 2 deletions
|
|
@ -31,8 +31,10 @@ class Client extends BaseClient {
|
|||
super(Object.assign({ _tokenType: 'Bot' }, options));
|
||||
|
||||
// Obtain shard details from environment
|
||||
if (!options.shardId && 'SHARD_ID' in process.env) options.shardId = Number(process.env.SHARD_ID);
|
||||
if (!options.shardCount && 'SHARD_COUNT' in process.env) options.shardCount = Number(process.env.SHARD_COUNT);
|
||||
if (!this.options.shardId && 'SHARD_ID' in process.env) this.options.shardId = Number(process.env.SHARD_ID);
|
||||
if (!this.options.shardCount && 'SHARD_COUNT' in process.env) {
|
||||
this.options.shardCount = Number(process.env.SHARD_COUNT);
|
||||
}
|
||||
|
||||
this._validateOptions();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue