From 9821bac66a4f1b0233c219ccabf60a3078f01aaf Mon Sep 17 00:00:00 2001 From: Siwoo Jeon Date: Sat, 28 Sep 2024 12:23:54 +0900 Subject: [PATCH] fix: If not release channel, disable to train --- package.json | 2 +- src/Client.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ccab18b..3ea891f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muffinbot", - "version": "4.0.0-pudding.d240928a", + "version": "4.0.0-pudding.d240928b", "main": "dist/index.js", "private": true, "dependencies": { diff --git a/src/Client.ts b/src/Client.ts index 60a8218..8695115 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -58,7 +58,12 @@ export default class MuffinBot extends SapphireClient { } public override async login(): Promise { - await container.chatBot.train(this) + if (container.release === 'RELEASE') await container.chatBot.train(this) + else + container.logger.info( + '[MuffinBot] 해당 채널은 RELEASE 채널이 아니라서 학습 기능이 꺼졌습니다.\n' + + `현재 채널: ${container.release}`, + ) return super.login(config.bot.token) } }