mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 14:49:47 +00:00
so, now?
This commit is contained in:
@@ -13,7 +13,7 @@ ktor = "3.2.1"
|
||||
ksp = "2.2.0-2.0.2"
|
||||
kotlin-poet = "2.0.0"
|
||||
|
||||
microutils = "0.26.0"
|
||||
microutils = "0.26.1"
|
||||
kslog = "1.5.0"
|
||||
|
||||
versions = "0.52.0"
|
||||
|
@@ -3,6 +3,8 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.SpecialMutableStateFlow
|
||||
import dev.inmo.micro_utils.coroutines.runCatchingLogging
|
||||
import dev.inmo.micro_utils.coroutines.subscribeAsync
|
||||
import dev.inmo.micro_utils.coroutines.subscribeLoggingDropExceptions
|
||||
import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptionsAsync
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.*
|
||||
@@ -69,12 +71,16 @@ internal fun <BC : BehaviourContext, T> BC.on(
|
||||
createSubContextAndDoSynchronouslyWithUpdatesFilter(behaviourContextReceiver = { scenarioReceiver(triggerData) })
|
||||
}
|
||||
markerFactory ?.let {
|
||||
subscribeSafelyWithoutExceptionsAsync(
|
||||
subscribeAsync(
|
||||
scope,
|
||||
{ markerFactory(it.second) },
|
||||
block = handler
|
||||
)
|
||||
} ?: subscribeLoggingDropExceptions(scope) {
|
||||
logger = Log
|
||||
) {
|
||||
runCatchingLogging(logger = Log) {
|
||||
handler(it)
|
||||
}
|
||||
}
|
||||
} ?: subscribeLoggingDropExceptions(scope, logger = Log) {
|
||||
scope.launchWithBotLogger {
|
||||
handler(it)
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
@file:Suppress("OPT_IN_USAGE")
|
||||
|
||||
package dev.inmo.tgbotapi.ksp.processor
|
||||
|
||||
import com.google.devtools.ksp.KspExperimental
|
||||
import com.google.devtools.ksp.getAnnotationsByType
|
||||
import com.google.devtools.ksp.isAnnotationPresent
|
||||
import com.google.devtools.ksp.symbol.*
|
||||
import com.squareup.kotlinpoet.*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
|
||||
|
||||
package dev.inmo.tgbotapi.webapps
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING")
|
||||
|
||||
package dev.inmo.tgbotapi.webapps
|
||||
|
||||
import dev.inmo.micro_utils.language_codes.IetfLang
|
||||
|
Reference in New Issue
Block a user