TelegramBotAPI v0.35.1 Release Notes
-
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