1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

BowlingDiceAnimationType

This commit is contained in:
InsanusMokrassar 2020-11-25 23:09:49 +06:00
parent 9a8175d1c8
commit 2cc66ef13c
3 changed files with 15 additions and 3 deletions

View File

@ -6,6 +6,8 @@
* `Version`:
* `UUID`: `0.2.2` -> `0.2.3`
* `MicroUtils`: `0.4.3` -> `0.4.5`
* `Core`:
* Add `BowlingDiceAnimationType`
## 0.30.8

View File

@ -65,7 +65,10 @@ val dartsAndCubeDiceResultLimit = 1 .. 6
@Deprecated("Renamed", ReplaceWith("dartsAndCubeDiceResultLimit", "dev.inmo.tgbotapi.types.dartsAndCubeDiceResultLimit"))
val diceResultLimit
get() = dartsAndCubeDiceResultLimit
val basketballAndFootballDiceResultLimit = 1 .. 5
val basketballBowlingAndFootballDiceResultLimit = 1 .. 5
@Deprecated("Renamed", ReplaceWith("basketballBowlingAndFootballDiceResultLimit", "dev.inmo.tgbotapi.types.basketballBowlingAndFootballDiceResultLimit"))
val basketballAndFootballDiceResultLimit
get() = basketballBowlingAndFootballDiceResultLimit
val slotMachineDiceResultLimit = 1 .. 64
val botCommandLengthLimit = 1 .. 32

View File

@ -27,13 +27,19 @@ object DartsDiceAnimationType : DiceAnimationType() {
object BasketballDiceAnimationType : DiceAnimationType() {
override val emoji: String = "\uD83C\uDFC0"
override val valueLimits: IntRange
get() = basketballAndFootballDiceResultLimit
get() = basketballBowlingAndFootballDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object FootballDiceAnimationType : DiceAnimationType() {
override val emoji: String = ""
override val valueLimits: IntRange
get() = basketballAndFootballDiceResultLimit
get() = basketballBowlingAndFootballDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object BowlingDiceAnimationType : DiceAnimationType() {
override val emoji: String = "\uD83C\uDFB3"
override val valueLimits: IntRange
get() = basketballBowlingAndFootballDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object SlotMachineDiceAnimationType : DiceAnimationType() {
@ -59,6 +65,7 @@ internal object DiceAnimationTypeSerializer : KSerializer<DiceAnimationType> {
BasketballDiceAnimationType.emoji -> BasketballDiceAnimationType
SlotMachineDiceAnimationType.emoji -> SlotMachineDiceAnimationType
FootballDiceAnimationType.emoji -> FootballDiceAnimationType
BowlingDiceAnimationType.emoji -> BowlingDiceAnimationType
else -> CustomDiceAnimationType(type)
}
}