mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Fix naming conflict with ShardingManager#respawn
This commit is contained in:
@@ -259,7 +259,7 @@ class Shard extends EventEmitter {
|
||||
// Shard is requesting a respawn of all shards
|
||||
if (message._sRespawnAll) {
|
||||
const { shardDelay, respawnDelay, waitForReady } = message._sRespawnAll;
|
||||
this.manager.respawn(shardDelay, respawnDelay, waitForReady).catch(() => {
|
||||
this.manager.respawnAll(shardDelay, respawnDelay, waitForReady).catch(() => {
|
||||
// Do nothing
|
||||
});
|
||||
return;
|
||||
|
||||
@@ -106,7 +106,7 @@ class ShardClientUtil {
|
||||
* (in milliseconds)
|
||||
* @param {boolean} [waitForReady=true] Whether to wait for a shard to become ready before continuing to another
|
||||
* @returns {Promise<void>} Resolves upon the message being sent
|
||||
* @see {@link ShardingManager#respawn}
|
||||
* @see {@link ShardingManager#respawnAll}
|
||||
*/
|
||||
respawnAll(shardDelay = 5000, respawnDelay = 500, waitForReady = true) {
|
||||
return this.send({ _sRespawnAll: { shardDelay, respawnDelay, waitForReady } });
|
||||
|
||||
@@ -184,7 +184,7 @@ class ShardingManager extends EventEmitter {
|
||||
* @param {boolean} [waitForReady=true] Whether to wait for a shard to become ready before continuing to another
|
||||
* @returns {Promise<Collection<string, Shard>>}
|
||||
*/
|
||||
async respawn(shardDelay = 5000, respawnDelay = 500, waitForReady = true) {
|
||||
async respawnAll(shardDelay = 5000, respawnDelay = 500, waitForReady = true) {
|
||||
let s = 0;
|
||||
for (const shard of this.shards) {
|
||||
const promises = [shard.respawn(respawnDelay, waitForReady)];
|
||||
|
||||
Reference in New Issue
Block a user