136 KiB
TelegramBotAPI changelog
12.0.0
11.0.0
THIS UPDATE CONTAINS REMOVES OF DEPRECATED THINGS
THIS UPDATE CONTAINS A LOT OF BREAKING CHANGES
Core
:MessageId
now isvalue class
.MessageIdentifier
become deprecatedMessageThreadId
now isvalue class
InlineQueryIdentifier
now isvalue class
MediaGroupIdentifier
has been renamed toMediaGroupId
and now isvalue class
CallbackQueryIdentifier
has been renamed toCallbackQueryId
and now isvalue class
WebAppQueryId
now isvalue class
PreCheckoutQueryId
now isvalue class
FileUniqueId
has been renamed toTgFileUniqueId
and now isvalue class
UpdateIdentifier
has been renamed toUpdateId
and now isvalue class
InlineMessageIdentifier
has been renamed toInlineMessageId
and now isvalue class
ShippingQueryIdentifier
has been renamed toShippingQueryId
and now isvalue class
Identifier
has been renamed toRawChatId
and now isvalue class
ShippingOptionIdentifier
has been renamed toShippingOptionId
and now isvalue class
PollIdentifier
has been renamed toPollId
and now isvalue class
StickerSetName
now isvalue class
10.1.2
Version
:Kotlin
:1.9.22
->1.9.23
Korlibs
:5.3.2
->5.4.0
Ktor
:2.3.8
->2.3.9
MicroUtils
:0.20.37
->0.20.39
KSLog
:1.3.2
->1.3.3
10.1.1
Version
:Serialization
:1.6.2
->1.6.3
MicroUtils
:0.20.34
->0.20.37
Korlibs
:5.3.1
->5.3.2
10.1.0
Add support of Telegram Bots API 7.1
Version
:Coroutines
:1.7.3
->1.8.0
MicroUtils
:0.20.32
->0.20.34
10.0.1
Version
:Ktor
:2.3.7
->2.3.8
MicroUtils
:0.20.26
->0.20.32
Korlibs
:5.3.0
->5.3.1
KSLog
:1.3.1
->1.3.2
10.0.0
Add support of Telegram Bots API 7.0
IN THIS UPDATE KLOCK DEPENDENCY CHANGED TO com.soywiz.korge:korlibs-time
UP TO 5.3.0 VERSION
IN THIS UPDATE KRYPTO DEPENDENCY CHANGED TO com.soywiz.korge:korlibs-crypto
UP TO 5.3.0 VERSION
Version
:MicroUtils
:0.20.23
->0.20.26
Korlibs
:4.0.10
->5.3.0
Core
:Message
now inherited by two variants:AccessibleMessage
andInaccessibleMessage
Common
:- In most places
disableWebPagePreview
has been replaced by newLinkPreviewOptions
- In most places arguments
replyToMessageId
andallowSendingWithoutReply
has been replaced withReplyParameters
- In
reply
extension two parameters have been added:replyInChatId
andreplyInThreadId
- In
- In most places
9.4.3
IetfLanguageCode has been renamed to IetfLang in MicroUtils
Version
:Kotlin
:1.9.21
->1.9.22
MicroUtils
:0.20.19
->0.20.23
9.4.2
Version
:Serialization
:1.6.1
->1.6.2
Ktor
:2.3.6
->2.3.7
MicroUtils
:0.20.15
->0.20.19
UUID
:0.8.1
->0.8.2
9.4.1
- Replace warning about two bots from
LongPolling
toDefaultKtorRequestsExecutor
9.4.0
Version
:Kotlin
:1.9.20
->1.9.21
Serialization
:1.6.0
->1.6.1
Ktor
:2.3.5
->2.3.6
MicroUtils
:0.20.12
->0.20.15
9.3.0
This release become possible thanks to Anton Lakotka
THIS RELEASE CONTAINS UPDATES UP TO RELEASE CANDIDATES VERSIONS
UPDATE MAY HAVE BREAKING CHANGES
SINCE THIS UPDATE IT WILL BE REQUIRED TO USE JDK 17+ FOR DEVELOPMENT
Version
:Kotlin
:1.8.22
->1.9.20
Serialization
:1.5.1
->1.6.0
KorLibs
:4.0.3
->4.0.10
UUID
:0.7.1
->0.8.1
Ktor
:2.3.4
->2.3.5
MicroUtils
:0.19.9
->0.20.12
9.2.4
Utils
:- New extensions
*.parseCommandsWithNamedArgs
- New extensions
BehaviourBuilder
:- In expectaters and triggers of
commands
add*WithNamedArgs
variants - In expectaters and triggers of
commands
add opportunity to use custom separator
- In expectaters and triggers of
9.2.3
Core
:- Fix in
VoiceContent#createResend
- Fix in
9.2.2
Core
:- Fix of #793: Add
PreviewChat
- Fix of #793: Add
9.2.1
Version
:Ktor
:2.3.3
->2.3.4
Core
:- All
ChatMember
inheritors have fixesstatus
field
- All
9.2.0
Add support of Telegram Bots API 6.9
- Rename
ChatAdministratorRightsImpl
->ChatCommonAdministratorRights
- All the request chat keyboards has changed their parameters
ChatAdministratorRights
toChatCommonAdministratorRights
9.1.2
Core
:- Fix of
MessageContent
serialization
- Fix of
9.1.1
Core
:- Potential fix of incorrect parsing in
RawMessageEntity
- Potential fix of incorrect parsing in
9.1.0
This update contains adding of Telegram Bot API 6.8 support
Version
:Coroutines
:1.7.2
->1.7.3
Ktor
:2.3.2
->2.3.3
MicroUtils
:0.19.7
->0.19.9
9.0.0
THIS UPDATE CONTAINS BREAKING CHANGES: USERNAMES OF BOTS NOW BECAME NULLABLE
Version
:Coroutines
:1.6.4
->1.7.1
Ktor
:2.3.1
->2.3.2
MicroUtils
:0.19.4
->0.19.7
Core
:- All bots now have nullable usernames just like common users (#772)
- Decrease possible errors in updates handling by additional handling of update deserialization wrapping (#773)
- New interface
GetUpdatesRequest
. You may implement it to show default telegram bot ktor executor that this request is an updates request and should be handled in a different way- Now it is possible to get raw updates with
GetUpdatesRaw
request
- Now it is possible to get raw updates with
Utils
:- Improve extension
Update.sourceChat
to add opportunity to select some chats by logic different with the default
- Improve extension
8.1.0
PARTIALLY BREAKING CHANGES: Exclude .*Impl
classcasts from ClassCastsNew
Version
:MicroUtils
:0.19.2
->0.19.4
Utils
:- Add deep links formatting for internal
tg://
prefix (thanks to @klimatov) - Exclude
.*Impl
classcasts fromClassCastsNew
- Add deep links formatting for internal
8.0.1
Version
:UUID
:0.7.0
->0.7.1
Ktor
:2.3.0
->2.3.1
MicroUtils
:0.19.1
->0.19.2
8.0.0
THIS UPDATE CONTAINS BREAKING CHANGES
ALL PROJECT DEPRECATIONS HAVE BEEN REMOVED
IN THIS UPDATE KORLIBS HAVE BEEN UPDATED TO VERSION 4.0.2
. SINCE THAT VERSION A LOT OF PACKAGES HAVE BEEN RENAMED.
MIGRATIONS USED IN THIS LIB:
-
com.soywiz.klock
->korlibs.time
-
com.soywiz.krypto
->korlibs.crypto
-
Versions
:Korlibs
:3.4.0
->4.0.3
MicroUtils
:0.18.4
->0.19.1
7.1.3
Versions
:Serialization
:1.5.0
->1.5.1
MicroUtils
:0.18.1
->0.18.4
Core
:- Actualize kdocs in
InputFile
- Actualize kdocs in
BehaviourBuilder
:- Now it is possible to use
waitMediaContent
/waitMediaContentMessage
/onMediaContent
- Add
onMention
/waitMention
functionality - Add opportunity to map content with extensions to
Flow
- Now it is possible to use
7.1.2
Versions
:MicroUtils
:0.18.0
->0.18.1
Core
:- Now it is possible to serialize
Sticker
s
- Now it is possible to serialize
7.1.1
Versions
:Kotlin
:1.8.20
->1.8.21
MicroUtils
:0.17.8
->0.18.0
Utils
:- Fixes in
makeLinkToMessage
- Fixes in
7.1.0
This update contains changes according to the Telegram Bot API 6.7
API
:- Rename
editMessageCaption
toeditMessageMedia
due to wrong old naming - Add
edit
extensions forInlineMessageIdentifier
s
- Rename
BehaviourBuilder
:BehaviourContext
extensionsonDeepLink
andwaitDeepLinks
now can be used withRegex
orString
as first parameters
7.0.2
This update brings experimental support of linuxX64
and mingwX64
platforms
Versions
:Kotlin
:1.8.10
->1.8.20
MicroUtils
:0.17.5
->0.17.8
Ktor
:2.2.4
->2.3.0
Core
:- New
RequestsExecutor
-MultipleClientKtorRequestsExecutor
- Old
KtorRequestsExecutor
has been renamed toDefaultKtorRequestsExecutor
KtorRequestsExecutor
now isexpect class
- On
JS
,JVM
andMinGWX64
platforms it isDefaultKtorRequestsExecutor
- On
LinuxX64
platform it isMultipleClientKtorRequestsExecutor
- On
- New
7.0.1
Core
:- New interface
WithChat
which containschat
fieldMessage
now inheritsWithChat
ChatMemberUpdated
now inheritsWithChat
- New interface
Utils
:- Improvements in
same
-notations
- Improvements in
7.0.0
This update contains support of Telegram Bot API 6.6
THIS VERSION CONTAINS BREAKING CHANGES:
- All previous deprecations have been removed
- Fully reworked mechanism of stickers creating and adding
- All separations of stickers types like
Animeted
have been replaces with typeStickerFormat
- New
InputSticker
type (and all subtypes) as replacements for old raw fields in methods
- All separations of stickers types like
- Reworked mechanism of files uploading
Other changes
Versions
:MicroUtils
:0.17.3
->0.17.5
6.1.0
Versions
:MicroUtils
:0.17.2
->0.17.3
API
:- Fix of #732
6.0.3
Versions
:MicroUtils
:0.17.1
->0.17.2
Core
:User
inCallbackQuery
now isCommonUser
as well as infrom
User
inInlineQuery
now isCommonUser
as well as infrom
BehaviourBuilder
:- Fixes in
DeepLink
triggers and waiters
- Fixes in
6.0.2
Core
:- Long polling now uses media groups debounce as in webhooks
6.0.1
Versions
:Ktor
:2.2.3
->2.2.4
MicroUtils
:0.17.0
->0.17.1
6.0.0
Versions
:Kotlin
:1.7.22
->1.8.10
MicroUtils
:0.16.10
->0.17.0
Serialization
:1.4.1
->1.5.0
uuid
:0.6.0
->0.7.0
Core
:*.link
extensions have been deprecated with renaming to avoid collisions withlink
methods
API
:- Add
TelegramBot.resend
methods
- Add
BehaviourBuilder
:- Add triggers and waiters for
VisualMediaGroupPartContent
- Add triggers and waiters for
Utils
:*.link
extensions have been deprecated with renaming to avoid collisions withlink
methods
5.2.1
Core
:- All the
CallbackQuery
es now will receiveCommonUser
instead ofUser
due inability of bots to trigger any inline interaction with others bots
- All the
API
:- Now
sentMessageFlow
will take each sent message inhandleLiveLocation
- Now
5.2.0
Versions
:MicroUtils
:0.16.8
->0.16.10
5.1.1
Core
:- Add opportunity to get user link with
makeUserLink
- Add opportunity to get user link with
BehaviourBuilder
:- Fixes in content waiting expectators
5.1.0
Bot API 6.5 support
Core
:ChatPermissions
now is interface and have two main realizations:ChatPermissions.Granular
andChatPermissions.Common
RestrictedChatMember
now implementsChatPermissions
too
API
:- Now it is possible to pass all long polling parameters in all places used it
Issues
:- Fix of #697
5.0.2
Versions
:MicroUtils
:0.16.6
->0.16.8
Ktor
:2.2.2
->2.2.3
BehaviourBuilder
:- Fixes in
BehaviourContext.onEditedContentMessage
- now it will trigger callback on channel post edits too
- Fixes in
5.0.1
Versions
:MicroUtils
:0.16.4
->0.16.6
Ktor
:2.2.1
->2.2.2
Core
:- Fixes in
SendMediaGroup
request - Fixes in
SetChatAdministratorCustomTitle
request (thanks to @madhead)
- Fixes in
5.0.0
Bot API 6.4 support!
- Long-polling improvements
4.2.4
Core
:- Fixes in webhook parts adapter
BehaviourBuilderWithFSM
:- Fixes in
DefaultBehaviourContextWithFSM
- Fixes in
4.2.3
Versions
:MicroUtils
:0.16.2
->0.16.4
Core
:- Simplify default
RequestsLimiter
(ExceptionsOnlyLimiter
) (thanks to @y9san9 for help)
- Simplify default
4.2.2
Versions
:MicroUtils
:0.16.0
->0.16.2
Core
:- Fix of #694: add opportunity to create
ChatId
andChatIdWithThreadId
fromIdChatIdentifier
- Fix of #694: add opportunity to create
4.2.1
Versions
:MicroUtils
:0.15.0
->0.16.0
Ktor
:2.1.3
->2.2.1
Utils
:- Improve support of
makeLinkToMessage
extensions
- Improve support of
4.2.0
Versions
:Kotlin
:1.7.21
->1.7.22
MicroUtils
:0.14.4
->0.15.0
4.1.3
Versions
:MicroUtils
:0.14.2
->0.14.4
Core
:ContentMessage
,CommonMessage
,PossiblyMediaGroupMessage
andPossiblySentViaBotCommonMessage
gotout
varianceUserId
now isChatId
instead ofIdChatIdentififer
4.1.2
Versions
:MicroUtils
:0.14.1
->0.14.2
BehaviourBuilder
:- Fixes in
CallbackQuery
waiters
- Fixes in
4.1.1
Core
:- Add opportunity to create
IdChatIdentifier
with optionalthreadId
- New serializer
FullChatIdentifierSerializer
with serialization ofChatIdWithThreadId
- Add opportunity to create
4.1.0
Versions
:Kotlin
:1.7.20
->1.7.21
MicroUtils
:0.14.0
->0.14.1
Korlibs
:3.3.1
->3.4.0
UUID
:0.5.0
->0.6.0
Core
:- All the chats identifiers has been rewritten as value classes
- New chat identifier:
ChatIdWithThreadId
RawMessage
will createChatIdWithThreadId
chat id under the hood by default- All the methods which potentially using
threadId
will try to take it fromchatId
API
:- All default
threadId
null values has been replaced with auto-calculated threadId from chats/chat ids
- All default
4.0.0
!!! THIS UPDATE CONTAINS FULL REWORK OF MEDIA GROUPS FUNCTIONALITY !!!
THIS UPDATE CONTAINS BREAKING CHANGES
Common
:- All the media groups have been rewritten. Since this update, there are no separated messages types for media groups,
but new type of content (
MediaGroupContent
) has been introduced - Bot API 6.3 support
- All the media groups have been rewritten. Since this update, there are no separated messages types for media groups,
but new type of content (
Versions
:MicroUtils
:0.13.2
->0.14.0
Core
:- New requests
3.3.1
Versions
:Ktor
:2.1.2
->2.1.3
Klock
:3.2.0
->3.3.1
MicroUtils
:0.13.1
->0.13.2
Utils
:- New extensions on
CommonMessage
:hasCommands
andhasNoCommands
. Useful for theinitialFilter
parameter in behaviour builder triggers.
- New extensions on
3.3.0
THIS VERSION CONTAINS UPGRADE KOTLIN (AND ALL RELATED LIBRARIES) UP TO 1.7.20
Versions
:Kotlin
:1.7.10
->1.7.20
Kotlin Serialization
:1.4.0
->1.4.1
Korlibs
:3.1.0
->3.2.0
MicroUtils
:0.12.17
->0.13.1
Core
:- Add opportunity to create command text source and add command in entities builder
via
BotCommamd
(thanks to d1shin)
- Add opportunity to create command text source and add command in entities builder
via
API
:- New extensions
TelegramBot#getStickerSetOrNull
andTelegramBot#getStickerSetOrThrow
- Old
TelegramBot#getStickerSet
has been deprecated
- Old
- New extensions
Behaviour Builder
:- Add opportunity to use triggers and waiters with
BotCommand
(thanks to d1shin)
- Add opportunity to use triggers and waiters with
3.2.7
Versions
:MicroUtils
:0.12.13
->0.12.17
Ktor
:2.1.1
->2.1.2
Utils
:- Next classes become typealiases instead of classes:
ReplyKeyboardBuilder
ReplyKeyboardRowBuilder
InlineKeyboardBuilder
InlineKeyboardRowBuilder
- Next classes become typealiases instead of classes:
3.2.6
Core
:- Fixes in
ChatMemberSerializer#serialize
method - Migration of
EntitiesBuilder
fromUtils
toCore
- Fixes in
API
:- All the extensions related to text messages (replies, sending, editing) got their duplicates with
buildEntities
lambda and separator
- All the extensions related to text messages (replies, sending, editing) got their duplicates with
Utils
:- Migration of
EntitiesBuilder
fromUtils
toCore
- Migration of
3.2.5
Common
:- Improve support of new exceptions recovering mechanism
3.2.4
API
:- New
edit
's with chats and message ids
- New
3.2.3
Core
:- Fixes in
DeleteMyCommands
- Fixes in
3.2.2
Versions
:MicroUtils
:0.12.10
->0.12.13
Core
:MessageIdentifier
has been renamed toMessageId
API
:- New
reply
'es with chats and message ids
- New
3.2.1
Versions
:Ktor
:2.1.0
->2.1.1
Korlibs
:3.0.0
->3.1.0
MicroUtils
:0.12.4
->0.12.10
3.2.0
Since this update, RequestsExecutor#execute
may throw only BotException
. In case you wish to handle some exceptions from execute
you must catch BotException
and handle its cause
Versions
:Serialization
:1.4.0-RC
->1.4.0
MicroUtils
:0.12.1
->0.12.4
Core
:SetWebhook#allowedUpdates
now isALL_UPDATES_LIST
by default instead ofnull
API
:- Extension
TelegramBot#setWebhook
parameterallowedUpdates
now isALL_UPDATES_LIST
by default instead ofnull
- Extension
Utils
:- All related to long polling extensions parameters
allowedUpdates
now areALL_UPDATES_LIST
by default instead ofnull
- All related to long polling extensions parameters
3.1.1
Common
:- Complete Bot API 6.2 implementation
3.1.0
This update contains including of Bot API 6.2
Versions
:Ktor
:2.0.3
->2.1.0
MicroUtils
:0.12.0
->0.12.1
Core
:- Add support of
custom emoji
s - Add support of
sticker_type
- Add support of
3.0.2
ALL OLD DEPRECATIONS HAVE BEEN REMOVED
copyMessage
HAVE CHANGED THEIR SIGNATURE BY SWAPPING FROM AND TO CHAT IDS
Versions
:Kotlin
:1.6.21
->1.7.10
Serialization
:1.3.3
->1.4.0-RC
Korlibs
:2.7.0
->3.0.0
UUID
:0.4.1
->0.5.0
MicroUtils
:0.11.13
->0.12.0
Core
:- Interface
ReplyMakrup
has been renamed toWithReplyMarkup
to correspond its purpose - Data class
LeftChatMember
has been renamed toLeftChatMemberEvent
to avoid type ambiguite with the otherLeftChatMember
ForwardInfo
hierarchy has been fully reworked:AnonymousForwardInfo
->ForwardInfo.ByAnonymous
UserForwardInfo
->ForwardInfo.ByUser
ForwardFromPublicChatInfo
->ForwardInfo.PublicChat
ForwardFromChannelInfo
->ForwardInfo.PublicChat.FromChannel
ForwardFromSupergroupInfo
->ForwardInfo.PublicChat.FromSupergroup
ForwardInfo.PublicChat.SentByChannel
has been created
- Interface
API
:- Add new
Flow
-based live locations API - Add
sendLocation
for sending live locations
- Add new
Utils
:- BREAKING CHANGES Now all new classcasts (like
Chat.ifPrivateChat
etc.) have been rewritten to be generated withksp
andkotlin poet
- BREAKING CHANGES Now all new classcasts (like
Note: Versions 3.0.0 and 3.0.1 have been published with errors and didn't recommend to use
2.2.2
Utils
:buildEntities
now is inline
Behaviour Builder
:- Fixes in
CallbackQuery
triggers
- Fixes in
2.2.1
Versions
:Coroutines
:1.6.3
->1.6.4
MicroUtils
:0.11.12
->0.11.13
Core
:- New
typealiase
s forCommonMessage
with all supported content types, more info: PR
- New
Utils
:- New extensions for all types of messages
*.withContentOrNull
and*.withContentOrThrow
as analogies to the same ones from class casts
- New extensions for all types of messages
2.2.0
Core
:- For
CopyMessage
order of parameters has been changed ReplyForce
defaults changes:- All old companion properties (like
ReplyForce.ReplyForceSelective
) have been renamed:ReplyForceSelective
->Selective
ReplyForceNonSelective
->NonSelective
ReplyForceDefault
->Default
- New companion functions:
ReplyForce#Selective
ReplyForce#NonSelective
- All old companion properties (like
- Rename
CreatorChatMember
->OwnerChatMember
- For
API
:- For
copyMessage
order of parameters has been changed
- For
Utils
:- New extension
Message#sameChat
- New extension
Message#sameMessage
- New functions
flatInlineKeyboard
andflatReplyKeyboard
- Experimentally add new triple of class casts:
if*
,*OrNull
and*OrThrow
- New extension
2.1.3
Versions
:MicroUtils
:0.11.9
->0.11.12
Utils
:- Rename
UserId
extensionlink
touserLink
- Rename
Core
ChatJoinRequest#inviteLink
is nullable due to the fact that join requests without link do not require invite link
2.1.2
Versions
:Coroutines
:1.6.1
->1.6.3
Ktor
:2.0.2
->2.0.3
MicroUtils
:0.11.6
->0.11.9
2.1.1
API
:- Now it is possible to edit any message text via
editMessageText
(but with warning) - Now it is possible to edit any message caption via
editMessageCaption
(but with warning) - Media message caption edit method (
editMessageCaption
) now returns the message with the same generic type (as it must be in telegram system) - New extensions
TelegramBot#edit
has been added for all possible editions types - New extensions
TelegramBot#send
has been added for all possible sending types - New extensions
TelegramBot#delete
has been added
- Now it is possible to edit any message text via
Versions
:MicroUtils
:0.11.3
->0.11.6
2.1.0
This update contains including of Telegram Bot API 6.1
- Add support of functionality for
WebApp
s from Bot API 6.1 - Add support of functionality for premium feature from Bot API 6.1
- Add support of
addedToAttachmentMenu
inCommonUser
from Bot API 6.1 - Add support of
secret_token
inSetWebhook
request from Bot API 6.1 - Add support of
createInvoiceLink
request from Bot API 6.1
2.0.3
Core
:- New function
regularln
for simple creating ofRegularTextSource
with new line in the end
- New function
API
:- New function
downloadFileToTemp
for simple downloading of file in filesystem and manipulation with avoiding of direct using input streams and other low-level things
- New function
Versions
:MicroUtils
:0.11.0
->0.11.3
2.0.2
Versions
:MicroUtils
:0.10.8
->0.11.0
UUID
:0.4.0
->0.4.1
2.0.1
Versions
:Ktor
:2.0.1
->2.0.2
MicroUtils
:0.10.5
->0.10.8
Utils
:TelegramBot#longPolling
now acceptsUpdatesFilter
instead ofFlowsUpdatesFilter
2.0.0
ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED
Behaviour Builder
:- Mappers have been removed from waiters extensions
- Triggers extensions now will use filtering inside of context receiver instead of passing the filters into
BehaviourContext
. That means that in the subcontext will not be used preinstalled filters for theirBehaviourContext
and filter of trigger will not be used in subcontext - Waiters do not take count parameter anymore
- Waiters do not take filter parameter anymore. Use flows filters
Utils
:- Add opportunity to get event messages with specific
ChatEvent
type usingwithEvent
/requireWithEvent
(by analog withwithEvent
andrequireWithEvent
)
- Add opportunity to get event messages with specific
1.1.3
Behaviour Builder with FSM
:- Typealias
StateHandlingErrorHandler
from1.1.2
has been deprecated and should be replaced with the new one from microutils
- Typealias
1.1.2
Core
:- Rename of
TelegramAPIUrlsKeeper#checkWebAppLink
->TelegramAPIUrlsKeeper#checkWebAppData
(fix of #591)
- Rename of
Behaviour Builder with FSM
:- New typealias
StateHandlingErrorHandler
BehaviourBuilderWithFSM
now accepts new parameteronStateHandlingErrorHandler
which will be used in case if state has not been successfully completed
- New typealias
1.1.1
Versions
:MicroUtils.Crypto
will not be provided with that library anymore. Instead, it is recommended to useKorlibs.Krypto
. You still can add crypto from microutils using next groovy dependency:dev.inmo:micro_utils.crypto:$micro_utils_version
Core
:- Improvements in
TelegramAPIUrlsKeeper#checkWebAppLink
- New field in
TelegramAPIUrlsKeeper#webAppDataSecretKeyHash
- Improvements in
Behaviour Builder
:- Extension
TelegramBot#buildBehaviour
now returnsBehaviourContext
- Extension
1.1.0
Utils
:- New parameter
additionalApplicationEngineEnvironmentConfigurator
inRequestsExecutor#setWebhookInfoAndStartListenWebhooks
andstartListenWebhooks
- New parameter
1.0.1
Versions
:Serialization
:1.3.2
->1.3.3
MicroUtils
:0.10.3
->0.10.4
1.0.0
All the tgbotapi.extensions.*
packages have been removed
Versions
:Kotlin
:1.6.10
->1.6.21
Ktor
:1.6.8
->2.0.1
MicroUtils
:0.9.24
->0.10.3
Core
:Ktor
package renamed. Migration:dev.inmo.tgbotapi.bot.Ktor
->dev.inmo.tgbotapi.bot.ktor
CallbackQuery
package renamed. Migration:dev.inmo.tgbotapi.types.CallbackQuery([\s\\.])
->dev.inmo.tgbotapi.types.queries.callback$1
ChatMember
package renamed. Migration:dev.inmo.tgbotapi.types.ChatMember([\s\\.])
->dev.inmo.tgbotapi.types.chat.member$1
ChatAdministratorRightsImpl
replaced. Migration:dev.inmo.tgbotapi.types.ChatAdministratorRightsImpl
->dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl
chat.abstract.extended
replaced. Migration:dev.inmo.tgbotapi.types.chat.abstract.extended
->dev.inmo.tgbotapi.types.chat.member.chat
chat.abstract
replaced. Migration:dev.inmo.tgbotapi.types.chat.abstract
->dev.inmo.tgbotapi.types.chat.member.chat
chat.extended
replaced. Migration:dev.inmo.tgbotapi.types.chat.extended
->dev.inmo.tgbotapi.types.chat.member.chat
- User interfaces have been fully replaced:
dev.inmo.tgbotapi.types.User
->dev.inmo.tgbotapi.types.chat.User
dev.inmo.tgbotapi.types.CommonUser
->dev.inmo.tgbotapi.types.chat.CommonUser
dev.inmo.tgbotapi.types.ExtendedUser
->dev.inmo.tgbotapi.types.chat.ExtendedUser
dev.inmo.tgbotapi.types.Bot
->dev.inmo.tgbotapi.types.chat.Bot
dev.inmo.tgbotapi.types.CommonBot
->dev.inmo.tgbotapi.types.chat.CommonBot
dev.inmo.tgbotapi.types.ExtendedBot
->dev.inmo.tgbotapi.types.chat.ExtendedBot
dev.inmo.tgbotapi.types.UserSerializer
->dev.inmo.tgbotapi.types.chat.UserSerializer
- All
InputMedia
has been renamed asTelegramMedia
. Migration:InputMedia
->TelegramMedia
dev.inmo.tgbotapi.types.InputMedia
->dev.inmo.tgbotapi.types.media
- Replaces of
MessageContent
. Migrations:dev.inmo.tgbotapi.types.message.content.abstracts
->dev.inmo.tgbotapi.types.message.content
dev.inmo.tgbotapi.types.message.content.media
->dev.inmo.tgbotapi.types.message.content
- Replaces of
TextSource
s. Migrations:dev.inmo.tgbotapi.types.MessageEntity.textsources
->dev.inmo.tgbotapi.types.message.textsources
- Replaces of
ParseMode
s. Migrations:dev.inmo.tgbotapi.types.ParseMode
->dev.inmo.tgbotapi.types.message
- Replaces of
MediaGroupUpdate
s. Migrations:dev.inmo.tgbotapi.types.update.MediaGroupUpdates
->dev.inmo.tgbotapi.types.update.media_group
InvoiceContent
has been replaced:dev.inmo.tgbotapi.types.message.payments.InvoiceContent
->dev.inmo.tgbotapi.types.message.content.InvoiceContent
PossiblySentViaBotCommonMessage
has been replaced:dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage
->dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
- Edit live location requests have been replaced:
dev.inmo.tgbotapi.requests.edit.LiveLocation
->dev.inmo.tgbotapi.requests.edit.location.live
dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
->dev.inmo.tgbotapi.extensions.api.edit.location.live
- Edit reply markup requests have been replaced:
dev.inmo.tgbotapi.requests.edit.ReplyMarkup
->dev.inmo.tgbotapi.requests.edit.reply_markup
dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
->dev.inmo.tgbotapi.extensions.api.edit.reply_markup
- Common abstracts have been replaced:
dev.inmo.tgbotapi.CommonAbstracts
->dev.inmo.tgbotapi.abstracts
- Constructor of
UnknownInlineKeyboardButton
is not internal and can be created with anyjson
(#563) - All the interfaces from
dev.inmo.tgbotapi.types.files.abstracts
have been replaced todev.inmo.tgbotapi.types.files
and converted to sealed (#550) PassportFile
has been replaced todev.inmo.tgbotapi.types.files
StorageFile
has been deprecated (fix of #556)MultipartFile
do not requireStorageFile
anymoreInputFile
companion got functions to simplify creation ofInputFile
s- New typealias
FileUrl
(representsFileId
but declare that they are the same)
BehaviourBuilder
:SimpleFilter
now is afun interface
instead of just callback (fix of #546)- New extension
BehaviourContext#createSubContext
. It uses separatedAccumulatorFlow
and will retrieve updates by itself - New extension
BehaviourContext#doInContext
- Extension
BehaviourContext#doInSubContextWithUpdatesFilter
has been renamed toBehaviourContext#createSubContextAndDoWithUpdatesFilter
- Extension
BehaviourContext#doInSubContext
has been deprecated
BehaviourContextWithFSM
:launchStateHandling
lost its parametercontextUpdatesFlow: Flow
handleState
ofBehaviourContextWithFSM
now will get/create sub context for the state and launch handling in itBehaviourWithFSMStateHandler
now extendsStatesHandler
BehaviourWithFSMStateHandlerHolder
now extendsCheckableHandlerHolder
andBehaviourWithFSMStateHandler
- Function
checkHandleable
ofBehaviourWithFSMStateHandlerHolder
now issuspend
- Function
0.38.23
BehaviourHandler
:- Add support of fallback triggers (fix of #560)
0.38.22
Core
:- New constant
tgWebAppStartParamField
- All keyboards builders and rows blocks becomes not crossinline
- New constant
0.38.21
WebApps
:WebAppInitData#queryId
now have correct js name of field- New function
sendDataOrWorkWithQueryId
0.38.20
BehaviourBuilder FSM
:- Hotfixes
WebApps
:- New extension
TelegramBot#answerWebAppQuery
- New function
handleResult
- New extension
0.38.19
BehaviourBuilder
:- Hotfixes
BehaviourBuilder FSM
:BehaviourContextWithFSMBuilder
deprecated in favor toBehaviourContextWithFSM
- Now it is possible to define additional handlers in subcontexts of
BehaviourBuilderWithFSM
0.38.18
Core
:- Add support of test servers (fix of #577)
BehaviourBuilder
:- Fixes in extension
BehaviourContext#doInSubContextWithUpdatesFilter
(thanks to xzima)
- Fixes in extension
0.38.17
Core
:- Add
BotCommandScopeChat
as newBotCommandScope
(fix of #574) BotCommandScope
companion got several properties and functions for more useful scope creation
- Add
0.38.16
Core
:TelegramAPIUrlsKeeper
now have two new things: propertieswebAppDataSecretKey
and funcheckWebAppLink
0.38.15
Common
:Version
:MicroUtils
:0.9.20
->0.9.24
Core
:- Fixes in
MessageContent#serializationModule
- Fixes in
BehaviourBuilder
:- Add triggers for
DataCallbackQuery
and subtypes with regex checking of data
- Add triggers for
0.38.14
This update contains including of Telegram Bot API 6.0
Core
:- Constructor of
UnknownInlineKeyboardButton
is not internal and can be created with anyjson
- Constructor of
WebApps
:- Created 🎉
0.38.13
Core
:- Fixes in
mention
creation - Deprecate
StorageFileInfo
- Fixes in
BehaviourBuilder
:- In the expectations a lot of
on*Message
extensions have been added (likeonContentMessage
). These extensions could be useful when with theContent
its message info is important
- In the expectations a lot of
0.38.12
Common
:Version
:MicroUtils
:0.9.17
->0.9.19
Coroutines
:1.6.0
->1.6.1
Core
:- New type
TextedMediaContent
which will uniteTextedInput
andMediaContent
MediaGroupContent
and all subsequent inheritors have been replaced to the packagedev.inmo.tgbotapi.types.message.content.media
MediaGroupContent
Now extendsTextedMediaContent
instead ofMediaContent
- Add
reply
functions with the texted content with including of text
- New type
Utils
:- Improve work with retrieving of accumulated updates
0.38.11
Common
:Version
:MicroUtils
:0.9.16
->0.9.17
Klock
:2.6.3
->2.7.0
Core
:- Fixes in
TextSourcesList
creating in fromRawMessageEntities
- Old ways to create keyboards (
matrix
androw
) have been deprecated
- Fixes in
API
:- Add ability to
reply
withPoll
- Add ability to
reply
with anyMessageContent
- Add ability to
reply
with anyTelegramMediaFile
- Add ability to
0.38.10
API
:- All
with*Action
extensions got a contracts which declare thatblock
will be called once - Add several extensions
TelegramBot#sendPhoto
withPhotoSize
- Add several extensions
TelegramBot#reply
withPhotoSize
- All
0.38.9
Core
:- New function
MessageContent.Companion#serializationModule
- Now it is possible to create
TelegramBot
(RequestsExecutor
) with several bots under the hood and opportunity for bots requests load balancing or fault-fix via sending of the requests via another bot
- New function
API
:- Add replies which will use another message as a source for reply (
copyMessage
)
- Add replies which will use another message as a source for reply (
0.38.8
Common
:Version
:MicroUtils
:0.9.12
->0.9.16
Klock
:2.6.2
->2.6.3
Ktor
:1.6.7
->1.6.8
BehaviourBuilder
:- Fixes in
onMediaGroup
and dependent functions - Add several new extensions for
SimpleFilter
:SimpleFilter#listAll
SimpleFilter#listAny
SimpleFilter#listNone
- Fixes in
0.38.7
Common
:Version
:MicroUtils
:0.9.9
->0.9.12
Klock
:2.5.2
->2.6.2
Core
:SimplePollOption#votes
now is0
by default- New function
PollOption.Companion#simple
0.38.6
Common
:Version
:MicroUtils
:0.9.6
->0.9.9
Klock
:2.4.13
->2.5.2
Core
:- New member of
MentionTextSource
-username
- New member of
0.38.5
Common
:Version
:MicroUtils
:0.9.5
->0.9.6
Core
:Username
got new propertyusernameWithoutAt
which will returnusername
without leading@
Utils
:- Several new functions for working with deep links:
makeUsernameDeepLinkPrefix
makeTelegramDeepLink
makeDeepLink
- Several new functions for working with deep links:
0.38.4
This update contains including of Telegram Bot API 5.7
Core
:- Support of new fields
Sticker
- Support of new fields
StickerSet
- Support of new fields in creating of sticker set and sticker
- Support of new fields
Utils
:- Rename
PathedFile
to avoid clash with core file (fix of #529)
- Rename
0.38.3
Common
:Version
:MicroUtils
:0.9.1
->0.9.2
Klock
:2.4.10
->2.4.12
UUID
:0.3.1
->0.4.0
API
- New extensions
TelegramBot#send*
for media groups with contents
- New extensions
0.38.2
Common
:Version
:MicroUtils
:0.9.0
->0.9.1
API
- New extensions
TelegramBot#copyMessages
for 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
ForwardFromPublicChatInfo
as extender ofForwardInfo
:ForwardFromChannelInfo
now extendsForwardFromPublicChatInfo
ForwardFromSupergroupInfo
now extendsForwardFromPublicChatInfo
- New type of events:
UserLoggedIn
Utils
:- (#511) New extensions properties (raw fields as in original API) for several types have been added:
Message
CallbackQuery
ChosenInlineResult
InlineQuery
Poll
- (#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.10
Coroutines
:1.5.2
->1.6.0
Serialization
:1.3.1
->1.3.2
Klock
:2.4.8
->2.4.10
Ktor
:1.6.5
->1.6.7
MicroUtils
:0.8.7
->0.9.0
Core
:- Add
SpoilerTextSource
(as part ofTelegram Bot API 5.6
update) - Add support of
protect_content
as a fieldprotectContent
in all send message requests and parameter in all functions related to that requests (as part ofTelegram Bot API 5.6
update) - ALL IMPLEMENTERS OF
CommonMessage
HAS CHANGED THEIR CONSTRUCTOR: NOW THEY GEThasProtectedContent
instead offorwardable
(inversed) fieldChannelContentMessageImpl
ChannelMediaGroupMessage
CommonMediaGroupMessage
GroupContentMessage
implementersConnectedFromChannelGroupContentMessageImpl
UnconnectedFromChannelGroupContentMessageImpl
AnonymousGroupContentMessageImpl
CommonGroupContentMessageImpl
PrivateContentMessageImpl
- Add
0.37.4
Common
:Version
:MicroUtils
:0.8.7
->0.8.9
Core
:- New
SupergroupEvent
subtype:MigratedToSupergroup
. This event is sent when a group is converted to a supergroup while bot is in the group. - Helper extenstion functions on
ChatEvent
to 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
ExtendedPrivateChat
got new properties:hasPrivateForwards
andallowCreateUserIdLink
(same ashasPrivateForwards
)- All
ContentMessage
got fieldforwardable
(old constructors marked asDeprecated
) FromChannelGroupContentMessage
has 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
ExtendedPrivateChat
got new properties:hasPrivateForwards
andallowCreateUserIdLink
(same ashasPrivateForwards
)- All
ContentMessage
got fieldforwardable
(old constructors marked asDeprecated
) ChannelContentMessage
has 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.1
Klock
:2.4.7
->2.4.8
MicroUtils
: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.7
Ktor
:1.6.4
->1.6.5
MicroUtils
:0.7.3
->0.8.1
Core
:- Replacement of simple
CreateChatInviteLink
andEditChatInviteLink
with several new:CreateChatInviteLinkSimple
CreateChatInviteLinkWithLimitedMembers
CreateChatInviteLinkWithJoinRequest
EditChatInviteLinkSimple
EditChatInviteLinkWithLimitedMembers
EditChatInviteLinkWithJoinRequest
- 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)
strictlyOn
andonStateOrSubstate
now are part ofBehaviourContextWithFSMBuilder
0.36.1
Common
:Version
:MicroUtils
:0.7.2
->0.7.3
API
:- Fix
getMyCommands
overloads conflict when no arguments provided
- Fix
Utils
:buildEntities
DSL now have parameterseparator
to specifyTextSource
that 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.0
MicroUtils
:0.5.28
->0.7.2
Klock
:2.4.3
->2.4.6
Ktor
:1.6.3
->1.6.4
-
Core
:PrivateContentMessageImpl#paymentInfo
now is deprecated and will always be nullPayInlineKeyboardButton#pay
now is deprecatedRowBuilder
andMatrixBuilder
now are open and available for extendingMatrixBuilder#matrix
will return read-only new list instead of original internalmutMatrix
- Introduced new type of events
SuccessfulPaymentEvent
instead of putting of payment inside of message - New type of events union:
PublicChatEvent
.CommonEvent
is still union of anyChatEvent
- New
AbstractFlowsUpdatesFilter
with defaultlazy
realization for all typed flows FlowsUpdatesFilter
fun now haveonBufferOverflow
andupstreamUpdatesFlow
as incoming paramsDefaultFlowsUpdatesFilter
now use additionalupstreamUpdatesFlow
as source of updates
-
Utils
:- Two new dsl:
inlineKeyboard
for creatingInlineKeyboardMarkup
replyKeyboard
for creatingReplyKeyboardMarkup
- Cast helpers for
Message
(thanks to madhead):asPossiblyReplyMessage
: tries to cast aMessage
toPossiblyReplyMessage
, returnsnull
if the message is not of that typerequirePossiblyReplyMessage
: casts aMessage
toPossiblyReplyMessage
, fails if the message is not of that typewhenPossiblyReplyMessage
: tries to cast aMessage
toPossiblyReplyMessage
and runs the given block of code with it, if the cast is successful
- New type
WithUser
for unioning of all types withuser
FromUser
now extendsWithUser
- Cast helpers for type
WithUser
:asWithUser
,whenWithUser
,requireWithUser
- Two new dsl:
-
Behaviour Builder
:- New expecters and waiters:
waitShippingQueries
/onShippingQuery
waitPreCheckoutQueries
/onPreCheckoutQuery
waitChosenInlineResult
/onChosenInlineResult
waitPollUpdates
/onPollUpdates
- New expecters and waiters:
-
Behaviour Builder FSM extension
:
0.35.9
Common
:Version
:Kotlin
:1.5.30
->1.5.31
Klock
:2.4.1
->2.4.2
MicroUtils
:0.5.25
->0.5.28
Core
:- New
BotAction
implementation -CustomBotAction
LocationContent
has been divided to two different types:LiveLocationContent
andStaticLocationContent
- New
API
:- Two new extensions:
TelegramBot#answer
withCallbackQuery
andInlineQuery
- 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:
BehaviourContextReceiver
BehaviourContextAndTypeReceiver
BehaviourContextAndTwoTypesReceiver
- Old API for triggers with the flags like
includeFilterByChatInBehaviourSubContext
have been deprecated
0.35.8
Common
:Version
:MicroUtils
:0.5.24
->0.5.25
UUID
:0.3.0
->0.3.1
Core
:MultipartRequestCallFactory
now will use file name as multipartfilename
parameter instead of generated file id- New extension
MPPFile#asMultipartFile
API
- Fixes in
TelegramBot#withAction
- Fixes in
Behaviour Builder
:- New extensions
BehaviourContext#commandWithArgs
andBehaviourContext#onCommandWithArgs
- New extensions
0.35.7
Common
:Version
:Kotlin
:1.5.21
->1.5.30
Klock
:2.3.3
->2.4.1
Ktor
:1.6.2
->1.6.3
Coroutines
:1.5.1
->1.5.2
MicroUtils
:0.5.21
->0.5.24
0.35.6
Common
:Version
:Klock
:2.3.1
->2.3.3
MicroUtils
:0.5.19
->0.5.21
Core
:- All
FlowsUpdatesFilter
flows have been renamed and updated
- All
Utils
:- Extensions
allSentMessagesFlow
andallSentMediaGroupsFlow
have 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#asStorageFile
andByteReadChannelAllocator#asStorageFile
- Several new extensions
ByteArray#asMultipartFile
,ByteReadChannel#asMultipartFile
andByteReadChannelAllocator#asMultipartFile
- New extension
StorageFile#asMultipartFile
- Several new extensions
API
:- New extensions
TelegramBot#downloadFile
for writing of incoming bytes to the file - New extensions
TelegramBot#downloadFileStream
andTelegramBot#downloadFileStreamAllocator
for getting of input streams instead of whole bytes arrays - Old extensions
TelegramBot#downloadFile
has been replaced to the new package. Migration: replace in your projectimport dev.inmo.tgbotapi.extensions.api.downloadFile
withimport dev.inmo.tgbotapi.extensions.api.files.downloadFile
PathedFile#filename
extension has been deprecated, and new propertyPathedFile#fileName
has been included directly inPathedFile
- New extensions
Utils
:- Add several functions
convertToStorageFile
and 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.1
Ktor
:1.6.1
->1.6.2
MicroUtils
:0.5.16
->0.5.18
Core
:SimpleRequestCallFactory
andMultipartRequestCallFactory
became 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#downloadFile
for anyMediaContent
- New extension
Behaviour Builder
:- New provider
defaultCoroutineScopeProvider
- Now it is not necessary to provide
CoroutineScope
toTelegramBot#buildBehaviour
extension
- Now it is not necessary to provide
- New
TelegramBot#buildBehaviour
extension withFlowUpdatesFilter
andCoroutineScope
with defaultCoroutineScope
- New typealias
SimpleFilter
for 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
/require
forWithOptionalLanguageCode
andWithLanguageCode
- New provider
0.35.2
Common
:Version
:Kotlin
:1.5.20
->1.5.21
Coroutines
:1.5.0
->1.5.1
Serialization
:1.2.1
->1.2.2
Klock
:2.1.2
->2.2.0
Ktor
:1.6.0
->1.6.1
MicroUtils
:0.5.15
->0.5.16
0.35.1
Common
:Version
:Kotlin
:1.5.10
->1.5.20
MicroUtils
:0.5.6
->0.5.15
Core
:- New interface
MyCommandsRequest
(also seeBot API 5.3
below) - New extensions
TextSourcesList#make*String
for all parse modes - All
MessageContent
subclasses now serializable ChosenInlineResult
was replaced and modified to be sealedChosenInlineResult
now extendsFromUser
- Added
Update#sourceUser
method - More types assumed as sent by user types now implements
FromUser
interface - Added
Any#whenFromUser
,Any#asFromUser
andAny#requireFromUser
extensions MedaGroupUpdate
and its direct extendersSentMediaGroupUpdate
andEditMediaGroupUpdate
becamesealed interface
s- New built-in
RequestException
implementatorGetUpdatesConflict
has 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
BehaviourContext
was rewritten as an interface with default realizationDefaultBehaviourContext
and factoryBehaviourContext(TelegramBot, CoroutineScope, FlowsUpdatesFilter)
- Extension
buildBehaviour
(and all related extensions/functions) for opportunity to passdefaultExceptionsHandler
- Trigger
onContentMessage
and waiterwaitContentMessage
now may include media groups
- ❗️ All triggers (
API
:- All
reply
and 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
EntitiesBuilder
now will return builder itself, so you may create sequences likebuildEntities { bold("Hello,") + italic(" world") }
directly inbuildEntities
body - New extension
TelegramBot#longPollingFlow
has been added with returning valueFlow
with updates
- With class casts like
Bot API 5.3
:- Add type
BotCommandScope
, its serializerBotCommandScopeSerializer
and all its children - New request
DeleteMyCommands
and updates inGetMyCommands
andSetMyCommands
- Renames according to
And more
of 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.10
MicroUtils
:0.4.36
->0.5.6
Coroutines
:1.4.3
->1.5.0
Serialization
:1.1.0
->1.2.1
Klock
:2.0.7
->2.1.2
UUID
:0.2.3
->0.3.0
Ktor
:1.5.4
->1.6.0
Core
:ForceReply
has been renamed toReplyForce
Captioned
andExplained
interfaces have been removedRecordAudioAction
andUploadAudioAction
(and all related to these actions functionality) have been removedTextSource
interface and all related things have been replacedCallbackQuery
interface and all its extenders/implementers becomesealed
InputMedia
interface and all its extenders/implementers becomesealed
ParseMode
interface and all its extenders/implementers becomesealed
ChatMember
becomessealed
KeyboardMarkup
becomessealed
LeftChatMember
andMemberChatMember
become interfaces. All their code were replaced to the*Impl
classes- Most of
sealed
classes have been modified to be interfaces - Most serializers becomes public, but they are still
RistFeature
- For
EntitiesBuilder
multilevel text sources builders with callback have been added
0.34.1
Common
:Version
:ktor
:1.5.3
->1.5.4
MicroUtils
: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 TextSource
s creating mechanism.
UPDATE UP TO Telegram Bot API 5.2
ALL OLD DEPRECATIONS WERE REMOVED
Core
:- Type
ChatType
has been added - New
ExtendedChat
for unknown messagesUnknownExtendedChat
has been added SendInvoice#startParameter
becomes optional and replaced inSendInvoice
constructor- New interface
CommonSendInvoiceData
has been added- Fields
CommonSendInvoiceData#maxTipAmount
andCommonSendInvoiceData#suggestedTipAmounts
have been added
- Fields
- New type
InputInvoiceMessageContent
has been added - New interface
TextedWithTextSources
on top ofTexted
interface- Interface
TextedInput
now extendsTextedWithTextSources
with overriding oftextSources
field as not nullable textSources
become main field inTextedInput
- MIGRATION Remove all
import dev.inmo.tgbotapi.CommonAbstracts.textSources
in your project textEntities
become are calculable property inTextedInput
- MIGRATION Remove all
- Interface
- Interface
Captioned
andCaptionedInput
now is deprecated- Most of captions usages were replaced with texts
- Interface
Explained
andExplainedInput
now is deprecated- Most of captions usages were replaced with texts
- Interface
VoiceChatEvent
now isCommonEvent
- Mechanism of
RawMessageEntity
converting were fully rewritten
- Type
0.33.4
Common
:Version
:uuid
:0.2.3
->0.2.4
MicroUtils
:0.4.33
->0.4.35
Core
:- All
TextSource
implementators have becomeSerializable
- New serializer
TextSourceSerializer
- New serializer
- Interface
FromUserMessage
now extendsMessage
- New interface
FromUser
- Interface
FromUserMessage
now extendsFromUser
- Interface
- All
Extensions Utils
- Fixes in
parseCommandsWithParams
- Fixes in
0.33.3
Common
:Version
:MicroUtils
:0.4.32
->0.4.33
Ktor
:1.5.2
->1.5.3
API
:- Bot actions DSL (fix for #358)
Behaviour Builder
:- Rewrite logic of
doInSubContextWithUpdatesFilter
anddoInSubContextWithFlowsUpdatesFilterSetup
extensions - All triggers now work with
stopOnCompletion
set up tofalse
- Rewrite logic of
0.33.2
Common
:Version
:MicroUtils
:0.4.30
->0.4.32
Behaviour Builder
:- New typealias
MediaGroupFilter
has been added forMediaGroup
expectators - Several typealiases became
suspend
:CallbackQueryMapper
ChatMemberUpdatedMapper
InlineQueryMapper
- 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.32
MicroUtils
:0.4.29
->0.4.30
Klocks
: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
:AdministratorChatMemberSerializer
andChatMemberSerializer
has changed their visibility: they are public for now- Add
ChatInviteLinkRequest
with subrequests likeKnownChatInviteLinkRequest
- Add
CreateChatInviteLink
/EditChatInviteLink
/RevokeChatInviteLink
requests - Update
KickChatMember
to includerevokeMessages
flag - Update
PromoteChatMember
to includecanManageVoiceChats
andcanManageChat
flags - Add
ChatInviteLink
object- Add
PrimaryInviteLink
forChatInviteLink
withisPrimary == true
- Add
CommonInviteLink
forChatInviteLink
withisPrimary == false
- Add
AdministratorChatMemberSerializer
has been set as public for several versionsChatMemberSerializer
has 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
ChatMemberUpdated
and its variations
0.32.9
Common
:Version
:Kotlin
:1.4.30
->1.4.31
Ktor
:1.5.1
->1.5.2
MicroUtils
:0.4.26
->0.4.28
Coroutines
:1.4.2
->1.4.3
0.32.8
Common
:Version
:Serialization
:1.1.0-RC
->1.1.0
MicroUtils
:0.4.25
->0.4.26
0.32.7
Core
:- New variable
LeftRestrictionsChatPermissions
andRestrictionsChatPermissions
- New variable
Extensions Utils
:DiceAnimationType
class casts
Behaviour Builder
:- Now
doInSubContextWithUpdatesFilter
anddoInSubContext
will automatically subscribe on updates of parentBehaviourContext
doInSubContextWithFlowsUpdatesFilterSetup
,doInSubContextWithUpdatesFilter
anddoInSubContext
got new parameterstopOnCompletion
to 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
:SlotMachineReelImages
has been renamed toSlotMachineReelImage
SlotMachineReelImage
got two built-in parameters:text
andnumber
- New extension
String#asSlotMachineReelImage
0.32.5
Core
:- Add
mention
variants for user ids and receiver variants (#294) - Now
AbstractRequestCallFactory
will set up one-second delay for zero timeouts inGetUpdate
requests - Several extensions for
TelegramBotAPI
likeretrieveAccumulatedUpdates
have 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
defaultParseMode
has been added (#291)
- Add
0.32.4
Common
:Version
:Kotlin
:1.4.21
->1.4.30
Klock
:2.0.4
->2.0.6
MicroUtils
:0.4.23
->0.4.24
Core
:- Renames:
ChannelMessage
->ChannelContentMessage
PublicMessage
->PublicContentMessage
GroupMessage
->GroupContentMessage
FromChannelGroupMessage
->FromChannelGroupContentMessage
AnonymousGroupMessage
->AnonymousGroupContentMessage
CommonGroupMessage
->CommonGroupContentMessage
PrivateMessage
->PrivateContentMessage
- Renames:
Extensions Utils
:- Renames of extensions in
ClassCasts
according 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.23
Klock
:0.2.3
->0.2.4
Ktor
:1.5.0
->1.5.1
Core
:- BREAKING CHANGE Now
MediaGroupMessage
have a generic type related toMediaGroupContent
- Methods and types related to
MediaGroupMessage
have been modified according to their meanings
- Methods and types related to
- Important Change
FlowsUpdatesFilter
now is an interface. Old class has been renamed toDefaultFlowsUpdatesFilter
and factory methodFlowsUpdatesFilter
has been added - PASSPORT Full support of
Telegram Passport API
PassportData
- All variants of
EncryptedPassportElement
- All variants of
SecureValue
- All variants of
PassportElementError
- New request
SetPassportDataErrors
Credentials
:EncryptedCredentials
DeryptedCredentials
EndDataCredentials
- BREAKING CHANGE Now
Behaviour Builder
:- Trigger and expectation extensions for
MessageContent
(onContentMessage
andwaitContentMessage
) onMediaGroup
has been replacedwaitMediaGroup
has been addedonVisualMediaGroup
now is just an alternative toonVisualGallery
command
andonCommand
expectations has been added for commandsString
variant- New extensions
BehaviourContext#oneOf
,BehaviourContext#parallel
andDeferred<T>#withAction
- Several renames:
waitAudioMediaGroup
->waitAudioMediaGroupContent
waitDocumentMediaGroup
->waitDocumentMediaGroupContent
waitMediaGroup
->waitAnyMediaGroupContent
waitVisualMediaGroup
->waitVisualMediaGroupContent
- New extensions
BehaviourContext#waitPassportMessagesWith
andBehaviourContext#waitAnyPassportMessages
- New extensions
BehaviourContext#onPassportMessage
andBehaviourContext#onPassportMessageWith
- Trigger and expectation extensions for
Utils
:- New
ClassCasts
forMessage
- PASSPORT
EncryptedPassportElement
- PASSPORT
PassportElementError
- PASSPORT
SecureValue
- Several tools for decryption have been added:
AESDecryptor
is available forJVM
platform- Extensions
EncryptedCredentials#decryptWithPKCS8PrivateKey
are available forJVM
platform - Extensions
EndDataCredentials#decryptData
andFileCredentials#decryptFile
have 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#buildBehaviour
have changed its return value: now it isJob
instead ofFlowsUpdatesFilter
- Extension
Utils
- New extensions
TelegramBot#longPolling
were added as new recommended way to start getting updates via long polling- Old extensions
RequestsExecutor#startGettingFlowsUpdatesByLongPolling
has been deprecated
- Old extensions
- New extensions
0.30.13
Common
:Version
:MicroUtils
:0.4.15
->0.4.16
Core
:- New variable
FlowsUpdatesFilter#allUpdatesWithoutMediaGroupsGroupingFlow
which will contains updates withoutSentMediaGroupUpdate
- New variable
Utils
:- Extensions for
ResendableContent
has been added - Extensions for
TextSource
has 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.15
Klock
:2.0.1
->2.0.3
Ktor
:1.4.3
->1.5.0
Core
:- All bot actions got functions for short calling, like
recordVideo
forRecordVideoNote
- 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.21
Klock
:2.0.0
->2.0.1
Ktor
:1.4.2
->1.4.3
MicroUtils
:0.4.6
->0.4.11
API Extensions
:- New function
buildBot
- New function
0.30.9
Common
:Version
:UUID
:0.2.2
->0.2.3
Coroutines
:1.4.1
->1.4.2
MicroUtils
:0.4.3
->0.4.6
Core
:- Add
BowlingDiceAnimationType
- Add
0.30.8
Common
:Version
:Kotlin
:1.4.10
->1.4.20
Klock
:1.12.1
->2.0.0
MicroUtils
:0.4.1
->0.4.3
0.30.7
Common
:Version
:MicroUtils
:0.4.0
->0.4.1
Core
:TelegramAPIUrlsKeeper
will fix ending of host url since this version- New mechanisms in
PowLimiter
andCommonLimiter
has 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
Core
TextSource
properties has been renamed:asMarkdownSource
->markdown
asMarkdownV2Source
->markdownV2
asHtmlSource
->html
PrivateChat
overrideid
property with typeUserId
- Several new extensions and functions in links creation:
- New function
makeUsernameLink
with parameterString
- New extension
Username#link
and functionmakeLink(Username)
- New extension
- Function
makeLinkToMessage
now able to get any type of chat- New extension
Message#link
- New extension
- Old functions
makeLinkToAddStickerSet...
has been deprecated:makeLinkToAddStickerSet
makeLinkToAddStickerSetInMarkdownV2
makeLinkToAddStickerSetInMarkdown
makeLinkToAddStickerSetInHtml
- New function
0.30.5
Common
:Version
:MicroUtils
:0.3.3
->0.4.0
Core
:- Mechanism of
ChatMember
serialization has been changed- Since this version any
ChatMember
can 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
User
propertyid
has 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#textSources
has been safely renamed tosubsources
TextContent#fullEntitiesList
has been deprecated- Now
TextContent
implementsTextedInput
TextContent#entities
has been deprecated
GroupEventMessage
now overrideschatEvent
with typeGroupEvent
SupergroupEventMessage
now overrideschatEvent
with typeSupergroupEvent
- Any
ChatEventMessage
now have generic type of itschatEvent
(just like messages)
Utils
:- Old extensions related to chat events are deprecated:
Flow<ChatEventMessage<*>>#divideBySource
Flow<ChatEventMessage<*>>#onlyChannelEvents
Flow<ChatEventMessage<*>>#onlyGroupEvents
Flow<ChatEventMessage<*>>#onlySupergroupEvents
- A lot of extensions for
Flow<ChatEventMessage>
has been added:FlowsUpdatesFilter#events
FlowsUpdatesFilter#channelEvents
FlowsUpdatesFilter#groupEvents
FlowsUpdatesFilter#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 EmptyLimiter
has been renamed toExceptionsOnlyLimiter
and currently will stop requests afterTooMuchRequestsException
happen until retry time is actual- Now
ExceptionsOnlyLimiter
(previouslyEmptyLimiter
) is a class
- Now
AbstractRequestCallFactory
currently will not look at the response and wait if it haveRetryAfter
error. 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
SetWebhookRequest
which can be used inSetWebhook
requests
- New sealed class
Utils
:- Extensions
setWebhookInfoAndStartListenWebhooks
has been united in one extension withSetWebhookRequest
incoming 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
logOut
method (LogOut
object as aRequest
) - Support of
close
method (Close
object as aRequest
) SetWebhook
updates:- New field
ipAddress
. It works the same asip_address
in setWebhook section - New field
dropPendingUpdates
. It works the same asdrop_pending_updates
in setWebhook section
- New field
- New field
ExtendedPrivateChat#bio
- New data class
ChatLocation
- New field
UnbanChatMember#onlyIfBanned
- New fields
ExtendedChannelChat#linkedGroupChatId
andExtendedSupergroupChat#linkedChannelChatId
- New fields
ExtendedSupergroupChat#location
- New fields
AudioFile#fileName
andVideoFile#fileName
- New fields
SendDocument#disableContentTypeDetection
andInputMediaDocument#disableContentTypeDetection
- New request
UnpinAllChatMessages
- New parameter for
unpinChatMessage
method:messageId
- New dice type
FootballDiceAnimationType
- Limits for dices has been changed
commonDiceResultLimit
has been deprecated- New field
DiceAnimationType#valueLimits
- Locations updates:
- New interface
Headed
with propertyheading
- New interface
HorizontallyAccured
with propertyhorizontalAccuracy
- New interface
ProximityAlertable
with propertyproximityAlertRadius
Location
class has been separated:StaticLocation
for static locationsLiveLocation
for live locations
- Property
Livable#livePeriod
now use typealias typeSeconds
(the same by meaning -Int
) EditLocationMessage
now extendsLocationed
,HorizontallyAccured
,ProximityAlertable
andHeaded
interfaces- New properties in
EditChatMessageLiveLocation
:horizontalAccuracy
,heading
,proximityAlertRadius
- New properties in
EditInlineMessageLiveLocation
:horizontalAccuracy
,heading
,proximityAlertRadius
- New properties in
- Main constructor of
SendLocation
now 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
PositionedSendMessageRequest
now extendsLocationed
LocationContent#createResend
now can createLiveLocation
- New interface
- Support of
ProximityAlertTriggered
. It isCommonEvent
- Property
pollQuestionTextLength
now have maximum up to300
- Anonymous Admins:
- New field
AdministratorChatMember#isAnonymous
- New field
- Several new interfaces of messages:
SignedMessage
- any message which possibly haveauthorSignature
WithSenderChatMessage
- any message which havesenderChat
. PropertysenderChat
is not-nullable due to separation of implementatorsPublicMessage
- all channel messages have propertyval chat: PublicChat
instead of commonval chat: Chat
ChannelMessage
- all channel messages have propertyval chat: ChannelChat
instead of commonval chat: Chat
- Old
ChannelMessage
was safely renamed toChannelMessageImpl
(old name was set as typealias and deprecated)
- Old
GroupMessage
- all group messages have propertyval chat: GroupChat
instead of commonval chat: Chat
FromChannelGroupMessage
- instances should have propertyval channel: ChannelChat
AnonymousGroupMessage
- instances may have setup propertyauthorSignature
CommonGroupMessage
- just common message
PrivateMessage
- works like previousCommonMessageImpl
- Previous
CommonMessageImpl
safely renamed toPrivateMessageImpl
- New property
PromoteChatMember#isAnonymous
- Update all classes which must have
entities
/caption_entities
fields - New request
CopyMessage
- New extension
List<TextSource>#makeString
for more comfortable work with new api with entities - Support for Google Places identifiers for venues
- New extensions for text sources separating:
List<TextSource>#separateForMessage
List<TextSource>#separateForCaption
List<TextSource>#separateForText
- Rewritten work with text sources and text parts:
- Now any
Message
type with entities will have full list of entities. That means that parts without any formatter entities will useRegularTextSource
MultilevelTextSource#textParts
has been deprecated. Now eachMultilevelTextSource
have its owntextSources
list
- Now any
- New dsl for creating of
TextSource
lists - Built-in
handleSafely
andExceptionHandler
is deprecated - New common factories for
StorageFile
- Support of
API
:- Extensions
TelegramBot#pinChatMessage
now support anyChat
andMessage
s from anyChat
- New extensions
TelegramBot#unpinAllChatMessages
- Extensions
TelegramBot#promoteChatMember
gotisAnonymous
parameter - All old api methods has been actualized to their analogs in
Core
- All
telegramBot
withtoken: String
gotapiUrl
parameter - Factory
telegramBotWithCustomClientConfig
has been renamed totelegramBot
- Extensions
0.29.4
Core
:diceResultLimit
now is deprecated, usecommonDiceResultLimit
instead- 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 usageSendMediaGroup
factory now marked withRiskFeature
- Media groups updates:
- New functions
SendPlaylist
- New functions
SendDocumentsGroup
- New functions
SendVisualMediaGroup
- New functions
- New type
VisualMediaGroupMemberInputMedia : MediaGroupMemberInputMedia
InputMediaPhoto
now implementsVisualMediaGroupMemberInputMedia
instead ofMediaGroupMemberInputMedia
InputMediaVideo
now implementsVisualMediaGroupMemberInputMedia
instead ofMediaGroupMemberInputMedia
- New type
VisualMediaGroupContent : MediaGroupContent
PhotoContent
now implementsVisualMediaGroupContent
instead ofMediaGroupContent
VideoContent
now implementsVisualMediaGroupContent
instead ofMediaGroupContent
- New type
AudioMediaGroupContent : MediaGroupContent
AudioContent
now implementsAudioMediaGroupContent
instead ofMediaContent
andCaptionedInput
- New type
DocumentMediaGroupContent : MediaGroupContent
DocumentContent
now implementsDocumentMediaGroupContent
instead ofMediaContent
andCaptionedInput
- New type
AudioMediaGroupMemberInputMedia : MediaGroupMemberInputMedia
InputMediaAudio
now implementsAudioMediaGroupMemberInputMedia
- New type
DocumentMediaGroupMemberInputMedia : MediaGroupMemberInputMedia
InputMediaDocument
now implementsDocumentMediaGroupMemberInputMedia
- New extension
AudioFile#toInputMediaAudio
AudioContent
now implementsMediaGroupContent
- New extension
DocumentFile#toInputMediaDocument
DocumentContent
now implementsMediaGroupContent
- New dice type
SlotMachineDiceAnimationType
- New extension
TelegramMediaFile#asDocumentFile
- New extension
VideoFile#toInputMediaVideo
- New exception
WrongFileIdentifierException
- Extension
String#toInputMediaFileAttachmentName
now is deprecated - Property
ThumbedInputMedia#thumbMedia
now is deprecated
- New annotation
API
:- New extensions for media groups:
TelegramBot#sendPlaylist
TelegramBot#replyWithPlaylist
TelegramBot#sendDocumentsGroup
TelegramBot#replyWithDocumentsGroup
TelegramBot#sendVisualMediaGroup
TelegramBot#replyWithVisualMediaGroup
- New extensions for media groups:
Utils
:- New extensions for
Flow
s:Flow<SentMediaGroupUpdate>#mediaGroupVisualMessages
Flow<SentMediaGroupUpdate>#mediaGroupAudioMessages
Flow<SentMediaGroupUpdate>#mediaGroupDocumentMessages
- New extensions for
FlowsUpdatesFilter
:FlowsUpdatesFilter#audioMessagesWithMediaGroups
FlowsUpdatesFilter#mediaGroupAudioMessages
FlowsUpdatesFilter#documentMessagesWithMediaGroups
FlowsUpdatesFilter#mediaGroupDocumentMessages
FlowsUpdatesFilter#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#debounceByValue
has 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.TelegramBotAPI
in 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
SendVoice
factory function has changed its signature: now it have nowthumb
(according to the documentation) AudioFile
now can be converted toVoiceFile
VoiceFile
now can be converted toAudioFile
- Now in forward info you can get
-
TelegramBotAPI-extensions-api
:- ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH
TelegramBot
TYPEALIAS. It should not bring any break changes - Internal changes of
sendRegularPoll
andsendQuizPoll
extensions - Variable
defaultLivePeriodDelayMillis
now is public - All
send
extensions forTelegramBot
got theirreply
variations (issue #144) - A lot of
send
extensions forTelegramBot
got their variation withChat
instead ofChatIdentifier
- ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH
0.28.4
Common
:- Version updates:
Ktor
:1.4.0
->1.4.1
- Version updates:
TelegramBotAPI-core
TelegramBotAPI-extensions-utils
- Extensions
Flow<ChatEventMessage>#onlyGroupEvents
andFlow<ChatEventMessage>#onlySupergroupEvents
now returnsCommonGroupEventMessage
andCommonSupergroupEventMessage
- Extensions
0.28.3
- Common:
- Version updates:
Klock
:0.12.0
->0.12.1
Kotlin serialization
:1.0.0-RC
->1.0.0-RC2
(dependencykotlinx-serialization-core
was replaced withkotlinx-serialization-json
due to kotlinx.serialization library update)
- Version updates:
TelegramBotAPI-core
:- All
InlineQueryResult
has changed their type of id for more obvious relation betweenInlineQueryResult#id
andChosenInlineResult#resultId
:String
->InlineQueryIdentifier
- All
TelegramBotAPI-extensions-utils
:- Several extensions for updates flows based on
InlineQueryUpdate
has been added:Flow<InlineQueryUpdate>#onlyBaseInlineQueriesWithUpdates
Flow<InlineQueryUpdate>#onlyBaseInlineQueries
Flow<InlineQueryUpdate>#onlyLocationInlineQueriesWithUpdates
Flow<InlineQueryUpdate>#onlyLocationInlineQueries
- Several extensions for updates flows based on
ChosenInlineResultUpdate
has been added:Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResultsWithUpdates
Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResults
Flow<ChosenInlineResultUpdate>.onlyLocationChosenInlineResultsWithUpdates
Flow<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:filterExactCommands
filterCommandsInsideTextMessages
filterCommandsWithArgs
- Extension
Flow<BaseSentMessageUpdate>.filterCommandsWithArgs
has changed its signature: now it will also have original message paired with list of text sources - Shortcut method
commonMessages
foronlyCommonMessages
- Shortcuts
onlySentViaBot
andwithoutSentViaBot
now are extensions for anyFlow
with types which implementingContentMessage
- Several commands shortcuts for
0.28.1
- Common:
- Versions updates:
Kotlin
:1.4.0
->1.4.10
UUID
:0.2.1
->0.2.2
- Versions updates:
TelegramBotAPI-core
:ExceptionHandler
has changed its incoming type:Exception
->Throwable
handleSafely
has changed its signatureexecuteUnsafe
has 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.0
Coroutines
:1.3.8
->1.3.9
Serialization
:0.20.0
->1.0.0-RC
Klock
:1.11.14
->1.12.0
UUID
:0.1.1
->0.2.1
Ktor
:1.3.2
->1.4.0
buildMimeType
function 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
TelegramBot
was added - Fully rebuilt
KtorCallFactory
interface to be able to handle custom answers from telegram bot api system - New implementation of
KtorCallFactory
was added:DownloadFileRequestCallFactory
DownloadFile
request was added
- All included
KtorCallFactory
realizations (except of abstract) now are objects:MultipartRequestCallFactory
SimpleRequestCallFactory
MediaGroupMemberInputMedia
members now will not havearguments
property due to redundancy and buggy of that- Field
media
now is common for allInputMedia
objects
- Typealias
-
TelegramBotAPI-extensions-api
:- Extensions
TelegramBot#downloadFile
were added
- Extensions
-
TelegramBotAPI-extensions-utils
:- All extensions for media groups (except of
mediaGroupId
) have changed their context:List<MediaGroupMessage>
->List<CommonMessage<MediaGroupContent>>
forwardInfo
replyTo
chat
createResend
(several extensions)
- Several extensions for downloading of files:
HttpClient#loadFile
PathedFile#download
- All extensions for media groups (except of
0.27.11
TelegramBotAPI
:- Extension
String#filenameFromUrl
was created- Extension
PathedFile#filename
was created
- Extension
- Extension
TelegramBotAPI-extensions-utils
:Flow<Iterable<T>>.flatMap
extension was added- Extensions for
FlowUpdatesFilter
were added:FlowsUpdatesFilter#allSentMessagesFlow
(combination ofmessageFlow
andchannelPostFlow
)FlowsUpdatesFilter#allSentMediaGroupsFlow
(combination ofmessageMediaGroupFlow
andchannelPostMediaGroupFlow
)FlowsUpdatesFilter#sentMessages
FlowsUpdatesFilter#sentMessagesWithMediaGroups
FlowsUpdatesFilter#photoMessagesWithMediaGroups
FlowsUpdatesFilter#imageMessagesWithMediaGroups
FlowsUpdatesFilter#videoMessagesWithMediaGroups
FlowsUpdatesFilter#mediaGroupMessages
FlowsUpdatesFilter#mediaGroupPhotosMessages
FlowsUpdatesFilter#mediaGroupVideosMessages
- A lot of extensions like
Flow<BaseSentMessageUpdate>#textMessages
were added:Flow<BaseSentMessageUpdate>#animationMessages
Flow<BaseSentMessageUpdate>#audioMessages
Flow<BaseSentMessageUpdate>#contactMessages
Flow<BaseSentMessageUpdate>#diceMessages
Flow<BaseSentMessageUpdate>#documentMessages
Flow<BaseSentMessageUpdate>#gameMessages
Flow<BaseSentMessageUpdate>#invoiceMessages
Flow<BaseSentMessageUpdate>#locationMessages
Flow<BaseSentMessageUpdate>#photoMessages
Flow<BaseSentMessageUpdate>#imageMessages
Flow<BaseSentMessageUpdate>#pollMessages
Flow<BaseSentMessageUpdate>#stickerMessages
Flow<BaseSentMessageUpdate>#textMessages
Flow<BaseSentMessageUpdate>#venueMessages
Flow<BaseSentMessageUpdate>#videoMessages
Flow<BaseSentMessageUpdate>#videoNoteMessages
Flow<BaseSentMessageUpdate>#voiceMessages
Flow<BaseSentMessageUpdate>#mediaGroupMessages
Flow<BaseSentMessageUpdate>#mediaGroupPhotosMessages
Flow<BaseSentMessageUpdate>#mediaGroupVideosMessages
0.27.10
TelegramBotAPI-extensions-api
:- Function
telegramBot(TelegramAPIUrlsKeeper)
was added
- Function
TelegramBotAPI-extensions-utils
:- Extension
Route#includeWebhookHandlingInRouteWithFlows
was added - A lot of extensions like
FlowsUpdatesFilter#textMessages
were added:FlowsUpdatesFilter#animationMessages
FlowsUpdatesFilter#audioMessages
FlowsUpdatesFilter#contactMessages
FlowsUpdatesFilter#diceMessages
FlowsUpdatesFilter#documentMessages
FlowsUpdatesFilter#gameMessages
FlowsUpdatesFilter#invoiceMessages
FlowsUpdatesFilter#locationMessages
FlowsUpdatesFilter#photoMessages
FlowsUpdatesFilter#imageMessages
FlowsUpdatesFilter#pollMessages
FlowsUpdatesFilter#stickerMessages
FlowsUpdatesFilter#textMessages
FlowsUpdatesFilter#venueMessages
FlowsUpdatesFilter#videoMessages
FlowsUpdatesFilter#videoNoteMessages
FlowsUpdatesFilter#voiceMessages
- Extension
0.27.9
Common
- Versions updates:
Gradle Wrapper
:6.5-all
->6.5.1-bin
Coroutines
:1.3.7
->1.3.8
Klock
:1.11.3
->1.11.14
UUID
:0.1.0
->0.1.1
- Versions updates:
0.27.8
TelegramBotAPI
:UnknownUpdateType
was renamed toUnknownUpdate
- Refactoring and optimization of
FlowsUpdatesFilter
Venue
type was replaced to a new package:com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue
Venue
type now implementsLocationed
and delegate realisation to itslocation
fieldFoursquareId
andFoursquareType
typealiases were added
TelegramBotAPI-extensions-utils
:- Several new functions
makeLinkToMessage
was added Foursquare
data class was added- Extension
Venue#foursquare
was added - Factory function
Venue
withFoursquare
parameter was added
- Extension
- Several new functions
0.27.7
TelegramBotAPI
:- Operator function
unaryPlus
was added toRowBuilder
. Now it is possible to writerow { +button }
- Function
flatMatrix
was added for single-row columns - Operator extension
RowBuilder#plus
was added to be able to write things likerow { this + button }
- Operator function
TelegramBotAPI-extensions-api
:- Extensions
RequestsExecutor#sendVenue
withLocation
args were added
- Extensions
TelegramBotAPI-extensions-utils
:- Function
InlineKeyboardMarkup
for flat keyboards was added - Function
ReplyKeyboardMarkup
for flat keyboards was added
- Function
0.27.6
Common
:- Versions:
Kotlin Coroutines
:1.3.6
->1.3.7
- Versions:
TelegramBotAPI
:- Interface
PossiblySentViaBot
has been added- Additional interface
PossiblySentViaBotCommonMessage
was added for more explicit typing declaration for compiler- Currently, only
ChannelMessage
andCommonMessageImpl
are implementing the interfacePossiblySentViaBotCommonMessage
. It could be changed in future
- Currently, only
- Additional interface
- Factory
buildMimeType
was added BuiltinMimeTypes
was added- Abstraction
ThumbedWithMimeTypeInlineQueryResult
withthumbMimeType
field was addedInlineQueryResultGif
andInlineQueryResultMpeg4Gif
now extendThumbedWithMimeTypeInlineQueryResult
instead ofThumbedInlineQueryResult
- Interface
TelegramBotAPI-extensions-utils
:- New extensions
onlyCommonMessages
,onlySentViaBot
andwithoutSentViaBot
was 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
row
was added makeLinkToMessage
extensions has been deprecated (replaced intoTelegramBotAPI-extensions-utils
)- Next things was deprecated and replaced into
TelegramBotAPI-extensions-utils
:- All
String
formatting public extensions and functions - All extensions like
CaptionedInput#toHtmlCaptions
- All helper extensions for
List<BaseMessageUpdate>
- All
RequestsExecutor#executeAsync
andRequestsExecutor#executeUnsafe
- All
BotCommand
now more strictly check commands which passed to it- Regex
BotCommandNameRegex
was added
- Regex
TelegramBotAPI-extensions-api
:- A lot of
RequesstExecutor#getChat
extensions was added for more explicit types showing - New
RequesstExecutor#setMyCommands
extension was added - New field
BotBuilder#ktorClientEngineFactory
introduced- Field
BotBuilder#ktorClientEngine
now is deprecated
- Field
- A lot of
TelegramBotAPI-extensions-utils
:safely
function was introduced. It is inPreviewFeature
state currentlymakeLinkToMessage
extensions has been addedmakeLinkToAddStickerSet
function and its variations were added- Next tools was added from
TelegramBotAPI
:- All
String
formatting extensions and functions - All extensions like
CaptionedInput#toHtmlCaptions
- All helper extensions for
List<BaseMessageUpdate>
- Several new extensions for
SentMediaGroupUpdate
were added:SentMediaGroupUpdate#forwardInfo
SentMediaGroupUpdate#replyTo
SentMediaGroupUpdate#chat
SentMediaGroupUpdate#mediaGroupId
- Several
List<MediaGroupMessage>.createResend
extensions were added
- Several new extensions for
RequestsExecutor#executeAsync
andRequestsExecutor#executeUnsafe
- All
0.27.4
TelegramBotAPI-extensions-utils
:- Several extensions for updates was added:
onlyBaseMessageUpdates
onlySentMessageUpdates
onlyEditMessageUpdates
onlyMediaGroupsUpdates
onlySentMediaGroupUpdates
onlyEditMediaGroupUpdates
- Renames in chat filters extensions:
filterBaseMessageUpdates
->filterBaseMessageUpdatesByChatId
andfilterBaseMessageUpdatesByChat
filterSentMediaGroupUpdates
->filterSentMediaGroupUpdatesByChatId
andfilterSentMediaGroupUpdatesByChat
- Several extensions for updates was added:
0.27.3
TelegramBotAPI
:UpdateDeserializationStrategy
is publicly available now- All
setWebhook
extensions was marked as deprecated, renamed and replaced intoTelegramBotAPI-extensions-utils
- Typealias
ExceptionHandler
was added - it will be used forhandleSafely
SetWebhook
factories signatures was changed (backward compatibility was not broken)executeUnsafe
now working differently- Now it is possible to pass exceptions handler into
executeUnsafe
- Now it is possible to pass exceptions handler into
BasketballDiceAnimationType
was addedUnknownDiceAnimationType
now is deprecated due to renaming - currently it is typealias forCustomDiceAnimationType
CustomDiceAnimationType
now isdata
class instead of common class
FlowsUpdatesFilter
will 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
telegramBot
functions was renamed intotelegramBotWithCustomClientConfig
- Add one more
setWebhookInfo
realisation
- Long Polling extensions now are deprecated in this project. It was replaced into
TelegramBotAPI-extensions-utils
:- Extension
toTelegramUpdate
was added - Long Polling extensions were added
- Updates utils were added
- New extensions
startListenWebhooks
,setWebhookInfoAndStartListenWebhooks
andincludeWebhookHandlingInRoute
was added - New extension
CoroutineScope#updateHandlerWithMediaGroupsAdaptation
was added - New extension
flowsUpdatesFilter
was 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
MimeType
was added- Field
MimeTyped#mimeType
now typed byMimeType
instead ofString
- Field
MediaGroupMemberInputMedia
children 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>#onlyChannelEvents
was added - Extension
Flow<ChatEventMessage>#onlyGroupEvents
was added - Extension
Flow<ChatEventMessage>#onlySupergroupEvents
was added
- Extension
- Chat events splitters added:
0.27.1
TelegramBotAPI
:- Interface
Explained
and subsinterfacesExplainedInput
andExplainedOutput
was added- Class
QuizPoll
now implementExplainedInput
- In
QuizPoll#caption
andQuizPoll#captionEntities
are deprecated now - Class
SendQuizPoll
now implementExplainedOutput
- In
SendQuizPoll#caption
is deprecated now
- Class
explanationLimit
range was added as future replacement ofquizPollExplanationLimit
quizPollExplanationLimit
now is deprecated
- Extensions
toMarkdownExplanations
,toMarkdownV2Explanations
andtoHtmlExplanations
was added - Typealias
FullTextSourcesList
was added- All extensions
fullEntitiesList
now returnFullTextSourcesList
- All extensions of
List<TextSource>
now are extensions forFullTextSourcesList
- All extensions
- Interface
TelegramBotAPI-extensions-api
:sendQuizPoll
now is usingexplanation
parameter instead ofcaption
0.27.0
Common
:- Versions updates:
Kotlin
:1.3.71
->1.3.72
Klock
:1.10.3
->1.10.5
- Versions updates:
TelegramBotAPI
:- Typealias
LongSeconds
was added for correct explanation of seconds inLong
primitive type - Several new fields was added:
explanationField
explanationEntitiesField
openPeriodField
closeDateField
- Extension
List<TextPart>#justTextSources
was added for mapping ofList<TextPart>
toList<TextSource>
- Field
SendPoll#closeInfo
was added- Range
openPeriodPollSecondsLimit
was added and used in allSendPoll
requests for checking income data
- Range
SendQuizPoll
now able to use fieldscaption
andparseMode
forexplanation
functionalityquizPollExplanationLimit
was added for checkingQuizPoll
explanation size
- Field
TextLinkTextSource#url
was added - Field
TextMentionTextSource#user
was added - Sealed class
ScheduledCloseInfo
was added- Class
ExactScheduledCloseInfo
was added for cases withclose_date
- Class
ApproximateScheduledCloseInfo
was added for cases withopen_period
- Class
- Field
Poll#scheduledCloseInfo
was added - Sealed class
MultipleAnswersPoll
was added- Class
RegularPoll
now extendsMultipleAnswersPoll
- Class
Dice
class was replaced into new package- Sealed class
DiceAnimationType
was added- Field
Dice#animationType
was added asemoji
API representation SendDice
now receiveanimationType
as second parameter
- Field
- For
List<TextSource>
was added several extensions:toMarkdownCaptions
toMarkdownTexts
toMarkdownV2Captions
toMarkdownV2Texts
toHtmlCaptions
toHtmlTexts
- Typealias
TelegramBotAPI-extensions-api
:- All
RequestsExecutor#sendDice
extensions now acceptDiceAnimationType?
as second parameter - All
RequestsExecutor#sendRegularPoll
extensions now acceptScheduledCloseInfo
fourth parameter - All
RequestsExecutor#sendQuizPoll
extensions now accept additional parameterscaption: String
andparseMode: ParseMode
forexplanation
functionality andcloseInfo: ScheduledCloseInfo?
for autoclose poll functionality
- All
TelegramBotAPI-extensions-utils
:- Several shortcuts for
ScheduledCloseInfo
was added:closePollExactAt
closePollExactAfter
closePollAfter
- Several shortcuts for
0.26.4
TelegramBotAPI
:- Now any getting of updates will return
UnknownUpdateType
when inside of deserialization will beSerializationException
orNotImplemented
error CallbackGame
currently is an object- It is possible to use
CallbackGame
for nowCallbackGameInlineKeyboardButton
now will not acceptcallbackGame
as 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
:CallbackGameInlineKeyboardButton
was added (Issue-79, PR-80)UnknownInlineKeyboardButton
was added. It is unavailable for creating, but you can receive it, for example, inInlineQueryResult
Update
now will be created even if wasSerializationException
inside of creating the update instance - in this case will be createdUnknownUpdateType
UnknownUpdateType$rawJson
value now is included (JsonElement
)- EXPERIMENTALLY
BaseEditMessageUpdate#data
now isCommonMessage<*>
- Suspend inline function
handleSafely
was addedKtorRequestsExecutor
now usehandleSafely
instead oftry
withsupervisorScope
UpdatesPolling
now usehandleSafely
instead oftry
withsupervisorScope
0.26.2
TelegramBotAPI
:- Now
EditMediaGroupUpdate
also extendsBaseEditMessageUpdate
- EXPERIMENTALLY Now all
TextSource
realisations will containsource
field as a property inside of them
- Now
TelegramBotAPI-extensions-api
:startGettingFlowsUpdates
extension which do not require filter (but return a new one) was added
TelegramBotAPI-extensions-utils
:- Subproject was added
filterBaseMessageUpdates
,filterSentMediaGroupUpdates
andfilterEditMediaGroupUpdates
extensions was addedfilterCommandsWithArgs
,filterExactCommands
andfilterCommandsInsideTextMessages
extensions was addedasContentMessagesFlow
,asChatEventsFlow
andasUnknownMessagesFlow
extensions was addedwithContentType
extension was addedonlyAnimationContentMessages
extension was addedonlyAudioContentMessages
extension was addedonlyContactContentMessages
extension was addedonlyDiceContentMessages
extension was addedonlyDocumentContentMessages
extension was addedonlyGameContentMessages
extension was addedonlyInvoiceContentMessages
extension was addedonlyLocationContentMessages
extension was addedonlyPhotoContentMessages
extension was addedonlyPollContentMessages
extension was addedonlyStickerContentMessages
extension was addedonlyTextContentMessages
extension was addedonlyVenueContentMessages
extension was addedonlyVideoContentMessages
extension was addedonlyVideoNoteContentMessages
extension was addedonlyVoiceContentMessages
extension was added
0.26.1
TelegramBotAPI
:BotCommand
now will check and throw error in case when command or description lengths is/are incorrectStorageFile
now is common for all platforms- JavaScript realization was removed due to its redundancy
- JVM realization was replaced with
fun
factory StorageFile
now able to accept any factory ofInput
StorageFileInfo
was added to avoid strange collisions with throws inStorageFile
- Fixes issue with
hashTag
for markdown InvalidPhotoDimensionsException
was added for cases whenPHOTO_INVALID_DIMENSION
answer received- Other fixes
0.26.0
Common
:- Versions updates:
Klock
:1.10.0
->1.10.3
- Versions updates:
TelegramBotAPI
:- Request
SendDice
was added (calling sendDice) - Class
Dice
was added (type dice) - Class
DiceContent
was added (for including it in message object) BotCommand
was addedGetMyCommands
request was addedSetMyCommands
request was addedGetMe
now is object instead of classGetMe
was replaced into packagecom.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMe
CreateNewStickerSet
renamed toCreateStaticNewStickerSet
CreateNewAnimatedStickerSet
request was added (it handle work withtgs_sticker
)StickerSet#thumb
was addedAddStickerToSet
renamed toAddStaticStickerToSet
AddAnimatedStickerToSet
request was addedSetStickerSetThumb
request was added- Most of sticker actions now implements
StandardStickerSetAction
instead ofStickerSetAction
getUpdatesLimit
was added to be ensure in get updates limitGetUpdates
now will check count of requesting updates and throw exception if it is not in range1 .. 100
GetUpdates#limit
now is not nullable and by default set up to 100
- Request
TelegramBotAPI-extensions-api
:- Extensions
sendDice
was added - Extension
getMyCommands
request was added - Extension
setMyCommands
request was added - Extension
getMe
was replaced into packagecom.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.GetMeKt.getMe
- All extensions
createNewStickerSet
was renamed tocreateNewStaticStickerSet
- Extensions
createNewAnimatedStickerSet
was added - All extensions
addStickerToSet
was renamed toaddStaticStickerToSet
- Extensions
addAnimatedStickerToSet
was added - Extensions
setStickerSetThumb
was added - Extension
startGettingUpdates
now will dropSentMediaGroupUpdate
in case if it is the last in updates group and size of retrieved updates is equal to 100 (max count of retrieved updates) - Extensions
getUpdates
now will receive only not nullablelimit
parameter
- 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.70
Kotlin coroutines
:1.3.3
->1.3.5
Kotlin serialization
:0.14.0
->0.20.0
Ktor
:1.3.1
->1.3.2
Klock
:1.8.7
->1.10.0
UUID
:0.0.7
->0.1.0
- Versions updates:
TelegramBotAPI
:Bot
implementations (as andBot
itself) now have not nullableusername
File#toInputFile
extension now will throw error when file does not existsInlineKeyboardMarkup
will check thatPayInlineKeyboardButton
is the first in case if it is exists inkeyboard
makeLinkToMessage
now is notPreviewFeature
- All deprecations was removed
RequestException
now extendsio.ktor.utils.io.errors.IOException
instead ofkotlinx.io.IOException
Any#toJson
now is NOTinline
FlowsUpdatesFilter
now as marked my annotationFlowPreview
PathedFile#fullUrl
now is notinline
functionSimpleRequest#json
now is notinline
andinternal
functionFlowsUpdatesFilter
now have two additional flows:pollAnswerFlow
,unknownUpdateTypeFlow
ExtendedUser
(typealias
) was added as aPreviewFeature
0.24.1
TelegramBotAPI
:UpdateReceiver
was replaced to the packagecom.github.insanusmokrassar.TelegramBotAPI.updateshandlers
- All functions inside
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPolling
are deprecated and will be removed in some soon versions. Their replacement are able insideTelegramBotAPI-extensions-api
UpdatesFilter
is interface for now- Previous
UpdatesFilter
class was renamed toSimpleUpdatesFilter
and for backward compatibility was added builder functionUpdatesFilter
, which will be removed in near releases FlowsUpdatesFilter
now implementsUpdatesFilter
- Previous
BaseSentMessageUpdate
andBaseEditMessageUpdate
interfaces was addedEditChannelPostUpdate
now is implementingBaseEditMessageUpdate
interfaceEditMessageUpdate
now is implementingBaseEditMessageUpdate
interfaceChannelPostUpdate
now is implementingBaseSentMessageUpdate
interfaceMessageUpdate
now is implementingBaseSentMessageUpdate
interface
UpdatesPoller
and all its usages, childs and childs usages now are deprecatedGetUpdates#timeout
type now isSeconds
(in fact it isInt
as previously)KtorRequestsExecutor
now is using a copy of incomingHttpClient
object and installHttpTimeout
featureAbstractRequestCallFactory
now setting up a custom delay in case if request isGetUpdates
TelegramBotAPI-extensions-api
:- All functions from
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesPolling
now available in packagecom.github.insanusmokrassar.TelegramBotAPI.extensions.api.updates.UpdatesPolling
- Now new method of getting updates available:
startGettingUpdates
withUpdatesFilter
as incoming first parameter startGettingUpdates
withreceiver
andallowedUpdates
parameters now will handle updates by itself
- All functions from
0.24.0
TelegramBotAPI
:- All suspend functions for
RequestsExecutor
was removed (due to replacement into TelegramBotAPI extensions project) ForwardFromChannelInfo#channelChat
now isChannelChat
instead ofChat
- All suspend functions for
TelegramBotAPI-extensions-api
:- Most part of sending media messages functions was removed and replaced with their
InputFile
args 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
SendPhoto
was added new functions for uploading ofMultipartFile
deleteWebhook
extension forRequestsExecutor
was added
Telegram Bot API
- All
RequestsExecutor
extensions related to Telegram Bots API was replaced intoAPI Extensions
project
0.23.2
- Fixes in
InputMedia
-media
field 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
CommonMultipartFileRequest
now is internal- Added
LiveLocation
class for more useful tracking live locations InvoiceOfPayment
is renamed toInvoiceContent
and now isMessageContent
instead ofPaymentInfo
SendInvoice
now returnContentMessage<InvoiceContent>
paymentInfo
inside ofCommonMessageImpl
now can be set only toSuccessfulPaymentInfo
- Added
RecordVideoNoteAction
andUploadVideoNoteAction
forrecord_video_note
andupload_video_note
actions - For most part of messages was added
RequestsExecutor
extensions for more useful way of usage toInputFile
extensions now will return more exact types- Now it is possible to send broadcast channels size for
FlowsUpdatesFilter
0.23.0 TelegramBotAPI 4.6
Poll
now is sealed classRegularPoll
type was added to represent polls with typeregular
QuizPoll
type was added to represent polls with typequiz
UnknownPollType
type was added to represent polls which are unknown in current version
AnonymousPollOption
was renamed toSimplePollOption
SendPoll
was rewritten as sealed classSendRegularPoll
was created and representsendPoll
method with typeregular
SendQuizPoll
was created and representsendPoll
method with typequiz
Poll#createRequest
extension was addedPollAnswerUpdate
type of update was addedPollAnswer
type was addedUpdatesFilter
now support work withPollAnswerUpdate
language
field in PreTextSource now correctly passed from telegram MessageEntitiesKeyboardButton
now is sealed class- Fixed problem of incorrect representation of this class (any type of request can be created separately)
- Added new types of
KeyboardButton
:UnknownKeyboardButton
SimpleKeyboardButton
RequestContactKeyboardButton
RequestLocationKeyboardButton
RequestPollKeyboardButton
- Added new type
KeyboardButtonPollType
:UnknownKeyboardButtonPollType
RegularKeyboardButtonPollType
QuizKeyboardButtonPollType
User
now is sealed classCommonUser
was added as representation of defaultUser
Bot
was added as representation of bot user (it is sealed class)ExtendedBot
with additional infoCommonBot
with simple info
GetMe
now returnExtendedBot
object- Now extension
javaLocale
is extension forCommonUser
0.22.2 CashTag and independent updates handling
cashtag
entity type was added- Several
Unknown*
realizations was added:UnknownUpdateType
UnknownMessageType
UnknownChatType
UnknownCallbackQueryType
UpdatesFilter
now have one additional income callback:unknownUpdateTypeCallback
createSimpleUpdateFilter
can receive one more callback:unknownCallback
(forunknownUpdateTypeCallback
)
0.22.1 MediaContent#asInputMedia
- All
MediaContent
instances now can create theirInputMedia
analog - New annotation
PreviewFeature
was added to mark new thing as preview for the time while they can work incorrectly - Added links utils:
makeLinkToMessage
have two signatures - for direct creating using username and for abstract creating using chat id
0.22.0
-
KtorCallFactory
must returnHttpStatement
instead ofHttpClientCall
-
SendMessage
was renamed toSendTextMessage
and previousSendMessage
is deprecated -
All
AbleToBe*
interfaces was renamed toPossibly*
AbleToBeEditedMessage
->PossiblyEditedMessage
AbleToBeForwardedMessage
->PossiblyForwardedMessage
AbleToBeMarkedUp
->PossiblyMarkedUp
AbleToBeEditedMessage
->PossiblyEditedMessage
-
ForwardedMessage
type was renamed toForwardInfo
AnonymousForwardedMessage
->AnonymousForwardInfo
UserForwardedMessage
->UserForwardInfo
ForwardedFromChannelMessage
->ForwardFromChannelInfo
PossiblyForwardedMessage#forwarded
field 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. -
EditChatMessage
now have generic type and extendsSimpleRequest<ContentMessage<GenericType>>
-
ResendableContent
now extendsRequest<out Message>
instead ofRequest<Message>
-
Most part of requests have changed return type. They are listed below:
ForwardMessage
GetChatAdministrators
EditChatMessageLiveLocation
StopChatMessageLiveLocation
EditChatMessageText
EditChatMessageCaption
EditChatMessageMedia
EditChatMessageReplyMarkup
SendAnimation
SendAudio
SendContact
SendLocation
SendTextMessage
SendPoll
SendVenue
SendGame
SendDocument
SendMediaGroup
SendPhoto
SendVideo
SendVideoNote
SendVoice
SendSticker
-
Changed type of
createResend
GameContent
LocationContent
PollContent
TextContent
VenueContent
AnimationContent
AudioContent
DocumentContent
ContactContent
PhotoContent
VideoContent
VideoNoteContent
VoiceContent
StickerContent
-
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 createdRegularTextSource
with the same text -
Fixed problem that usually string formatting did not trigger escaping of control characters
-
Actualized work with
pre
type of text - now it is possible to uselanguage
for formatting of text -
Removed constructor of
TextMentionTextSource
, which was deprecated previously -
All
TelegramMediaFile
instances now have fieldfileUniqueId
, which representsfile_unique_id
field from API -
Now
ChatPhoto
have two additional fields:smallFileUniqueId
andbigFileUniqueId
-
Now any administrator object instance have
customTitle
nullable field -
Added the new request
SetChatAdministratorCustomTitle
to manage the custom titles of administrators promoted by the bot. -
Added the field
slowModeDelay
to theExtendedSupergroupChat
objects. -
CaptionedInput
now have extensionfullEntitiesList
which will return list ofTextPart
withRegularSource
's -
TextPart
added - it will be used as part of some text and can be not related to telegram bot -
MultilevelTextSource
was added - it is type ofTextSource
, which can have subsources as parts of this text -
In all
TextSource
s 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
setWebhook
supports setting up of path for listening - Now
setWebhook
supports custom listen address even if certificate was not provided
0.20.3
- Now
LeftChatMamber
is aCommonEvent
0.20.2
- New exception type
MessageIsNotModifierException
was added - New exception type
MessageToEditNotFoundException
was added - Now exceptions in requests will be caught correctly
0.20.1
User
now implementPrivateChat
TextMentionMessageEntity
now acceptPrivateChat
instead ofUser
in main constructorTextMentionMessageEntity
now contains not user, but containsPrivateChat
- Fixed:
TextMentionMessageEntity#asHtmlSource
previously worked incorrect
- Abstraction
TextSource
MessageEntity
now extendsTextSource
createFormattedText
method now acceptList<TextSource>
createHtmlText
method now acceptList<TextSource>
createMarkdownText
method now acceptList<TextSource>
- A lot of
TextSource
implementors was added. More info here- All
MessageEntity
implementations now are using newTextSource
analogues as delegates
- All
0.20.0 MPP Migration
- Time library change:
joda-time
->com.soywiz.korlibs.klock:klock
Currencied
now using ascurrency
value with typeString
- For
Java
there isCurrencied#javaCurrency
extension function, which will give an old currency work way
- For
User
now have no fielduserLocale
- For
Java
there isUser#javaLocale
extension function, which will give an old locale work way
- For
0.19.0 ImplicitReflection removing
- Total rework of serialization for requests. Now all
SimpleRequest
children 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.WebhookPrivateKeyConfig
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.UpdatesFilter
com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.createSimpleUpdateFilter
com.github.insanusmokrassar.TelegramBotAPI.utils.createMarkdownText
com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownCaption
com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownText
com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.KtorUpdatesPoller
com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContent
com.github.insanusmokrassar.TelegramBotAPI.types.message.CommonForwardedMessage
com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.CaptionedInputMedia
com.github.insanusmokrassar.TelegramBotAPI.types.games.Game#text
com.github.insanusmokrassar.TelegramBotAPI.types.games.Game#textEntities
com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.makeFileUrl
com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.downloadingFilesBaseUrl
com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.Data
com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId
com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId
com.github.insanusmokrassar.TelegramBotAPI.bot.RequestException
com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.ReplyMessageNotFound
com.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#baseUrl
com.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
BotAction
now will be deserialized in a little bit other wayBotActionSerializer
now 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:
RawMessage
RawUpdate
RawChatMember
RawMessageEntity
RawInlineQuery
RawCallbackQuery
RawChosenInlineResult
-
All
RawMessage
usages was replaced withMessage
interface (with some of other raw classes was made the same things)TelegramBotAPIMessageDeserializationStrategy
was created. It was used for deserialization of Telegram Bot API incoming messagesTelegramBotAPIMessageDeserializeOnlySerializer
was created. It MUST NOT be used to serialize messages
-
Update of description
-
Make
Game
object a little bit more standartizated -
Game
now is not serializable and have no additional trash, related to serialization -
TelegramFile
was 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:
Sticker
andStickerSet
now have fieldisAnimated
ChatPermissions
object was added,GroupChat
interface gotpermissions
field, requestSetChatPermissions
was addedGroupChat
object now have no fieldallMembersAreAdmins
SpecialRightsChatMember
was added for administrators and restricted members rights union, chat members abstractions was replaced intoabstracts
package and available permissions was updatedRestrictChatMember
request now acceptpermissions
object instead of separated permissions- All
GroupChat
instances have description
Other important changes:
- Totally reworked chats hierarchy.
Extended
abstractions was added for cases when calledGetChat
request RawChat
boilerplate was removed and replaced by serializersBotCommandMessageEntity#command
will not contain/
/!
parts and also will cut outside of command begin token (/
or!
) and username token (@
) or end of command (any space character)RequestsExecutor
now isCloseable
TelegramAPIUrlsKeeper
was added to provide more comfortable work with file urls and other things like this
0.16.1
- Now old uncommon
CaptionedMediaContent
andCaptionedInputMedia
are replaced by almost the same interfacesCaptionedInput
andCaptionedOutput
. They are both implementingCaptioned
interface AnimationContent
now isCaptionedInput
0.16.0 Bot API 4.3
LoginURL
andLoginURLInlineKeyboardButton
has been addedreplyMarkup
field was added to theCommonMessage
objects viaAbleToBeMarkedUp
interfaceSwitchInlineQueryCurrentChatInlineKeyboardButton#switchInlineQueryCurrentChat
field fixedInlineKeyboardButton
now is sealed class and all its possible realisations are inside of its class fileString#asUsername
method renamed toString#toUsername
- Several
toChatId
extensions added
0.15.0
- Old
UpdatesPoller
removed (was deprecated) UpdatesPoller
renamed toKtorUpdatesPoller
- Now
KtorUpdatesPoller
do 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
suspend
for now - They are return
UpdatesPoller
- They are using
timeoutMillis
instead ofrequestsDelayMillis
- They are not
- Added
CIO
ktor client engine as lightweight default engine for long-polling
0.14.2 MediaGroups edit hotfixes
convertWithMediaGroupUpdates
extension 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
UpdatesFilter
andUpdatesPoller
into another package - Replace
WebhookPrivateKeyConfig
- Added
FlowsUpdatesFilter
UpdatesFilter
now have additional callback for pollsStopPoll#replyMarkup
now 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
Ktor
version1.1.3
->1.1.4
- Requests results now always decoding as
UTF-8
AbstractRequestCallFactory
was 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
CommonForwardedMessage
was 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
PollOption
andAnonymousPollOption
added - Type
Poll
added - Type
PollUpdate
added and implemented inRawUpdate
. NowPollUpdate
can be retrieved fromRawUpdate
- Type
PollContent
added - now it can be a value ofContentMessage#content
- Request
SendPoll
added andPollContent#createResend
now use it ByInlineMessageId
is deprecated (useInlineMessageAction
instead)ByMessageId
is deprecated (useMessageAction
instead)- Most part of requests which are working with identifiers of messages now implement
MessageAction
directly or by their parents StopPoll
implemented- All current
Chat
abstractions are deprecated and rewritten as typealiases. UseChat
abstractions fromcom.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts
package - Common Groups now may have pinned message
is_member
field added intoRestrictedChatMember
- BREAK CHANGES Now
ForwardedMessages
can beAnonymousForwardedMessage
andPublicForwardedMessage
. Old implementations now extendPublicForwardedMessage
0.12.7 Hotfix version
- Now temporary all requests of input media will contains
file
field
0.12.6 Libraries updates
kotlin
version1.3.21
->1.3.30
kotlin coroutines
version1.1.1
->1.2.0
kotlin serialization
version0.10.0
->0.11.0
ktor
version1.1.2
->1.1.3
- Added
DeleteWebhook
request - All default
startGettingOfUpdates
(in fact - methodstart
ofUpdatesPoller
) are suspend and will try to delete webhook
0.12.5 MediaContent
improvements
- Now
MediaGroupContent
isMediaContent
- All
MedaContent
now have no generics and have basicTelegramMediaFile
media field
0.12.4
- Optimized preparing of media group in
UpdatesPoller
- Add
CommonLimiter
- Add
MessageEntity#asHtmlSource
andString#toHtml
- Add tools for work with html captions and texts
MessageContent
which using captions or text now have default parse modeHTMLParseMode
due to issue with escaping of]
in links titles- Added
Markdown
andHTML
type aliases which actually meansMarkdownParseMode
andHTMLParseMode
ChatId
now have extensionlink
which 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
MessageEntities
to use new formatting options
0.12.3 Cleaning
- Refactor, optimizing and cleaning of code
- Removed deprecated method
T#toJsonWithoutNulls()
- Renamed instances of
MediaGroupMessage
s and refactored their interfaces.ChannelMediaGroupMessage
will not containuser
field (butCommonMediaGroupMessage
will have) - Now
MediaCollectionContent
isMediaContent
(classes of this interface must choose best media for present out)PhotoContent
now 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
Update
and can be use as regular update with list of messages - Data now is list with
MediaGroupMessage
- Added field
origins
which represent origin updates forMediaGroupMessage
updateId
now represent LAST id of origins updates
- It is subtype of
UpdatesFilter
and 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
DataRequest
interface which replaceData
interface MultipartRequestImpl
now useDataRequest
- All requests which implements
Data
now implementDataRequest
- Added class
SetWebhook
and its factory - Added class
UpdatesFilter
which can help to filter updates by categories - Added function
accumulateByKey
which work as debounce for keys and send list of received values - Added webhooks functions and workaround for
Reverse Proxy
mode - Added new type of updates
MediaGroupUpdate
, which can be received only from filters UpdatesFilter
now use new type of updates for mediagroups- Add
GetWebhookInfo
request andWebhookInfo
type - Replace updates types into separated place in types
- Now default
RequestException
will contain plain answer from telegram - Added
UnauthorizedException
RequestException
now is sealed- Rename
ReplyMessageNotFound
toReplyMessageNotFoundException
- Added
List<BaseMessageUpdate>#mediaGroupId
extension - Added utility
T#asReference(): WeakReference(T)
extension - Added
UpdatesPoller
class 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
Username
correctly 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
replyMarkup
inInlineQueryResultArticle
0.10.1
- Change algorithm of
executeUnsafe
: now it use loop instead of recursive calling - Add additional
startGettingUpdates
with better management of received updates for media groups - Now
MediaGroupMessage
isCommonMessage
withMediaGroupContent
content - Added extensions
replyTo
,forwarded
andchat
forList<BaseMessageUpdated>
for comfortable work with media groups lists - Fix
parseMode
ofInputTextMessageContent
0.10.0
- Most part of abstractions was replaced from
requests
andtypes
on more high level - Added abstraction
CommonVenueData
- Added abstraction
CommonContactData
- Added
InputMessageContent
- Update some types and requests according to abstractions replacing
- Add all
InlineQueryResult
,InputMessageContent
and other inline mode types - Fixes in edition of inline messages and their result types
- Replace basic exception and add
ReplyMessageNotFound
exception
0.9.3
KtorRequestsExecutor
now can use customJSON
string formatter (by default - non strict)ResponseParameters
renamed toResponse
- Add
RequestError
sealed class and described in documentation known errors - Add
ResponseParametersRaw
which can create error based on input parameters - Add
parameters
field inResponse
and remove useless fields fromResponse
- Add
leftToRetry
parameter inRetryAfterError
- Add handling of
RetryAfterError
inKtorRequestsExecutor
0.9.2
RequestsExecutor#executeAsync(Request, CoroutineScope)
now will returnDeferred
for cases when you need resultRequestsExecutor#executeUnsafe
will 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
RegularTextMessageEntity
which is useful for representing regular text message entity - Add
convertToFullMessageEntityList
which create list of entities withRegularTextMessageEntity
on 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#createResends
which create adapted list of resends for content - Add
TextContent
owncreateResends
realisation
0.9.0
- Old extension
OkHttpClient.Builder#useWith
now deprecated and must be replaced by the same incom.github.insanusmokrassar.TelegramBotAPI.bot.Ktor
package - Replace
ProxySettings
data class insettings
package, deprecate old link BaseRequestsExecutor
now have no it's own scope- Add
RequestLimiter
and base realisations - Now
KtorRequestsExecutor
can 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
createMarkdownText
and extensions forCaptionedMediaContent
andTextContent
- Added
ResendableContent
and realize in different contents- Animation
- Audio
- Document
- Photo
- Sticker
- Video
- VideoNote
- Voice
MessageContent
now isResendableContent
- Now all media sending factories which contains
thumb
have defaultnull
value ChatIdentifier
classes now aredata
classes- Now
MediaGroupContent
interface containstoMediaGroupMemberInputMedia
method for easily creating mirror input media - Change signature of
Update
- Now
Update
is untyped and data isAny
- Now
- Media groups now are separated type of updates and you can subscribe on that receiving directly
- Now
AdministratorChatMember
is interface andCreatorChatMember
implement it
0.8.3
- Now
ForwardedMessage
contains nullablefrom
0.8.2
- Add
FromUserMessage
which must be implemented in all messages realisations which haveuser
field - Add
CommonMediaGroupMessage
which in fact extension ofMediaGroupMessage
with implementation ofFromUserMessage
CommonMessageImpl
now implementingFromUserMessage
0.8.1
- Update
MediaGroupMessage
interface - Add implementation of
MediaGroupMessage
- Add generating of
MediaGroupMessage
inRawMessage