diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b77b4837c..393eb8d39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * `WebAppQueryId` now is `value class` * `PreCheckoutQueryId` now is `value class` * `FileUniqueId` has been renamed to `TgFileUniqueId` and now is `value class` + * `UpdateIdentifier` has been renamed to `UpdateId` and now is `value class` ## 10.1.2 diff --git a/tgbotapi.api/api/tgbotapi.api.api b/tgbotapi.api/api/tgbotapi.api.api index 0a3ad8a02b..dc3a7423c6 100644 --- a/tgbotapi.api/api/tgbotapi.api.api +++ b/tgbotapi.api/api/tgbotapi.api.api @@ -139,16 +139,16 @@ public final class dev/inmo/tgbotapi/extensions/api/ForwardMessagesKt { public final class dev/inmo/tgbotapi/extensions/api/GetUpdatesKt { public static final fun getUpdates (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/update/abstracts/Update;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun getUpdates (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun getUpdates$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/update/abstracts/Update;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun getUpdates$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun getUpdates-Z6_7qMY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun getUpdates-Z6_7qMY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; } public final class dev/inmo/tgbotapi/extensions/api/GetUpdatesRawKt { public static final fun getRawUpdates (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/update/abstracts/Update;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun getRawUpdates (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun getRawUpdates$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/update/abstracts/Update;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun getRawUpdates$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun getRawUpdates-Z6_7qMY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun getRawUpdates-Z6_7qMY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; } public final class dev/inmo/tgbotapi/extensions/api/LiveFlowLocationKt { diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdates.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdates.kt index cdba967fb4..2d1f68998f 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdates.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdates.kt @@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.update.abstracts.Update suspend fun TelegramBot.getUpdates( - offset: UpdateIdentifier? = null, + offset: UpdateId? = null, limit: Int = getUpdatesLimit.last, timeout: Seconds? = null, allowed_updates: List? = ALL_UPDATES_LIST diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdatesRaw.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdatesRaw.kt index 040ff36ac5..154c335f67 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdatesRaw.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/GetUpdatesRaw.kt @@ -1,13 +1,12 @@ package dev.inmo.tgbotapi.extensions.api import dev.inmo.tgbotapi.bot.TelegramBot -import dev.inmo.tgbotapi.requests.GetUpdates import dev.inmo.tgbotapi.requests.GetUpdatesRaw import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.update.abstracts.Update suspend fun TelegramBot.getRawUpdates( - offset: UpdateIdentifier? = null, + offset: UpdateId? = null, limit: Int = getUpdatesLimit.last, timeout: Seconds? = null, allowed_updates: List? = ALL_UPDATES_LIST diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt index 69f299add4..56b3448981 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt @@ -5,7 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder import dev.inmo.micro_utils.coroutines.* import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.updateshandlers.* import kotlinx.coroutines.* @@ -72,7 +72,7 @@ class DefaultBehaviourContext( private val additionalUpdatesSharedFlow = MutableSharedFlow(0, broadcastChannelsSize, onBufferOverflow) override val allUpdatesFlow: Flow = (additionalUpdatesSharedFlow.asSharedFlow()).let { if (upstreamUpdatesFlow != null) { - val handledUpdates = mutableSetOf() + val handledUpdates = mutableSetOf() (it + upstreamUpdatesFlow).filter { val passed = handledUpdates.add(it.updateId) (passed).also { passed -> diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index fa53adf233..9a14eb2a01 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -699,19 +699,18 @@ public final class dev/inmo/tgbotapi/requests/ForwardMessagesKt { public final class dev/inmo/tgbotapi/requests/GetUpdates : dev/inmo/tgbotapi/requests/GetUpdatesRequest { public static final field Companion Ldev/inmo/tgbotapi/requests/GetUpdates$Companion; - public fun ()V - public fun (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;)V - public synthetic fun (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/Long; + public synthetic fun (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId; public final fun component2 ()I public final fun component3 ()Ljava/lang/Integer; public final fun component4 ()Ljava/util/List; - public final fun copy (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;)Ldev/inmo/tgbotapi/requests/GetUpdates; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/requests/GetUpdates;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/GetUpdates; + public final fun copy-2y9cPAk (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;)Ldev/inmo/tgbotapi/requests/GetUpdates; + public static synthetic fun copy-2y9cPAk$default (Ldev/inmo/tgbotapi/requests/GetUpdates;Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/GetUpdates; public fun equals (Ljava/lang/Object;)Z public fun getAllowed_updates ()Ljava/util/List; public fun getLimit ()I - public fun getOffset ()Ljava/lang/Long; + public fun getOffset-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId; public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getTimeout ()Ljava/lang/Integer; @@ -737,19 +736,18 @@ public final class dev/inmo/tgbotapi/requests/GetUpdates$Companion { public final class dev/inmo/tgbotapi/requests/GetUpdatesRaw : dev/inmo/tgbotapi/requests/GetUpdatesRequest { public static final field Companion Ldev/inmo/tgbotapi/requests/GetUpdatesRaw$Companion; - public fun ()V - public fun (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;)V - public synthetic fun (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/Long; + public synthetic fun (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId; public final fun component2 ()I public final fun component3 ()Ljava/lang/Integer; public final fun component4 ()Ljava/util/List; - public final fun copy (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;)Ldev/inmo/tgbotapi/requests/GetUpdatesRaw; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/requests/GetUpdatesRaw;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/GetUpdatesRaw; + public final fun copy-2y9cPAk (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;)Ldev/inmo/tgbotapi/requests/GetUpdatesRaw; + public static synthetic fun copy-2y9cPAk$default (Ldev/inmo/tgbotapi/requests/GetUpdatesRaw;Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/GetUpdatesRaw; public fun equals (Ljava/lang/Object;)Z public fun getAllowed_updates ()Ljava/util/List; public fun getLimit ()I - public fun getOffset ()Ljava/lang/Long; + public fun getOffset-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId; public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getTimeout ()Ljava/lang/Integer; @@ -776,7 +774,7 @@ public final class dev/inmo/tgbotapi/requests/GetUpdatesRaw$Companion { public abstract interface class dev/inmo/tgbotapi/requests/GetUpdatesRequest : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { public abstract fun getAllowed_updates ()Ljava/util/List; public abstract fun getLimit ()I - public abstract fun getOffset ()Ljava/lang/Long; + public abstract fun getOffset-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId; public abstract fun getTimeout ()Ljava/lang/Integer; public abstract fun method ()Ljava/lang/String; } @@ -10664,6 +10662,41 @@ public final class dev/inmo/tgbotapi/types/TgFileUniqueId$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/UpdateId : java/lang/Comparable { + public static final field Companion Ldev/inmo/tgbotapi/types/UpdateId$Companion; + public static final synthetic fun box-impl (J)Ldev/inmo/tgbotapi/types/UpdateId; + public synthetic fun compareTo (Ljava/lang/Object;)I + public fun compareTo-SlbwuWs (J)I + public static fun compareTo-SlbwuWs (JJ)I + public static fun constructor-impl (J)J + public fun equals (Ljava/lang/Object;)Z + public static fun equals-impl (JLjava/lang/Object;)Z + public static final fun equals-impl0 (JJ)Z + public final fun getLong ()J + public fun hashCode ()I + public static fun hashCode-impl (J)I + public static final fun minus-ixa4S5U (JJ)J + public static final fun plus-ixa4S5U (JJ)J + public fun toString ()Ljava/lang/String; + public static fun toString-impl (J)Ljava/lang/String; + public final synthetic fun unbox-impl ()J +} + +public final class dev/inmo/tgbotapi/types/UpdateId$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/UpdateId$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun deserialize-ixa4S5U (Lkotlinx/serialization/encoding/Decoder;)J + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun serialize-bcZmaVM (Lkotlinx/serialization/encoding/Encoder;J)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/UpdateId$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/inmo/tgbotapi/types/UpdateTypesKt { public static final field UPDATE_CALLBACK_QUERY Ljava/lang/String; public static final field UPDATE_CHANNEL_POST Ljava/lang/String; @@ -23055,45 +23088,45 @@ public final class dev/inmo/tgbotapi/types/stories/Story$Companion { } public final class dev/inmo/tgbotapi/types/update/CallbackQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery; - public final fun copy (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;)Ldev/inmo/tgbotapi/types/update/CallbackQueryUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/CallbackQueryUpdate;JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/CallbackQueryUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;)Ldev/inmo/tgbotapi/types/update/CallbackQueryUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/CallbackQueryUpdate;JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/CallbackQueryUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/ChannelPostUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate { - public fun (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; - public final fun copy (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/ChannelPostUpdate; public fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChannelPostUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChannelPostUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/ChannelPostUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChannelPostUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChannelPostUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public static final field Companion Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate$Companion; - public fun (JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostRemoved; - public final fun copy (JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;)Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate;JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;)Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate;JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostRemoved; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -23115,15 +23148,15 @@ public final class dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate$Compani public final class dev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public static final field Companion Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate$Companion; - public fun (JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostUpdated; - public final fun copy (JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;)Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate;JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;)Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate;JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostUpdated; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -23144,30 +23177,30 @@ public final class dev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate$Compani } public final class dev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/ChatJoinRequest; - public final fun copy (JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate;JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate;JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatJoinRequest; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public static final field Companion Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate$Companion; - public fun (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated; - public final fun copy (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -23189,15 +23222,15 @@ public final class dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpda public final class dev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public static final field Companion Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate$Companion; - public fun (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated; - public final fun copy (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -23218,159 +23251,159 @@ public final class dev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdat } public final class dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult; - public final fun copy (JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate { - public fun (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; - public final fun copy (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)Ldev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)Ldev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/EditChannelPostUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseEditMessageUpdate { - public fun (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; - public final fun copy (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)Ldev/inmo/tgbotapi/types/update/EditChannelPostUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/EditChannelPostUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/EditChannelPostUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)Ldev/inmo/tgbotapi/types/update/EditChannelPostUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/EditChannelPostUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/EditChannelPostUpdate; public fun equals (Ljava/lang/Object;)Z public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/EditMessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseEditMessageUpdate { - public fun (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; - public final fun copy (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)Ldev/inmo/tgbotapi/types/update/EditMessageUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/EditMessageUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/EditMessageUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)Ldev/inmo/tgbotapi/types/update/EditMessageUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/EditMessageUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/EditMessageUpdate; public fun equals (Ljava/lang/Object;)Z public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/InlineQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery; - public final fun copy (JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;)Ldev/inmo/tgbotapi/types/update/InlineQueryUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/InlineQueryUpdate;JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/InlineQueryUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;)Ldev/inmo/tgbotapi/types/update/InlineQueryUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/InlineQueryUpdate;JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/InlineQueryUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/MessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate { - public fun (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; - public final fun copy (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; public fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; public synthetic fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/MessageUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/MessageUpdate;JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/MessageUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate { - public fun (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; - public final fun copy (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)Ldev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)Ldev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate;JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/PollAnswerUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/polls/PollAnswer;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/polls/PollAnswer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/polls/PollAnswer; - public final fun copy (JLdev/inmo/tgbotapi/types/polls/PollAnswer;)Ldev/inmo/tgbotapi/types/update/PollAnswerUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/PollAnswerUpdate;JLdev/inmo/tgbotapi/types/polls/PollAnswer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/PollAnswerUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/polls/PollAnswer;)Ldev/inmo/tgbotapi/types/update/PollAnswerUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/PollAnswerUpdate;JLdev/inmo/tgbotapi/types/polls/PollAnswer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/PollAnswerUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/polls/PollAnswer; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/PollUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/polls/Poll;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/polls/Poll;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/polls/Poll; - public final fun copy (JLdev/inmo/tgbotapi/types/polls/Poll;)Ldev/inmo/tgbotapi/types/update/PollUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/PollUpdate;JLdev/inmo/tgbotapi/types/polls/Poll;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/PollUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/polls/Poll;)Ldev/inmo/tgbotapi/types/update/PollUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/PollUpdate;JLdev/inmo/tgbotapi/types/polls/Poll;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/PollUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/polls/Poll; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/payments/PreCheckoutQuery; - public final fun copy (JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;)Ldev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate;JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;)Ldev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate;JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/payments/PreCheckoutQuery; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public final class dev/inmo/tgbotapi/types/update/ShippingQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLdev/inmo/tgbotapi/types/payments/ShippingQuery;)V - public final fun component1 ()J + public synthetic fun (JLdev/inmo/tgbotapi/types/payments/ShippingQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Ldev/inmo/tgbotapi/types/payments/ShippingQuery; - public final fun copy (JLdev/inmo/tgbotapi/types/payments/ShippingQuery;)Ldev/inmo/tgbotapi/types/update/ShippingQueryUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/ShippingQueryUpdate;JLdev/inmo/tgbotapi/types/payments/ShippingQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ShippingQueryUpdate; + public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/payments/ShippingQuery;)Ldev/inmo/tgbotapi/types/update/ShippingQueryUpdate; + public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/ShippingQueryUpdate;JLdev/inmo/tgbotapi/types/payments/ShippingQuery;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/ShippingQueryUpdate; public fun equals (Ljava/lang/Object;)Z public fun getData ()Ldev/inmo/tgbotapi/types/payments/ShippingQuery; public synthetic fun getData ()Ljava/lang/Object; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -23392,26 +23425,26 @@ public abstract interface class dev/inmo/tgbotapi/types/update/abstracts/ChatMem } public final class dev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { - public fun (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;)V public synthetic fun (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()J + public synthetic fun (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-4k5XoGU ()J public final fun component2 ()Lkotlinx/serialization/json/JsonElement; public final fun component3 ()Ljava/lang/Throwable; - public final fun copy (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;)Ldev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate;JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate; + public final fun copy-OljFBRw (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;)Ldev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate; + public static synthetic fun copy-OljFBRw$default (Ldev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate;JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate; public fun equals (Ljava/lang/Object;)Z public synthetic fun getData ()Ljava/lang/Object; public fun getData ()Lkotlinx/serialization/json/JsonElement; public final fun getRawJson ()Lkotlinx/serialization/json/JsonElement; public final fun getThrowable ()Ljava/lang/Throwable; - public fun getUpdateId ()J + public fun getUpdateId-4k5XoGU ()J public fun hashCode ()I public fun toString ()Ljava/lang/String; } public abstract interface class dev/inmo/tgbotapi/types/update/abstracts/Update { public abstract fun getData ()Ljava/lang/Object; - public abstract fun getUpdateId ()J + public abstract fun getUpdateId-4k5XoGU ()J } public final class dev/inmo/tgbotapi/types/update/abstracts/UpdateDeserializationStrategy : kotlinx/serialization/DeserializationStrategy { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdates.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdates.kt index c19f91aba2..745853f18c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdates.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdates.kt @@ -21,7 +21,7 @@ private val updatesListSerializer = ListSerializer( */ @Serializable data class GetUpdates( - override val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates + override val offset: UpdateId? = null,// set `last update id + 1` to receive next part of updates override val limit: Int = getUpdatesLimit.last, override val timeout: Seconds? = null, override val allowed_updates: List? = ALL_UPDATES_LIST diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRaw.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRaw.kt index 25789b30b5..8388917c79 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRaw.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRaw.kt @@ -1,9 +1,8 @@ package dev.inmo.tgbotapi.requests -import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST import dev.inmo.tgbotapi.types.Seconds -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.getUpdatesLimit import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.Serializable @@ -16,7 +15,7 @@ import kotlinx.serialization.json.JsonArray */ @Serializable data class GetUpdatesRaw( - override val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates + override val offset: UpdateId? = null,// set `last update id + 1` to receive next part of updates override val limit: Int = getUpdatesLimit.last, override val timeout: Seconds? = null, override val allowed_updates: List? = ALL_UPDATES_LIST diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRequest.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRequest.kt index 4db8c1fafe..2e53f987fb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRequest.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/GetUpdatesRequest.kt @@ -1,14 +1,11 @@ package dev.inmo.tgbotapi.requests -import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest -import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST import dev.inmo.tgbotapi.types.Seconds -import dev.inmo.tgbotapi.types.UpdateIdentifier -import dev.inmo.tgbotapi.types.getUpdatesLimit +import dev.inmo.tgbotapi.types.UpdateId interface GetUpdatesRequest : SimpleRequest { - val offset: UpdateIdentifier? + val offset: UpdateId? val limit: Int val timeout: Seconds? val allowed_updates: List? diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 25652c7477..e2059d1d8d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -11,7 +11,6 @@ import kotlin.jvm.JvmInline typealias Identifier = Long typealias MessageIdentifier = MessageId -typealias UpdateIdentifier = Long typealias ForwardSignature = String typealias ForwardSenderName = String typealias AuthorSignature = ForwardSignature diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UpdateId.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UpdateId.kt new file mode 100644 index 0000000000..1ee62183d4 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UpdateId.kt @@ -0,0 +1,20 @@ +package dev.inmo.tgbotapi.types + +import kotlinx.serialization.Serializable +import kotlin.jvm.JvmInline + +@Serializable +@JvmInline +value class UpdateId( + val long: Long +) : Comparable { + operator fun plus(long: Long) = UpdateId(this.long + long) + operator fun minus(long: Long) = UpdateId(this.long - long) + + override fun compareTo(other: UpdateId): Int { + return long.compareTo(other.long) + } +} + +@Deprecated("Renamed", ReplaceWith("UpdateId", "dev.inmo.tgbotapi.types.UpdateId")) +typealias UpdateIdentifier = UpdateId diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CallbackQueryUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CallbackQueryUpdate.kt index aa4a4b2c55..b8a3e88017 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CallbackQueryUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CallbackQueryUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.Update data class CallbackQueryUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: CallbackQuery ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChannelPostUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChannelPostUpdate.kt index eeb5ad2cb7..8ac9ead5c6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChannelPostUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChannelPostUpdate.kt @@ -1,11 +1,11 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate data class ChannelPostUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: AccessibleMessage ) : BaseSentMessageUpdate { override fun copy(newData: AccessibleMessage): BaseSentMessageUpdate = copy(updateId, newData) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate.kt index 2e13161d9f..d0a051d60f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate.kt @@ -1,14 +1,12 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.boosts.ChatBoostRemoved -import dev.inmo.tgbotapi.types.boosts.ChatBoostUpdated -import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated import dev.inmo.tgbotapi.types.update.abstracts.Update import kotlinx.serialization.Serializable @Serializable data class ChatBoostRemovedUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatBoostRemoved ) : Update \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate.kt index e23e963550..239816daa9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate.kt @@ -1,13 +1,12 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.boosts.ChatBoostUpdated -import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated import dev.inmo.tgbotapi.types.update.abstracts.Update import kotlinx.serialization.Serializable @Serializable data class ChatBoostUpdatedUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatBoostUpdated ) : Update \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate.kt index 2f8f7f2e78..b276b18290 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update import dev.inmo.tgbotapi.types.chat.ChatJoinRequest -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.Update data class ChatJoinRequestUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatJoinRequest ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate.kt index 75303b6a6f..4f5eac4321 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate.kt @@ -1,12 +1,12 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated import dev.inmo.tgbotapi.types.update.abstracts.Update import kotlinx.serialization.Serializable @Serializable data class ChatMessageReactionUpdatedUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatMessageReactionUpdated ) : Update \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate.kt index 62ed8a6e1b..417b2e4449 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate.kt @@ -1,13 +1,12 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier -import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.chat.ChatMessageReactionsCountUpdated import dev.inmo.tgbotapi.types.update.abstracts.Update import kotlinx.serialization.Serializable @Serializable data class ChatMessageReactionsCountUpdatedUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatMessageReactionsCountUpdated ) : Update \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt index 1f10df9add..d219d66113 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.Update data class ChosenInlineResultUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChosenInlineResult ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate.kt index 5ac3ec9e03..74e0dc3fd8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate data class CommonChatMemberUpdatedUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatMemberUpdated ) : ChatMemberUpdatedUpdate diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditChannelPostUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditChannelPostUpdate.kt index 309357f774..b041ae9d79 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditChannelPostUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditChannelPostUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate data class EditChannelPostUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: CommonMessage<*> ) : BaseEditMessageUpdate diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditMessageUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditMessageUpdate.kt index 44a429f1f1..2e35de31ff 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditMessageUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/EditMessageUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate data class EditMessageUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: CommonMessage<*> ) : BaseEditMessageUpdate diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/InlineQueryUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/InlineQueryUpdate.kt index 7d46a186f7..86377e3735 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/InlineQueryUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/InlineQueryUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.Update data class InlineQueryUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: InlineQuery ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MessageUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MessageUpdate.kt index babf6dfc31..497435c8e8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MessageUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MessageUpdate.kt @@ -1,11 +1,11 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate data class MessageUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: AccessibleMessage ) : BaseSentMessageUpdate { override fun copy(newData: AccessibleMessage) = copy(updateId, newData) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate.kt index 6c8779f1b8..57ef80141f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate data class MyChatMemberUpdatedUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ChatMemberUpdated ) : ChatMemberUpdatedUpdate diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollAnswerUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollAnswerUpdate.kt index 0a93bdfaa7..5fd9886225 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollAnswerUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollAnswerUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.polls.PollAnswer import dev.inmo.tgbotapi.types.update.abstracts.Update data class PollAnswerUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: PollAnswer ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollUpdate.kt index 040bb95133..7d04d1c025 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PollUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.polls.Poll import dev.inmo.tgbotapi.types.update.abstracts.Update data class PollUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: Poll ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate.kt index 2edaada180..556e4e67cc 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery import dev.inmo.tgbotapi.types.update.abstracts.Update data class PreCheckoutQueryUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: PreCheckoutQuery ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/RawUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/RawUpdate.kt index 7eec35e1ee..ead3a2b09d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/RawUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/RawUpdate.kt @@ -24,7 +24,7 @@ import kotlinx.serialization.json.jsonObject @Serializable internal data class RawUpdate constructor( @SerialName(updateIdField) - val updateId: UpdateIdentifier, + val updateId: UpdateId, @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) private val edited_message: CommonMessage<*>? = null, @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ShippingQueryUpdate.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ShippingQueryUpdate.kt index 4146449c43..631259049c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ShippingQueryUpdate.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/ShippingQueryUpdate.kt @@ -1,10 +1,10 @@ package dev.inmo.tgbotapi.types.update -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.payments.ShippingQuery import dev.inmo.tgbotapi.types.update.abstracts.Update data class ShippingQueryUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: ShippingQuery ) : Update diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/abstracts/Update.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/abstracts/Update.kt index 168eb57ebd..86b8d99b28 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/abstracts/Update.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/update/abstracts/Update.kt @@ -1,7 +1,7 @@ package dev.inmo.tgbotapi.types.update.abstracts import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.RawUpdate import dev.inmo.tgbotapi.types.updateIdField import dev.inmo.tgbotapi.utils.RiskFeature @@ -17,12 +17,12 @@ import kotlinx.serialization.json.longOrNull @ClassCastsIncluded interface Update { - val updateId: UpdateIdentifier + val updateId: UpdateId val data: Any } data class UnknownUpdate( - override val updateId: UpdateIdentifier, + override val updateId: UpdateId, override val data: JsonElement, val throwable: Throwable? = null ) : Update { @@ -60,7 +60,7 @@ object UpdateDeserializationStrategy : DeserializationStrategy { ) }.getOrElse { UnknownUpdate( - (asJson as? JsonObject) ?.get(updateIdField) ?.jsonPrimitive ?.longOrNull ?: -1L, + UpdateId((asJson as? JsonObject) ?.get(updateIdField) ?.jsonPrimitive ?.longOrNull ?: -1L), asJson, it ) diff --git a/tgbotapi.utils/api/tgbotapi.utils.api b/tgbotapi.utils/api/tgbotapi.utils.api index e856f05cdf..a95f43693f 100644 --- a/tgbotapi.utils/api/tgbotapi.utils.api +++ b/tgbotapi.utils/api/tgbotapi.utils.api @@ -3255,7 +3255,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/updates/UpdatesChatFilters public final class dev/inmo/tgbotapi/extensions/utils/updates/UpdatesUtilsKt { public static final fun convertWithMediaGroupUpdates (Ljava/util/List;)Ljava/util/List; - public static final fun lastUpdateIdentifier (Ljava/util/List;)Ljava/lang/Long; + public static final fun lastUpdateIdentifier (Ljava/util/List;)Ldev/inmo/tgbotapi/types/UpdateId; } public final class dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPollingKt { diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/internal_utils/UpdatesFiltering.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/internal_utils/UpdatesFiltering.kt index 3d97313af5..fc6e156a60 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/internal_utils/UpdatesFiltering.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/internal_utils/UpdatesFiltering.kt @@ -1,11 +1,11 @@ package dev.inmo.tgbotapi.extensions.utils.internal_utils -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.abstracts.Update import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.mapNotNull -internal inline fun Flow.onlySpecifiedTypeOfDataWithUpdates(): Flow> { +internal inline fun Flow.onlySpecifiedTypeOfDataWithUpdates(): Flow> { return mapNotNull { it.updateId to (it.data as? T ?: return@mapNotNull null) } diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/ChosenInlineResultUpdatesConversations.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/ChosenInlineResultUpdatesConversations.kt index 63fe4f4283..c218472f36 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/ChosenInlineResultUpdatesConversations.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/ChosenInlineResultUpdatesConversations.kt @@ -4,16 +4,16 @@ import dev.inmo.tgbotapi.extensions.utils.internal_utils.onlySpecifiedTypeOfData import dev.inmo.tgbotapi.extensions.utils.internal_utils.onlySpecifiedTypeOfDataWithUpdates import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.ChosenInlineResultUpdate import dev.inmo.tgbotapi.types.update.InlineQueryUpdate import kotlinx.coroutines.flow.Flow /** - * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateIdentifier]. It could be useful in + * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateId]. It could be useful in * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [BaseChosenInlineResult]. */ -fun Flow.onlyBaseChosenInlineResultsWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() +fun Flow.onlyBaseChosenInlineResultsWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() /** * @return Filter updates only with [BaseChosenInlineResult] and map it to a [Flow] with values [BaseChosenInlineResult] @@ -23,10 +23,10 @@ fun Flow.onlyBaseChosenInlineResultsWithUpdates(): Flo fun Flow.onlyBaseChosenInlineResults(): Flow = onlySpecifiedTypeOfData() /** - * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateIdentifier]. It could be useful in + * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateId]. It could be useful in * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [LocationChosenInlineResult]. */ -fun Flow.onlyLocationChosenInlineResultsWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() +fun Flow.onlyLocationChosenInlineResultsWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() /** * @return Filter updates only with [LocationChosenInlineResult] and map it to a [Flow] with values [LocationChosenInlineResult] diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/InlineQueryUpdatesConversations.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/InlineQueryUpdatesConversations.kt index ab324e7771..8c41796a2d 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/InlineQueryUpdatesConversations.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/InlineQueryUpdatesConversations.kt @@ -4,15 +4,15 @@ import dev.inmo.tgbotapi.extensions.utils.internal_utils.onlySpecifiedTypeOfData import dev.inmo.tgbotapi.extensions.utils.internal_utils.onlySpecifiedTypeOfDataWithUpdates import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.update.InlineQueryUpdate import kotlinx.coroutines.flow.Flow /** - * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateIdentifier]. It could be useful in + * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateId]. It could be useful in * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [BaseInlineQuery]. */ -fun Flow.onlyBaseInlineQueriesWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() +fun Flow.onlyBaseInlineQueriesWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() /** * @return Filter updates only with [BaseInlineQuery] and map it to a [Flow] with values [BaseInlineQuery] @@ -22,10 +22,10 @@ fun Flow.onlyBaseInlineQueriesWithUpdates(): Flow.onlyBaseInlineQueries(): Flow = onlySpecifiedTypeOfData() /** - * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateIdentifier]. It could be useful in + * @return Mapped [Flow] with [Pair]s. [Pair.first] in this pair will be [UpdateId]. It could be useful in * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [LocationInlineQuery]. */ -fun Flow.onlyLocationInlineQueriesWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() +fun Flow.onlyLocationInlineQueriesWithUpdates(): Flow> = onlySpecifiedTypeOfDataWithUpdates() /** * @return Filter updates only with [LocationInlineQuery] and map it to a [Flow] with values [LocationInlineQuery] diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/UpdatesUtils.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/UpdatesUtils.kt index c59809eebb..5588d99587 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/UpdatesUtils.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/UpdatesUtils.kt @@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.utils.updates import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.types.MediaGroupIdentifier -import dev.inmo.tgbotapi.types.UpdateIdentifier +import dev.inmo.tgbotapi.types.UpdateId import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent import dev.inmo.tgbotapi.types.update.* @@ -11,12 +11,12 @@ import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.extensions.asMediaGroupMessage /** - * @return The biggest [UpdateIdentifier] OR null + * @return The biggest [UpdateId] OR null * * @see [Update.lastUpdateIdentifier] */ -fun List.lastUpdateIdentifier(): UpdateIdentifier? { - return maxByOrNull { it.updateId } ?.updateId ?.takeIf { it > -1 } +fun List.lastUpdateIdentifier(): UpdateId? { + return maxByOrNull { it.updateId } ?.updateId ?.takeIf { it.long > -1 } } /** diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt index 9c56622c85..e39765987c 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPolling.kt @@ -6,7 +6,6 @@ import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.exceptions.* import dev.inmo.tgbotapi.extensions.utils.updates.convertWithMediaGroupUpdates import dev.inmo.tgbotapi.requests.GetUpdates -import dev.inmo.tgbotapi.requests.GetUpdatesRaw import dev.inmo.tgbotapi.requests.webhook.DeleteWebhook import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage @@ -52,7 +51,7 @@ fun TelegramBot.longPollingFlow( } } - var lastUpdateIdentifier: UpdateIdentifier? = null + var lastUpdateIdentifier: UpdateId? = null val updatesHandler: (suspend (List) -> Unit) = if (mediaGroupsDebounceTimeMillis != null) { val scope = CoroutineScope(contextToWork) @@ -92,7 +91,7 @@ fun TelegramBot.longPollingFlow( for (update in updates) { send(update) - if (update.updateId > -1) { + if (update.updateId.long > -1) { lastUpdateIdentifier = update.updateId } }