1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-04-21 01:12:49 +00:00

fill CHANGELOG.md, fix README.md, small fix in checkSendData to not throw error

This commit is contained in:
2026-04-16 12:37:34 +06:00
parent 0e481c3dd9
commit 4a0b890697
3 changed files with 54 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializ
import dev.inmo.tgbotapi.types.message.content.PollContent
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.polls.*
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
import korlibs.time.millisecondsLong
import korlibs.time.seconds
import kotlinx.serialization.*
@@ -244,7 +245,9 @@ internal fun ScheduledCloseInfo.checkSendData() {
is ApproximateScheduledCloseInfo -> openDuration.seconds
}.toInt()
if (span !in openPeriodPollSecondsLimit) {
error("Duration of autoclose for polls must be in range $openPeriodPollSecondsLimit, but was $span")
DefaultKTgBotAPIKSLog.w("checkSendData") {
"Duration of autoclose for polls must be in range $openPeriodPollSecondsLimit, but was $span"
}
}
}