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
- (