mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
fixes
This commit is contained in:
parent
179a724d20
commit
19d221fc29
@ -89,7 +89,7 @@ suspend fun TelegramBot.buildBehaviourWithFSM(
|
||||
scope: CoroutineScope = defaultCoroutineScopeProvider(),
|
||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||
handlersPreset: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||
block: suspend BehaviourContextWithFSMBuilder.() -> Unit
|
||||
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||
) = BehaviourContextWithFSMBuilder(
|
||||
DefaultBehaviourContext(this, scope, upstreamUpdatesFlow = upstreamUpdatesFlow),
|
||||
statesManager,
|
||||
@ -108,7 +108,7 @@ suspend fun TelegramBot.buildBehaviourWithFSMAndLongPolling(
|
||||
scope: CoroutineScope = defaultCoroutineScopeProvider(),
|
||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||
block: suspend BehaviourContextWithFSMBuilder.() -> Unit
|
||||
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||
) = buildBehaviourWithFSM(upstreamUpdatesFlow, scope, statesManager, presetHandlers, block).run {
|
||||
this to scope.launch {
|
||||
start()
|
||||
@ -169,7 +169,7 @@ suspend fun TelegramBot.buildBehaviourWithFSM(
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||
) = FlowsUpdatesFilter().let {
|
||||
buildBehaviourWithFSM(
|
||||
it,
|
||||
|
@ -37,7 +37,7 @@ suspend fun telegramBotWithBehaviourAndFSM(
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||
): TelegramBot = telegramBot(
|
||||
token,
|
||||
apiUrl,
|
||||
@ -75,7 +75,7 @@ suspend fun telegramBotWithBehaviourAndFSM(
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||
): Pair<TelegramBot, Job> {
|
||||
return telegramBot(
|
||||
token,
|
||||
|
Loading…
Reference in New Issue
Block a user