mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
fix(ShardingManager): respawnAll shard iteration
This commit is contained in:
@@ -194,7 +194,7 @@ class ShardingManager extends EventEmitter {
|
||||
*/
|
||||
async respawnAll(shardDelay = 5000, respawnDelay = 500, waitForReady = true) {
|
||||
let s = 0;
|
||||
for (const shard of this.shards) {
|
||||
for (const shard of this.shards.values()) {
|
||||
const promises = [shard.respawn(respawnDelay, waitForReady)];
|
||||
if (++s < this.shards.size && shardDelay > 0) promises.push(Util.delayFor(shardDelay));
|
||||
await Promise.all(promises); // eslint-disable-line no-await-in-loop
|
||||
|
||||
Reference in New Issue
Block a user