Releases: InsanusMokrassar/ktgbotapi
Releases · InsanusMokrassar/ktgbotapi
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
became
sealed 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 parameter
markerFactory
, 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 pass
defaultExceptionsHandler
- 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 like
buildEntities { 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
0.33.2 (Not recommended)
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