From b4a0627fe32d283abbe2c66108dea25b1163c25c Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sun, 1 May 2022 23:47:50 +0300 Subject: [PATCH] don't respawn shard in dev env --- 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 5fa8c6c..b5b3156 100644 --- a/src/middleware/BaseClient.js +++ b/src/middleware/BaseClient.js @@ -12,7 +12,8 @@ class BaseClient extends EventEmitter { super(); - this.shardingManager = new ShardingManager('src/structure/DiscordClient.js', options.discord.shardOptions); + const respawn = process.env.NODE_ENV !== 'development'; + this.shardingManager = new ShardingManager('src/structure/DiscordClient.js', { ...options.discord.shardOptions, respawn }); this.slashCommandManager = new SlashCommandManager(this); this.logger = new Logger(this, options.logger);