Skip to content

Releases: InsanusMokrassar/ktgbotapi

0.30.4

12 Nov 17:29
Compare
Choose a tag to compare
  • Common:
    • Version:
      • MicroUtils: 0.3.1 -> 0.3.3
  • Core:
    • MultilevelTextSource#textSources has been safely renamed to subsources
    • TextContent#fullEntitiesList has been deprecated
    • Now TextContent implements TextedInput
      • TextContent#entities has been deprecated
    • GroupEventMessage now overrides chatEvent with type GroupEvent
    • SupergroupEventMessage now overrides chatEvent with type SupergroupEvent
    • Any ChatEventMessage now have generic type of its chatEvent (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

0.30.3

11 Nov 05:43
Compare
Choose a tag to compare
  • 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 to ExceptionsOnlyLimiter and currently will stop requests after
      TooMuchRequestsException happen until retry time is actual
      • Now ExceptionsOnlyLimiter (previously EmptyLimiter) is a class
    • AbstractRequestCallFactory currently will not look at the response and wait if it have RetryAfter error. New
      behaviour aimed on delegating of this work to RequestsLimiter

0.30.2

10 Nov 19:57
Compare
Choose a tag to compare
  • Common:
    • Version:
      • Ktor: 1.4.1 -> 1.4.2
  • Core:
    • New sealed class SetWebhookRequest which can be used in SetWebhook requests
  • Utils:
    • Extensions setWebhookInfoAndStartListenWebhooks has been united in one extension with SetWebhookRequest
      incoming parameter

0.30.1

09 Nov 09:30
Compare
Choose a tag to compare
  • Common:
    • Version:
      • MicroUtils: 0.2.7 -> 0.3.0
  • Utils:
    • Builder-style DSL for text sources - buildEntities (thanks to djaler)

0.30.0

07 Nov 17:47
Compare
Choose a tag to compare

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 a Request)
    • Support of close method (Close object as a Request)
    • SetWebhook updates:
      • New field ipAddress. It works the same as ip_address in setWebhook
        section
      • New field dropPendingUpdates. It works the same as drop_pending_updates in setWebhook
        section
    • New field ExtendedPrivateChat#bio
    • New data class ChatLocation
    • New field UnbanChatMember#onlyIfBanned
    • New fields ExtendedChannelChat#linkedGroupChatId and ExtendedSupergroupChat#linkedChannelChatId
    • New fields ExtendedSupergroupChat#location
    • New fields AudioFile#fileName and VideoFile#fileName
    • New fields SendDocument#disableContentTypeDetection and InputMediaDocument#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 property heading
      • New interface HorizontallyAccured with property horizontalAccuracy
      • New interface ProximityAlertable with property proximityAlertRadius
      • Location class has been separated:
        • StaticLocation for static locations
        • LiveLocation for live locations
      • Property Livable#livePeriod now use typealias type Seconds (the same by meaning - Int)
      • EditLocationMessage now extends Locationed, HorizontallyAccured, ProximityAlertable and Headed interfaces
        • New properties in EditChatMessageLiveLocation: horizontalAccuracy, heading, proximityAlertRadius
        • New properties in EditInlineMessageLiveLocation: horizontalAccuracy, heading, proximityAlertRadius
      • Main constructor of SendLocation now is internal. Instead of that currently available next factories:
        • SendLocation - sending of static location without live parameters
        • SendStaticLocation - sending of static location without live parameters
        • SendLiveLocation - sending of live location with live parameters
      • PositionedSendMessageRequest now extends Locationed
      • LocationContent#createResend now can create LiveLocation
    • Support of ProximityAlertTriggered. It is CommonEvent
    • Property pollQuestionTextLength now have maximum up to 300
    • Anonymous Admins:
      • New field AdministratorChatMember#isAnonymous
    • Several new interfaces of messages:
      • SignedMessage - any message which possibly have authorSignature
      • WithSenderChatMessage - any message which have senderChat. Property senderChat is not-nullable due to
        separation of implementators
      • PublicMessage - all channel messages have property val chat: PublicChat instead of common val chat: Chat
        • ChannelMessage - all channel messages have property val chat: ChannelChat instead of common val chat: Chat
          • Old ChannelMessage was safely renamed to ChannelMessageImpl (old name was set as typealias and deprecated)
        • GroupMessage - all group messages have property val chat: GroupChat instead of common val chat: Chat
          • FromChannelGroupMessage - instances should have property val channel: ChannelChat
          • AnonymousGroupMessage - instances may have setup property authorSignature
          • CommonGroupMessage - just common message
        • PrivateMessage - works like previous CommonMessageImpl
        • Previous CommonMessageImpl safely renamed to PrivateMessageImpl
    • 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 use RegularTextSource
      • MultilevelTextSource#textParts has been deprecated. Now each MultilevelTextSource have its own
        textSources list
    • New dsl for creating of TextSource lists
    • Built-in handleSafely and ExceptionHandler is deprecated
    • New common factories for StorageFile
  • API:
    • Extensions TelegramBot#pinChatMessage now support any Chat and Messages from any Chat
    • New extensions TelegramBot#unpinAllChatMessages
    • Extensions TelegramBot#promoteChatMember got isAnonymous parameter
    • All old api methods has been actualized to their analogs in Core
    • All telegramBot with token: String got apiUrl parameter
    • Factory telegramBotWithCustomClientConfig has been renamed to telegramBot

0.29.4

02 Nov 16:12
Compare
Choose a tag to compare
  • Core:
    • diceResultLimit now is deprecated, use commonDiceResultLimit instead
    • New extension slotMachineDiceResultLimit
  • Utils:
    • New enum SlotMachineReelImages
    • New extension Int#asSlotMachineReelImage
    • New data class SlotMachineResult
      • New extension Dice#calculateSlotMachineResult

0.29.3

02 Nov 08:34
Compare
Choose a tag to compare
  • Common:
    • Version updates:
      • Serialization: 1.0.0 -> 1.0.1
  • Core:
    • New annotation RiskFeature. This annotation will be applied to the things which contains unsafe types usage
      • SendMediaGroup factory now marked with RiskFeature
    • Media groups updates:
      • New functions SendPlaylist
      • New functions SendDocumentsGroup
      • New functions SendVisualMediaGroup
    • New type VisualMediaGroupMemberInputMedia : MediaGroupMemberInputMedia
      • InputMediaPhoto now implements VisualMediaGroupMemberInputMedia instead of MediaGroupMemberInputMedia
      • InputMediaVideo now implements VisualMediaGroupMemberInputMedia instead of MediaGroupMemberInputMedia
    • New type VisualMediaGroupContent : MediaGroupContent
      • PhotoContent now implements VisualMediaGroupContent instead of MediaGroupContent
      • VideoContent now implements VisualMediaGroupContent instead of MediaGroupContent
    • New type AudioMediaGroupContent : MediaGroupContent
      • AudioContent now implements AudioMediaGroupContent instead of MediaContent and CaptionedInput
    • New type DocumentMediaGroupContent : MediaGroupContent
      • DocumentContent now implements DocumentMediaGroupContent instead of MediaContent and CaptionedInput
    • New type AudioMediaGroupMemberInputMedia : MediaGroupMemberInputMedia
      • InputMediaAudio now implements AudioMediaGroupMemberInputMedia
    • New type DocumentMediaGroupMemberInputMedia : MediaGroupMemberInputMedia
      • InputMediaDocument now implements DocumentMediaGroupMemberInputMedia
    • New extension AudioFile#toInputMediaAudio
    • AudioContent now implements MediaGroupContent
    • New extension DocumentFile#toInputMediaDocument
    • DocumentContent now implements MediaGroupContent
    • 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
  • API:
    • New extensions for media groups:
      • TelegramBot#sendPlaylist
      • TelegramBot#replyWithPlaylist
      • TelegramBot#sendDocumentsGroup
      • TelegramBot#replyWithDocumentsGroup
      • TelegramBot#sendVisualMediaGroup
      • TelegramBot#replyWithVisualMediaGroup
  • Utils:
    • New extensions for Flows:
      • Flow<SentMediaGroupUpdate>#mediaGroupVisualMessages
      • Flow<SentMediaGroupUpdate>#mediaGroupAudioMessages
      • Flow<SentMediaGroupUpdate>#mediaGroupDocumentMessages
    • New extensions for FlowsUpdatesFilter:
      • FlowsUpdatesFilter#audioMessagesWithMediaGroups
      • FlowsUpdatesFilter#mediaGroupAudioMessages
      • FlowsUpdatesFilter#documentMessagesWithMediaGroups
      • FlowsUpdatesFilter#mediaGroupDocumentMessages
      • FlowsUpdatesFilter#mediaGroupVisualMessages

0.29.2

27 Oct 10:07
Compare
Choose a tag to compare
  • Common:
    • Version updates:
      • Coroutines: 1.3.9 -> 1.4.0
    • Internal broadcast channels were replaced with SharedFlow
  • TelegramBotAPI-extensions-utils:
    • Extension ReceiveChannel#debounceByValue has been deprecated

0.29.1

13 Oct 10:21
37ad279
Compare
Choose a tag to compare
  • Common:
    • Version updates:
      • Serialization: 1.0.0-RC2 -> 1.0.0

0.29.0

04 Oct 14:47
Compare
Choose a tag to compare
  • 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):
      1. 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:*"
      2. Replace packages com.github.insanusmokrassar.TelegramBotAPI in the whole project by dev.inmo.tgbotapi
  • TelegramBotAPI-core:

    • Now in forward info you can get ForwardFromSupergroupInfo
    • BREAKING CHANGE SendVoice factory function has changed its signature: now it have now thumb
      (according to the documentation)
    • AudioFile now can be converted to VoiceFile
    • VoiceFile now can be converted to AudioFile
  • TelegramBotAPI-extensions-api:

    • ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH TelegramBot TYPEALIAS. It should not bring any break changes
    • Internal changes of sendRegularPoll and sendQuizPoll extensions
    • Variable defaultLivePeriodDelayMillis now is public
    • All send extensions for TelegramBot got their reply variations (issue #144)
    • A lot of send extensions for TelegramBot got their variation with Chat instead of ChatIdentifier