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

Merge pull request #226 from InsanusMokrassar/0.30.9

0.30.9
This commit is contained in:
InsanusMokrassar 2020-11-27 00:59:33 +06:00 committed by GitHub
commit 08e3326d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 9 deletions

View File

@ -1,5 +1,15 @@
# TelegramBotAPI changelog
## 0.30.9
* `Common`:
* `Version`:
* `UUID`: `0.2.2` -> `0.2.3`
* `Coroutines`: `1.4.1` -> `1.4.2`
* `MicroUtils`: `0.4.3` -> `0.4.6`
* `Core`:
* Add `BowlingDiceAnimationType`
## 0.30.8
* `Common`:

View File

@ -6,17 +6,17 @@ kotlin.incremental=true
kotlin.incremental.js=true
kotlin_version=1.4.20
kotlin_coroutines_version=1.4.1
kotlin_coroutines_version=1.4.2
kotlin_serialisation_runtime_version=1.0.1
klock_version=2.0.0
uuid_version=0.2.2
uuid_version=0.2.3
ktor_version=1.4.2
micro_utils_version=0.4.3
micro_utils_version=0.4.6
javax_activation_version=1.1.1
library_group=dev.inmo
library_version=0.30.8
library_version=0.30.9
github_release_plugin_version=2.2.12

View File

@ -61,10 +61,13 @@ val inlineQueryAnswerResultsLimit = 0 .. 50
val customTitleLength = 0 .. 16
val dartsAndCubeDiceResultLimit = 1 .. 6
@Deprecated("Renamed", ReplaceWith("dartsAndCubeDiceResultLimit", "dev.inmo.tgbotapi.types.dartsAndCubeDiceResultLimit"))
val dartsCubeAndBowlingDiceResultLimit = 1 .. 6
@Deprecated("Renamed", ReplaceWith("dartsCubeAndBowlingDiceResultLimit", "dev.inmo.tgbotapi.types.dartsCubeAndBowlingDiceResultLimit"))
val dartsAndCubeDiceResultLimit
get() = dartsCubeAndBowlingDiceResultLimit
@Deprecated("Renamed", ReplaceWith("dartsCubeAndBowlingDiceResultLimit", "dev.inmo.tgbotapi.types.dartsCubeAndBowlingDiceResultLimit"))
val diceResultLimit
get() = dartsAndCubeDiceResultLimit
get() = dartsCubeAndBowlingDiceResultLimit
val basketballAndFootballDiceResultLimit = 1 .. 5
val slotMachineDiceResultLimit = 1 .. 64

View File

@ -15,13 +15,13 @@ sealed class DiceAnimationType {
object CubeDiceAnimationType : DiceAnimationType() {
override val emoji: String = "\uD83C\uDFB2"
override val valueLimits: IntRange
get() = dartsAndCubeDiceResultLimit
get() = dartsCubeAndBowlingDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object DartsDiceAnimationType : DiceAnimationType() {
override val emoji: String = "\uD83C\uDFAF"
override val valueLimits: IntRange
get() = dartsAndCubeDiceResultLimit
get() = dartsCubeAndBowlingDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object BasketballDiceAnimationType : DiceAnimationType() {
@ -36,6 +36,12 @@ object FootballDiceAnimationType : DiceAnimationType() {
get() = basketballAndFootballDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object BowlingDiceAnimationType : DiceAnimationType() {
override val emoji: String = "\uD83C\uDFB3"
override val valueLimits: IntRange
get() = dartsCubeAndBowlingDiceResultLimit
}
@Serializable(DiceAnimationTypeSerializer::class)
object SlotMachineDiceAnimationType : DiceAnimationType() {
override val emoji: String = "\uD83C\uDFB0"
override val valueLimits: IntRange
@ -59,6 +65,7 @@ internal object DiceAnimationTypeSerializer : KSerializer<DiceAnimationType> {
BasketballDiceAnimationType.emoji -> BasketballDiceAnimationType
SlotMachineDiceAnimationType.emoji -> SlotMachineDiceAnimationType
FootballDiceAnimationType.emoji -> FootballDiceAnimationType
BowlingDiceAnimationType.emoji -> BowlingDiceAnimationType
else -> CustomDiceAnimationType(type)
}
}