Teensy cleanup

This commit is contained in:
Schuyler Cebulskie
2016-10-13 23:32:52 -04:00
parent 853a3dfa04
commit aad06c1116
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -61,10 +61,10 @@ class ShardingManager extends EventEmitter {
this.spawnArgs = options.spawnArgs;
/**
* Token that will be passed to the shards. Also used for auto shard count.
* Token to use for obtaining the automatic shard count, and passing to shards
* @type {string}
*/
this.token = options.token || null;
this.token = options.token;
/**
* A collection of shards that this manager has spawned

View File

@@ -8,7 +8,7 @@ const botGateway = require('./Constants').Endpoints.botGateway;
*/
module.exports = function getRecommendedShards(token) {
return new Promise((resolve, reject) => {
if (!token) reject(new Error('A token must be provided.'));
if (!token) throw new Error('A token must be provided.');
superagent.get(botGateway)
.set('Authorization', `Bot ${token.replace('Bot ', '')}`)
.end((err, res) => {