fix: If not release channel, disable to train

This commit is contained in:
Siwoo Jeon 2024-09-28 12:23:54 +09:00
parent 3ac32871f6
commit 9821bac66a
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA
2 changed files with 7 additions and 2 deletions

View file

@ -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": {

View file

@ -58,7 +58,12 @@ export default class MuffinBot extends SapphireClient {
}
public override async login(): Promise<string> {
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)
}
}