diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index ab5b92164..25f66bbfc 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -474,17 +474,23 @@ class WebSocketShard extends EventEmitter { this.emit(ShardEvents.ALL_READY); return; } + const hasGuildsIntent = new Intents(this.manager.client.options.intents).has(Intents.FLAGS.GUILDS); // Step 2. Create a 15s timeout that will mark the shard as ready if there are still unavailable guilds - this.readyTimeout = setTimeout(() => { - this.debug(`Shard did not receive any more guild packets in 15 seconds. - Unavailable guild count: ${this.expectedGuilds.size}`); + this.readyTimeout = setTimeout( + () => { + this.debug( + `Shard ${hasGuildsIntent ? 'did' : 'will'} not receive any more guild packets` + + `${hasGuildsIntent ? ' in 15 seconds' : ''}.\n Unavailable guild count: ${this.expectedGuilds.size}`, + ); - this.readyTimeout = null; + this.readyTimeout = null; - this.status = Status.READY; + this.status = Status.READY; - this.emit(ShardEvents.ALL_READY, this.expectedGuilds); - }, 15000).unref(); + this.emit(ShardEvents.ALL_READY, this.expectedGuilds); + }, + hasGuildsIntent ? 15000 : 0, + ).unref(); } /**