100 KiB
TelegramBotAPI changelog
0.38.2
Common:Version:MicroUtils:0.9.0->0.9.1
API- New extensions
TelegramBot#copyMessagesfor media groups
- New extensions
0.38.1
Core:MessageCallbackQuery(and all implementers as well) has changed the type ofmessage: now it isContentMessage<MessageContent>instead ofMessage- New type
ForwardFromPublicChatInfoas extender ofForwardInfo:ForwardFromChannelInfonow extendsForwardFromPublicChatInfoForwardFromSupergroupInfonow extendsForwardFromPublicChatInfo
- New type of events:
UserLoggedIn
Utils:- (#511) New extensions properties (raw fields as in original API) for several types have been added:
MessageCallbackQueryChosenInlineResultInlineQueryPoll
- (#511) New extensions properties (raw fields as in original API) for several types have been added:
0.38.0
This update contains Telegram Bot API 5.6 implementation
This update contains migration onto Kotlin 1.6
This update has changed constructors of all CommonMessage implementations
Common:Version:Kotlin:1.5.31->1.6.10Coroutines:1.5.2->1.6.0Serialization:1.3.1->1.3.2Klock:2.4.8->2.4.10Ktor:1.6.5->1.6.7MicroUtils:0.8.7->0.9.0
Core:- Add
SpoilerTextSource(as part ofTelegram Bot API 5.6update) - Add support of
protect_contentas a fieldprotectContentin all send message requests and parameter in all functions related to that requests (as part ofTelegram Bot API 5.6update) - ALL IMPLEMENTERS OF
CommonMessageHAS CHANGED THEIR CONSTRUCTOR: NOW THEY GEThasProtectedContentinstead offorwardable(inversed) fieldChannelContentMessageImplChannelMediaGroupMessageCommonMediaGroupMessageGroupContentMessageimplementersConnectedFromChannelGroupContentMessageImplUnconnectedFromChannelGroupContentMessageImplAnonymousGroupContentMessageImplCommonGroupContentMessageImpl
PrivateContentMessageImpl
- Add
0.37.4
Common:Version:MicroUtils:0.8.7->0.8.9
Core:- New
SupergroupEventsubtype:MigratedToSupergroup. This event is sent when a group is converted to a supergroup while bot is in the group. - Helper extenstion functions on
ChatEventto cast it toMigratedToSupergroup.
- New
0.37.3 Hotfix of 0.37.2
Core:- Fixes in hierarchy (and creating) of messages from channels
0.37.2 changelog:
This update contains Telegram Bot API 5.5 implementation
Common:Version:MicroUtils:0.8.2->0.8.7
Core:- New request type:
ChatSenderRequest- New request
BanChatSenderChat - New request
UnbanChatSenderChat
- New request
ExtendedPrivateChatgot new properties:hasPrivateForwardsandallowCreateUserIdLink(same ashasPrivateForwards)- All
ContentMessagegot fieldforwardable(old constructors marked asDeprecated) FromChannelGroupContentMessagehas been divided for two interfaces (and corresponding classes):ConnectedFromChannelGroupContentMessage(andConnectedFromChannelGroupContentMessageImpl) for connected to the group channels messagesUnconnectedFromChannelGroupContentMessage(andUnconnectedFromChannelGroupContentMessageImpl) for unconnected channels
- New request type:
API:- New extensions
TelegramBot#banChatSenderChat - New extensions
TelegramBot#unbanChatSenderChat
- New extensions
Utils:- Fix of
EntitiesBuilder#linkln
- Fix of
0.37.2 Telegram Bot API 5.5
Common:Version:MicroUtils:0.8.2->0.8.7
Core:- New request type:
ChatSenderRequest- New request
BanChatSenderChat - New request
UnbanChatSenderChat
- New request
ExtendedPrivateChatgot new properties:hasPrivateForwardsandallowCreateUserIdLink(same ashasPrivateForwards)- All
ContentMessagegot fieldforwardable(old constructors marked asDeprecated) ChannelContentMessagehas been divided for two interfaces (and corresponding classes):ConnectedChannelContentMessage(andConnectedChannelContentMessageImpl) for connected to the group channels messagesUnconnectedChannelContentMessage(andUnconnectedChannelContentMessageImpl) for unconnected channels
- New request type:
API:- New extensions
TelegramBot#banChatSenderChat - New extensions
TelegramBot#unbanChatSenderChat
- New extensions
Utils:- Fix of
EntitiesBuilder#linkln
- Fix of
0.37.1
Common:Version:Serialization:1.3.0->1.3.1Klock:2.4.7->2.4.8MicroUtils:0.8.1->0.8.2
0.37.0 Telegram Bot API 5.4
ALL DEPRECATIONS WERE REMOVED
Common:Version:Klock:2.4.6->2.4.7Ktor:1.6.4->1.6.5MicroUtils:0.7.3->0.8.1
Core:- Replacement of simple
CreateChatInviteLinkandEditChatInviteLinkwith several new:CreateChatInviteLinkSimpleCreateChatInviteLinkWithLimitedMembersCreateChatInviteLinkWithJoinRequestEditChatInviteLinkSimpleEditChatInviteLinkWithLimitedMembersEditChatInviteLinkWithJoinRequest
- New
BotAction:ChooseStickerAction - Now requester will throw exceptions related to responses decoding directly instead of wrapping in
RequestException
- Replacement of simple
BehaviourBuilder FSM:- Incompatible changes (now generics are used in state machines)
strictlyOnandonStateOrSubstatenow are part ofBehaviourContextWithFSMBuilder
0.36.1
Common:Version:MicroUtils:0.7.2->0.7.3
API:- Fix
getMyCommandsoverloads conflict when no arguments provided
- Fix
Utils:buildEntitiesDSL now have parameterseparatorto specifyTextSourcethat will be inserted between other sources
0.36.0
ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED ALL EXTENSION PACKAGES HAS BEEN RENAMES. Old packages are still available, but will be removed in next major update:
-
tgbotapi.extensions.api->tgbotape.api -
tgbotapi.extensions.utils->tgbotape.utils -
tgbotapi.extensions.behaviour_builder->tgbotape.behaviour_builder -
Common:Version:Serialization:1.2.2->1.3.0MicroUtils:0.5.28->0.7.2Klock:2.4.3->2.4.6Ktor:1.6.3->1.6.4
-
Core:PrivateContentMessageImpl#paymentInfonow is deprecated and will always be nullPayInlineKeyboardButton#paynow is deprecatedRowBuilderandMatrixBuildernow are open and available for extendingMatrixBuilder#matrixwill return read-only new list instead of original internalmutMatrix- Introduced new type of events
SuccessfulPaymentEventinstead of putting of payment inside of message - New type of events union:
PublicChatEvent.CommonEventis still union of anyChatEvent - New
AbstractFlowsUpdatesFilterwith defaultlazyrealization for all typed flows FlowsUpdatesFilterfun now haveonBufferOverflowandupstreamUpdatesFlowas incoming paramsDefaultFlowsUpdatesFilternow use additionalupstreamUpdatesFlowas source of updates
-
Utils:- Two new dsl:
inlineKeyboardfor creatingInlineKeyboardMarkupreplyKeyboardfor creatingReplyKeyboardMarkup
- Cast helpers for
Message(thanks to madhead):asPossiblyReplyMessage: tries to cast aMessagetoPossiblyReplyMessage, returnsnullif the message is not of that typerequirePossiblyReplyMessage: casts aMessagetoPossiblyReplyMessage, fails if the message is not of that typewhenPossiblyReplyMessage: tries to cast aMessagetoPossiblyReplyMessageand runs the given block of code with it, if the cast is successful
- New type
WithUserfor unioning of all types withuserFromUsernow extendsWithUser- Cast helpers for type
WithUser:asWithUser,whenWithUser,requireWithUser
- Two new dsl:
-
Behaviour Builder:- New expecters and waiters:
waitShippingQueries/onShippingQuerywaitPreCheckoutQueries/onPreCheckoutQuerywaitChosenInlineResult/onChosenInlineResultwaitPollUpdates/onPollUpdates
- New expecters and waiters:
-
Behaviour Builder FSM extension:
0.35.9
Common:Version:Kotlin:1.5.30->1.5.31Klock:2.4.1->2.4.2MicroUtils:0.5.25->0.5.28
Core:- New
BotActionimplementation -CustomBotAction LocationContenthas been divided to two different types:LiveLocationContentandStaticLocationContent
- New
API:- Two new extensions:
TelegramBot#answerwithCallbackQueryandInlineQuery
- Two new extensions:
Behaviour Builder:- All triggers have been changed to use two filters: filter for in subcontext data and filter for incoming data
- New waiters for edited content
- New extension
BehaviourContext#followLocation - New factory-functions:
BehaviourContextReceiverBehaviourContextAndTypeReceiverBehaviourContextAndTwoTypesReceiver
- Old API for triggers with the flags like
includeFilterByChatInBehaviourSubContexthave been deprecated
0.35.8
Common:Version:MicroUtils:0.5.24->0.5.25UUID:0.3.0->0.3.1
Core:MultipartRequestCallFactorynow will use file name as multipartfilenameparameter instead of generated file id- New extension
MPPFile#asMultipartFile
API- Fixes in
TelegramBot#withAction
- Fixes in
Behaviour Builder:- New extensions
BehaviourContext#commandWithArgsandBehaviourContext#onCommandWithArgs
- New extensions
0.35.7
Common:Version:Kotlin:1.5.21->1.5.30Klock:2.3.3->2.4.1Ktor:1.6.2->1.6.3Coroutines:1.5.1->1.5.2MicroUtils:0.5.21->0.5.24
0.35.6
Common:Version:Klock:2.3.1->2.3.3MicroUtils:0.5.19->0.5.21
Core:- All
FlowsUpdatesFilterflows have been renamed and updated
- All
Utils:- Extensions
allSentMessagesFlowandallSentMediaGroupsFlowhave been deprecated
- Extensions
0.35.5
MIME TYPES FOR REQUESTS HAVE BEEN DEPRECATED DUE TO REDUNDANCY OF MIME TYPES IN FILES SENDING
Core:- Several new extensions
ByteReadChannel#asStorageFileandByteReadChannelAllocator#asStorageFile - Several new extensions
ByteArray#asMultipartFile,ByteReadChannel#asMultipartFileandByteReadChannelAllocator#asMultipartFile - New extension
StorageFile#asMultipartFile
- Several new extensions
API:- New extensions
TelegramBot#downloadFilefor writing of incoming bytes to the file - New extensions
TelegramBot#downloadFileStreamandTelegramBot#downloadFileStreamAllocatorfor getting of input streams instead of whole bytes arrays - Old extensions
TelegramBot#downloadFilehas been replaced to the new package. Migration: replace in your projectimport dev.inmo.tgbotapi.extensions.api.downloadFilewithimport dev.inmo.tgbotapi.extensions.api.files.downloadFile PathedFile#filenameextension has been deprecated, and new propertyPathedFile#fileNamehas been included directly inPathedFile
- New extensions
Utils:- Add several functions
convertToStorageFileand extensionsTelegramBot#convertToStorageFile
- Add several functions
0.35.4 Hotfix
Common:Version:MicroUtils:0.5.18->0.5.19
0.35.3
Common:Version:Klock:2.2.0->2.3.1Ktor:1.6.1->1.6.2MicroUtils:0.5.16->0.5.18
Core:SimpleRequestCallFactoryandMultipartRequestCallFactorybecame a classes instead of objects to avoid collisions in different bots- Support of strongly-typed ietf language codes has been added
API:- New extension
TelegramBot#downloadFilefor anyMediaContent
- New extension
Behaviour Builder:- New provider
defaultCoroutineScopeProvider- Now it is not necessary to provide
CoroutineScopetoTelegramBot#buildBehaviourextension
- Now it is not necessary to provide
- New
TelegramBot#buildBehaviourextension withFlowUpdatesFilterandCoroutineScopewith defaultCoroutineScope - New typealias
SimpleFilterfor unifying triggers filter signatures- All waiters got real filters (
SimpleFilter) and rename old filters as mappers
- All waiters got real filters (
- New extensions for
Any:as/when/requireforWithOptionalLanguageCodeandWithLanguageCode
- New provider
0.35.2
Common:Version:Kotlin:1.5.20->1.5.21Coroutines:1.5.0->1.5.1Serialization:1.2.1->1.2.2Klock:2.1.2->2.2.0Ktor:1.6.0->1.6.1MicroUtils:0.5.15->0.5.16
0.35.1
Common:Version:Kotlin:1.5.10->1.5.20MicroUtils:0.5.6->0.5.15
Core:- New interface
MyCommandsRequest(also seeBot API 5.3below) - New extensions
TextSourcesList#make*Stringfor all parse modes - All
MessageContentsubclasses now serializable ChosenInlineResultwas replaced and modified to be sealedChosenInlineResultnow extendsFromUser- Added
Update#sourceUsermethod - More types assumed as sent by user types now implements
FromUserinterface - Added
Any#whenFromUser,Any#asFromUserandAny#requireFromUserextensions MedaGroupUpdateand its direct extendersSentMediaGroupUpdateandEditMediaGroupUpdatebecamesealed interfaces- New built-in
RequestExceptionimplementatorGetUpdatesConflicthas been added
- New interface
Behaviour Builder:- ❗️ All triggers (
on*extensions) have been modified to work in parallel by some marker by default (new parametermarkerFactory, in most cases will work async for different chats) - New extensions
telegramBotWithBehaviour - All behaviour builder extensions got new parameter
defaultExceptionsHandler - Class
BehaviourContextwas rewritten as an interface with default realizationDefaultBehaviourContextand factoryBehaviourContext(TelegramBot, CoroutineScope, FlowsUpdatesFilter) - Extension
buildBehaviour(and all related extensions/functions) for opportunity to passdefaultExceptionsHandler - Trigger
onContentMessageand waiterwaitContentMessagenow may include media groups
- ❗️ All triggers (
API:- All
replyand subsequent extensions have been replaced in send package
- All
Utils:- With class casts like
as*andrequire*now you may usewhen*with parameter callback - Methods of
EntitiesBuildernow will return builder itself, so you may create sequences likebuildEntities { bold("Hello,") + italic(" world") }directly inbuildEntitiesbody - New extension
TelegramBot#longPollingFlowhas been added with returning valueFlowwith updates
- With class casts like
Bot API 5.3:- Add type
BotCommandScope, its serializerBotCommandScopeSerializerand all its children - New request
DeleteMyCommandsand updates inGetMyCommandsandSetMyCommands - Renames according to
And moreof June 25, 2021 update
- Add type
0.35.0
ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED JS PART NOW USE IR COMPILER ONLY
Common:Version:Kotlin:1.4.72->1.5.10MicroUtils:0.4.36->0.5.6Coroutines:1.4.3->1.5.0Serialization:1.1.0->1.2.1Klock:2.0.7->2.1.2UUID:0.2.3->0.3.0Ktor:1.5.4->1.6.0
Core:ForceReplyhas been renamed toReplyForceCaptionedandExplainedinterfaces have been removedRecordAudioActionandUploadAudioAction(and all related to these actions functionality) have been removedTextSourceinterface and all related things have been replacedCallbackQueryinterface and all its extenders/implementers becomesealedInputMediainterface and all its extenders/implementers becomesealedParseModeinterface and all its extenders/implementers becomesealedChatMemberbecomessealedKeyboardMarkupbecomessealedLeftChatMemberandMemberChatMemberbecome interfaces. All their code were replaced to the*Implclasses- Most of
sealedclasses have been modified to be interfaces - Most serializers becomes public, but they are still
RistFeature - For
EntitiesBuildermultilevel text sources builders with callback have been added
0.34.1
Common:Version:ktor:1.5.3->1.5.4MicroUtils:0.4.35->0.4.36
Core- Fix in creating of text sources list
0.34.0
It is recommended to use 0.34.1 version due to the bug in 0.34.0 related to rewriting of TextSources creating mechanism.
UPDATE UP TO Telegram Bot API 5.2
ALL OLD DEPRECATIONS WERE REMOVED
Core:- Type
ChatTypehas been added - New
ExtendedChatfor unknown messagesUnknownExtendedChathas been added SendInvoice#startParameterbecomes optional and replaced inSendInvoiceconstructor- New interface
CommonSendInvoiceDatahas been added- Fields
CommonSendInvoiceData#maxTipAmountandCommonSendInvoiceData#suggestedTipAmountshave been added
- Fields
- New type
InputInvoiceMessageContenthas been added - New interface
TextedWithTextSourceson top ofTextedinterface- Interface
TextedInputnow extendsTextedWithTextSourceswith overriding oftextSourcesfield as not nullable textSourcesbecome main field inTextedInput- MIGRATION Remove all
import dev.inmo.tgbotapi.CommonAbstracts.textSourcesin your project textEntitiesbecome are calculable property inTextedInput
- MIGRATION Remove all
- Interface
- Interface
CaptionedandCaptionedInputnow is deprecated- Most of captions usages were replaced with texts
- Interface
ExplainedandExplainedInputnow is deprecated- Most of captions usages were replaced with texts
- Interface
VoiceChatEventnow isCommonEvent
- Mechanism of
RawMessageEntityconverting were fully rewritten
- Type
0.33.4
Common:Version:uuid:0.2.3->0.2.4MicroUtils:0.4.33->0.4.35
Core:- All
TextSourceimplementators have becomeSerializable- New serializer
TextSourceSerializer
- New serializer
- Interface
FromUserMessagenow extendsMessage - New interface
FromUser- Interface
FromUserMessagenow extendsFromUser
- Interface
- All
Extensions Utils- Fixes in
parseCommandsWithParams
- Fixes in
0.33.3
Common:Version:MicroUtils:0.4.32->0.4.33Ktor:1.5.2->1.5.3
API:- Bot actions DSL (fix for #358)
Behaviour Builder:- Rewrite logic of
doInSubContextWithUpdatesFilteranddoInSubContextWithFlowsUpdatesFilterSetupextensions - All triggers now work with
stopOnCompletionset up tofalse
- Rewrite logic of
0.33.2
Common:Version:MicroUtils:0.4.30->0.4.32
Behaviour Builder:- New typealias
MediaGroupFilterhas been added forMediaGroupexpectators - Several typealiases became
suspend:CallbackQueryMapperChatMemberUpdatedMapperInlineQueryMapper
- Commands got an additional parameter -
additionalFilter. It will be called when all command filters were passed
- New typealias
0.33.1
Common:Version:Kotlin:1.4.31->1.4.32MicroUtils:0.4.29->0.4.30Klocks:2.0.6->2.0.7
Utils Extensions:- Add extensions
parseCommandsWithParams
- Add extensions
0.33.0
UPDATE UP TO Telegram Bot API 5.1 ALL DEPRECATIONS WERE REMOVED
Common:Version:MicroUtils:0.4.28->0.4.29
Core:AdministratorChatMemberSerializerandChatMemberSerializerhas changed their visibility: they are public for now- Add
ChatInviteLinkRequestwith subrequests likeKnownChatInviteLinkRequest - Add
CreateChatInviteLink/EditChatInviteLink/RevokeChatInviteLinkrequests - Update
KickChatMemberto includerevokeMessagesflag - Update
PromoteChatMemberto includecanManageVoiceChatsandcanManageChatflags - Add
ChatInviteLinkobject- Add
PrimaryInviteLinkforChatInviteLinkwithisPrimary == true - Add
CommonInviteLinkforChatInviteLinkwithisPrimary == false
- Add
AdministratorChatMemberSerializerhas been set as public for several versionsChatMemberSerializerhas been set as public for several versions- Add
ChatMemberUpdated - Add
MessageAutoDeleteTimerChanged - Add
VoiceChatEvent- Add
VoiceChatEnded - Add
VoiceChatParticipantsInvited
- Add
- Add
VoiceChatStarted - Add
ChatMemberUpdatedUpdate- Add
CommonChatMemberUpdatedUpdate - Add
MyChatMemberUpdatedUpdate
- Add
API:- All API extensions has been updated
Behaviour Builder:- Now content triggers and expectators will wait for channel posts too
- New waiters and triggers for
ChatMemberUpdatedand its variations
0.32.9
Common:Version:Kotlin:1.4.30->1.4.31Ktor:1.5.1->1.5.2MicroUtils:0.4.26->0.4.28Coroutines:1.4.2->1.4.3
0.32.8
Common:Version:Serialization:1.1.0-RC->1.1.0MicroUtils:0.4.25->0.4.26
0.32.7
Core:- New variable
LeftRestrictionsChatPermissionsandRestrictionsChatPermissions
- New variable
Extensions Utils:DiceAnimationTypeclass casts
Behaviour Builder:- Now
doInSubContextWithUpdatesFilteranddoInSubContextwill automatically subscribe on updates of parentBehaviourContext doInSubContextWithFlowsUpdatesFilterSetup,doInSubContextWithUpdatesFilteranddoInSubContextgot new parameterstopOnCompletionto be able to disable stopping of behaviour context on finishing
- Now
0.32.6
Common:Version:MicroUtils:0.4.24->0.4.25
Extensions API:- New extension
TelegramBot#replyWithDice
- New extension
Extensions Utils:SlotMachineReelImageshas been renamed toSlotMachineReelImageSlotMachineReelImagegot two built-in parameters:textandnumber- New extension
String#asSlotMachineReelImage
0.32.5
Core:- Add
mentionvariants for user ids and receiver variants (#294) - Now
AbstractRequestCallFactorywill set up one-second delay for zero timeouts inGetUpdaterequests - Several extensions for
TelegramBotAPIlikeretrieveAccumulatedUpdateshave been added as a solution for #293 - Links for
tg://user?id=<user_id>have been updated (#292) - All usages of captions or texts in resends and same things have been replaced with
textSources - Global
defaultParseModehas been added (#291)
- Add
0.32.4
Common:Version:Kotlin:1.4.21->1.4.30Klock:2.0.4->2.0.6MicroUtils:0.4.23->0.4.24
Core:- Renames:
ChannelMessage->ChannelContentMessagePublicMessage->PublicContentMessageGroupMessage->GroupContentMessageFromChannelGroupMessage->FromChannelGroupContentMessageAnonymousGroupMessage->AnonymousGroupContentMessageCommonGroupMessage->CommonGroupContentMessage
PrivateMessage->PrivateContentMessage
- Renames:
Extensions Utils:- Renames of extensions in
ClassCastsaccording to changes inCore
- Renames of extensions in
0.32.3
Behaviour Builder:- Add expectators and waiters for inline queries
0.32.2
Core:- Fix of #275
0.32.1
0.32.0
THIS UPDATE CONTAINS BREAKING CHANGES
Common:Version:MicroUtils:0.4.16->0.4.23Klock:0.2.3->0.2.4Ktor:1.5.0->1.5.1
Core:- BREAKING CHANGE Now
MediaGroupMessagehave a generic type related toMediaGroupContent- Methods and types related to
MediaGroupMessagehave been modified according to their meanings
- Methods and types related to
- Important Change
FlowsUpdatesFilternow is an interface. Old class has been renamed toDefaultFlowsUpdatesFilterand factory methodFlowsUpdatesFilterhas been added - PASSPORT Full support of
Telegram Passport APIPassportData- All variants of
EncryptedPassportElement - All variants of
SecureValue - All variants of
PassportElementError - New request
SetPassportDataErrors Credentials:EncryptedCredentialsDeryptedCredentialsEndDataCredentials
- BREAKING CHANGE Now
Behaviour Builder:- Trigger and expectation extensions for
MessageContent(onContentMessageandwaitContentMessage) onMediaGrouphas been replacedwaitMediaGrouphas been addedonVisualMediaGroupnow is just an alternative toonVisualGallerycommandandonCommandexpectations has been added for commandsStringvariant- New extensions
BehaviourContext#oneOf,BehaviourContext#parallelandDeferred<T>#withAction - Several renames:
waitAudioMediaGroup->waitAudioMediaGroupContentwaitDocumentMediaGroup->waitDocumentMediaGroupContentwaitMediaGroup->waitAnyMediaGroupContentwaitVisualMediaGroup->waitVisualMediaGroupContent
- New extensions
BehaviourContext#waitPassportMessagesWithandBehaviourContext#waitAnyPassportMessages - New extensions
BehaviourContext#onPassportMessageandBehaviourContext#onPassportMessageWith
- Trigger and expectation extensions for
Utils:- New
ClassCastsforMessage- PASSPORT
EncryptedPassportElement - PASSPORT
PassportElementError - PASSPORT
SecureValue
- Several tools for decryption have been added:
AESDecryptoris available forJVMplatform- Extensions
EncryptedCredentials#decryptWithPKCS8PrivateKeyare available forJVMplatform - Extensions
EndDataCredentials#decryptDataandFileCredentials#decryptFilehave been added - Several extensions
createDecryptor - Several extensions
doInDecryptionContextWithPKCS8Key
- New extension
Flow#passportMessages - In most of webhook setting up functions/methods now available parameter
mediaGroupsDebounceTimeMillis
- New
API:- PASSPORT New extensions
TelegramBot#setPassportDataErrors
- PASSPORT New extensions
0.31.0
THIS UPDATE CONTAINS BREAKING CHANGES
Common:- ALL DEPRECATIONS CREATED SINCE 0.30.0 WERE REMOVED
Behaviour Builder:- Extension
TelegramBot#buildBehaviourhave changed its return value: now it isJobinstead ofFlowsUpdatesFilter
- Extension
Utils- New extensions
TelegramBot#longPollingwere added as new recommended way to start getting updates via long polling- Old extensions
RequestsExecutor#startGettingFlowsUpdatesByLongPollinghas been deprecated
- Old extensions
- New extensions
0.30.13
Common:Version:MicroUtils:0.4.15->0.4.16
Core:- New variable
FlowsUpdatesFilter#allUpdatesWithoutMediaGroupsGroupingFlowwhich will contains updates withoutSentMediaGroupUpdate
- New variable
Utils:- Extensions for
ResendableContenthas been added - Extensions for
TextSourcehas been added
- Extensions for
Behaviour Builder:- Project has been created :)
0.30.12
Utils:- Class casts has been added. Now you can write something like
message.asGroupMessage() ?.let { ... }instead of(message as? GroupMessage<*>) ?.let { ... }
- Class casts has been added. Now you can write something like
0.30.11
Common:Version:MicroUtils:0.4.11->0.4.15Klock:2.0.1->2.0.3Ktor:1.4.3->1.5.0
Core:- All bot actions got functions for short calling, like
recordVideoforRecordVideoNote - All bot actions got class-cast shortcuts
- All bot actions got functions for short calling, like
0.30.10
Common:Version:Kotlin:1.4.20->1.4.21Klock:2.0.0->2.0.1Ktor:1.4.2->1.4.3MicroUtils:0.4.6->0.4.11
API Extensions:- New function
buildBot
- New function
0.30.9
Common:Version:UUID:0.2.2->0.2.3Coroutines:1.4.1->1.4.2MicroUtils:0.4.3->0.4.6
Core:- Add
BowlingDiceAnimationType
- Add
0.30.8
Common:Version:Kotlin:1.4.10->1.4.20Klock:1.12.1->2.0.0MicroUtils:0.4.1->0.4.3
0.30.7
Common:Version:MicroUtils:0.4.0->0.4.1
Core:TelegramAPIUrlsKeeperwill fix ending of host url since this version- New mechanisms in
PowLimiterandCommonLimiterhas been added - New builder
KtorRequestsExecutorBuilder- New function
telegramBot
- New function
Utils:- Simple function
telegramBot(TelegramAPIUrlsKeeper)has been deprecated with replacement by almost the same function inCore
- Simple function
0.30.6
CoreTextSourceproperties has been renamed:asMarkdownSource->markdownasMarkdownV2Source->markdownV2asHtmlSource->html
PrivateChatoverrideidproperty with typeUserId- Several new extensions and functions in links creation:
- New function
makeUsernameLinkwith parameterString- New extension
Username#linkand functionmakeLink(Username)
- New extension
- Function
makeLinkToMessagenow able to get any type of chat- New extension
Message#link
- New extension
- Old functions
makeLinkToAddStickerSet...has been deprecated:makeLinkToAddStickerSetmakeLinkToAddStickerSetInMarkdownV2makeLinkToAddStickerSetInMarkdownmakeLinkToAddStickerSetInHtml
- New function
0.30.5
Common:Version:MicroUtils:0.3.3->0.4.0
Core:- Mechanism of
ChatMemberserialization has been changed- Since this version any
ChatMembercan be serialized (even outside in case it marked by@Serializable) - Since this version any
ChatMember(included in this project) can be deserialized in common way
- Since this version any
Userpropertyidhas changed its type: now it isUserId(under the hood it is the same asChatId)
- Mechanism of
0.30.4
Common:Version:MicroUtils:0.3.1->0.3.3
Core:MultilevelTextSource#textSourceshas been safely renamed tosubsourcesTextContent#fullEntitiesListhas been deprecated- Now
TextContentimplementsTextedInputTextContent#entitieshas been deprecated
GroupEventMessagenow overrideschatEventwith typeGroupEventSupergroupEventMessagenow overrideschatEventwith typeSupergroupEvent- Any
ChatEventMessagenow have generic type of itschatEvent(just like messages)
Utils:- Old extensions related to chat events are deprecated:
Flow<ChatEventMessage<*>>#divideBySourceFlow<ChatEventMessage<*>>#onlyChannelEventsFlow<ChatEventMessage<*>>#onlyGroupEventsFlow<ChatEventMessage<*>>#onlySupergroupEvents
- A lot of extensions for
Flow<ChatEventMessage>has been added:FlowsUpdatesFilter#eventsFlowsUpdatesFilter#channelEventsFlowsUpdatesFilter#groupEventsFlowsUpdatesFilter#supergroupEvents- And a lot of other filters with specific types
- Old extensions related to chat events are deprecated:
0.30.3
Common:Version:MicroUtils:0.3.0->0.3.1
Core:- New type of requests exceptions
TooMuchRequestsException. In fact it will be rare case when you will get this exception EmptyLimiterhas been renamed toExceptionsOnlyLimiterand currently will stop requests afterTooMuchRequestsExceptionhappen until retry time is actual- Now
ExceptionsOnlyLimiter(previouslyEmptyLimiter) is a class
- Now
AbstractRequestCallFactorycurrently will not look at the response and wait if it haveRetryAftererror. New behaviour aimed on delegating of this work toRequestsLimiter
- New type of requests exceptions
0.30.2
Common:Version:Ktor:1.4.1->1.4.2
Core:- New sealed class
SetWebhookRequestwhich can be used inSetWebhookrequests
- New sealed class
Utils:- Extensions
setWebhookInfoAndStartListenWebhookshas been united in one extension withSetWebhookRequestincoming parameter
- Extensions
0.30.1
Common:Version:MicroUtils:0.2.7->0.3.0
Utils:- Builder-style DSL for text sources -
buildEntities(thanks to djaler)
- Builder-style DSL for text sources -
0.30.0 Bot API 5.0
THIS UPDATE CONTAINS A LOT OF BREAKING CHANGES. PLEASE, BE CAREFUL ON UPGRADING OF YOUR PROJECT
Common:Version:Coroutine:1.4.0->1.4.1- NEW
MicroUtils:0.2.7
Core:- Support of
logOutmethod (LogOutobject as aRequest) - Support of
closemethod (Closeobject as aRequest) SetWebhookupdates:- New field
ipAddress. It works the same asip_addressin setWebhook section - New field
dropPendingUpdates. It works the same asdrop_pending_updatesin setWebhook section
- New field
- New field
ExtendedPrivateChat#bio - New data class
ChatLocation - New field
UnbanChatMember#onlyIfBanned - New fields
ExtendedChannelChat#linkedGroupChatIdandExtendedSupergroupChat#linkedChannelChatId - New fields
ExtendedSupergroupChat#location - New fields
AudioFile#fileNameandVideoFile#fileName - New fields
SendDocument#disableContentTypeDetectionandInputMediaDocument#disableContentTypeDetection - New request
UnpinAllChatMessages - New parameter for
unpinChatMessagemethod:messageId - New dice type
FootballDiceAnimationType - Limits for dices has been changed
commonDiceResultLimithas been deprecated- New field
DiceAnimationType#valueLimits - Locations updates:
- New interface
Headedwith propertyheading - New interface
HorizontallyAccuredwith propertyhorizontalAccuracy - New interface
ProximityAlertablewith propertyproximityAlertRadius Locationclass has been separated:StaticLocationfor static locationsLiveLocationfor live locations
- Property
Livable#livePeriodnow use typealias typeSeconds(the same by meaning -Int) EditLocationMessagenow extendsLocationed,HorizontallyAccured,ProximityAlertableandHeadedinterfaces- New properties in
EditChatMessageLiveLocation:horizontalAccuracy,heading,proximityAlertRadius - New properties in
EditInlineMessageLiveLocation:horizontalAccuracy,heading,proximityAlertRadius
- New properties in
- Main constructor of
SendLocationnow is internal. Instead of that currently available next factories:SendLocation- sending of static location without live parametersSendStaticLocation- sending of static location without live parametersSendLiveLocation- sending of live location with live parameters
PositionedSendMessageRequestnow extendsLocationedLocationContent#createResendnow can createLiveLocation
- New interface
- Support of
ProximityAlertTriggered. It isCommonEvent - Property
pollQuestionTextLengthnow have maximum up to300 - Anonymous Admins:
- New field
AdministratorChatMember#isAnonymous
- New field
- Several new interfaces of messages:
SignedMessage- any message which possibly haveauthorSignatureWithSenderChatMessage- any message which havesenderChat. PropertysenderChatis not-nullable due to separation of implementatorsPublicMessage- all channel messages have propertyval chat: PublicChatinstead of commonval chat: ChatChannelMessage- all channel messages have propertyval chat: ChannelChatinstead of commonval chat: Chat- Old
ChannelMessagewas safely renamed toChannelMessageImpl(old name was set as typealias and deprecated)
- Old
GroupMessage- all group messages have propertyval chat: GroupChatinstead of commonval chat: ChatFromChannelGroupMessage- instances should have propertyval channel: ChannelChatAnonymousGroupMessage- instances may have setup propertyauthorSignatureCommonGroupMessage- just common message
PrivateMessage- works like previousCommonMessageImpl- Previous
CommonMessageImplsafely renamed toPrivateMessageImpl
- New property
PromoteChatMember#isAnonymous - Update all classes which must have
entities/caption_entitiesfields - New request
CopyMessage - New extension
List<TextSource>#makeStringfor more comfortable work with new api with entities - Support for Google Places identifiers for venues
- New extensions for text sources separating:
List<TextSource>#separateForMessageList<TextSource>#separateForCaptionList<TextSource>#separateForText
- Rewritten work with text sources and text parts:
- Now any
Messagetype with entities will have full list of entities. That means that parts without any formatter entities will useRegularTextSource MultilevelTextSource#textPartshas been deprecated. Now eachMultilevelTextSourcehave its owntextSourceslist
- Now any
- New dsl for creating of
TextSourcelists - Built-in
handleSafelyandExceptionHandleris deprecated - New common factories for
StorageFile
- Support of
API:- Extensions
TelegramBot#pinChatMessagenow support anyChatandMessages from anyChat - New extensions
TelegramBot#unpinAllChatMessages - Extensions
TelegramBot#promoteChatMembergotisAnonymousparameter - All old api methods has been actualized to their analogs in
Core - All
telegramBotwithtoken: StringgotapiUrlparameter - Factory
telegramBotWithCustomClientConfighas been renamed totelegramBot
- Extensions
0.29.4
Core:diceResultLimitnow is deprecated, usecommonDiceResultLimitinstead- New extension
slotMachineDiceResultLimit
Utils:- New enum
SlotMachineReelImages - New extension
Int#asSlotMachineReelImage - New data class
SlotMachineResult- New extension
Dice#calculateSlotMachineResult
- New extension
- New enum
0.29.3
Common:- Version updates:
Serialization:1.0.0->1.0.1
- Version updates:
Core:- New annotation
RiskFeature. This annotation will be applied to the things which contains unsafe types usageSendMediaGroupfactory now marked withRiskFeature
- Media groups updates:
- New functions
SendPlaylist - New functions
SendDocumentsGroup - New functions
SendVisualMediaGroup
- New functions
- New type
VisualMediaGroupMemberInputMedia : MediaGroupMemberInputMediaInputMediaPhotonow implementsVisualMediaGroupMemberInputMediainstead ofMediaGroupMemberInputMediaInputMediaVideonow implementsVisualMediaGroupMemberInputMediainstead ofMediaGroupMemberInputMedia
- New type
VisualMediaGroupContent : MediaGroupContentPhotoContentnow implementsVisualMediaGroupContentinstead ofMediaGroupContentVideoContentnow implementsVisualMediaGroupContentinstead ofMediaGroupContent
- New type
AudioMediaGroupContent : MediaGroupContentAudioContentnow implementsAudioMediaGroupContentinstead ofMediaContentandCaptionedInput
- New type
DocumentMediaGroupContent : MediaGroupContentDocumentContentnow implementsDocumentMediaGroupContentinstead ofMediaContentandCaptionedInput
- New type
AudioMediaGroupMemberInputMedia : MediaGroupMemberInputMediaInputMediaAudionow implementsAudioMediaGroupMemberInputMedia
- New type
DocumentMediaGroupMemberInputMedia : MediaGroupMemberInputMediaInputMediaDocumentnow implementsDocumentMediaGroupMemberInputMedia
- New extension
AudioFile#toInputMediaAudio AudioContentnow implementsMediaGroupContent- New extension
DocumentFile#toInputMediaDocument DocumentContentnow implementsMediaGroupContent- New dice type
SlotMachineDiceAnimationType - New extension
TelegramMediaFile#asDocumentFile - New extension
VideoFile#toInputMediaVideo - New exception
WrongFileIdentifierException - Extension
String#toInputMediaFileAttachmentNamenow is deprecated - Property
ThumbedInputMedia#thumbMedianow is deprecated
- New annotation
API:- New extensions for media groups:
TelegramBot#sendPlaylistTelegramBot#replyWithPlaylistTelegramBot#sendDocumentsGroupTelegramBot#replyWithDocumentsGroupTelegramBot#sendVisualMediaGroupTelegramBot#replyWithVisualMediaGroup
- New extensions for media groups:
Utils:- New extensions for
Flows:Flow<SentMediaGroupUpdate>#mediaGroupVisualMessagesFlow<SentMediaGroupUpdate>#mediaGroupAudioMessagesFlow<SentMediaGroupUpdate>#mediaGroupDocumentMessages
- New extensions for
FlowsUpdatesFilter:FlowsUpdatesFilter#audioMessagesWithMediaGroupsFlowsUpdatesFilter#mediaGroupAudioMessagesFlowsUpdatesFilter#documentMessagesWithMediaGroupsFlowsUpdatesFilter#mediaGroupDocumentMessagesFlowsUpdatesFilter#mediaGroupVisualMessages
- New extensions for
0.29.2
Common:- Version updates:
Coroutines:1.3.9->1.4.0
- Internal broadcast channels were replaced with
SharedFlow
- Version updates:
TelegramBotAPI-extensions-utils:- Extension
ReceiveChannel#debounceByValuehas been deprecated
- Extension
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