Skip to content

Commit

Permalink
refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
demidko committed Sep 23, 2024
1 parent 719f2cb commit c41dabe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/kotlin/com/github/demidko/glock/GlockBot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ class GlockBot(

private val idToChatOps = ConcurrentHashMap<Long, ChatOps>()

private var previousChatsCount = 0

fun cleanTempMessages() {
if(idToChatOps.count() > previousChatsCount) {
previousChatsCount = idToChatOps.count()
println("Bot has $previousChatsCount chats")
}
forEachChat(ChatOps::cleanTempMessages)
}

Expand Down

0 comments on commit c41dabe

Please sign in to comment.