From 46fe16fd73951e28d12df3de880ae9fd1c076f5d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 30 Oct 2020 19:37:26 +0600 Subject: [PATCH] Revert "Revert "add slot machine, but currently it is not working"" This reverts commit f317e144e672c970986f039ede71d89dff13a9e8. --- CHANGELOG.md | 3 +++ .../kotlin/dev/inmo/tgbotapi/types/dice/DiceAnimationType.kt | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34491c6985..9f83e783d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 0.29.3 +* `Core`: + * New dice type `SlotMachineDiceAnimationType` + ## 0.29.2 * `Common`: diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/dice/DiceAnimationType.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/dice/DiceAnimationType.kt index 806e43d16f..89ea0878cf 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/dice/DiceAnimationType.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/dice/DiceAnimationType.kt @@ -22,6 +22,10 @@ object BasketballDiceAnimationType : DiceAnimationType() { override val emoji: String = "\uD83C\uDFC0" } @Serializable(DiceAnimationTypeSerializer::class) +object SlotMachineDiceAnimationType : DiceAnimationType() { + override val emoji: String = "\uD83C\uDFB0" +} +@Serializable(DiceAnimationTypeSerializer::class) data class CustomDiceAnimationType( override val emoji: String ) : DiceAnimationType() @@ -34,6 +38,7 @@ internal object DiceAnimationTypeSerializer : KSerializer { CubeDiceAnimationType.emoji -> CubeDiceAnimationType DartsDiceAnimationType.emoji -> DartsDiceAnimationType BasketballDiceAnimationType.emoji -> BasketballDiceAnimationType + SlotMachineDiceAnimationType.emoji -> BasketballDiceAnimationType else -> CustomDiceAnimationType(type) } }