Merge pull request #883 from DRSchlaubi/patch-1

Delay after executing action in sendActionDSL
This commit is contained in:
InsanusMokrassar authored and GitHub committed 2024-08-15 00:31:19 +06:00
commit 1990e6b158
1 file changed
+1 -1
@@ -24,10 +24,10 @@ public suspend fun <T> TelegramBot.withAction(
}
val botActionJob = CoroutineScope(currentCoroutineContext()).launch {
while (isActive) {
delay(refreshTime)
safelyWithoutExceptions {
execute(actionRequest)
}
delay(refreshTime)
}
}
val result = safelyWithResult { block() }