mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Teensy cleanup
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user