Skip to content

Commit

Permalink
fix: 機能の有効化無効化が効かない問題を解決
Browse files Browse the repository at this point in the history
  • Loading branch information
testusuke committed Feb 28, 2024
1 parent 8cb9ed2 commit 9f19464
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/kotlin/dev/t7e/mechatechkt/config/BotStatus.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/dev/t7e/mechatechkt/unit/CleanUp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f19464

Please sign in to comment.