1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +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 title: String
val stickerType: StickerType
val stickerFormat: StickerFormat
val stickers: List<Sticker>
val isAnimated: Boolean
get() = false
@ -124,11 +125,19 @@ sealed interface StickerSet {
sealed interface AnimatedStickerSet : StickerSet {
override val isAnimated: Boolean
get() = true
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat
get() = StickerFormat.Animated
}
@Serializable
sealed interface VideoStickerSet : StickerSet {
override val isVideo: Boolean
get() = true
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat
get() = StickerFormat.Video
}
@Serializable
sealed interface RegularStickerSet : StickerSet
@ -151,6 +160,9 @@ data class RegularSimpleStickerSet(
@SerialName(stickerTypeField)
@EncodeDefault
override val stickerType: StickerType = StickerType.Regular
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat = StickerFormat.Static
}
@Serializable
@ -199,6 +211,10 @@ data class MaskSimpleStickerSet(
@SerialName(stickerTypeField)
@EncodeDefault
override val stickerType: StickerType = StickerType.Mask
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat = StickerFormat.Static
}
@Serializable
@ -247,6 +263,10 @@ data class CustomEmojiSimpleStickerSet(
@SerialName(stickerTypeField)
@EncodeDefault
override val stickerType: StickerType = StickerType.CustomEmoji
@SerialName(stickerFormatField)
@EncodeDefault
override val stickerFormat: StickerFormat = StickerFormat.Static
}
@Serializable