Releases: InsanusMokrassar/ktgbotapi
Releases · InsanusMokrassar/ktgbotapi
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 after
TooMuchRequestsException
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
0.30.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 own
textSources
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