forked from Galactic/galactic-bot
more logging
This commit is contained in:
parent
6f74e9af0a
commit
a75bce24f7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user