mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Small cleanups
This commit is contained in:
@@ -27,11 +27,11 @@ class Client extends EventEmitter {
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ class Shard {
|
||||
*/
|
||||
this.process = childProcess.fork(path.resolve(this.manager.file), [], {
|
||||
env: {
|
||||
SHARD_ID: this.id, SHARD_COUNT: this.manager.totalShards,
|
||||
SHARD_ID: this.id,
|
||||
SHARD_COUNT: this.manager.totalShards,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user