UpdateId is value class now

This commit is contained in:
InsanusMokrassar 2024-03-16 20:32:18 +06:00
parent bb62f9fbd6
commit ceff85fcfd
37 changed files with 238 additions and 195 deletions

View File

@ -13,6 +13,7 @@
* `WebAppQueryId` now is `value class` * `WebAppQueryId` now is `value class`
* `PreCheckoutQueryId` now is `value class` * `PreCheckoutQueryId` now is `value class`
* `FileUniqueId` has been renamed to `TgFileUniqueId` and 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 ## 10.1.2

View File

@ -139,16 +139,16 @@ public final class dev/inmo/tgbotapi/extensions/api/ForwardMessagesKt {
public final class dev/inmo/tgbotapi/extensions/api/GetUpdatesKt { 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;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;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 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;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;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 { public final class dev/inmo/tgbotapi/extensions/api/LiveFlowLocationKt {

View File

@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
suspend fun TelegramBot.getUpdates( suspend fun TelegramBot.getUpdates(
offset: UpdateIdentifier? = null, offset: UpdateId? = null,
limit: Int = getUpdatesLimit.last, limit: Int = getUpdatesLimit.last,
timeout: Seconds? = null, timeout: Seconds? = null,
allowed_updates: List<String>? = ALL_UPDATES_LIST allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,13 +1,12 @@
package dev.inmo.tgbotapi.extensions.api package dev.inmo.tgbotapi.extensions.api
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.GetUpdates
import dev.inmo.tgbotapi.requests.GetUpdatesRaw import dev.inmo.tgbotapi.requests.GetUpdatesRaw
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
suspend fun TelegramBot.getRawUpdates( suspend fun TelegramBot.getRawUpdates(
offset: UpdateIdentifier? = null, offset: UpdateId? = null,
limit: Int = getUpdatesLimit.last, limit: Int = getUpdatesLimit.last,
timeout: Seconds? = null, timeout: Seconds? = null,
allowed_updates: List<String>? = ALL_UPDATES_LIST allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -5,7 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder
import dev.inmo.micro_utils.coroutines.* import dev.inmo.micro_utils.coroutines.*
import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder 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.types.update.abstracts.Update
import dev.inmo.tgbotapi.updateshandlers.* import dev.inmo.tgbotapi.updateshandlers.*
import kotlinx.coroutines.* import kotlinx.coroutines.*
@ -72,7 +72,7 @@ class DefaultBehaviourContext(
private val additionalUpdatesSharedFlow = MutableSharedFlow<Update>(0, broadcastChannelsSize, onBufferOverflow) private val additionalUpdatesSharedFlow = MutableSharedFlow<Update>(0, broadcastChannelsSize, onBufferOverflow)
override val allUpdatesFlow: Flow<Update> = (additionalUpdatesSharedFlow.asSharedFlow()).let { override val allUpdatesFlow: Flow<Update> = (additionalUpdatesSharedFlow.asSharedFlow()).let {
if (upstreamUpdatesFlow != null) { if (upstreamUpdatesFlow != null) {
val handledUpdates = mutableSetOf<UpdateIdentifier>() val handledUpdates = mutableSetOf<UpdateId>()
(it + upstreamUpdatesFlow).filter { (it + upstreamUpdatesFlow).filter {
val passed = handledUpdates.add(it.updateId) val passed = handledUpdates.add(it.updateId)
(passed).also { passed -> (passed).also { passed ->

View File

@ -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 final class dev/inmo/tgbotapi/requests/GetUpdates : dev/inmo/tgbotapi/requests/GetUpdatesRequest {
public static final field Companion Ldev/inmo/tgbotapi/requests/GetUpdates$Companion; public static final field Companion Ldev/inmo/tgbotapi/requests/GetUpdates$Companion;
public fun <init> ()V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId;
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()I public final fun component2 ()I
public final fun component3 ()Ljava/lang/Integer; public final fun component3 ()Ljava/lang/Integer;
public final fun component4 ()Ljava/util/List; 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 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$default (Ldev/inmo/tgbotapi/requests/GetUpdates;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)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 equals (Ljava/lang/Object;)Z
public fun getAllowed_updates ()Ljava/util/List; public fun getAllowed_updates ()Ljava/util/List;
public fun getLimit ()I 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 getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
public fun getTimeout ()Ljava/lang/Integer; 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 final class dev/inmo/tgbotapi/requests/GetUpdatesRaw : dev/inmo/tgbotapi/requests/GetUpdatesRequest {
public static final field Companion Ldev/inmo/tgbotapi/requests/GetUpdatesRaw$Companion; public static final field Companion Ldev/inmo/tgbotapi/requests/GetUpdatesRaw$Companion;
public fun <init> ()V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;)V public synthetic fun <init> (Ldev/inmo/tgbotapi/types/UpdateId;ILjava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-FG9WeOs ()Ldev/inmo/tgbotapi/types/UpdateId;
public final fun component1 ()Ljava/lang/Long;
public final fun component2 ()I public final fun component2 ()I
public final fun component3 ()Ljava/lang/Integer; public final fun component3 ()Ljava/lang/Integer;
public final fun component4 ()Ljava/util/List; 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 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$default (Ldev/inmo/tgbotapi/requests/GetUpdatesRaw;Ljava/lang/Long;ILjava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)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 equals (Ljava/lang/Object;)Z
public fun getAllowed_updates ()Ljava/util/List; public fun getAllowed_updates ()Ljava/util/List;
public fun getLimit ()I 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 getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
public fun getTimeout ()Ljava/lang/Integer; 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 interface class dev/inmo/tgbotapi/requests/GetUpdatesRequest : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
public abstract fun getAllowed_updates ()Ljava/util/List; public abstract fun getAllowed_updates ()Ljava/util/List;
public abstract fun getLimit ()I 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 getTimeout ()Ljava/lang/Integer;
public abstract fun method ()Ljava/lang/String; 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 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 final class dev/inmo/tgbotapi/types/UpdateTypesKt {
public static final field UPDATE_CALLBACK_QUERY Ljava/lang/String; public static final field UPDATE_CALLBACK_QUERY Ljava/lang/String;
public static final field UPDATE_CHANNEL_POST 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 final class dev/inmo/tgbotapi/types/update/CallbackQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery; public fun getData ()Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/ChannelPostUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate { public final class dev/inmo/tgbotapi/types/update/ChannelPostUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate {
public fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; 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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { 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 static final field Companion Ldev/inmo/tgbotapi/types/update/ChatBoostRemovedUpdate$Companion;
public fun <init> (JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostRemoved; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostRemoved; public fun getData ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostRemoved;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; 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 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 static final field Companion Ldev/inmo/tgbotapi/types/update/ChatBoostUpdatedUpdate$Companion;
public fun <init> (JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostUpdated; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostUpdated; public fun getData ()Ldev/inmo/tgbotapi/types/boosts/ChatBoostUpdated;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; 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 final class dev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/ChatJoinRequest;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/ChatJoinRequest; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatJoinRequest; public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatJoinRequest;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { 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 static final field Companion Ldev/inmo/tgbotapi/types/update/ChatMessageReactionUpdatedUpdate$Companion;
public fun <init> (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated; public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; 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 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 static final field Companion Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate$Companion;
public fun <init> (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated; public fun getData ()Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionsCountUpdated;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; 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 final class dev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult; public fun getData ()Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate { public final class dev/inmo/tgbotapi/types/update/CommonChatMemberUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate {
public fun <init> (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; public fun getData ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/EditChannelPostUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseEditMessageUpdate { public final class dev/inmo/tgbotapi/types/update/EditChannelPostUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseEditMessageUpdate {
public fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; 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 final fun copy-VElHuNg (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 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 fun equals (Ljava/lang/Object;)Z
public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/EditMessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseEditMessageUpdate { public final class dev/inmo/tgbotapi/types/update/EditMessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseEditMessageUpdate {
public fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; 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 final fun copy-VElHuNg (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 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 fun equals (Ljava/lang/Object;)Z
public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public synthetic fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage; public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/InlineQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public final class dev/inmo/tgbotapi/types/update/InlineQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery; public fun getData ()Ldev/inmo/tgbotapi/types/InlineQueries/query/InlineQuery;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/MessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate { public final class dev/inmo/tgbotapi/types/update/MessageUpdate : dev/inmo/tgbotapi/types/update/abstracts/BaseSentMessageUpdate {
public fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; 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 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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public fun getData ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate { public final class dev/inmo/tgbotapi/types/update/MyChatMemberUpdatedUpdate : dev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate {
public fun <init> (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated; public fun getData ()Ldev/inmo/tgbotapi/types/chat/member/ChatMemberUpdated;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/PollAnswerUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public final class dev/inmo/tgbotapi/types/update/PollAnswerUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/polls/PollAnswer;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/polls/PollAnswer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/polls/PollAnswer; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/polls/PollAnswer; public fun getData ()Ldev/inmo/tgbotapi/types/polls/PollAnswer;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/PollUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public final class dev/inmo/tgbotapi/types/update/PollUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/polls/Poll;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/polls/Poll;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/polls/Poll; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/polls/Poll; public fun getData ()Ldev/inmo/tgbotapi/types/polls/Poll;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public final class dev/inmo/tgbotapi/types/update/PreCheckoutQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/payments/PreCheckoutQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/payments/PreCheckoutQuery; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/payments/PreCheckoutQuery; public fun getData ()Ldev/inmo/tgbotapi/types/payments/PreCheckoutQuery;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/update/ShippingQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update { public final class dev/inmo/tgbotapi/types/update/ShippingQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLdev/inmo/tgbotapi/types/payments/ShippingQuery;)V public synthetic fun <init> (JLdev/inmo/tgbotapi/types/payments/ShippingQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public final fun component1-4k5XoGU ()J
public final fun component2 ()Ldev/inmo/tgbotapi/types/payments/ShippingQuery; 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 final fun copy-VElHuNg (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 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 equals (Ljava/lang/Object;)Z
public fun getData ()Ldev/inmo/tgbotapi/types/payments/ShippingQuery; public fun getData ()Ldev/inmo/tgbotapi/types/payments/ShippingQuery;
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; 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 final class dev/inmo/tgbotapi/types/update/abstracts/UnknownUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
public fun <init> (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;)V
public synthetic fun <init> (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (JLkotlinx/serialization/json/JsonElement;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()J public synthetic fun <init> (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 component2 ()Lkotlinx/serialization/json/JsonElement;
public final fun component3 ()Ljava/lang/Throwable; 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 final fun copy-OljFBRw (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 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 fun equals (Ljava/lang/Object;)Z
public synthetic fun getData ()Ljava/lang/Object; public synthetic fun getData ()Ljava/lang/Object;
public fun getData ()Lkotlinx/serialization/json/JsonElement; public fun getData ()Lkotlinx/serialization/json/JsonElement;
public final fun getRawJson ()Lkotlinx/serialization/json/JsonElement; public final fun getRawJson ()Lkotlinx/serialization/json/JsonElement;
public final fun getThrowable ()Ljava/lang/Throwable; public final fun getThrowable ()Ljava/lang/Throwable;
public fun getUpdateId ()J public fun getUpdateId-4k5XoGU ()J
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public abstract interface class dev/inmo/tgbotapi/types/update/abstracts/Update { public abstract interface class dev/inmo/tgbotapi/types/update/abstracts/Update {
public abstract fun getData ()Ljava/lang/Object; 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 { public final class dev/inmo/tgbotapi/types/update/abstracts/UpdateDeserializationStrategy : kotlinx/serialization/DeserializationStrategy {

View File

@ -21,7 +21,7 @@ private val updatesListSerializer = ListSerializer(
*/ */
@Serializable @Serializable
data class GetUpdates( 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 limit: Int = getUpdatesLimit.last,
override val timeout: Seconds? = null, override val timeout: Seconds? = null,
override val allowed_updates: List<String>? = ALL_UPDATES_LIST override val allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,9 +1,8 @@
package dev.inmo.tgbotapi.requests 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.ALL_UPDATES_LIST
import dev.inmo.tgbotapi.types.Seconds 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 dev.inmo.tgbotapi.types.getUpdatesLimit
import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@ -16,7 +15,7 @@ import kotlinx.serialization.json.JsonArray
*/ */
@Serializable @Serializable
data class GetUpdatesRaw( 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 limit: Int = getUpdatesLimit.last,
override val timeout: Seconds? = null, override val timeout: Seconds? = null,
override val allowed_updates: List<String>? = ALL_UPDATES_LIST override val allowed_updates: List<String>? = ALL_UPDATES_LIST

View File

@ -1,14 +1,11 @@
package dev.inmo.tgbotapi.requests package dev.inmo.tgbotapi.requests
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest 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.Seconds
import dev.inmo.tgbotapi.types.UpdateIdentifier import dev.inmo.tgbotapi.types.UpdateId
import dev.inmo.tgbotapi.types.getUpdatesLimit
interface GetUpdatesRequest<T : Any> : SimpleRequest<T> { interface GetUpdatesRequest<T : Any> : SimpleRequest<T> {
val offset: UpdateIdentifier? val offset: UpdateId?
val limit: Int val limit: Int
val timeout: Seconds? val timeout: Seconds?
val allowed_updates: List<String>? val allowed_updates: List<String>?

View File

@ -11,7 +11,6 @@ import kotlin.jvm.JvmInline
typealias Identifier = Long typealias Identifier = Long
typealias MessageIdentifier = MessageId typealias MessageIdentifier = MessageId
typealias UpdateIdentifier = Long
typealias ForwardSignature = String typealias ForwardSignature = String
typealias ForwardSenderName = String typealias ForwardSenderName = String
typealias AuthorSignature = ForwardSignature typealias AuthorSignature = ForwardSignature

View File

@ -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<UpdateId> {
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

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update package dev.inmo.tgbotapi.types.update
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery 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 import dev.inmo.tgbotapi.types.update.abstracts.Update
data class CallbackQueryUpdate( data class CallbackQueryUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: CallbackQuery override val data: CallbackQuery
) : Update ) : Update

View File

@ -1,11 +1,11 @@
package dev.inmo.tgbotapi.types.update 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.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
data class ChannelPostUpdate( data class ChannelPostUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: AccessibleMessage override val data: AccessibleMessage
) : BaseSentMessageUpdate { ) : BaseSentMessageUpdate {
override fun copy(newData: AccessibleMessage): BaseSentMessageUpdate = copy(updateId, newData) override fun copy(newData: AccessibleMessage): BaseSentMessageUpdate = copy(updateId, newData)

View File

@ -1,14 +1,12 @@
package dev.inmo.tgbotapi.types.update 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.ChatBoostRemoved
import dev.inmo.tgbotapi.types.boosts.ChatBoostUpdated
import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
data class ChatBoostRemovedUpdate( data class ChatBoostRemovedUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatBoostRemoved override val data: ChatBoostRemoved
) : Update ) : Update

View File

@ -1,13 +1,12 @@
package dev.inmo.tgbotapi.types.update 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.boosts.ChatBoostUpdated
import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
data class ChatBoostUpdatedUpdate( data class ChatBoostUpdatedUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatBoostUpdated override val data: ChatBoostUpdated
) : Update ) : Update

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update package dev.inmo.tgbotapi.types.update
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest 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 import dev.inmo.tgbotapi.types.update.abstracts.Update
data class ChatJoinRequestUpdate( data class ChatJoinRequestUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatJoinRequest override val data: ChatJoinRequest
) : Update ) : Update

View File

@ -1,12 +1,12 @@
package dev.inmo.tgbotapi.types.update 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.chat.ChatMessageReactionUpdated
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
data class ChatMessageReactionUpdatedUpdate( data class ChatMessageReactionUpdatedUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatMessageReactionUpdated override val data: ChatMessageReactionUpdated
) : Update ) : Update

View File

@ -1,13 +1,12 @@
package dev.inmo.tgbotapi.types.update 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.chat.ChatMessageReactionsCountUpdated import dev.inmo.tgbotapi.types.chat.ChatMessageReactionsCountUpdated
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
data class ChatMessageReactionsCountUpdatedUpdate( data class ChatMessageReactionsCountUpdatedUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatMessageReactionsCountUpdated override val data: ChatMessageReactionsCountUpdated
) : Update ) : Update

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update package dev.inmo.tgbotapi.types.update
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult 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 import dev.inmo.tgbotapi.types.update.abstracts.Update
data class ChosenInlineResultUpdate( data class ChosenInlineResultUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChosenInlineResult override val data: ChosenInlineResult
) : Update ) : Update

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update package dev.inmo.tgbotapi.types.update
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated 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 import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
data class CommonChatMemberUpdatedUpdate( data class CommonChatMemberUpdatedUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatMemberUpdated override val data: ChatMemberUpdated
) : ChatMemberUpdatedUpdate ) : ChatMemberUpdatedUpdate

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update 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.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
data class EditChannelPostUpdate( data class EditChannelPostUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: CommonMessage<*> override val data: CommonMessage<*>
) : BaseEditMessageUpdate ) : BaseEditMessageUpdate

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update 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.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
data class EditMessageUpdate( data class EditMessageUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: CommonMessage<*> override val data: CommonMessage<*>
) : BaseEditMessageUpdate ) : BaseEditMessageUpdate

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update package dev.inmo.tgbotapi.types.update
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery 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 import dev.inmo.tgbotapi.types.update.abstracts.Update
data class InlineQueryUpdate( data class InlineQueryUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: InlineQuery override val data: InlineQuery
) : Update ) : Update

View File

@ -1,11 +1,11 @@
package dev.inmo.tgbotapi.types.update 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.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
data class MessageUpdate( data class MessageUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: AccessibleMessage override val data: AccessibleMessage
) : BaseSentMessageUpdate { ) : BaseSentMessageUpdate {
override fun copy(newData: AccessibleMessage) = copy(updateId, newData) override fun copy(newData: AccessibleMessage) = copy(updateId, newData)

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update package dev.inmo.tgbotapi.types.update
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated 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 import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
data class MyChatMemberUpdatedUpdate( data class MyChatMemberUpdatedUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ChatMemberUpdated override val data: ChatMemberUpdated
) : ChatMemberUpdatedUpdate ) : ChatMemberUpdatedUpdate

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update 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.polls.PollAnswer
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
data class PollAnswerUpdate( data class PollAnswerUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: PollAnswer override val data: PollAnswer
) : Update ) : Update

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update 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.polls.Poll
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
data class PollUpdate( data class PollUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: Poll override val data: Poll
) : Update ) : Update

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update 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.payments.PreCheckoutQuery
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
data class PreCheckoutQueryUpdate( data class PreCheckoutQueryUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: PreCheckoutQuery override val data: PreCheckoutQuery
) : Update ) : Update

View File

@ -24,7 +24,7 @@ import kotlinx.serialization.json.jsonObject
@Serializable @Serializable
internal data class RawUpdate constructor( internal data class RawUpdate constructor(
@SerialName(updateIdField) @SerialName(updateIdField)
val updateId: UpdateIdentifier, val updateId: UpdateId,
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
private val edited_message: CommonMessage<*>? = null, private val edited_message: CommonMessage<*>? = null,
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)

View File

@ -1,10 +1,10 @@
package dev.inmo.tgbotapi.types.update 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.payments.ShippingQuery
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
data class ShippingQueryUpdate( data class ShippingQueryUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: ShippingQuery override val data: ShippingQuery
) : Update ) : Update

View File

@ -1,7 +1,7 @@
package dev.inmo.tgbotapi.types.update.abstracts package dev.inmo.tgbotapi.types.update.abstracts
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded 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.update.RawUpdate
import dev.inmo.tgbotapi.types.updateIdField import dev.inmo.tgbotapi.types.updateIdField
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
@ -17,12 +17,12 @@ import kotlinx.serialization.json.longOrNull
@ClassCastsIncluded @ClassCastsIncluded
interface Update { interface Update {
val updateId: UpdateIdentifier val updateId: UpdateId
val data: Any val data: Any
} }
data class UnknownUpdate( data class UnknownUpdate(
override val updateId: UpdateIdentifier, override val updateId: UpdateId,
override val data: JsonElement, override val data: JsonElement,
val throwable: Throwable? = null val throwable: Throwable? = null
) : Update { ) : Update {
@ -60,7 +60,7 @@ object UpdateDeserializationStrategy : DeserializationStrategy<Update> {
) )
}.getOrElse { }.getOrElse {
UnknownUpdate( UnknownUpdate(
(asJson as? JsonObject) ?.get(updateIdField) ?.jsonPrimitive ?.longOrNull ?: -1L, UpdateId((asJson as? JsonObject) ?.get(updateIdField) ?.jsonPrimitive ?.longOrNull ?: -1L),
asJson, asJson,
it it
) )

View File

@ -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 final class dev/inmo/tgbotapi/extensions/utils/updates/UpdatesUtilsKt {
public static final fun convertWithMediaGroupUpdates (Ljava/util/List;)Ljava/util/List; 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 { public final class dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPollingKt {

View File

@ -1,11 +1,11 @@
package dev.inmo.tgbotapi.extensions.utils.internal_utils 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 dev.inmo.tgbotapi.types.update.abstracts.Update
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.mapNotNull import kotlinx.coroutines.flow.mapNotNull
internal inline fun <reified T : Any, UT : Update> Flow<UT>.onlySpecifiedTypeOfDataWithUpdates(): Flow<Pair<UpdateIdentifier, T>> { internal inline fun <reified T : Any, UT : Update> Flow<UT>.onlySpecifiedTypeOfDataWithUpdates(): Flow<Pair<UpdateId, T>> {
return mapNotNull { return mapNotNull {
it.updateId to (it.data as? T ?: return@mapNotNull null) it.updateId to (it.data as? T ?: return@mapNotNull null)
} }

View File

@ -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.extensions.utils.internal_utils.onlySpecifiedTypeOfDataWithUpdates
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult 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.ChosenInlineResultUpdate
import dev.inmo.tgbotapi.types.update.InlineQueryUpdate import dev.inmo.tgbotapi.types.update.InlineQueryUpdate
import kotlinx.coroutines.flow.Flow 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]. * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [BaseChosenInlineResult].
*/ */
fun Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResultsWithUpdates(): Flow<Pair<UpdateIdentifier, BaseChosenInlineResult>> = onlySpecifiedTypeOfDataWithUpdates() fun Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResultsWithUpdates(): Flow<Pair<UpdateId, BaseChosenInlineResult>> = onlySpecifiedTypeOfDataWithUpdates()
/** /**
* @return Filter updates only with [BaseChosenInlineResult] and map it to a [Flow] with values [BaseChosenInlineResult] * @return Filter updates only with [BaseChosenInlineResult] and map it to a [Flow] with values [BaseChosenInlineResult]
@ -23,10 +23,10 @@ fun Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResultsWithUpdates(): Flo
fun Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResults(): Flow<BaseChosenInlineResult> = onlySpecifiedTypeOfData() fun Flow<ChosenInlineResultUpdate>.onlyBaseChosenInlineResults(): Flow<BaseChosenInlineResult> = 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]. * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [LocationChosenInlineResult].
*/ */
fun Flow<ChosenInlineResultUpdate>.onlyLocationChosenInlineResultsWithUpdates(): Flow<Pair<UpdateIdentifier, LocationChosenInlineResult>> = onlySpecifiedTypeOfDataWithUpdates() fun Flow<ChosenInlineResultUpdate>.onlyLocationChosenInlineResultsWithUpdates(): Flow<Pair<UpdateId, LocationChosenInlineResult>> = onlySpecifiedTypeOfDataWithUpdates()
/** /**
* @return Filter updates only with [LocationChosenInlineResult] and map it to a [Flow] with values [LocationChosenInlineResult] * @return Filter updates only with [LocationChosenInlineResult] and map it to a [Flow] with values [LocationChosenInlineResult]

View File

@ -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.extensions.utils.internal_utils.onlySpecifiedTypeOfDataWithUpdates
import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery
import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery 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 dev.inmo.tgbotapi.types.update.InlineQueryUpdate
import kotlinx.coroutines.flow.Flow 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]. * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [BaseInlineQuery].
*/ */
fun Flow<InlineQueryUpdate>.onlyBaseInlineQueriesWithUpdates(): Flow<Pair<UpdateIdentifier, BaseInlineQuery>> = onlySpecifiedTypeOfDataWithUpdates() fun Flow<InlineQueryUpdate>.onlyBaseInlineQueriesWithUpdates(): Flow<Pair<UpdateId, BaseInlineQuery>> = onlySpecifiedTypeOfDataWithUpdates()
/** /**
* @return Filter updates only with [BaseInlineQuery] and map it to a [Flow] with values [BaseInlineQuery] * @return Filter updates only with [BaseInlineQuery] and map it to a [Flow] with values [BaseInlineQuery]
@ -22,10 +22,10 @@ fun Flow<InlineQueryUpdate>.onlyBaseInlineQueriesWithUpdates(): Flow<Pair<Update
fun Flow<InlineQueryUpdate>.onlyBaseInlineQueries(): Flow<BaseInlineQuery> = onlySpecifiedTypeOfData() fun Flow<InlineQueryUpdate>.onlyBaseInlineQueries(): Flow<BaseInlineQuery> = 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]. * cases you are using [InlineQueryUpdate.updateId] for some reasons. [Pair.second] will always be [LocationInlineQuery].
*/ */
fun Flow<InlineQueryUpdate>.onlyLocationInlineQueriesWithUpdates(): Flow<Pair<UpdateIdentifier, LocationInlineQuery>> = onlySpecifiedTypeOfDataWithUpdates() fun Flow<InlineQueryUpdate>.onlyLocationInlineQueriesWithUpdates(): Flow<Pair<UpdateId, LocationInlineQuery>> = onlySpecifiedTypeOfDataWithUpdates()
/** /**
* @return Filter updates only with [LocationInlineQuery] and map it to a [Flow] with values [LocationInlineQuery] * @return Filter updates only with [LocationInlineQuery] and map it to a [Flow] with values [LocationInlineQuery]

View File

@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.utils.updates
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.types.MediaGroupIdentifier 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.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent
import dev.inmo.tgbotapi.types.update.* import dev.inmo.tgbotapi.types.update.*
@ -11,12 +11,12 @@ import dev.inmo.tgbotapi.utils.RiskFeature
import dev.inmo.tgbotapi.utils.extensions.asMediaGroupMessage import dev.inmo.tgbotapi.utils.extensions.asMediaGroupMessage
/** /**
* @return The biggest [UpdateIdentifier] OR null * @return The biggest [UpdateId] OR null
* *
* @see [Update.lastUpdateIdentifier] * @see [Update.lastUpdateIdentifier]
*/ */
fun List<Update>.lastUpdateIdentifier(): UpdateIdentifier? { fun List<Update>.lastUpdateIdentifier(): UpdateId? {
return maxByOrNull { it.updateId } ?.updateId ?.takeIf { it > -1 } return maxByOrNull { it.updateId } ?.updateId ?.takeIf { it.long > -1 }
} }
/** /**

View File

@ -6,7 +6,6 @@ import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.bot.exceptions.* import dev.inmo.tgbotapi.bot.exceptions.*
import dev.inmo.tgbotapi.extensions.utils.updates.convertWithMediaGroupUpdates import dev.inmo.tgbotapi.extensions.utils.updates.convertWithMediaGroupUpdates
import dev.inmo.tgbotapi.requests.GetUpdates import dev.inmo.tgbotapi.requests.GetUpdates
import dev.inmo.tgbotapi.requests.GetUpdatesRaw
import dev.inmo.tgbotapi.requests.webhook.DeleteWebhook import dev.inmo.tgbotapi.requests.webhook.DeleteWebhook
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage 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<Update>) -> Unit) = if (mediaGroupsDebounceTimeMillis != null) { val updatesHandler: (suspend (List<Update>) -> Unit) = if (mediaGroupsDebounceTimeMillis != null) {
val scope = CoroutineScope(contextToWork) val scope = CoroutineScope(contextToWork)
@ -92,7 +91,7 @@ fun TelegramBot.longPollingFlow(
for (update in updates) { for (update in updates) {
send(update) send(update)
if (update.updateId > -1) { if (update.updateId.long > -1) {
lastUpdateIdentifier = update.updateId lastUpdateIdentifier = update.updateId
} }
} }