All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dehuckakpyt.telegrambot.resolver.UpdateResolverImpl.kt Maven / Gradle / Ivy

The newest version!
package io.github.dehuckakpyt.telegrambot.resolver

import io.github.dehuckakpyt.telegrambot.model.telegram.Update


/**
 * Created on 08.12.2023.
 *

* * @author Denis Matytsin */ class UpdateResolverImpl internal constructor( private val dialogUpdateResolver: DialogUpdateResolver, private val eventUpdateResolver: EventUpdateResolver, ) : UpdateResolver { override suspend fun processUpdate(update: Update): Unit = with(update) { eventUpdateResolver.processUpdate(this) when { message != null -> dialogUpdateResolver.processMessage(message) callbackQuery != null -> dialogUpdateResolver.processCallback(callbackQuery) } } override val allowedUpdates: Set get() = buildSet { addAll(eventUpdateResolver.allowedUpdates) addAll(dialogUpdateResolver.allowedUpdates) } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy