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

eu.vendeli.tgbot.api.stickerset.SetStickerMaskPosition.kt Maven / Gradle / Ivy

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

package eu.vendeli.tgbot.api.stickerset

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

class SetStickerMaskPositionAction(
    sticker: String,
    maskPosition: MaskPosition?,
) : SimpleAction, ActionState() {
    override val TgAction.method: TgMethod
        get() = TgMethod("setStickerMaskPosition")
    override val TgAction.returnType: Class
        get() = getReturnType()

    init {
        parameters["sticker"] = sticker
        if (maskPosition != null) parameters["mask_position"] = maskPosition
    }
}

fun setStickerMaskPosition(sticker: String, maskPosition: MaskPosition? = null) =
    SetStickerMaskPositionAction(sticker, maskPosition)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy