telegram Bot With Behaviour And FSM
suspend fun <T : State> telegramBotWithBehaviourAndFSM(token: String, flowsUpdatesFilter: FlowsUpdatesFilter, scope: CoroutineScope? = null, apiUrl: String = telegramBotAPIDefaultUrl, builder: KtorRequestsExecutorBuilder.() -> Unit = {}, defaultExceptionsHandler: ExceptionHandler<Unit>? = null, statesManager: StatesManager<T> = DefaultStatesManager(InMemoryDefaultStatesManagerRepo()), presetHandlers: List<BehaviourWithFSMStateHandlerHolder<*, T>> = listOf(), testServer: Boolean = false, onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler(), timeoutSeconds: Seconds = 30, autoDisableWebhooks: Boolean = true, autoSkipTimeoutExceptions: Boolean = true, mediaGroupsDebounceTimeMillis: Long? = 1000, block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>): TelegramBot
Create bot using telegramBot and start listening for updates using buildBehaviourWithFSM. Use this method in case you wish to make some additional actions with flowsUpdatesFilter.
WARNING This method WILL NOT launch any listening of updates. Use something like startGettingOfUpdatesByLongPolling or tools for work with webhooks
Return
Created bot which has been used to create BehaviourContext via buildBehaviourWithFSM
See also
Parameters
media Groups Debounce Time Millis
Will be used for calling of updateHandlerWithMediaGroupsAdaptation. Pass null in case you wish to enable classic way of updates handling, but in that mode some media group messages can be retrieved in different updates