startListenWebhooks

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 = 1000, additionalApplicationEngineEnvironmentConfigurator: ApplicationEngineEnvironmentBuilder.() -> Unit = {}, block: UpdateReceiver<Update>): ApplicationEngine

Setting up ktor server

Parameters

listenPort

port which will be listen by bot

listenRoute

address to listen by bot. If null - will be set up in root of host

scope

Scope which will be used for

privateKeyConfig

If configured - server will be created with sslConnector. connector will be used otherwise

mediaGroupsDebounceTimeMillis

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

See also

FlowsUpdatesFilter
UpdatesFilter
UpdatesFilter.asUpdateReceiver