mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Clean up a bunch of promise stuff
This commit is contained in:
@@ -110,7 +110,7 @@ class ShardingManager extends EventEmitter {
|
||||
fetchRecommendedShards(this.token).then(count => {
|
||||
this.totalShards = count;
|
||||
resolve(this._spawn(count, delay));
|
||||
}).catch(reject);
|
||||
}, reject);
|
||||
} else {
|
||||
if (typeof amount !== 'number' || isNaN(amount)) throw new TypeError('Amount of shards must be a number.');
|
||||
if (amount < 1) throw new RangeError('Amount of shards must be at least 1.');
|
||||
|
||||
Reference in New Issue
Block a user