mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
add setStickerMaskPosition
This commit is contained in:
parent
90b9c66bea
commit
79c9e6258f
@ -0,0 +1,19 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.api.stickers
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
|
import dev.inmo.tgbotapi.requests.stickers.SetStickerEmojiList
|
||||||
|
import dev.inmo.tgbotapi.requests.stickers.SetStickerMaskPosition
|
||||||
|
import dev.inmo.tgbotapi.requests.stickers.SetStickerPositionInSet
|
||||||
|
import dev.inmo.tgbotapi.types.files.Sticker
|
||||||
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
|
|
||||||
|
suspend fun TelegramBot.setStickerMaskPosition(
|
||||||
|
sticker: FileId,
|
||||||
|
maskPosition: MaskPosition
|
||||||
|
) = execute(
|
||||||
|
SetStickerMaskPosition(
|
||||||
|
sticker,
|
||||||
|
maskPosition
|
||||||
|
)
|
||||||
|
)
|
@ -0,0 +1,26 @@
|
|||||||
|
package dev.inmo.tgbotapi.requests.stickers
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.*
|
||||||
|
import dev.inmo.tgbotapi.requests.common.CommonMultipartFileRequest
|
||||||
|
import dev.inmo.tgbotapi.requests.stickers.abstracts.OwnerStickerSetAction
|
||||||
|
import dev.inmo.tgbotapi.requests.stickers.abstracts.StickerAction
|
||||||
|
import dev.inmo.tgbotapi.requests.stickers.abstracts.StickerSetAction
|
||||||
|
import dev.inmo.tgbotapi.types.*
|
||||||
|
import dev.inmo.tgbotapi.types.stickers.MaskPosition
|
||||||
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.builtins.serializer
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class SetStickerMaskPosition (
|
||||||
|
@SerialName(stickerField)
|
||||||
|
override val sticker: FileId,
|
||||||
|
@SerialName(maskPositionField)
|
||||||
|
val maskPosition: MaskPosition
|
||||||
|
) : StickerAction<Boolean> {
|
||||||
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
get() = Boolean.serializer()
|
||||||
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
|
get() = serializer()
|
||||||
|
|
||||||
|
override fun method(): String = "setStickerMaskPosition"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user