build Behaviour With FSMAnd Start Long Polling
suspend fun TelegramBot.buildBehaviourWithFSMAndStartLongPolling(upstreamUpdatesFlow: Flow<Update>? = null, scope: CoroutineScope = defaultCoroutineScopeProvider(), defaultExceptionsHandler: ExceptionHandler<Unit>? = null, statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()), presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(), block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>): Pair<BehaviourContextWithFSM, Job>
Content copied to clipboard
Use buildBehaviourWithFSM to create BehaviourContextWithFSM and launch getting of updates using longPolling. For longPolling will be used result BehaviourContextWithFSM for both parameters flowsUpdatesFilter and scope
suspend fun TelegramBot.buildBehaviourWithFSMAndStartLongPolling(scope: CoroutineScope = defaultCoroutineScopeProvider(), defaultExceptionsHandler: ExceptionHandler<Unit>? = null, statesManager: StatesManager = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()), presetHandlers: MutableList<BehaviourWithFSMStateHandlerHolder<*>> = mutableListOf(), block: CustomBehaviourContextReceiver<BehaviourContextWithFSMBuilder, Unit>): Job
Content copied to clipboard
Use buildBehaviourWithFSM to create BehaviourContextWithFSM and launch getting of updates using longPolling. For longPolling will be used result BehaviourContextWithFSM for both parameters flowsUpdatesFilter and scope