Simplify Shard.env

This commit is contained in:
Schuyler Cebulskie
2016-10-26 15:31:05 -04:00
committed by GitHub
parent 1a3ea65abd
commit ecee07655f

View File

@@ -29,10 +29,11 @@ class Shard {
* The environment variables for the shard * The environment variables for the shard
* @type {Object} * @type {Object}
*/ */
this.env = Object.assign({}, process.env); this.env = Object.assign({}, process.env, {
this.env.SHARD_ID = this.id; SHARD_ID: this.id,
this.env.SHARD_COUNT = this.manager.totalShards; SHARD_COUNT: this.manager.totalShards,
if (this.manager.token) this.env.CLIENT_TOKEN = this.manager.token; CLIENT_TOKEN: this.manager.token,
});
/** /**
* Process of the shard * Process of the shard