Releases: InsanusMokrassar/ktgbotapi
Release list
36.1.0
Dependencies:- Update
com.gradleup.nmcp.aggregation:com.gradleup.nmcp.aggregation.gradle.pluginfrom1.6.0to1.6.1 - Update
com.google.devtools.ksp:symbol-processing-apifrom2.3.9to2.3.11 - Update
io.ktor:ktor-client-corefrom3.5.1to3.5.2 - Update
dev.inmo:kslogfrom1.6.1to1.7.0 - Update
dev.inmo:micro_utils.colors.commonfrom0.30.0to0.30.1
- Update
36.0.0
THIS UPDATE CONTAINS SUPPORT OF TELEGRAM BOTS API 10.2
Breaking changes:
RichBlockTableCell.alignnow uses the string-serializedRichBlockTableCellAlignsealed hierarchy (Left,Center, orRight) instead ofStringRichBlockTableCell.valignnow uses the string-serializedRichBlockTableCellVAlignsealed hierarchy (Top,Middle, orBottom) instead ofStringRichBlockTableCellis now a sealed interface withHeaderandRegularimplementations; the input table DSL usesheaderCellandcellrespectivelyInputRichBlockListItemis now a sealed interface withOrderedandUnorderedimplementations; ordered items require a non-nullvalueand typedLabelType, whileLabelType.Decimalsis the default;InputRichBlocksBuildernow exposes separateorderedListandunorderedListDSL functions with matching item buildersReplyParametersis now a sealed interface with nestedReplyParameters.ChatandReplyParameters.Ephemeralimplementations; overloadedReplyParameters(...)companion factories construct both regular-message and ephemeral-message variants- The 4 group-family message implementations (
CommonGroupContentMessageImpl,CommonForumContentMessageImpl,CommonChannelDirectMessagesContentMessageImpl,CommonSuggestedChannelDirectMessagesContentMessageImpl) gained trailingreceiverUser/ephemeralMessageIdprimary-constructor parameters (defaulted tonull) ��� positional construction of these classes must be updated reply(to = ...)overloads for the 13 ephemeral-capable senders (see below) now detect an ephemeraltotarget (to is PossiblyEphemeralMessage && to.ephemeralMessageId != null) and automatically address the reply throughephemeral_message_id, sending the outgoing message itself as ephemeral to the same receiver ��� this is a behavior change for any existing code that replies to a message carrying a non-nullephemeralMessageId
Migration advice: Keep ReplyParameters(...) for both chat-message and ephemeral-message targets; explicit ReplyParameters.Ephemeral(...) subtype construction also remains available; pass receiverUser/ephemeralMessageId explicitly (or rely on their null default) when constructing the 4 group-family message implementations positionally
Core:- (
Rich Messages) Added the raw-string-serializedRichBlockTableCellVAlignhierarchy and migrated table-cell vertical alignment fromStringtoRichBlockTableCellVAlign - (
Rich Messages) Added the raw-string-serializedRichBlockTableCellAlignhierarchy and migrated table-cell alignment fromStringtoRichBlockTableCellAlign - (
Rich Messages) SplitRichBlockTableCellinto header/regular variants with a shared flat surrogate serializer; addedheaderCellto the input table DSL - (
Rich Messages) Addedh1throughh6shortcuts for plain and rich-text headings inInputRichBlocksBuilder - (
Rich Messages) Reworked the input table DSL to build cells through nestedtable { row { cell(...) { } } }builders - (
Rich Messages) Replaced the flatInputRichBlockListItemdata class with ordered/unordered variants, added the string-serializedLabelTypehierarchy (A,a,I,i,1), and split the list DSL intoInputRichBlockOrderedListBuilder/InputRichBlockUnorderedListBuilder - (
Rich Messages) AddedInputRichBlockhierarchy with all 21InputRichBlock*types (mirroring the receivedRichBlock*hierarchy and reusingRichText/RichBlockCaption/RichBlockTableCell), the label-lessInputRichBlockListItemand theInputRichBlockSerializer; everyInputRichBlockexposessubBlocksnavigation - (
Rich Messages) AddedTelegramMediaVoiceNote(InputMediaVoiceNote) and theRichMessageMemberTelegramMediamarker interface implemented by it,TelegramMediaAnimation,TelegramMediaAudio,TelegramMediaPhotoandTelegramMediaVideo; addedVoiceFile.toTelegramMediaVoiceNoteconverters - (
Rich Messages) AddedInputRichMessageMediatype (media referenced fromInputRichMessage.html/.markdownviatg://photo?id=,tg://video?id=andtg://audio?id=links) - (
Rich Messages)InputRichMessagegainedblocksandmediafields ("exactly one ofhtml,markdownorblocksmust be used") and theInputRichMessageBlocksfactory;InputRichMessageHTML/InputRichMessageMarkdowngained a trailingmediaparameter - (
Rich Messages) Added Rich Messages input DSL buildersbuildInputRichBlocks/InputRichBlocksBuilder, typed ordered/unordered list builders and theInputRichMessageBlocks { }builder overload (marked with the@RichTextDslDSL marker) - (
Rich Messages)SendRichMessagenow supportsattach://upload of new files referenced fromInputRichMessage.blocks/.media;SendRichMessageDraftnow rejects rich messages that require direct file upload (unsupported by the method) - (
Ephemeral Messages) AddedEphemeralMessageIdvalue class,PossiblyEphemeralMessage(receiverUser/ephemeralMessageId) andEphemeralMessageAction(receiverUserId/ephemeralMessageId) abstractions - (
Ephemeral Messages)RawMessageparsesreceiver_user/ephemeral_message_id; the 4 group-familyCommon*ContentMessagetypes (CommonGroupContentMessage,CommonForumContentMessage,CommonChannelDirectMessagesContentMessage,CommonSuggestedChannelDirectMessagesContentMessage, via the sharedPotentiallyFromUserGroupContentMessage) now also implementPossiblyEphemeralMessage - (
Ephemeral Messages)BotCommandgained theisEphemeralfield - (
Ephemeral Messages)ReplyParametersbecame a sealed interface with nestedChatandEphemeralimplementations and a shared surrogate-backed serializer preserving the flat Bot API JSON shape; added theMessage.ephemeralReplyParametersOrNull()/Message.ephemeralReplyReceiverUserIdOrNullhelpers used by thereply(to = ...)smart-branch - (
Ephemeral Messages)ReplyParameters.EphemeralandMessage.ephemeralReplyParametersOrNull()support and forwardallowSendingWithoutReply,checklistTaskId, andpollOptionIdtogether withephemeralMessageId - (
Ephemeral Messages) AddedreceiverUserId/callbackQueryIdparams (via the newOptionallyEphemeralSendRequest) to the 13 ephemeral-capable send requests:SendTextMessage,SendContact,SendLocation(Static/Live),SendVenue,SendPhotoData,SendLivePhotoData,SendAudioData,SendDocumentData,SendVideoData,SendAnimationData,SendVoiceData,SendVideoNoteData,SendStickerByFileId - (
Ephemeral Messages) AddedEditEphemeralMessageText/EditEphemeralMessageMedia/EditEphemeralMessageCaption/EditEphemeralMessageReplyMarkupandDeleteEphemeralMessagerequests (all returnUnit, mirroring the inline-message edit family);EditEphemeralMessageMediarejectsMultipartFilemedia (new file upload is not supported for ephemeral edits) - (
Ephemeral Messages) AddedEphemeralChatId(IdChatIdentifier, carryingchatId/receiverUser/ephemeralMessageId) and theChatIdentifier.receiverUser/ChatIdentifier.ephemeralMessageIdextensions (mirroringChatIdentifier.threadId);FullChatIdentifierSerializergained thechatId/eph/receiverUserChatId/ephemeralMessageIdstring format. The nullablereceiverUserIdparam of the 13 ephemeral-capable send requests still defaults from the passedchatIdwhen it is anEphemeralChatId;DeleteEphemeralMessageandEditEphemeralMessageText/EditEphemeralMessageCaption/EditEphemeralMessageMedia/EditEphemeralMessageReplyMarkupinstead keepreceiverUserId/ephemeralMessageIdREQUIRED on their primary constructor/factory form, gainingEphemeralChatId-taking secondary constructors/factory overloads that source both params from the identifier (throwingIllegalArgumentExceptionif it carries noephemeralMessageId) - (
Communities) AddedCommunityIdvalue class andCommunitytype (id/name) - (
Communities) AddedCommunityChatAdded(community) andCommunityChatRemoved(fieldless) chat events (CommonEvent);RawMessageparsescommunity_chat_added/community_chat_removed - (
Communities) Addedcommunityfield toExtendedChat(ChatFullInfo.community), parsed forExtendedChannelChatImpl,ExtendedGroupChatImpl,ExtendedSupergroupChatImpl,ExtendedForumChatImpl,ExtendedChannelDirectMessagesChatImplandExtendedBot - (
Bot Subscriptions) AddedBotSubscriptionUpdated(user,invoicePayload,state) andBotSubscriptionUpdatedUpdate;stateis modeled as the typed sealedBotSubscriptionUpdated.State(Canceled/Active/Failed, with anUnknownfallback), mirroringTransactionType - (
Bot Subscriptions)RawUpdateparses the newsubscriptionfield; addedUPDATE_SUBSCRIPTIONtoALL_UPDATES_LIST_WITHOUT_REACTIONS;FlowsUpdatesFiltergainedbotSubscriptionUpdatedUpdatesFlow
- (
API:- (
Ephemeral Messages) ThreadedreceiverUserId/callbackQueryIdthrough thesendXxx/send/reply/replyWithXxxextensions for the 13 ephemeral-capable senders (send/Sends.kt,send/Replies.kt,send/RepliesWithChatsAndMessages.ktand their per-type extension files);reply(to = ...)now automatically sends an ephemeral reply whentois itself ephemeral (see Breaking changes) - (
Ephemeral Messages) Ephemeral-capablereply(to = ...)overloads gainedreplyToEphemeralMessageId, defaulting fromPossiblyEphemeralMessage.ephemeralMessageId; direct and dispatcher overloads forward the explicit target intoephemeralReplyParametersOrNull - (
Ephemeral Messages) Added 48 ephemeral-onlyreply/replyWithXxxoverloads inRepliesWithEphemeral.ktwithout aChatMessage; each overload requiresreplyInChatId,receiverUserId, andreplyToEphemeralMessageId, with compl...
- (
35.1.0
Dependencies:Kotlin:2.3.20->2.3.21Coroutines:1.10.2->1.11.0Ktor:3.4.2->3.5.1KSP:2.3.6->2.3.9MicroUtils:0.29.2->0.30.0Dokka:2.0.0->2.2.0Versions:0.53.0->0.54.0NMCP:1.4.4->1.6.0
Build:- Updated Gradle wrapper
8.13->9.6.1and migrated build scripts to be Gradle 9 compatible (Project.exec->providers.exec,tasks.whenTaskAdded->tasks.configureEach) - Migrated Dokka documentation to the Dokka Gradle Plugin v2: the
docsmodule is now included in the build as the KDocs aggregator (./gradlew :docs:dokkaGenerate) and thePublish KDocsworkflow was updated accordingly
- Updated Gradle wrapper
35.0.0
THIS UPDATE CONTAINS SUPPORT OF TELEGRAM BOTS API 10.1
Breaking changes:
EditTextChatMessage.textchanged fromStringtoString?(rich edits carry no text) ��� implementations overriding it must widen the type and readers must handlenullEditChatMessageText.textchanged fromStringtoString?; itstextSourcesis nownullwhen there is no text ��� code readingtextas non-null must handlenullExtendedBotgained thesupportsJoinRequestQueriesfield inserted betweensupportsGuestQueriesandcanConnectToBusiness��� positional constructor calls andcomponentNdestructuring shift and must be updated
Migration advice: Handle nullable text on EditTextChatMessage/EditChatMessageText; construct ExtendedBot with named arguments
Core:- (
Rich Messages) AddedRichText(RichTextPlain,RichTextGroup,RichTextEntity) hierarchy with all 25RichText*entity types and a recursive serializer supporting plain strings, arrays and typed objects; everyRichTextexposesrawText,markdownandhtmlrenderings - (
Rich Messages) AddedRichBlockhierarchy with all 21RichBlock*types plusRichBlockCaption,RichBlockTableCellandRichBlockListItem; everyRichBlockexposesmarkdown/htmlsource, theRichBlockMediamarker interface andsubBlocks/searchnavigation helpers - (
Rich Messages) AddedRichTextInfotype (withmarkdown/htmlsource built from its blocks) andRichMessageContentmessage content;RichMessageContent.createResendre-sends the content (forwarded when it contains media blocks, otherwise re-built throughSendRichMessage); parsedrich_messageinRawMessage; addedRichMessageContentMessagetypealias - (
Rich Messages) AddedInputRichMessage(internal constructor withInputRichMessageHTML/InputRichMessageMarkdownfactories) andInputRichMessageContentusable asInputMessageContent - (
Rich Messages) Added Rich Messages DSL buildersbuildRichText/RichTextBuilder,buildRichBlocks/RichBlocksBuilder,buildRichTextInfoandRichBlockListBuilder(marked with the@RichTextDslDSL marker) - (
Rich Messages) Added Rich Markdown/HTML source helpersString.escapeRichMarkdown()andList<RichBlock>.toRichMarkdown()/toRichHtml() - (
Rich Messages) AddedSendRichMessageandSendRichMessageDraftrequests - (
Rich Messages) AddedrichMessageparameter toEditChatMessageText; itstextis now nullable (per API) and theEditChatMessageRichTextfactory builds a rich edit; widenedEditTextChatMessage.textto nullable - (
Polls) AddedLinktype (dev.inmo.tgbotapi.types.Link) implementingPollMedia, carrying theurlof a link attached to a poll option - (
Polls) Addedlinkfield parsing toPollMediadeserialization/serialization - (
Polls) AddedTelegramMediaLink(InputMediaLink) implementingInputPollOptionMedia, usable as a poll option media - (
Join Request Queries) AddedChatJoinRequestQueryIdvalue class andqueryIdfield toChatJoinRequest - (
Join Request Queries) AddedsupportsJoinRequestQueriesflag toExtendedBot(User.supports_join_request_queries) - (
Join Request Queries) AddedguardBotfield toExtendedChat(ChatFullInfo.guard_bot), parsed for public chats - (
Join Request Queries) AddedAnswerChatJoinRequestQueryrequest andChatJoinRequestQueryResultsealed interface (Approve/Decline/Queue/Unknown) serialized as a plain string - (
Join Request Queries) AddedSendChatJoinRequestWebApprequest
- (
API:- (
Rich Messages) AddedsendRichMessageandsendRichMessageDraftTelegramBotextensions - (
Join Request Queries) AddedanswerChatJoinRequestQueryandsendChatJoinRequestWebAppTelegramBotextensions
- (
BehaviourBuilder:- (
Rich Messages) AddedonRichMessagetrigger andwaitRichMessage/waitRichMessageMessageexpectations
- (
Utils:- (
Rich Messages) AddedFlow<ContentMessage<*>>.onlyRichMessageContentMessages() - (
Join Request Queries) AddedChatJoinRequest.query_idraw accessor
- (
34.0.0
THIS UPDATE CONTAINS SUPPORT OF TELEGRAM BOTS API 10.0
THIS UPDATE CONTAINS BREAKING CHANGES
Breaking changes:
- Removed the
CommonMessage<T>super-type ��� replaced by the new sealedChatContentMessage<T>(CommonContentMessage,ChatMessage); code referencingCommonMessagein types,whenbranches or signatures must switch toChatContentMessage - Renamed casts
commonMessageOrNull/commonMessageOrThrow/ifCommonMessagetochatContentMessageOrNull/chatContentMessageOrThrow/ifChatContentMessage - Reworked the message hierarchy (
ContentMessage,Message,FromUserMessage,PossiblyEditedMessage,PossiblyForwardedMessage,PossiblyPaymentMessage,PossiblySentViaBotCommonMessage,PossiblyTopicMessage,SignedMessage,ChatEventMessage,PassportMessage) and related typealiases ��� dependent type signatures may need updates - Chat send/reply extensions now return
ChatContentMessage<*>(previouslyContentMessage<*>) ChatPermissionsinterface gained the abstractcanReactToMessagesmember ��� custom implementations must add itSendMessageDraftno longer throws when the text length is out of range: it now logs a warning and validates against the newdraftMessageTextLength(0..textLength.last) range, allowing empty textpollOptionsLimitchanged from2..12to1..12
Migration advice: Replace CommonMessage usages with ChatContentMessage, commonMessageOr with chatContentMessageOr
Core:- (
Guest Mode) AddedGuestQueryIdvalue class indev.inmo.tgbotapi.typesandWithOptionalGuestQueryIdinterface indev.inmo.tgbotapi.abstracts.types - (
Guest Mode) AddedRequestGuestMessageandRequestGuestContentMessage<T>message abstractions (CommonContentMessage,SpecialMessage,FromUserMessage,PossiblySentViaBot) exposingguestQueryId; addedPossiblyGuestAnswerMessageexposingguestBotCallerUserandguestBotCallerChat - (
Guest Mode) AddedRequestGuestContentMessageImpldata class implementingRequestGuestContentMessage - (
Guest Mode) AddedSentGuestMessagecarryingInlineMessageId - (
Guest Mode) AddedGuestMessageUpdate(BaseSentMessageUpdate) andguest_messageupdate type wiring inRawUpdate/UpdateTypes/FlowsUpdatesFilter - (
Guest Mode) AddedAnswerGuestQueryrequest returningSentGuestMessage - Introduced sealed
ChatContentMessage<T>super-type extendingCommonContentMessageandChatMessage, used as the common return type of chat send/reply operations - Reworked
ContentMessage,Message,FromUserMessage,PossiblyEditedMessage,PossiblyForwardedMessage,PossiblyPaymentMessage,PossiblySentViaBotCommonMessage,PossiblyTopicMessage,SignedMessage,ChatEventMessage,PassportMessageand related typealiases to integrate guest messages and unify chat content messages - Updated
RawMessage,MessageUpdate,ChannelPostUpdate,BusinessMessageUpdate,EditMessageUpdate,EditChannelPostUpdate,BaseMessageUpdate,BaseEditMessageUpdate,BaseSentMessageUpdateto align with the new hierarchy - (
Live Photos) AddedLivePhotoFileclass representing the incomingLivePhotoTelegram type (PollMedia,MediaContentVariant,UsefulAsPaidMediaFile) - (
Live Photos) AddedLivePhotoContent(VisualMediaGroupPartContent) representing live photo messages - (
Live Photos) AddedTelegramMediaLivePhoto(TelegramFreeMedia,VisualMediaGroupMemberTelegramMedia,InputPollMedia,InputPollOptionMedia) ��� usable insendMediaGroup,editMessageMedia, and polls - (
Live Photos) AddedTelegramPaidMediaLivePhoto(VisualTelegramPaidMedia) for paid live photos - (
Live Photos) AddedPaidMedia.LivePhotovariant andPaidMedia.LivePhoto.toTelegramPaidMediaLivePhoto()conversion - (
Live Photos) AddedlivePhotoFieldconstant; addedlive_photoparsing toRawMessageandReplyInfo.Externalsurrogate - (
Live Photos) AddedSendLivePhotorequest andSendLivePhotoData/SendLivePhotoFiles - (
Live Photos) AddedLivePhotoMessagetypealias - (
Live Photos) AddedLivePhotoFile.toTelegramMediaLivePhoto(...)andLivePhotoFile.toTelegramPaidMediaLivePhoto()extensions - (
Chat Management) AddedcanReactToMessagesfield toChatPermissions(interface,GranularandCommon) andRestrictedMemberChatMember - (
Chat Management) Added optionalretrieveOtherBotsparameter toGetChatAdministratorsrequest - (
Chat Management) AddedDeleteMessageReactionrequest with@Warningon primary constructor; addedDeleteUserMessageReactionandDeleteActorChatMessageReactionfactory functions - (
Chat Management) AddedDeleteAllMessageReactionsrequest with@Warningon primary constructor; addedDeleteAllUserMessageReactionsandDeleteAllActorChatMessageReactionsfactory functions - (
Polls) AddedTelegramMediaSticker,TelegramMediaLocationandTelegramMediaVenueclasses - (
Polls) AddedInputPollMediaandInputPollOptionMediasealed interfaces representing input media variants accepted bysendPoll - (
Polls) AddedPollMediaclass representing media attached to polls in incoming updates - (
Polls) Addedmediafield toPoll,PollOptionandInputPollOption - (
Polls) AddedexplanationMediafield toQuizPoll - (
Polls) AddedmembersOnlyfield toPoll - (
Polls) AddedcountryCodesfield toPoll - (
Polls) Addedmedia,membersOnly,countryCodesparameters toSendRegularPollandSendPollfactory functions - (
Polls) Addedmedia,explanationMedia,membersOnly,countryCodesparameters toSendQuizPollfactory functions - (
Polls) Decreased minimum allowed poll options count from 2 to 1 (pollOptionsLimitis now1..12) - (
Managed Bots Access) AddedBotAccessSettingsdata class indev.inmo.tgbotapi.types.managed_botswithisAccessRestrictedandaddedUsersfields - (
Managed Bots Access) AddedGetManagedBotAccessSettingsrequest returningBotAccessSettings - (
Managed Bots Access) AddedSetManagedBotAccessSettingsrequest withuserIdand optionaladdedUserIds(isAccessRestrictedis derived fromaddedUserIds) - (
Managed Bots Access) AddedisAccessRestrictedField,addedUsersField,addedUserIdsFieldconstants - (
Personal Chat) AddedGetUserPersonalChatMessagesrequest returningList<ChatContentMessage<*>> - (
Drafts)SendMessageDraftnow allows empty text via the newdraftMessageTextLength(0..textLength.last) range and logs a warning instead of throwing when the text length is out of range
- (
API:- (
Guest Mode) AddedanswerGuestQueryextensions indev.inmo.tgbotapi.extensions.api.answers - (
Guest Mode) AddedRepliesWithGuestQueryId.ktreply extensions acceptingGuestQueryId - (
Guest Mode) Updated reply/send extensions (Replies,RepliesWithChatsAndMessages,Sends,ResendMessage,SendChecklist,SendContact,SendDice,SendLiveLocation,SendStaticLocation,SendVenue,SendMessage, mediaSend*,SendGame,SendInvoice,SendQuizPoll,SendRegularPoll) to returnChatContentMessage<*>and align with the new hierarchy - (
Live Photos) AddedsendLivePhotoextensions (ChatIdentifier/Chat��InputFile/LivePhotoFile�� text/textSources) - (
Chat Management) Added optionalretrieveOtherBotsparameter togetChatAdministratorsextensions - (
Chat Management) AddeddeleteUserMessageReactionanddeleteActorChatMessageReactionextensions - (
Chat Management) AddeddeleteAllUserMessageReactionsanddeleteAllActorChatMessageReactionsextensions - (
Chat Management) Added@Warning-marked catch-alldeleteMessageReactionanddeleteAllMessageReactionsextensions - (
Polls) Addedmedia,membersOnly,countryCodesparameters tosendRegularPollextension - (
Polls) Addedmedia,explanationMedia,membersOnly,countryCodesparameters tosendQuizPollextension - (
Managed Bots Access) AddedgetManagedBotAccessSettingsextension indev.inmo.tgbotapi.extensions.api.managed_bots - (
Managed Bots Access) AddedsetManagedBotAccessSettingsextension withuserIdand optionaladdedUserIds - (
Personal Chat) AddedgetUserPersonalChatMessagesextension returningList<ContentMessage<*>>
- (
Behaviour Builder:- (
Guest Mode) AddedGuestMessageTriggerswithonGuestRequestMessagetrigger - (
Guest Mode) UpdatedWaitContent,WaitContentMessage,WaitEditedContentMessage,WaitMediaGroup,WaitMediaGroupMessages,WaitCommandsMessages,WaitDeepLinks,WaitMention,WaitMentionMessage,ContentTriggers,EditedContentTriggers,MediaGroupMessagesTriggers,MediaGroupTriggers,MentionTriggers,DeepLinkHandling,MessageFilterExcludingMediaGroupsfor the unifiedChatContentMessagehierarchy - (
Live Photos) AddedonLivePhoto,onEditedLivePhoto,onLivePhotoGalleryMessages,onLivePhotoGallerytriggers - (
Live Photos) AddedonMentionWithLivePhotoContent/onTextMentionWithLivePhotoContenttriggers - (
Live Photos) AddedwaitLivePhoto,waitLivePhotoMessage,waitEditedLivePhoto,waitEditedLivePhotoMessage,waitLivePhotoGallery,waitLivePhotoGalleryMessagesexpectations - (
Live Photos) AddedonlyLivePhotoContentMessagesutility
- (
Utils:- (
Guest Mode) AddedguestMessageUpdateOrNulland related casts inClassCastsNew - (
Guest Mode) UpdatedMediaGroupContentMessageCreatorandFlowsUpdatesFilterto support guest messages
- (
33.2.0
Core:- Add
ApiExceptionas variant ofBotException - Add classcasts for bots exceptions
- Add
33.1.0
Versions:Kotlin:2.3.10->2.3.20Serialization:1.10.0->1.11.0Ktor:3.4.1->3.4.2MicroUtils:0.29.1->0.29.2KSLog:1.6.0->1.6.1
33.0.0
THIS UPDATE CONTAINS ADDING SUPPORT OF Telegram Bots API 9.6
THIS UPDATE CONTAINS BREAKING CHANGES
Core:- THIS IS BREAKING CHANGE
MultipleAnswersPollremoved;RegularPollnow directly implementsPoll - THIS IS BREAKING CHANGE
allowMultipleAnswersrenamed toallowsMultipleAnswersacross poll types and requests - THIS IS BREAKING CHANGE
QuizPoll.correctOptionId: Int?changed tocorrectOptionIds: List<Int>? - THIS IS BREAKING CHANGE
PollOptionis now a sealed interface withPollOption.SimpleandPollOption.LatelyAddedsubtypes;SimplePollOptionremoved - THIS IS BREAKING CHANGE
PollAnswer.Anonymous.voterChattype changed fromChannelChattoPreviewPublicChat - THIS IS BREAKING CHANGE
requestChannelReplyButton(group variant) renamed torequestGroupReplyButton - Added
BotTokenvalue class - Added
SavePreparedKeyboardButtonrequest withPreparedKeyboardButtonandPreparedKeyboardButtonIdtypes - Added
GetManagedBotTokenandReplaceManagedBotTokenrequests - Added
KeyboardButtonRequestManagedBotandRequestManagedBotKeyboardButton - Added
ManagedBotCreatedchat event andManagedBotUpdatedtype withManagedBotUpdate - Added
PollOptionPersistentIdvalue class - Added
PollOptionAddedandPollOptionDeletedchat events - Added
pollOptionIdsupport inReplyParameters(reply_to_poll_option_id) - Added
canManageBotstoExtendedBot - Added
allowsRevoting,shuffleOptions,allowAddingOptions,hideResultsUntilCloses,description/descriptionTextSourcesto poll types and send requests - Added
chosenPersistentIdstoPollAnswer - Added
UsernameAtLessSerializer - Extended
openPeriodPollSecondsLimitfrom5..600to5..2628000 - Fixed quiz poll serialization type (was incorrectly using
regularPollTypein quiz branch) - Fixed quiz poll explanation serialization (now correctly uses
explanation/explanationTextSources) - Fixed
SendQuizPollcorrect option index range validation (off-by-one) - Several poll validation checks changed from throwing exceptions to logging warnings
- THIS IS BREAKING CHANGE
API:- Added
savePreparedKeyboardButtonextensions - Added
getManagedBotTokenandreplaceManagedBotTokenextensions - Added optional
pollOptionIdparameter toreply/replyWith*extensions - Updated
sendQuizPollextensions withcorrectOptionIds,allowsMultipleAnswers,allowsRevoting,shuffleOptions,hideResultsUntilCloses,descriptionparameters - Updated
sendRegularPollextensions withallowsRevoting,shuffleOptions,allowAddingOptions,hideResultsUntilCloses,descriptionparameters
- Added
BehaviourBuilder:- Added
onManagedBotCreatedandonManagedBotUpdatedtriggers - Added
onPollOptionAddedandonPollOptionDeletedtriggers - Added
waitManagedBotCreatedEventsandwaitManagedBotUpdatedexpectations - Added
waitPollOptionAddedEventsandwaitPollOptionDeletedEventsexpectations - Added
ManagedBotUpdatedFilterByUserandByUserManagedBotUpdatedMarkerFactory
- Added
Utils:- Added
managedBotCreationLinkformatting extensions - Added
requestManagedBotButtontoReplyKeyboardBuilder - Added class casts for
ManagedBotUpdate,ManagedBotCreated,PollOptionAdded,PollOptionDeleted - Removed
MultipleAnswersPollclass casts - Updated raw poll accessors to match new model (
allowsMultipleAnswers,correctOptionIds,explanation) - Regenerated class casts extensions
- Added
WebApps:- Added
requestChatsupport forPreparedKeyboardButtonId - Fixed
iconCustomEmojiIdpassing inBottomButton
- Added
32.0.0
THIS UPDATE CONTAINS BREAKING CHANGES
Version:Kotlin:2.2.21->2.3.10Kotlin Serialization:1.9.0->1.10.0Ktor:3.3.2->3.4.1KSP:2.3.2->2.3.6MicroUtils:0.26.9->0.29.1KSLog:1.5.2->1.6.0
Core+API:- BREAKING CHANGES: ALL METHODS THAT PREVIOUSLY RETURNED BOOLEAN NOW RETURNS UNIT
Core:- BREAKING CHANGE
SetChatTitleinit do not throw error in case whentitle.lengthis outside ofchatTitleLength - BREAKING CHANGE
SetStickerEmojiListinit do not throw error in case whenemojis.sizeis outside ofemojisInStickerLimit - BREAKING CHANGE
DeleteMessagesinit do not throw error in case when title ismessageIds.sizeofdeleteMessagesLimit - BREAKING CHANGE
ForwardMessagesinit do not throw error in case whenmessageIds.sizeis outside offorwardMessagesLimit - BREAKING CHANGE
CopyMessagesinit do not throw error in case whenmessageIds.sizeis outside ofcopyMessagesLimit - BREAKING CHANGE
SwitchInlineQueryChosenChatinit do not throw error in case whenmessageIds.sizeis outside ofcopyMessagesLimit - BREAKING CHANGE
SetStickerKeywordsinit do not throw error in case when there are errors inkeywords
- BREAKING CHANGE