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

eu.vendeli.tgbot.api.AnswerCallbackQuery.kt Maven / Gradle / Ivy

@file:Suppress("MatchingDeclarationName")

package eu.vendeli.tgbot.api

import eu.vendeli.tgbot.interfaces.Action
import eu.vendeli.tgbot.interfaces.ActionState
import eu.vendeli.tgbot.interfaces.TgAction
import eu.vendeli.tgbot.interfaces.features.OptionsFeature
import eu.vendeli.tgbot.types.internal.TgMethod
import eu.vendeli.tgbot.types.internal.options.AnswerCallbackQueryOptions
import eu.vendeli.tgbot.utils.getReturnType

class AnswerCallbackQueryAction(callbackQueryId: String) :
    Action,
    ActionState(),
    OptionsFeature {
    override val TgAction.method: TgMethod
        get() = TgMethod("answerCallbackQuery")
    override val TgAction.returnType: Class
        get() = getReturnType()
    override val OptionsFeature.options
        get() = AnswerCallbackQueryOptions()

    init {
        parameters["callback_query_id"] = callbackQueryId
    }
}

fun answerCallbackQuery(callbackQueryId: String) = AnswerCallbackQueryAction(callbackQueryId)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy