Add ShardClientUtil#respawnAll

This commit is contained in:
Schuyler Cebulskie
2017-11-19 01:54:10 -05:00
parent a414e4884f
commit 2a332d8d15
2 changed files with 24 additions and 0 deletions

View File

@@ -255,6 +255,15 @@ class Shard extends EventEmitter {
);
return;
}
// Shard is requesting a respawn of all shards
if (message._sRespawnAll) {
const { shardDelay, respawnDelay, waitForReady } = message._sRespawnAll;
this.manager.respawn(shardDelay, respawnDelay, waitForReady).catch(() => {
// Do nothing
});
return;
}
}
/**