telegramBotWithBehaviourAndLongPolling

suspend fun telegramBotWithBehaviourAndLongPolling(token: String, scope: CoroutineScope? = null, apiUrl: String = telegramBotAPIDefaultUrl, builder: KtorRequestsExecutorBuilder.() -> Unit = {}, defaultExceptionsHandler: ExceptionHandler<Unit>? = null, testServer: Boolean = false, block: BehaviourContextReceiver<Unit>): Pair<TelegramBot, Job>

Create bot using telegramBot and start listening for updates using buildBehaviourWithLongPolling. Use this method in case you wish to make some additional actions with flowsUpdatesFilter.

WARNING This method WILL launch updates listening inside of calling buildBehaviourWithLongPolling

Return

Pair of TelegramBot and Job. This Job can be used to stop listening updates in your block you passed here

See also