mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
refactor: ES2021 features (#6540)
Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
@@ -178,7 +178,7 @@ class ShardingManager extends EventEmitter {
|
||||
* @param {MultipleShardSpawnOptions} [options] Options for spawning shards
|
||||
* @returns {Promise<Collection<number, Shard>>}
|
||||
*/
|
||||
async spawn({ amount = this.totalShards, delay = 5500, timeout = 30000 } = {}) {
|
||||
async spawn({ amount = this.totalShards, delay = 5500, timeout = 30_000 } = {}) {
|
||||
// Obtain/verify the number of shards to spawn
|
||||
if (amount === 'auto') {
|
||||
amount = await Util.fetchRecommendedShards(this.token);
|
||||
@@ -302,7 +302,7 @@ class ShardingManager extends EventEmitter {
|
||||
* @param {MultipleShardRespawnOptions} [options] Options for respawning shards
|
||||
* @returns {Promise<Collection<string, Shard>>}
|
||||
*/
|
||||
async respawnAll({ shardDelay = 5000, respawnDelay = 500, timeout = 30000 } = {}) {
|
||||
async respawnAll({ shardDelay = 5_000, respawnDelay = 500, timeout = 30_000 } = {}) {
|
||||
let s = 0;
|
||||
for (const shard of this.shards.values()) {
|
||||
const promises = [shard.respawn({ respawnDelay, timeout })];
|
||||
|
||||
Reference in New Issue
Block a user