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

Merge pull request #540 from InsanusMokrassar/0.38.7

0.38.7
This commit is contained in:
InsanusMokrassar 2022-03-12 14:32:20 +06:00 committed by GitHub
commit be62c4fe37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 5 deletions

View File

@ -1,5 +1,15 @@
# TelegramBotAPI changelog
## 0.38.7
* `Common`:
* `Version`:
* `MicroUtils`: `0.9.9` -> `0.9.12`
* `Klock`: `2.5.2` -> `2.6.2`
* `Core`:
* `SimplePollOption#votes` now is `0` by default
* New function `PollOption.Companion#simple`
## 0.38.6
* `Common`:

View File

@ -8,11 +8,11 @@ kotlin.incremental.js=true
kotlin_version=1.6.10
kotlin_coroutines_version=1.6.0
kotlin_serialisation_runtime_version=1.3.2
klock_version=2.5.2
klock_version=2.6.2
uuid_version=0.4.0
ktor_version=1.6.7
micro_utils_version=0.9.9
micro_utils_version=0.9.12
javax_activation_version=1.1.1
@ -20,6 +20,6 @@ javax_activation_version=1.1.1
dokka_version=1.6.10
library_group=dev.inmo
library_version=0.38.6
library_version=0.38.7
github_release_plugin_version=2.2.12

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip

View File

@ -12,6 +12,13 @@ import kotlinx.serialization.encoding.Encoder
sealed class PollOption {
abstract val text: String
abstract val votes: Int
companion object {
fun simple(
text: String,
votes: Int = 0
) = SimplePollOption(text, votes)
}
}
@Serializable
@ -19,7 +26,7 @@ data class SimplePollOption (
@SerialName(textField)
override val text: String,
@SerialName(votesCountField)
override val votes: Int
override val votes: Int = 0
) : PollOption()
@RiskFeature