TelegramBotAPI v0.36.0 Release Notes
-
๐ 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
: