mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +00:00
Small cleanups
This commit is contained in:
parent
13e2b923e8
commit
d9bc5cea1e
2 changed files with 4 additions and 3 deletions
|
|
@ -27,11 +27,11 @@ class Client extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
this.options = mergeDefault(Constants.DefaultOptions, options);
|
this.options = mergeDefault(Constants.DefaultOptions, options);
|
||||||
|
|
||||||
if (!this.options.shard_id && process.env.hasOwnProperty('SHARD_ID')) {
|
if (!this.options.shard_id && 'SHARD_ID' in process.env) {
|
||||||
this.options.shard_id = process.env.SHARD_ID;
|
this.options.shard_id = process.env.SHARD_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.options.shard_count && process.env.hasOwnProperty('SHARD_COUNT')) {
|
if (!this.options.shard_count && 'SHARD_COUNT' in process.env) {
|
||||||
this.options.shard_count = process.env.SHARD_COUNT;
|
this.options.shard_count = process.env.SHARD_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ class Shard {
|
||||||
*/
|
*/
|
||||||
this.process = childProcess.fork(path.resolve(this.manager.file), [], {
|
this.process = childProcess.fork(path.resolve(this.manager.file), [], {
|
||||||
env: {
|
env: {
|
||||||
SHARD_ID: this.id, SHARD_COUNT: this.manager.totalShards,
|
SHARD_ID: this.id,
|
||||||
|
SHARD_COUNT: this.manager.totalShards,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue