mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-11-08 04:43:03 +00:00
Delay after executing action in sendActionDSL
This commit is contained in:
1 parent
40c5af4469
commit
21ba1cca30
1 file changed
+1
-1
+1
-1
@@ -24,10 +24,10 @@ public suspend fun <T> TelegramBot.withAction(
|
|||||||
}
|
}
|
||||||
val botActionJob = CoroutineScope(currentCoroutineContext()).launch {
|
val botActionJob = CoroutineScope(currentCoroutineContext()).launch {
|
||||||
while (isActive) {
|
while (isActive) {
|
||||||
delay(refreshTime)
|
|
||||||
safelyWithoutExceptions {
|
safelyWithoutExceptions {
|
||||||
execute(actionRequest)
|
execute(actionRequest)
|
||||||
}
|
}
|
||||||
|
delay(refreshTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val result = safelyWithResult { block() }
|
val result = safelyWithResult { block() }
|
||||||
|
|||||||
Reference in new issue
Block a user