From a75bce24f7a8745d754124673ad4fffde5f84f56 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 11 May 2022 16:51:49 +0300 Subject: [PATCH] more logging --- src/middleware/BaseClient.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/middleware/BaseClient.js b/src/middleware/BaseClient.js index f958b17..4626b91 100644 --- a/src/middleware/BaseClient.js +++ b/src/middleware/BaseClient.js @@ -32,13 +32,14 @@ class BaseClient extends EventEmitter { async build() { + const start = Date.now(); await this.shardingManager.spawn().catch((error) => { this.logger.error(`Fatal error during shard spawning:\n${error.stack || error}`); // eslint-disable-next-line no-process-exit process.exit(); // Prevent a boot loop when shards die due to an error in the client }); - this.logger.status(`Shards spawned, spawned ${this.shardingManager.shards.size} shards`); + this.logger.status(`Shards spawned, spawned ${this.shardingManager.shards.size} shards. Took ${Date.now() - start} ms`); const API = this._options.api.load ? await import('/Documents/My programs/GBot/api/index.js') .catch(() => this.logger.warn(`Error importing API files, continuing without`)) : null;