From cb94a3a38908004a409edcd7d80e2b44d93945d1 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 12 Aug 2019 13:25:55 +0600 Subject: [PATCH] Sticker and StickerSet now with isAnimated field --- CHANGELOG.md | 4 ++++ .../github/insanusmokrassar/TelegramBotAPI/types/Common.kt | 1 + .../insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt | 2 ++ .../TelegramBotAPI/types/stickers/StickerSet.kt | 2 ++ 4 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eec9b1df7..d16f0b716d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ * `TelegramAPIUrlsKeeper` was added to provide more comfortable work with file urls and other things like this +Changes according to [July 29, 2019 Telegram Bot API update](https://core.telegram.org/bots/api#july-29-2019): + +* `Sticker` and `StickerSet` now have field `isAnimated` + ## 0.16.0 Bot API 4.3 * `LoginURL` and `LoginURLInlineKeyboardButton` has been added diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt index d6ce1db4da..9d2bac17a1 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt @@ -89,6 +89,7 @@ const val forwardTextField = "forward_text" const val botUsernameField = "bot_username" const val switchInlineQueryCurrentChatField = "switch_inline_query_current_chat" const val switchInlineQueryField = "switch_inline_query" +const val isAnimatedField = "is_animated" const val requestWriteAccessField = "request_write_access" diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt index 5cbc60242e..93d9b56272 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/Sticker.kt @@ -21,6 +21,8 @@ data class Sticker( val emoji: String? = null, @SerialName(stickerSetNameField) val stickerSetName: String? = null, + @SerialName(isAnimatedField) + val isAnimated: Boolean = false, @SerialName(maskPositionField) val maskPosition: MaskPosition? = null, @SerialName(fileSizeField) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt index 85fa4210d5..b36fbc4016 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/stickers/StickerSet.kt @@ -13,6 +13,8 @@ data class StickerSet( val title: String, @SerialName(stickersField) val stickers: List, + @SerialName(isAnimatedField) + val isAnimated: Boolean = false, @SerialName(containsMasksField) val containsMasks: Boolean = false )