1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00

add sticker format to stickerset

This commit is contained in:
InsanusMokrassar 2023-03-11 00:53:36 +06:00
parent 988d9995c5
commit 0c24aa1270

View File

@ -25,6 +25,7 @@ sealed interface StickerSet {
val name: String val name: String
val title: String val title: String
val stickerType: StickerType val stickerType: StickerType
val stickerFormat: StickerFormat
val stickers: List<Sticker> val stickers: List<Sticker>
val isAnimated: Boolean val isAnimated: Boolean
get() = false get() = false
@ -124,11 +125,19 @@ sealed interface StickerSet {
sealed interface AnimatedStickerSet : StickerSet { sealed interface AnimatedStickerSet : StickerSet {
override val isAnimated: Boolean override val isAnimated: Boolean
get() = true get() = true
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat
get() = StickerFormat.Animated
} }
@Serializable @Serializable
sealed interface VideoStickerSet : StickerSet { sealed interface VideoStickerSet : StickerSet {
override val isVideo: Boolean override val isVideo: Boolean
get() = true get() = true
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat
get() = StickerFormat.Video
} }
@Serializable @Serializable
sealed interface RegularStickerSet : StickerSet sealed interface RegularStickerSet : StickerSet
@ -151,6 +160,9 @@ data class RegularSimpleStickerSet(
@SerialName(stickerTypeField) @SerialName(stickerTypeField)
@EncodeDefault @EncodeDefault
override val stickerType: StickerType = StickerType.Regular override val stickerType: StickerType = StickerType.Regular
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat = StickerFormat.Static
} }
@Serializable @Serializable
@ -199,6 +211,10 @@ data class MaskSimpleStickerSet(
@SerialName(stickerTypeField) @SerialName(stickerTypeField)
@EncodeDefault @EncodeDefault
override val stickerType: StickerType = StickerType.Mask override val stickerType: StickerType = StickerType.Mask
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat = StickerFormat.Static
} }
@Serializable @Serializable
@ -247,6 +263,10 @@ data class CustomEmojiSimpleStickerSet(
@SerialName(stickerTypeField) @SerialName(stickerTypeField)
@EncodeDefault @EncodeDefault
override val stickerType: StickerType = StickerType.CustomEmoji override val stickerType: StickerType = StickerType.CustomEmoji
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat = StickerFormat.Static
} }
@Serializable @Serializable