upgrade to support new ktgbotapi

This commit is contained in:
2024-04-18 17:03:53 +06:00
parent 57dd2380cd
commit b660bf5f42
4 changed files with 8 additions and 15 deletions

View File

@@ -56,16 +56,19 @@ suspend fun main(args: Array<String>) {
val newSticker = when (sticker) {
is CustomEmojiSticker -> InputSticker.WithKeywords.CustomEmoji(
downloadFileToTemp(sticker.fileId).asMultipartFile(),
sticker.stickerFormat,
listOf(sticker.emoji ?: "\uD83D\uDE0A"),
emptyList()
)
is MaskSticker -> InputSticker.Mask(
downloadFileToTemp(sticker.fileId).asMultipartFile(),
sticker.stickerFormat,
listOf(sticker.emoji ?: "\uD83D\uDE0A"),
sticker.maskPosition
)
is RegularSticker -> InputSticker.WithKeywords.Regular(
downloadFileToTemp(sticker.fileId).asMultipartFile(),
sticker.stickerFormat,
listOf(sticker.emoji ?: "\uD83D\uDE0A"),
emptyList()
)
@@ -85,7 +88,6 @@ suspend fun main(args: Array<String>) {
it.chat.id.toChatId(),
stickerSetName.string,
"Sticker set by ${me.firstName}",
it.content.media.stickerFormat,
listOf(
newSticker
),