Skip to content

Commit

Permalink
Merge pull request #10 from TNCT-Mechatech/feature/clean-up
Browse files Browse the repository at this point in the history
Fix: 機能の有効化無効化が聞かない問題を解決
  • Loading branch information
testusuke authored Feb 28, 2024
2 parents d0924da + 1e9f223 commit 6771baa
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 6771baa

Please sign in to comment.