Package dev. inmo. tgbotapi. extensions. utils. updates. retrieving
Functions
createAccumulatedUpdatesRetrieverFlow
Link copied to clipboard
fun TelegramBot.createAccumulatedUpdatesRetrieverFlow(avoidInlineQueries: Boolean = false, avoidCallbackQueries: Boolean = false, exceptionsHandler: ExceptionHandler<Unit>? = null, allowedUpdates: List<String>? = null): Flow<Update>
Content copied to clipboard
includeWebhookHandlingInRoute
Link copied to clipboard
fun Route.includeWebhookHandlingInRoute(scope: CoroutineScope, exceptionsHandler: ExceptionHandler<Unit>? = null, mediaGroupsDebounceTimeMillis: Long = 1000L, block: UpdateReceiver<Update>)
Content copied to clipboard
includeWebhookHandlingInRouteWithFlows
Link copied to clipboard
fun Route.includeWebhookHandlingInRouteWithFlows(scope: CoroutineScope, exceptionsHandler: ExceptionHandler<Unit>? = null, mediaGroupsDebounceTimeMillis: Long = 1000L, block: FlowsUpdatesFilter.() -> Unit)
Content copied to clipboard
longPolling
Link copied to clipboard
fun TelegramBot.longPolling(flowsUpdatesFilter: FlowsUpdatesFilter, timeoutSeconds: Seconds = 30, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null): Job
Content copied to clipboard
fun TelegramBot.longPolling(timeoutSeconds: Seconds = 30, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null, flowsUpdatesFilterUpdatesKeeperCount: Int = 100, flowUpdatesPreset: FlowsUpdatesFilter.() -> Unit): Job
Content copied to clipboard
Will enable longPolling by creating FlowsUpdatesFilter with flowsUpdatesFilterUpdatesKeeperCount as an argument and applied flowUpdatesPreset.
longPollingFlow
Link copied to clipboard
fun TelegramBot.longPollingFlow(timeoutSeconds: Seconds = 30, exceptionsHandler: ExceptionHandler<Unit>? = null, allowedUpdates: List<String>? = null): Flow<Update>
Content copied to clipboard
retrieveAccumulatedUpdates
Link copied to clipboard
fun TelegramBot.retrieveAccumulatedUpdates(flowsUpdatesFilter: FlowsUpdatesFilter, avoidInlineQueries: Boolean = false, avoidCallbackQueries: Boolean = false, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null): Job
Content copied to clipboard
fun TelegramBot.retrieveAccumulatedUpdates(avoidInlineQueries: Boolean = false, avoidCallbackQueries: Boolean = false, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null, allowedUpdates: List<String>? = null, updatesReceiver: UpdateReceiver<Update>): Job
Content copied to clipboard
setWebhookInfoAndStartListenWebhooks
Link copied to clipboard
suspend fun RequestsExecutor.setWebhookInfoAndStartListenWebhooks(listenPort: Int, engineFactory: ApplicationEngineFactory<*, *>, setWebhookRequest: SetWebhookRequest, exceptionsHandler: ExceptionHandler<Unit> = {}, listenHost: String = "0.0.0.0", listenRoute: String = "/", privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), mediaGroupsDebounceTimeMillis: Long = 1000L, block: UpdateReceiver<Update>): ApplicationEngine
Content copied to clipboard
Setting up ktor server, set webhook info via SetWebhookRequest request.
startGettingOfUpdatesByLongPolling
Link copied to clipboard
fun RequestsExecutor.startGettingOfUpdatesByLongPolling(updatesFilter: UpdatesFilter, timeoutSeconds: Seconds = 30, exceptionsHandler: ExceptionHandler<Unit>? = null, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)): Job
Content copied to clipboard
fun TelegramBot.startGettingOfUpdatesByLongPolling(timeoutSeconds: Seconds = 30, scope: CoroutineScope = CoroutineScope(Dispatchers.Default), exceptionsHandler: ExceptionHandler<Unit>? = null, allowedUpdates: List<String>? = null, updatesReceiver: UpdateReceiver<Update>): Job
Content copied to clipboard
startListenWebhooks
Link copied to clipboard
fun startListenWebhooks(listenPort: Int, engineFactory: ApplicationEngineFactory<*, *>, exceptionsHandler: ExceptionHandler<Unit>, listenHost: String = "0.0.0.0", listenRoute: String? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), mediaGroupsDebounceTimeMillis: Long = 1000L, block: UpdateReceiver<Update>): ApplicationEngine
Content copied to clipboard
updateHandlerWithMediaGroupsAdaptation
Link copied to clipboard
fun CoroutineScope.updateHandlerWithMediaGroupsAdaptation(output: UpdateReceiver<Update>): suspend (Update) -> Unit
Content copied to clipboard
Create UpdateReceiver object which will correctly accumulate updates and send into output updates which INCLUDE dev.inmo.tgbotapi.types.update.MediaGroupUpdates.MediaGroupUpdates.
fun CoroutineScope.updateHandlerWithMediaGroupsAdaptation(output: UpdateReceiver<Update>, debounceTimeMillis: Long = 1000L): UpdateReceiver<Update>
Content copied to clipboard
Create UpdateReceiver object which will correctly accumulate updates and send into output updates which INCLUDE dev.inmo.tgbotapi.types.update.MediaGroupUpdates.MediaGroupUpdates.