longPolling

fun TelegramBot.longPolling(flowsUpdatesFilter: FlowsUpdatesFilter, timeoutSeconds: Seconds = 30, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null): Job

Will startGettingOfUpdatesByLongPolling using incoming flowsUpdatesFilter. It is assumed that you ALREADY CONFIGURE all updates receivers, because this method will trigger getting of updates and.

fun TelegramBot.longPolling(timeoutSeconds: Seconds = 30, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null, flowsUpdatesFilterUpdatesKeeperCount: Int = 100, flowUpdatesPreset: FlowsUpdatesFilter.() -> Unit): Job

Will enable longPolling by creating FlowsUpdatesFilter with flowsUpdatesFilterUpdatesKeeperCount as an argument and applied flowUpdatesPreset. It is assumed that you WILL CONFIGURE all updates receivers in flowUpdatesPreset, because of after flowUpdatesPreset method calling will be triggered getting of updates.