mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-04-16 15:08:06 +00:00
fill CHANGELOG.md, fix README.md, small fix in checkSendData to not throw error
This commit is contained in:
49
CHANGELOG.md
49
CHANGELOG.md
@@ -2,6 +2,55 @@
|
||||
|
||||
## 33.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 9.6](https://core.telegram.org/bots/api-changelog#april-3-2026)**
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||
|
||||
* `Core`:
|
||||
* **BREAKING CHANGE** `PollOption` reimplemented as a sealed interface hierarchy:
|
||||
* `PollOption.Simple` replaces `SimplePollOption`
|
||||
* `PollOption.LatelyAdded` sealed interface added with `AddedByUser` and `AddedByChat` variants
|
||||
* `PollOption` now has `id: PollOptionPersistentId` field
|
||||
* **BREAKING CHANGE** `QuizPoll.correctOptionId` replaced with `correctOptionIds: List<Int>` (multiple correct options support)
|
||||
* **BREAKING CHANGE** `PollAnswer.Anonymous.voterChat` type changed from `ChannelChat` to `PreviewPublicChat`
|
||||
* **BREAKING CHANGE** `SendPoll` and `SendRegularPoll` init checks no longer throw errors, warnings are logged instead
|
||||
* **BREAKING CHANGE** `requestChannelReplyButton` for groups renamed to `requestGroupReplyButton`
|
||||
* **BREAKING CHANGE** `openPeriodPollSecondsLimit` changed from `5 .. 600` to `5 .. 2628000`
|
||||
* Added `PollOptionPersistentId` value class
|
||||
* Added `PollOptionAdded` and `PollOptionDeleted` chat events
|
||||
* Added `chosenPersistentIds` to `PollAnswer`
|
||||
* Added `pollOptionId` support in `ReplyParameters` and `ReplyInfo` (`reply_to_poll_option_id`)
|
||||
* Added `allowsRevoting`, `shuffleOptions`, `hideResultsUntilCloses` fields to `SendRegularPoll` and `SendQuizPoll`
|
||||
* Added `allowAddingOptions` field to `SendRegularPoll`
|
||||
* Added `description`, `descriptionParseMode`, `descriptionTextSources` fields to `SendQuizPoll` and `SendRegularPoll`
|
||||
* Added `allowsMultipleAnswers` field to `SendQuizPoll`
|
||||
* Added `openPeriod` and `closeDate` parameters to `SendPoll` function
|
||||
* Added `ManagedBotCreated` and `ManagedBotUpdated` chat events
|
||||
* Added `ManagedBotUpdate` update type and `UPDATE_MANAGED_BOT` constant
|
||||
* Added `GetManagedBotToken` and `ReplaceManagedBotToken` requests
|
||||
* Added `BotToken` value class
|
||||
* Added `KeyboardButtonRequestManagedBot` and `RequestManagedBotKeyboardButton`
|
||||
* Added `requestManagedBotReplyButton` shortcuts
|
||||
* Added `SavePreparedKeyboardButton` request
|
||||
* Added `PreparedKeyboardButton` and `PreparedKeyboardButtonId` types
|
||||
* Added `canManageBots` field to `ExtendedBot`
|
||||
* Added `managedBotNewBotUsername` constant
|
||||
* `API`:
|
||||
* Added `savePreparedKeyboardButton` extensions
|
||||
* Added `getManagedBotToken` and `replaceManagedBotToken` extensions
|
||||
* `BehaviourBuilder`:
|
||||
* Added event triggers: `onManagedBotCreated`, `onManagedBotUpdated`, `onPollOptionAdded`, `onPollOptionDeleted`
|
||||
* Added `onManagedBotUpdate` trigger for `ManagedBotUpdated` updates
|
||||
* Added `waitManagedBotCreatedEvents`, `waitManagedBotUpdatedEvents`, `waitPollOptionAddedEvents`, `waitPollOptionDeletedEvents` expectations
|
||||
* Added `waitManagedBotUpdated` expectation
|
||||
* Added `ManagedBotUpdatedFilterByUser` and `ByUserManagedBotUpdatedMarkerFactory`
|
||||
* `Utils`:
|
||||
* Added `managedBotCreationLink` functions for building managed bot creation links
|
||||
* Added `requestManagedBotButton` extensions to `ReplyKeyboardRowBuilder`
|
||||
* Regenerated class casts extensions
|
||||
* `WebApps`:
|
||||
* Added `requestChat` method to `WebApp`
|
||||
|
||||
## 32.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# TelegramBotAPI [](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#march-1-2026)
|
||||
# TelegramBotAPI [](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#april-3-2026)
|
||||
|
||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user