diff --git a/src/main/kotlin/dev/t7e/mechatechkt/config/BotStatus.kt b/src/main/kotlin/dev/t7e/mechatechkt/config/BotStatus.kt index b0006be..566d815 100644 --- a/src/main/kotlin/dev/t7e/mechatechkt/config/BotStatus.kt +++ b/src/main/kotlin/dev/t7e/mechatechkt/config/BotStatus.kt @@ -14,7 +14,8 @@ import java.io.File data class BotStatus( var progressReportChannel: ULong = "0".toULong(), var cleanUpChannel: ULong = "0".toULong(), - var enabledProgressReport: Boolean = "false".toBoolean() + var enabledProgressReport: Boolean = "false".toBoolean(), + var enabledCleanUp: Boolean = "false".toBoolean() ) { companion object { private val yaml = Yaml(configuration = YamlConfiguration(encodeDefaults = true, strictMode = false)) diff --git a/src/main/kotlin/dev/t7e/mechatechkt/unit/CleanUp.kt b/src/main/kotlin/dev/t7e/mechatechkt/unit/CleanUp.kt index 297c1aa..10c56c4 100644 --- a/src/main/kotlin/dev/t7e/mechatechkt/unit/CleanUp.kt +++ b/src/main/kotlin/dev/t7e/mechatechkt/unit/CleanUp.kt @@ -31,7 +31,7 @@ object CleanUp { val task = timerTask { // check enabled - if (!BotStatus.config.enabledProgressReport) return@timerTask + if (!BotStatus.config.enabledCleanUp) return@timerTask GlobalScope.launch { // check today is not weekend