57 KiB
TelegramBotAPI changelog
0.29.1
Common:- Version updates:
Serialization:1.0.0-RC2->1.0.0
- Version updates:
0.29.0
-
THIS VERSION CONTAINS BREAKING CHANGES
-
PROJECT PACKAGES WERE CHANGED
- Packages in the whole project were changed
com.github.insanusmokrassar.TelegramBotAPI->dev.inmo.tgbotapi - Project group in repositories were changed:
com.github.insanusmokrassar->dev.inmo - Migration (Examples migration):
- Change implementation in your gradle files:
implementation "com.github.insanusmokrassar:TelegramBotAPI-core:*"->implementation "dev.inmo:tgbotapi.core:*"implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-utils:*"->implementation "dev.inmo:tgbotapi.extensions.utils:*"implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-api:*"->implementation "dev.inmo:tgbotapi.extensions.api:*"implementation "com.github.insanusmokrassar:TelegramBotAPI:*"->implementation "dev.inmo:tgbotapi:*"
- Replace packages
com.github.insanusmokrassar.TelegramBotAPIin the whole project bydev.inmo.tgbotapi
- Change implementation in your gradle files:
- Packages in the whole project were changed
-
TelegramBotAPI-core:- Now in forward info you can get
ForwardFromSupergroupInfo - BREAKING CHANGE
SendVoicefactory function has changed its signature: now it have nowthumb(according to the documentation) AudioFilenow can be converted toVoiceFileVoiceFilenow can be converted toAudioFile
- Now in forward info you can get
-
TelegramBotAPI-extensions-api:- ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH
TelegramBotTYPEALIAS. It should not bring any break changes - Internal changes of
sendRegularPollandsendQuizPollextensions - Variable
defaultLivePeriodDelayMillisnow is public - All
sendextensions forTelegramBotgot theirreplyvariations (issue #144) - A lot of
sendextensions forTelegramBotgot their variation withChatinstead ofChatIdentifier
- ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH
0.28.4
Common:- Version updates:
Ktor:1.4.0->1.4.1
- Version updates:
TelegramBotAPI-coreTelegramBotAPI-extensions-utils- Extensions
Flow<ChatEventMessage>#onlyGroupEventsandFlow<ChatEventMessage>#onlySupergroupEventsnow returnsCommonGroupEventMessageandCommonSupergroupEventMessage
- Extensions
0.28.3
- Common:
- Version updates:
Klock:0.12.0->0.12.1Kotlin serialization:1.0.0-RC->1.0.0-RC2(dependencykotlinx-serialization-corewas replaced withkotlinx-serialization-jsondue to kotlinx.serialization library update)
- Version updates:
TelegramBotAPI-core:- All
InlineQueryResulthas changed their type of id for more obvious relation betweenInlineQueryResult#idandChosenInlineResult#resultId:String->InlineQueryIdentifier
- All
TelegramBotAPI-extensions-utils:- Several extensions for updates flows based on
InlineQueryUpdatehas been added:Flow<InlineQueryUpdate>#onlyBaseInlineQueriesWithUpdatesFlow<InlineQueryUpdate>#onlyBaseInlineQueriesFlow<InlineQueryUpdate>#onlyLocationInlineQueriesWithUpdatesFlow<InlineQueryUpdate>#onlyLocationInlineQueries
- Several extensions for updates flows based on
ChosenInlineResultUpdatehas been added:Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResultsWithUpdatesFlow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResultsFlow<ChosenInlineResultUpdate>.onlyLocationChosenInlineResultsWithUpdatesFlow<ChosenInlineResultUpdate>.onlyLocationChosenInlineResults
- Several extensions for updates flows based on
0.28.2
TelegramBotAPI-extensions-utils:- Several commands shortcuts for
Flow<ContentMessage<TextContent>>has been added:filterExactCommandsfilterCommandsInsideTextMessagesfilterCommandsWithArgs
- Extension
Flow<BaseSentMessageUpdate>.filterCommandsWithArgshas changed its signature: now it will also have original message paired with list of text sources - Shortcut method
commonMessagesforonlyCommonMessages - Shortcuts
onlySentViaBotandwithoutSentViaBotnow are extensions for anyFlowwith types which implementingContentMessage
- Several commands shortcuts for
0.28.1
- Common:
- Versions updates:
Kotlin:1.4.0->1.4.10UUID:0.2.1->0.2.2
- Versions updates:
TelegramBotAPI-core:ExceptionHandlerhas changed its incoming type:Exception->ThrowablehandleSafelyhas changed its signatureexecuteUnsafehas changed its signature
0.28.0
-
THIS VERSION CONTAINS BREAKING CHANGES
-
PROJECT PACKAGES WERE CHANGED
- Project
TelegramBotAPI->TelegramBotAPI-core - Project
TelegramBotAPI-all->TelegramBotAPI
- Project
-
Common:- Version updates:
Kotlin:1.3.72->1.4.0Coroutines:1.3.8->1.3.9Serialization:0.20.0->1.0.0-RCKlock:1.11.14->1.12.0UUID:0.1.1->0.2.1Ktor:1.3.2->1.4.0
buildMimeTypefunction now is cache-oriented getter which will save already got mime types into internal map- All deprecations from previous versions were removed
- Version updates:
-
TelegramBotAPI-core:- Typealias
TelegramBotwas added - Fully rebuilt
KtorCallFactoryinterface to be able to handle custom answers from telegram bot api system - New implementation of
KtorCallFactorywas added:DownloadFileRequestCallFactoryDownloadFilerequest was added
- All included
KtorCallFactoryrealizations (except of abstract) now are objects:MultipartRequestCallFactorySimpleRequestCallFactory
MediaGroupMemberInputMediamembers now will not haveargumentsproperty due to redundancy and buggy of that- Field
medianow is common for allInputMediaobjects
- Typealias
-
TelegramBotAPI-extensions-api:- Extensions
TelegramBot#downloadFilewere added
- Extensions
-
TelegramBotAPI-extensions-utils:- All extensions for media groups (except of
mediaGroupId) have changed their context:List<MediaGroupMessage>->List<CommonMessage<MediaGroupContent>>forwardInforeplyTochatcreateResend(several extensions)
- Several extensions for downloading of files:
HttpClient#loadFilePathedFile#download
- All extensions for media groups (except of
0.27.11
TelegramBotAPI:- Extension
String#filenameFromUrlwas created- Extension
PathedFile#filenamewas created
- Extension
- Extension
TelegramBotAPI-extensions-utils:Flow<Iterable<T>>.flatMapextension was added- Extensions for
FlowUpdatesFilterwere added:FlowsUpdatesFilter#allSentMessagesFlow(combination ofmessageFlowandchannelPostFlow)FlowsUpdatesFilter#allSentMediaGroupsFlow(combination ofmessageMediaGroupFlowandchannelPostMediaGroupFlow)FlowsUpdatesFilter#sentMessagesFlowsUpdatesFilter#sentMessagesWithMediaGroupsFlowsUpdatesFilter#photoMessagesWithMediaGroupsFlowsUpdatesFilter#imageMessagesWithMediaGroupsFlowsUpdatesFilter#videoMessagesWithMediaGroupsFlowsUpdatesFilter#mediaGroupMessagesFlowsUpdatesFilter#mediaGroupPhotosMessagesFlowsUpdatesFilter#mediaGroupVideosMessages
- A lot of extensions like
Flow<BaseSentMessageUpdate>#textMessageswere added:Flow<BaseSentMessageUpdate>#animationMessagesFlow<BaseSentMessageUpdate>#audioMessagesFlow<BaseSentMessageUpdate>#contactMessagesFlow<BaseSentMessageUpdate>#diceMessagesFlow<BaseSentMessageUpdate>#documentMessagesFlow<BaseSentMessageUpdate>#gameMessagesFlow<BaseSentMessageUpdate>#invoiceMessagesFlow<BaseSentMessageUpdate>#locationMessagesFlow<BaseSentMessageUpdate>#photoMessagesFlow<BaseSentMessageUpdate>#imageMessages
Flow<BaseSentMessageUpdate>#pollMessagesFlow<BaseSentMessageUpdate>#stickerMessagesFlow<BaseSentMessageUpdate>#textMessagesFlow<BaseSentMessageUpdate>#venueMessagesFlow<BaseSentMessageUpdate>#videoMessagesFlow<BaseSentMessageUpdate>#videoNoteMessagesFlow<BaseSentMessageUpdate>#voiceMessagesFlow<BaseSentMessageUpdate>#mediaGroupMessagesFlow<BaseSentMessageUpdate>#mediaGroupPhotosMessagesFlow<BaseSentMessageUpdate>#mediaGroupVideosMessages
0.27.10
TelegramBotAPI-extensions-api:- Function
telegramBot(TelegramAPIUrlsKeeper)was added
- Function
TelegramBotAPI-extensions-utils:- Extension
Route#includeWebhookHandlingInRouteWithFlowswas added - A lot of extensions like
FlowsUpdatesFilter#textMessageswere added:FlowsUpdatesFilter#animationMessagesFlowsUpdatesFilter#audioMessagesFlowsUpdatesFilter#contactMessagesFlowsUpdatesFilter#diceMessagesFlowsUpdatesFilter#documentMessagesFlowsUpdatesFilter#gameMessagesFlowsUpdatesFilter#invoiceMessagesFlowsUpdatesFilter#locationMessagesFlowsUpdatesFilter#photoMessagesFlowsUpdatesFilter#imageMessages
FlowsUpdatesFilter#pollMessagesFlowsUpdatesFilter#stickerMessagesFlowsUpdatesFilter#textMessagesFlowsUpdatesFilter#venueMessagesFlowsUpdatesFilter#videoMessagesFlowsUpdatesFilter#videoNoteMessagesFlowsUpdatesFilter#voiceMessages
- Extension
0.27.9
Common- Versions updates:
Gradle Wrapper:6.5-all->6.5.1-binCoroutines:1.3.7->1.3.8Klock:1.11.3->1.11.14UUID:0.1.0->0.1.1
- Versions updates:
0.27.8
TelegramBotAPI:UnknownUpdateTypewas renamed toUnknownUpdate- Refactoring and optimization of
FlowsUpdatesFilter Venuetype was replaced to a new package:com.github.insanusmokrassar.TelegramBotAPI.types.venue.VenueVenuetype now implementsLocationedand delegate realisation to itslocationfieldFoursquareIdandFoursquareTypetypealiases were added
TelegramBotAPI-extensions-utils:- Several new functions
makeLinkToMessagewas added Foursquaredata class was added- Extension
Venue#foursquarewas added - Factory function
VenuewithFoursquareparameter was added
- Extension
- Several new functions
0.27.7
TelegramBotAPI:- Operator function
unaryPluswas added toRowBuilder. Now it is possible to writerow { +button } - Function
flatMatrixwas added for single-row columns - Operator extension
RowBuilder#pluswas added to be able to write things likerow { this + button }
- Operator function
TelegramBotAPI-extensions-api:- Extensions
RequestsExecutor#sendVenuewithLocationargs were added
- Extensions
TelegramBotAPI-extensions-utils:- Function
InlineKeyboardMarkupfor flat keyboards was added - Function
ReplyKeyboardMarkupfor flat keyboards was added
- Function
0.27.6
Common:- Versions:
Kotlin Coroutines:1.3.6->1.3.7
- Versions:
TelegramBotAPI:- Interface
PossiblySentViaBothas been added- Additional interface
PossiblySentViaBotCommonMessagewas added for more explicit typing declaration for compiler- Currently, only
ChannelMessageandCommonMessageImplare implementing the interfacePossiblySentViaBotCommonMessage. It could be changed in future
- Currently, only
- Additional interface
- Factory
buildMimeTypewas added BuiltinMimeTypeswas added- Abstraction
ThumbedWithMimeTypeInlineQueryResultwiththumbMimeTypefield was addedInlineQueryResultGifandInlineQueryResultMpeg4Gifnow extendThumbedWithMimeTypeInlineQueryResultinstead ofThumbedInlineQueryResult
- Interface
TelegramBotAPI-extensions-utils:- New extensions
onlyCommonMessages,onlySentViaBotandwithoutSentViaBotwas added
- New extensions
0.27.5
Common:- Versions:
Klock:1.11.1->1.11.3
- Versions:
TelegramotAPI:- Fix: for sending requests caption and text lengths limits were updated
- New variant of
rowwas added makeLinkToMessageextensions has been deprecated (replaced intoTelegramBotAPI-extensions-utils)- Next things was deprecated and replaced into
TelegramBotAPI-extensions-utils:- All
Stringformatting public extensions and functions - All extensions like
CaptionedInput#toHtmlCaptions - All helper extensions for
List<BaseMessageUpdate> - All
RequestsExecutor#executeAsyncandRequestsExecutor#executeUnsafe
- All
BotCommandnow more strictly check commands which passed to it- Regex
BotCommandNameRegexwas added
- Regex
TelegramBotAPI-extensions-api:- A lot of
RequesstExecutor#getChatextensions was added for more explicit types showing - New
RequesstExecutor#setMyCommandsextension was added - New field
BotBuilder#ktorClientEngineFactoryintroduced- Field
BotBuilder#ktorClientEnginenow is deprecated
- Field
- A lot of
TelegramBotAPI-extensions-utils:safelyfunction was introduced. It is inPreviewFeaturestate currentlymakeLinkToMessageextensions has been addedmakeLinkToAddStickerSetfunction and its variations were added- Next tools was added from
TelegramBotAPI:- All
Stringformatting extensions and functions - All extensions like
CaptionedInput#toHtmlCaptions - All helper extensions for
List<BaseMessageUpdate>- Several new extensions for
SentMediaGroupUpdatewere added:SentMediaGroupUpdate#forwardInfoSentMediaGroupUpdate#replyToSentMediaGroupUpdate#chatSentMediaGroupUpdate#mediaGroupId
- Several
List<MediaGroupMessage>.createResendextensions were added
- Several new extensions for
RequestsExecutor#executeAsyncandRequestsExecutor#executeUnsafe
- All
0.27.4
TelegramBotAPI-extensions-utils:- Several extensions for updates was added:
onlyBaseMessageUpdatesonlySentMessageUpdatesonlyEditMessageUpdatesonlyMediaGroupsUpdatesonlySentMediaGroupUpdatesonlyEditMediaGroupUpdates
- Renames in chat filters extensions:
filterBaseMessageUpdates->filterBaseMessageUpdatesByChatIdandfilterBaseMessageUpdatesByChatfilterSentMediaGroupUpdates->filterSentMediaGroupUpdatesByChatIdandfilterSentMediaGroupUpdatesByChat
- Several extensions for updates was added:
0.27.3
TelegramBotAPI:UpdateDeserializationStrategyis publicly available now- All
setWebhookextensions was marked as deprecated, renamed and replaced intoTelegramBotAPI-extensions-utils - Typealias
ExceptionHandlerwas added - it will be used forhandleSafely SetWebhookfactories signatures was changed (backward compatibility was not broken)executeUnsafenow working differently- Now it is possible to pass exceptions handler into
executeUnsafe
- Now it is possible to pass exceptions handler into
BasketballDiceAnimationTypewas addedUnknownDiceAnimationTypenow is deprecated due to renaming - currently it is typealias forCustomDiceAnimationTypeCustomDiceAnimationTypenow isdataclass instead of common class
FlowsUpdatesFilterwill use size 64 by default for internal broadcast channels
TelegramBotAPI-extensions-api:- Long Polling extensions now are deprecated in this project. It was replaced into
TelegramBotAPI-extensions-utils - Several
telegramBotfunctions was renamed intotelegramBotWithCustomClientConfig - Add one more
setWebhookInforealisation
- Long Polling extensions now are deprecated in this project. It was replaced into
TelegramBotAPI-extensions-utils:- Extension
toTelegramUpdatewas added - Long Polling extensions were added
- Updates utils were added
- New extensions
startListenWebhooks,setWebhookInfoAndStartListenWebhooksandincludeWebhookHandlingInRoutewas added - New extension
CoroutineScope#updateHandlerWithMediaGroupsAdaptationwas added - New extension
flowsUpdatesFilterwas added
- Extension
TelegramBotAPI-all:- Project was created
0.27.2
Common:- Versions:
- Coroutines:
1.3.5->1.3.6 - Klock:
1.10.5->1.11.1
- Coroutines:
- Versions:
TelegramBotAPI:- Expected class
MimeTypewas added- Field
MimeTyped#mimeTypenow typed byMimeTypeinstead ofString
- Field
MediaGroupMemberInputMediachildren now can be deserialized (but only those ones who are declared inside library)
- Expected class
TelegramBotAPI-extensions-utils:- Chat events splitters added:
- Extension
Flow<ChatEventMessage>#onlyChannelEventswas added - Extension
Flow<ChatEventMessage>#onlyGroupEventswas added - Extension
Flow<ChatEventMessage>#onlySupergroupEventswas added
- Extension
- Chat events splitters added:
0.27.1
TelegramBotAPI:- Interface
Explainedand subsinterfacesExplainedInputandExplainedOutputwas added- Class
QuizPollnow implementExplainedInput - In
QuizPoll#captionandQuizPoll#captionEntitiesare deprecated now - Class
SendQuizPollnow implementExplainedOutput - In
SendQuizPoll#captionis deprecated now
- Class
explanationLimitrange was added as future replacement ofquizPollExplanationLimitquizPollExplanationLimitnow is deprecated
- Extensions
toMarkdownExplanations,toMarkdownV2ExplanationsandtoHtmlExplanationswas added - Typealias
FullTextSourcesListwas added- All extensions
fullEntitiesListnow returnFullTextSourcesList - All extensions of
List<TextSource>now are extensions forFullTextSourcesList
- All extensions
- Interface
TelegramBotAPI-extensions-api:sendQuizPollnow is usingexplanationparameter instead ofcaption
0.27.0
Common:- Versions updates:
Kotlin:1.3.71->1.3.72Klock:1.10.3->1.10.5
- Versions updates:
TelegramBotAPI:- Typealias
LongSecondswas added for correct explanation of seconds inLongprimitive type - Several new fields was added:
explanationFieldexplanationEntitiesFieldopenPeriodFieldcloseDateField
- Extension
List<TextPart>#justTextSourceswas added for mapping ofList<TextPart>toList<TextSource> - Field
SendPoll#closeInfowas added- Range
openPeriodPollSecondsLimitwas added and used in allSendPollrequests for checking income data
- Range
SendQuizPollnow able to use fieldscaptionandparseModeforexplanationfunctionalityquizPollExplanationLimitwas added for checkingQuizPollexplanation size
- Field
TextLinkTextSource#urlwas added - Field
TextMentionTextSource#userwas added - Sealed class
ScheduledCloseInfowas added- Class
ExactScheduledCloseInfowas added for cases withclose_date - Class
ApproximateScheduledCloseInfowas added for cases withopen_period
- Class
- Field
Poll#scheduledCloseInfowas added - Sealed class
MultipleAnswersPollwas added- Class
RegularPollnow extendsMultipleAnswersPoll
- Class
Diceclass was replaced into new package- Sealed class
DiceAnimationTypewas added- Field
Dice#animationTypewas added asemojiAPI representation SendDicenow receiveanimationTypeas second parameter
- Field
- For
List<TextSource>was added several extensions:toMarkdownCaptionstoMarkdownTextstoMarkdownV2CaptionstoMarkdownV2TextstoHtmlCaptionstoHtmlTexts
- Typealias
TelegramBotAPI-extensions-api:- All
RequestsExecutor#sendDiceextensions now acceptDiceAnimationType?as second parameter - All
RequestsExecutor#sendRegularPollextensions now acceptScheduledCloseInfofourth parameter - All
RequestsExecutor#sendQuizPollextensions now accept additional parameterscaption: StringandparseMode: ParseModeforexplanationfunctionality andcloseInfo: ScheduledCloseInfo?for autoclose poll functionality
- All
TelegramBotAPI-extensions-utils:- Several shortcuts for
ScheduledCloseInfowas added:closePollExactAtclosePollExactAfterclosePollAfter
- Several shortcuts for
0.26.4
TelegramBotAPI:- Now any getting of updates will return
UnknownUpdateTypewhen inside of deserialization will beSerializationExceptionorNotImplementederror CallbackGamecurrently is an object- It is possible to use
CallbackGamefor nowCallbackGameInlineKeyboardButtonnow will not acceptcallbackGameas income object
- It is possible to use
- Now it is possible to pass exception handler in webhook
- Now any getting of updates will return
0.26.3
TelegramBotAPI:CallbackGameInlineKeyboardButtonwas added (Issue-79, PR-80)UnknownInlineKeyboardButtonwas added. It is unavailable for creating, but you can receive it, for example, inInlineQueryResultUpdatenow will be created even if wasSerializationExceptioninside of creating the update instance - in this case will be createdUnknownUpdateTypeUnknownUpdateType$rawJsonvalue now is included (JsonElement)- EXPERIMENTALLY
BaseEditMessageUpdate#datanow isCommonMessage<*> - Suspend inline function
handleSafelywas addedKtorRequestsExecutornow usehandleSafelyinstead oftrywithsupervisorScopeUpdatesPollingnow usehandleSafelyinstead oftrywithsupervisorScope
0.26.2
TelegramBotAPI:- Now
EditMediaGroupUpdatealso extendsBaseEditMessageUpdate - EXPERIMENTALLY Now all
TextSourcerealisations will containsourcefield as a property inside of them
- Now
TelegramBotAPI-extensions-api:startGettingFlowsUpdatesextension which do not require filter (but return a new one) was added
TelegramBotAPI-extensions-utils:- Subproject was added
filterBaseMessageUpdates,filterSentMediaGroupUpdatesandfilterEditMediaGroupUpdatesextensions was addedfilterCommandsWithArgs,filterExactCommandsandfilterCommandsInsideTextMessagesextensions was addedasContentMessagesFlow,asChatEventsFlowandasUnknownMessagesFlowextensions was addedwithContentTypeextension was addedonlyAnimationContentMessagesextension was addedonlyAudioContentMessagesextension was addedonlyContactContentMessagesextension was addedonlyDiceContentMessagesextension was addedonlyDocumentContentMessagesextension was addedonlyGameContentMessagesextension was addedonlyInvoiceContentMessagesextension was addedonlyLocationContentMessagesextension was addedonlyPhotoContentMessagesextension was addedonlyPollContentMessagesextension was addedonlyStickerContentMessagesextension was addedonlyTextContentMessagesextension was addedonlyVenueContentMessagesextension was addedonlyVideoContentMessagesextension was addedonlyVideoNoteContentMessagesextension was addedonlyVoiceContentMessagesextension was added
0.26.1
TelegramBotAPI:BotCommandnow will check and throw error in case when command or description lengths is/are incorrectStorageFilenow is common for all platforms- JavaScript realization was removed due to its redundancy
- JVM realization was replaced with
funfactory StorageFilenow able to accept any factory ofInputStorageFileInfowas added to avoid strange collisions with throws inStorageFile
- Fixes issue with
hashTagfor markdown InvalidPhotoDimensionsExceptionwas added for cases whenPHOTO_INVALID_DIMENSIONanswer received- Other fixes
0.26.0
Common:- Versions updates:
Klock:1.10.0->1.10.3
- Versions updates:
TelegramBotAPI:- Request
SendDicewas added (calling sendDice) - Class
Dicewas added (type dice) - Class
DiceContentwas added (for including it in message object) BotCommandwas addedGetMyCommandsrequest was addedSetMyCommandsrequest was addedGetMenow is object instead of classGetMewas replaced into packagecom.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMeCreateNewStickerSetrenamed toCreateStaticNewStickerSetCreateNewAnimatedStickerSetrequest was added (it handle work withtgs_sticker)StickerSet#thumbwas addedAddStickerToSetrenamed toAddStaticStickerToSetAddAnimatedStickerToSetrequest was addedSetStickerSetThumbrequest was added- Most of sticker actions now implements
StandardStickerSetActioninstead ofStickerSetAction getUpdatesLimitwas added to be ensure in get updates limitGetUpdatesnow will check count of requesting updates and throw exception if it is not in range1 .. 100GetUpdates#limitnow is not nullable and by default set up to 100
- Request
TelegramBotAPI-extensions-api:- Extensions
sendDicewas added - Extension
getMyCommandsrequest was added - Extension
setMyCommandsrequest was added - Extension
getMewas replaced into packagecom.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.GetMeKt.getMe - All extensions
createNewStickerSetwas renamed tocreateNewStaticStickerSet - Extensions
createNewAnimatedStickerSetwas added - All extensions
addStickerToSetwas renamed toaddStaticStickerToSet - Extensions
addAnimatedStickerToSetwas added - Extensions
setStickerSetThumbwas added - Extension
startGettingUpdatesnow will dropSentMediaGroupUpdatein case if it is the last in updates group and size of retrieved updates is equal to 100 (max count of retrieved updates) - Extensions
getUpdatesnow will receive only not nullablelimitparameter
- Extensions
0.25.1
- Update kotlin:
1.3.70->1.3.71 - Fix of error inside of update utils for media groups
0.25.0
- Common:
- Versions updates:
Kotlin:1.3.61->1.3.70Kotlin coroutines:1.3.3->1.3.5Kotlin serialization:0.14.0->0.20.0Ktor:1.3.1->1.3.2Klock:1.8.7->1.10.0UUID:0.0.7->0.1.0
- Versions updates:
TelegramBotAPI:Botimplementations (as andBotitself) now have not nullableusernameFile#toInputFileextension now will throw error when file does not existsInlineKeyboardMarkupwill check thatPayInlineKeyboardButtonis the first in case if it is exists inkeyboardmakeLinkToMessagenow is notPreviewFeature- All deprecations was removed
RequestExceptionnow extendsio.ktor.utils.io.errors.IOExceptioninstead ofkotlinx.io.IOExceptionAny#toJsonnow is NOTinlineFlowsUpdatesFilternow as marked my annotationFlowPreviewPathedFile#fullUrlnow is notinlinefunctionSimpleRequest#jsonnow is notinlineandinternalfunctionFlowsUpdatesFilternow have two additional flows:pollAnswerFlow,unknownUpdateTypeFlowExtendedUser(typealias) was added as aPreviewFeature
0.24.1
TelegramBotAPI:UpdateReceiverwas replaced to the packagecom.github.insanusmokrassar.TelegramBotAPI.updateshandlers- All functions inside
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPollingare deprecated and will be removed in some soon versions. Their replacement are able insideTelegramBotAPI-extensions-api UpdatesFilteris interface for now- Previous
UpdatesFilterclass was renamed toSimpleUpdatesFilterand for backward compatibility was added builder functionUpdatesFilter, which will be removed in near releases FlowsUpdatesFilternow implementsUpdatesFilter
- Previous
BaseSentMessageUpdateandBaseEditMessageUpdateinterfaces was addedEditChannelPostUpdatenow is implementingBaseEditMessageUpdateinterfaceEditMessageUpdatenow is implementingBaseEditMessageUpdateinterfaceChannelPostUpdatenow is implementingBaseSentMessageUpdateinterfaceMessageUpdatenow is implementingBaseSentMessageUpdateinterface
UpdatesPollerand all its usages, childs and childs usages now are deprecatedGetUpdates#timeouttype now isSeconds(in fact it isIntas previously)KtorRequestsExecutornow is using a copy of incomingHttpClientobject and installHttpTimeoutfeatureAbstractRequestCallFactorynow setting up a custom delay in case if request isGetUpdates
TelegramBotAPI-extensions-api:- All functions from
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPollingnow available in packagecom.github.insanusmokrassar.TelegramBotAPI.extensions.api.updates.UpdatesPolling - Now new method of getting updates available:
startGettingUpdateswithUpdatesFilteras incoming first parameter startGettingUpdateswithreceiverandallowedUpdatesparameters now will handle updates by itself
- All functions from
0.24.0
TelegramBotAPI:- All suspend functions for
RequestsExecutorwas removed (due to replacement into TelegramBotAPI extensions project) ForwardFromChannelInfo#channelChatnow isChannelChatinstead ofChat
- All suspend functions for
TelegramBotAPI-extensions-api:- Most part of sending media messages functions was removed and replaced with their
InputFileargs analogs
- Most part of sending media messages functions was removed and replaced with their
0.23.3 Project separating prepare version
API Extensions
- Project created
- For
SendPhotowas added new functions for uploading ofMultipartFile deleteWebhookextension forRequestsExecutorwas added
Telegram Bot API
- All
RequestsExecutorextensions related to Telegram Bots API was replaced intoAPI Extensionsproject
0.23.2
- Fixes in
InputMedia-mediafield was not included to serialization
0.23.1
- Versions updates:
- Klock
1.8.6->1.8.7 - Ktor
1.3.0->1.3.1
- Klock
- Now it is possible to get updates by polling with custom executor engine
CommonMultipartFileRequestnow is internal- Added
LiveLocationclass for more useful tracking live locations InvoiceOfPaymentis renamed toInvoiceContentand now isMessageContentinstead ofPaymentInfoSendInvoicenow returnContentMessage<InvoiceContent>paymentInfoinside ofCommonMessageImplnow can be set only toSuccessfulPaymentInfo- Added
RecordVideoNoteActionandUploadVideoNoteActionforrecord_video_noteandupload_video_noteactions - For most part of messages was added
RequestsExecutorextensions for more useful way of usage toInputFileextensions now will return more exact types- Now it is possible to send broadcast channels size for
FlowsUpdatesFilter
0.23.0 TelegramBotAPI 4.6
Pollnow is sealed classRegularPolltype was added to represent polls with typeregularQuizPolltype was added to represent polls with typequizUnknownPollTypetype was added to represent polls which are unknown in current version
AnonymousPollOptionwas renamed toSimplePollOptionSendPollwas rewritten as sealed classSendRegularPollwas created and representsendPollmethod with typeregularSendQuizPollwas created and representsendPollmethod with typequiz
Poll#createRequestextension was addedPollAnswerUpdatetype of update was addedPollAnswertype was addedUpdatesFilternow support work withPollAnswerUpdate
languagefield in PreTextSource now correctly passed from telegram MessageEntitiesKeyboardButtonnow is sealed class- Fixed problem of incorrect representation of this class (any type of request can be created separately)
- Added new types of
KeyboardButton:UnknownKeyboardButtonSimpleKeyboardButtonRequestContactKeyboardButtonRequestLocationKeyboardButtonRequestPollKeyboardButton
- Added new type
KeyboardButtonPollType:UnknownKeyboardButtonPollTypeRegularKeyboardButtonPollTypeQuizKeyboardButtonPollType
Usernow is sealed classCommonUserwas added as representation of defaultUserBotwas added as representation of bot user (it is sealed class)ExtendedBotwith additional infoCommonBotwith simple info
GetMenow returnExtendedBotobject- Now extension
javaLocaleis extension forCommonUser
0.22.2 CashTag and independent updates handling
cashtagentity type was added- Several
Unknown*realizations was added:UnknownUpdateTypeUnknownMessageTypeUnknownChatTypeUnknownCallbackQueryType
UpdatesFilternow have one additional income callback:unknownUpdateTypeCallbackcreateSimpleUpdateFiltercan receive one more callback:unknownCallback(forunknownUpdateTypeCallback)
0.22.1 MediaContent#asInputMedia
- All
MediaContentinstances now can create theirInputMediaanalog - New annotation
PreviewFeaturewas added to mark new thing as preview for the time while they can work incorrectly - Added links utils:
makeLinkToMessagehave two signatures - for direct creating using username and for abstract creating using chat id
0.22.0
-
KtorCallFactorymust returnHttpStatementinstead ofHttpClientCall -
SendMessagewas renamed toSendTextMessageand previousSendMessageis deprecated -
All
AbleToBe*interfaces was renamed toPossibly*AbleToBeEditedMessage->PossiblyEditedMessageAbleToBeForwardedMessage->PossiblyForwardedMessageAbleToBeMarkedUp->PossiblyMarkedUpAbleToBeEditedMessage->PossiblyEditedMessage
-
ForwardedMessagetype was renamed toForwardInfoAnonymousForwardedMessage->AnonymousForwardInfoUserForwardedMessage->UserForwardInfoForwardedFromChannelMessage->ForwardFromChannelInfoPossiblyForwardedMessage#forwardedfield now renamed toforwardInfo
-
All serializers in library now are
internal. If you have used some of them or I have marked as internal by a mistake - don't hesitate to say this. -
EditChatMessagenow have generic type and extendsSimpleRequest<ContentMessage<GenericType>> -
ResendableContentnow extendsRequest<out Message>instead ofRequest<Message> -
Most part of requests have changed return type. They are listed below:
ForwardMessageGetChatAdministratorsEditChatMessageLiveLocationStopChatMessageLiveLocationEditChatMessageTextEditChatMessageCaptionEditChatMessageMediaEditChatMessageReplyMarkupSendAnimationSendAudioSendContactSendLocationSendTextMessageSendPollSendVenueSendGameSendDocumentSendMediaGroupSendPhotoSendVideoSendVideoNoteSendVoiceSendSticker
-
Changed type of
createResendGameContentLocationContentPollContentTextContentVenueContentAnimationContentAudioContentDocumentContentContactContentPhotoContentVideoContentVideoNoteContentVoiceContentStickerContent
-
Version updates:
- Ktor
1.2.6->1.3.0
- Ktor
0.21.0 TelegramBotAPI 4.5
-
All
MessageEntity'es now are replaced withTextPart -
Added support of strikethrough and underline
- Added
UnderlineTextSource - Added
StrikethroughTextSource - Added support in
RawMessageEntity
- Added
-
Added support of
MarkdownV2 -
Now will not be thrown exception when there is income unknown type of
RawMessageEntity. Instead of this will be createdRegularTextSourcewith the same text -
Fixed problem that usually string formatting did not trigger escaping of control characters
-
Actualized work with
pretype of text - now it is possible to uselanguagefor formatting of text -
Removed constructor of
TextMentionTextSource, which was deprecated previously -
All
TelegramMediaFileinstances now have fieldfileUniqueId, which representsfile_unique_idfield from API -
Now
ChatPhotohave two additional fields:smallFileUniqueIdandbigFileUniqueId -
Now any administrator object instance have
customTitlenullable field -
Added the new request
SetChatAdministratorCustomTitleto manage the custom titles of administrators promoted by the bot. -
Added the field
slowModeDelayto theExtendedSupergroupChatobjects. -
CaptionedInputnow have extensionfullEntitiesListwhich will return list ofTextPartwithRegularSource's -
TextPartadded - it will be used as part of some text and can be not related to telegram bot -
MultilevelTextSourcewas added - it is type ofTextSource, which can have subsources as parts of this text -
In all
TextSources all fields now are lazy for avoiding of potential risk for performance issues -
Updates in versions:
- Coroutines
1.3.2->1.3.3 - Klock
1.8.0->1.8.6 - UUID
0.0.6->0.0.7
- Coroutines
0.20.4
- Now
setWebhooksupports setting up of path for listening - Now
setWebhooksupports custom listen address even if certificate was not provided
0.20.3
- Now
LeftChatMamberis aCommonEvent
0.20.2
- New exception type
MessageIsNotModifierExceptionwas added - New exception type
MessageToEditNotFoundExceptionwas added - Now exceptions in requests will be caught correctly
0.20.1
Usernow implementPrivateChatTextMentionMessageEntitynow acceptPrivateChatinstead ofUserin main constructorTextMentionMessageEntitynow contains not user, but containsPrivateChat- Fixed:
TextMentionMessageEntity#asHtmlSourcepreviously worked incorrect
- Abstraction
TextSourceMessageEntitynow extendsTextSourcecreateFormattedTextmethod now acceptList<TextSource>createHtmlTextmethod now acceptList<TextSource>createMarkdownTextmethod now acceptList<TextSource>- A lot of
TextSourceimplementors was added. More info here- All
MessageEntityimplementations now are using newTextSourceanalogues as delegates
- All
0.20.0 MPP Migration
- Time library change:
joda-time->com.soywiz.korlibs.klock:klock Currenciednow using ascurrencyvalue with typeString- For
Javathere isCurrencied#javaCurrencyextension function, which will give an old currency work way
- For
Usernow have no fielduserLocale- For
Javathere isUser#javaLocaleextension function, which will give an old locale work way
- For
0.19.0 ImplicitReflection removing
- Total rework of serialization for requests. Now all
SimpleRequestchildren have:requestSerializer- field, which must provide serializer of current typeresultDeserializer- field, which must provide opportunity to deserializer result. Previously it was a function
- Removed deprecations:
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.WebhookPrivateKeyConfigcom.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesFiltercom.github.insanusmokrassar.TelegramBotAPI.utils.extensions.createSimpleUpdateFiltercom.github.insanusmokrassar.TelegramBotAPI.utils.createMarkdownTextcom.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownCaptioncom.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownTextcom.github.insanusmokrassar.TelegramBotAPI.updateshandlers.KtorUpdatesPollercom.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContentcom.github.insanusmokrassar.TelegramBotAPI.types.message.CommonForwardedMessagecom.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.CaptionedInputMediacom.github.insanusmokrassar.TelegramBotAPI.types.games.Game#textcom.github.insanusmokrassar.TelegramBotAPI.types.games.Game#textEntitiescom.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.makeFileUrlcom.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.downloadingFilesBaseUrlcom.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.Datacom.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageIdcom.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageIdcom.github.insanusmokrassar.TelegramBotAPI.bot.RequestExceptioncom.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.ReplyMessageNotFoundcom.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#baseUrlcom.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#constructor(token, hostUrl)com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, client, hostUrl, callsFactories, excludeDefaultFactories, requestsLimiter, jsonFormatter)com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, engine, hostUrl)
0.18.1 Libraries update
- Update libraries:
kotlin: 1.3.41 -> 1.3.61kotlin coroutines: 1.2.2 -> 1.3.2kotlin serialization: 0.11.1 -> 0.14.0joda time: 2.10.3 -> 2.10.5ktor: 1.2.3 -> 1.2.6
BotActionnow will be deserialized in a little bit other wayBotActionSerializernow is internal
- Most part of serializers now are objects (instead of classes as was previously)
0.18.0 Raws cleaning
-
Made internal and not available outside of library:
RawMessageRawUpdateRawChatMemberRawMessageEntityRawInlineQueryRawCallbackQueryRawChosenInlineResult
-
All
RawMessageusages was replaced withMessageinterface (with some of other raw classes was made the same things)TelegramBotAPIMessageDeserializationStrategywas created. It was used for deserialization of Telegram Bot API incoming messagesTelegramBotAPIMessageDeserializeOnlySerializerwas created. It MUST NOT be used to serialize messages
-
Update of description
-
Make
Gameobject a little bit more standartizated -
Gamenow is not serializable and have no additional trash, related to serialization -
TelegramFilewas removed
0.17.0 July 29, 2019 API Update
Libraries updates:
- Kotlin version
1.3.31->1.3.41 - Kotlin Coroutines version
1.2.1->1.2.2 - Kotlin Serialization version
0.11.0->0.11.1 - Joda Time version
2.10.1->2.10.3 - ktor version
1.1.4->1.2.3
Changes according to July 29, 2019 Telegram Bot API update:
StickerandStickerSetnow have fieldisAnimatedChatPermissionsobject was added,GroupChatinterface gotpermissionsfield, requestSetChatPermissionswas addedGroupChatobject now have no fieldallMembersAreAdminsSpecialRightsChatMemberwas added for administrators and restricted members rights union, chat members abstractions was replaced intoabstractspackage and available permissions was updatedRestrictChatMemberrequest now acceptpermissionsobject instead of separated permissions- All
GroupChatinstances have description
Other important changes:
- Totally reworked chats hierarchy.
Extendedabstractions was added for cases when calledGetChatrequest RawChatboilerplate was removed and replaced by serializersBotCommandMessageEntity#commandwill not contain//!parts and also will cut outside of command begin token (/or!) and username token (@) or end of command (any space character)RequestsExecutornow isCloseableTelegramAPIUrlsKeeperwas added to provide more comfortable work with file urls and other things like this
0.16.1
- Now old uncommon
CaptionedMediaContentandCaptionedInputMediaare replaced by almost the same interfacesCaptionedInputandCaptionedOutput. They are both implementingCaptionedinterface AnimationContentnow isCaptionedInput
0.16.0 Bot API 4.3
LoginURLandLoginURLInlineKeyboardButtonhas been addedreplyMarkupfield was added to theCommonMessageobjects viaAbleToBeMarkedUpinterfaceSwitchInlineQueryCurrentChatInlineKeyboardButton#switchInlineQueryCurrentChatfield fixedInlineKeyboardButtonnow is sealed class and all its possible realisations are inside of its class fileString#asUsernamemethod renamed toString#toUsername- Several
toChatIdextensions added
0.15.0
- Old
UpdatesPollerremoved (was deprecated) UpdatesPollerrenamed toKtorUpdatesPoller- Now
KtorUpdatesPollerdo not use additional delay between requests and await answer from Telegram all timeout time - Added abstraction
UpdatesPoller - Changed signature of the most count of
startGettingOfUpdates:- They are not
suspendfor now - They are return
UpdatesPoller - They are using
timeoutMillisinstead ofrequestsDelayMillis
- They are not
- Added
CIOktor client engine as lightweight default engine for long-polling
0.14.2 MediaGroups edit hotfixes
convertWithMediaGroupUpdatesextension added- All media group converting extensions are internal for now
- Fixes according to updates in converting of updates to media group updates
0.14.1
- Replace
UpdatesFilterandUpdatesPollerinto another package - Replace
WebhookPrivateKeyConfig - Added
FlowsUpdatesFilter UpdatesFilternow have additional callback for pollsStopPoll#replyMarkupnow is optional
0.14.0
- Now library have no default engine for both webhooks and requests executor. It is required for clients to set some default library
- All proxy help methods was removed . They are will be replaced in separated project
Ktorversion1.1.3->1.1.4- Requests results now always decoding as
UTF-8 AbstractRequestCallFactorywas added with cache of methods urls to avoid memory leaks- Small refactoring of work with response in
KtorRequestsExecutor - Kotlin version
1.3.30->1.3.31 - Kotlin coroutines
1.2.0->1.2.1 CommonForwardedMessagewas renamed toUserForwardedMessage- All forwarded messages are now just childs of
ForwardedMessage:AnonymousForwardedMessage- for messages without forwarded infoUserForwardedMessage- for messages from users and groups (contains not message id)ForwardedFromChannelMessage- for messages from channels
- Changed logic of forwarded messages preparing
0.13.0 Telegram Polls
- Type
PollOptionandAnonymousPollOptionadded - Type
Polladded - Type
PollUpdateadded and implemented inRawUpdate. NowPollUpdatecan be retrieved fromRawUpdate - Type
PollContentadded - now it can be a value ofContentMessage#content - Request
SendPolladded andPollContent#createResendnow use it ByInlineMessageIdis deprecated (useInlineMessageActioninstead)ByMessageIdis deprecated (useMessageActioninstead)- Most part of requests which are working with identifiers of messages now implement
MessageActiondirectly or by their parents StopPollimplemented- All current
Chatabstractions are deprecated and rewritten as typealiases. UseChatabstractions fromcom.github.insanusmokrassar.TelegramBotAPI.types.chat.abstractspackage - Common Groups now may have pinned message
is_memberfield added intoRestrictedChatMember- BREAK CHANGES Now
ForwardedMessagescan beAnonymousForwardedMessageandPublicForwardedMessage. Old implementations now extendPublicForwardedMessage
0.12.7 Hotfix version
- Now temporary all requests of input media will contains
filefield
0.12.6 Libraries updates
kotlinversion1.3.21->1.3.30kotlin coroutinesversion1.1.1->1.2.0kotlin serializationversion0.10.0->0.11.0ktorversion1.1.2->1.1.3- Added
DeleteWebhookrequest - All default
startGettingOfUpdates(in fact - methodstartofUpdatesPoller) are suspend and will try to delete webhook
0.12.5 MediaContent improvements
- Now
MediaGroupContentisMediaContent - All
MedaContentnow have no generics and have basicTelegramMediaFilemedia field
0.12.4
- Optimized preparing of media group in
UpdatesPoller - Add
CommonLimiter - Add
MessageEntity#asHtmlSourceandString#toHtml - Add tools for work with html captions and texts
MessageContentwhich using captions or text now have default parse modeHTMLParseModedue to issue with escaping of]in links titles- Added
MarkdownandHTMLtype aliases which actually meansMarkdownParseModeandHTMLParseMode ChatIdnow have extensionlinkwhich will automatically create link liketg://user?id=<chatId>- Created a few of methods for all supported formats of text like bold, italic, links and others
- Rewritten
MessageEntitiesto use new formatting options
0.12.3 Cleaning
- Refactor, optimizing and cleaning of code
- Removed deprecated method
T#toJsonWithoutNulls() - Renamed instances of
MediaGroupMessages and refactored their interfaces.ChannelMediaGroupMessagewill not containuserfield (butCommonMediaGroupMessagewill have) - Now
MediaCollectionContentisMediaContent(classes of this interface must choose best media for present out)PhotoContentnow choose biggest photo size from its collection asmedia
- Fix in order of media group messages which was received by webhooks
0.12.2
- New in
MediaGroupUpdate:- It is subtype of
Updateand can be use as regular update with list of messages - Data now is list with
MediaGroupMessage - Added field
originswhich represent origin updates forMediaGroupMessage updateIdnow represent LAST id of origins updates
- It is subtype of
UpdatesFilterand other objects now work withUpdateReceiver<Update>as common supertype for receivers.
0.12.1 Hotfix for media groups
- Added additional media group types (like
MessageMediaGroupUpdate) - Fixed handling of media group updates in
UpdatesFilter
0.12.0 Webhooks
- Added
DataRequestinterface which replaceDatainterface MultipartRequestImplnow useDataRequest- All requests which implements
Datanow implementDataRequest - Added class
SetWebhookand its factory - Added class
UpdatesFilterwhich can help to filter updates by categories - Added function
accumulateByKeywhich work as debounce for keys and send list of received values - Added webhooks functions and workaround for
Reverse Proxymode - Added new type of updates
MediaGroupUpdate, which can be received only from filters UpdatesFilternow use new type of updates for mediagroups- Add
GetWebhookInforequest andWebhookInfotype - Replace updates types into separated place in types
- Now default
RequestExceptionwill contain plain answer from telegram - Added
UnauthorizedException RequestExceptionnow is sealed- Rename
ReplyMessageNotFoundtoReplyMessageNotFoundException - Added
List<BaseMessageUpdate>#mediaGroupIdextension - Added utility
T#asReference(): WeakReference(T)extension - Added
UpdatesPollerclass which can be instantiated for manage updates polling - Separated execute extensions (now they are in file
Executes) and poller creating extensions BaseMessageUpdate#toMediaGroupUpdate()will also check condition when update-receiver already isMediaGroupUpdate
0.11.0
- Kotlin
1.3.11->1.3.21 - Kotlin coroutines
1.1.0->1.1.1 - Kotlin serialization
0.9.1->0.10.0 - Ktor
1.1.1->1.1.2
0.10.3
- Hotfix for username data class
0.10.2
- Fixes in
Username- Now you can create username object using string which is not starting with
@ - Now
Usernamecorrectly comparing with strings, which are not starting with@
- Now you can create username object using string which is not starting with
- Now most part of usernames in library have type
Username - Fix
replyMarkupinInlineQueryResultArticle
0.10.1
- Change algorithm of
executeUnsafe: now it use loop instead of recursive calling - Add additional
startGettingUpdateswith better management of received updates for media groups - Now
MediaGroupMessageisCommonMessagewithMediaGroupContentcontent - Added extensions
replyTo,forwardedandchatforList<BaseMessageUpdated>for comfortable work with media groups lists - Fix
parseModeofInputTextMessageContent
0.10.0
- Most part of abstractions was replaced from
requestsandtypeson more high level - Added abstraction
CommonVenueData - Added abstraction
CommonContactData - Added
InputMessageContent - Update some types and requests according to abstractions replacing
- Add all
InlineQueryResult,InputMessageContentand other inline mode types - Fixes in edition of inline messages and their result types
- Replace basic exception and add
ReplyMessageNotFoundexception
0.9.3
KtorRequestsExecutornow can use customJSONstring formatter (by default - non strict)ResponseParametersrenamed toResponse- Add
RequestErrorsealed class and described in documentation known errors - Add
ResponseParametersRawwhich can create error based on input parameters - Add
parametersfield inResponseand remove useless fields fromResponse - Add
leftToRetryparameter inRetryAfterError - Add handling of
RetryAfterErrorinKtorRequestsExecutor
0.9.2
RequestsExecutor#executeAsync(Request, CoroutineScope)now will returnDeferredfor cases when you need resultRequestsExecutor#executeUnsafewill automatically retry request if it was unsuccessful and retries > 0
0.9.1
- Updated built-in lengths restrictions
- Apply restrictions of text limit for sending messages
- Add
RegularTextMessageEntitywhich is useful for representing regular text message entity - Add
convertToFullMessageEntityListwhich create list of entities withRegularTextMessageEntityon places where must be regular text - Change signature of
createMarkdownText: now it will return list of strings - Deprecate old signatures of
createMarkdownText,toMarkdownCaption,toMarkdownText - Add
ResendableContent#createResendswhich create adapted list of resends for content - Add
TextContentowncreateResendsrealisation
0.9.0
- Old extension
OkHttpClient.Builder#useWithnow deprecated and must be replaced by the same incom.github.insanusmokrassar.TelegramBotAPI.bot.Ktorpackage - Replace
ProxySettingsdata class insettingspackage, deprecate old link BaseRequestsExecutornow have no it's own scope- Add
RequestLimiterand base realisations - Now
KtorRequestsExecutorcan receive as one of parametersRequestLimiter(by default -EmptyLimiter)
0.8.5
- Add extension
String#toMarkdown - Fix of inserting of text when create Markdown-adapted text from text and text entities
- Fix default realisation of MessageEntity#asMarkdownSource
0.8.4
- Added
createMarkdownTextand extensions forCaptionedMediaContentandTextContent - Added
ResendableContentand realize in different contents- Animation
- Audio
- Document
- Photo
- Sticker
- Video
- VideoNote
- Voice
MessageContentnow isResendableContent- Now all media sending factories which contains
thumbhave defaultnullvalue ChatIdentifierclasses now aredataclasses- Now
MediaGroupContentinterface containstoMediaGroupMemberInputMediamethod for easily creating mirror input media - Change signature of
Update- Now
Updateis untyped and data isAny
- Now
- Media groups now are separated type of updates and you can subscribe on that receiving directly
- Now
AdministratorChatMemberis interface andCreatorChatMemberimplement it
0.8.3
- Now
ForwardedMessagecontains nullablefrom
0.8.2
- Add
FromUserMessagewhich must be implemented in all messages realisations which haveuserfield - Add
CommonMediaGroupMessagewhich in fact extension ofMediaGroupMessagewith implementation ofFromUserMessage CommonMessageImplnow implementingFromUserMessage
0.8.1
- Update
MediaGroupMessageinterface - Add implementation of
MediaGroupMessage - Add generating of
MediaGroupMessageinRawMessage