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(),
|
scope: CoroutineScope = defaultCoroutineScopeProvider(),
|
||||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||||
handlersPreset: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
handlersPreset: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||||
block: suspend BehaviourContextWithFSMBuilder.() -> Unit
|
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||||
) = BehaviourContextWithFSMBuilder(
|
) = BehaviourContextWithFSMBuilder(
|
||||||
DefaultBehaviourContext(this, scope, upstreamUpdatesFlow = upstreamUpdatesFlow),
|
DefaultBehaviourContext(this, scope, upstreamUpdatesFlow = upstreamUpdatesFlow),
|
||||||
statesManager,
|
statesManager,
|
||||||
@ -108,7 +108,7 @@ suspend fun TelegramBot.buildBehaviourWithFSMAndLongPolling(
|
|||||||
scope: CoroutineScope = defaultCoroutineScopeProvider(),
|
scope: CoroutineScope = defaultCoroutineScopeProvider(),
|
||||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||||
block: suspend BehaviourContextWithFSMBuilder.() -> Unit
|
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||||
) = buildBehaviourWithFSM(upstreamUpdatesFlow, scope, statesManager, presetHandlers, block).run {
|
) = buildBehaviourWithFSM(upstreamUpdatesFlow, scope, statesManager, presetHandlers, block).run {
|
||||||
this to scope.launch {
|
this to scope.launch {
|
||||||
start()
|
start()
|
||||||
@ -169,7 +169,7 @@ suspend fun TelegramBot.buildBehaviourWithFSM(
|
|||||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||||
block: BehaviourContextReceiver<Unit>
|
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||||
) = FlowsUpdatesFilter().let {
|
) = FlowsUpdatesFilter().let {
|
||||||
buildBehaviourWithFSM(
|
buildBehaviourWithFSM(
|
||||||
it,
|
it,
|
||||||
|
@ -37,7 +37,7 @@ suspend fun telegramBotWithBehaviourAndFSM(
|
|||||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||||
block: BehaviourContextReceiver<Unit>
|
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||||
): TelegramBot = telegramBot(
|
): TelegramBot = telegramBot(
|
||||||
token,
|
token,
|
||||||
apiUrl,
|
apiUrl,
|
||||||
@ -75,7 +75,7 @@ suspend fun telegramBotWithBehaviourAndFSM(
|
|||||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||||
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()),
|
||||||
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(),
|
||||||
block: BehaviourContextReceiver<Unit>
|
block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>
|
||||||
): Pair<TelegramBot, Job> {
|
): Pair<TelegramBot, Job> {
|
||||||
return telegramBot(
|
return telegramBot(
|
||||||
token,
|
token,
|
||||||
|
Loading…
Reference in New Issue
Block a user