diff --git a/CHANGELOG.md b/CHANGELOG.md index c5f2afa8cd..501b930656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`: diff --git a/gradle.properties b/gradle.properties index 00382e11b3..75f0d455ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7645e290ee..cde1e36e1a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/polls/PollOption.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/polls/PollOption.kt index 0e7ab5d758..b5ea4dd388 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/polls/PollOption.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/polls/PollOption.kt @@ -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