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;