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

This commit is contained in:
InsanusMokrassar committed 2026-04-16 12:39:26 +06:00
1 parent 0e481c3dd9
commit 4a0b890697
3 files changed
+54 -2

No files matched your search

@@ -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"
}
}
}