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

eu.vendeli.tgbot.api.botactions.GetMe.kt Maven / Gradle / Ivy

There is a newer version: 6.6.0
Show newest version
@file:Suppress("MatchingDeclarationName")

package eu.vendeli.tgbot.api.botactions

import eu.vendeli.tgbot.interfaces.ActionState
import eu.vendeli.tgbot.interfaces.SimpleAction
import eu.vendeli.tgbot.interfaces.TgAction
import eu.vendeli.tgbot.types.User
import eu.vendeli.tgbot.types.internal.TgMethod
import eu.vendeli.tgbot.utils.getReturnType

/**
 * A simple method for testing your bot's authentication token.
 * Requires no parameters. Returns basic information about the bot in form of a [User](User) object.
 *
 */
class GetMeAction : SimpleAction, ActionState() {
    override val TgAction.method: TgMethod
        get() = TgMethod("getMe")
    override val TgAction.returnType: Class
        get() = getReturnType()
}

/**
 * A simple method for testing your bot's authentication token. Requires no parameters.
 * Returns basic information about the bot in form of a [User](User) object.
 *
 */
fun getMe() = GetMeAction()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy