1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00
This commit is contained in:
InsanusMokrassar 2024-09-07 02:43:25 +06:00
parent b60b0259db
commit 3cbfb2fb0b
9 changed files with 46 additions and 18 deletions

View File

@ -17966,18 +17966,18 @@ public final class dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$Stars$Companion
public final fun serializer ()Lkotlinx/serialization/KSerializer; public final fun serializer ()Lkotlinx/serialization/KSerializer;
} }
public final class dev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults : dev/inmo/tgbotapi/types/giveaway/GiveawayResults, dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent, dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent { public final class dev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults : dev/inmo/tgbotapi/types/giveaway/GiveawayResults {
public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults$Companion;
public fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChat;ILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Z)V public fun <init> (IILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Z)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChat;ILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (IILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public final fun component1 ()I
public final fun component2 ()I public final fun component2 ()I
public final fun component3 ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public final fun component3 ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public final fun component4 ()Z public final fun component4 ()Z
public final fun copy (Ldev/inmo/tgbotapi/types/chat/PreviewChat;ILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Z)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults; public final fun copy (IILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Z)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults;
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults;Ldev/inmo/tgbotapi/types/chat/PreviewChat;ILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults; public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults;IILdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public final fun getCount ()I
public final fun getMessage ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage; public final fun getMessage ()Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;
public fun getUnclaimedCount ()I public fun getUnclaimedCount ()I
public fun hashCode ()I public fun hashCode ()I
@ -18000,7 +18000,7 @@ public final class dev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults$Compa
public final fun serializer ()Lkotlinx/serialization/KSerializer; public final fun serializer ()Lkotlinx/serialization/KSerializer;
} }
public abstract interface class dev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults : dev/inmo/tgbotapi/abstracts/WithPreviewChatAndMessageId, dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$OptionallyPremium, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$OptionallyStars, dev/inmo/tgbotapi/types/giveaway/GiveawayResults { public abstract interface class dev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults : dev/inmo/tgbotapi/abstracts/WithPreviewChat, dev/inmo/tgbotapi/abstracts/WithPreviewChatAndMessageId, dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$OptionallyPremium, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$OptionallyStars, dev/inmo/tgbotapi/types/giveaway/GiveawayResults {
public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults$Companion;
public abstract fun getAdditionalChats ()I public abstract fun getAdditionalChats ()I
public abstract fun getCount ()I public abstract fun getCount ()I
@ -18110,7 +18110,7 @@ public final class dev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults$Winner
public final fun serializer ()Lkotlinx/serialization/KSerializer; public final fun serializer ()Lkotlinx/serialization/KSerializer;
} }
public abstract interface class dev/inmo/tgbotapi/types/giveaway/GiveawayResults : dev/inmo/tgbotapi/abstracts/WithPreviewChat { public abstract interface class dev/inmo/tgbotapi/types/giveaway/GiveawayResults : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent, dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent {
public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/GiveawayResults$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/GiveawayResults$Companion;
public abstract fun getUnclaimedCount ()I public abstract fun getUnclaimedCount ()I
} }

View File

@ -122,7 +122,7 @@ sealed interface ChatBoostSource {
@SerialName(isUnclaimedField) @SerialName(isUnclaimedField)
val unclaimed: Boolean? = null, val unclaimed: Boolean? = null,
@SerialName(prizeStarCountField) @SerialName(prizeStarCountField)
val prizeStarCount: Int? val prizeStarCount: Int? = null
) )
companion object : KSerializer<ChatBoostSource> { companion object : KSerializer<ChatBoostSource> {

View File

@ -22,7 +22,7 @@ sealed interface GiveawayCreated : ChatEvent, PublicChatEvent {
object Serializer : KSerializer<GiveawayCreated> { object Serializer : KSerializer<GiveawayCreated> {
@Serializable @Serializable
private data class Surrogate( private data class Surrogate(
val prizeStarCount: Int? val prizeStarCount: Int? = null
) )
override val descriptor: SerialDescriptor override val descriptor: SerialDescriptor

View File

@ -12,8 +12,8 @@ import kotlinx.serialization.Transient
@Serializable @Serializable
data class GiveawayPrivateResults( data class GiveawayPrivateResults(
@SerialName(chatField) @SerialName(winnersCountField)
override val chat: PreviewChat, val count: Int,
@SerialName(unclaimedPrizeCountField) @SerialName(unclaimedPrizeCountField)
override val unclaimedCount: Int, override val unclaimedCount: Int,
@SerialName(giveawayMessageField) @SerialName(giveawayMessageField)
@ -21,4 +21,4 @@ data class GiveawayPrivateResults(
val message: AccessibleMessage? = null, val message: AccessibleMessage? = null,
@SerialName(isStarGiveawayField) @SerialName(isStarGiveawayField)
val isStarGiveaway: Boolean = false, val isStarGiveaway: Boolean = false,
) : GiveawayResults, ChatEvent, PublicChatEvent ) : GiveawayResults

View File

@ -1,9 +1,11 @@
package dev.inmo.tgbotapi.types.giveaway package dev.inmo.tgbotapi.types.giveaway
import dev.inmo.tgbotapi.abstracts.WithPreviewChat
import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId import dev.inmo.tgbotapi.abstracts.WithPreviewChatAndMessageId
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.PreviewChat import dev.inmo.tgbotapi.types.chat.PreviewChat
import dev.inmo.tgbotapi.types.chat.PreviewUser import dev.inmo.tgbotapi.types.chat.PreviewUser
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent
import kotlinx.serialization.* import kotlinx.serialization.*
import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Decoder
@ -11,7 +13,7 @@ import kotlinx.serialization.encoding.Encoder
@Serializable(GiveawayPublicResults.Companion::class) @Serializable(GiveawayPublicResults.Companion::class)
sealed interface GiveawayPublicResults : GiveawayInfo, GiveawayResults, WithPreviewChatAndMessageId, sealed interface GiveawayPublicResults : GiveawayInfo, GiveawayResults, WithPreviewChatAndMessageId,
ReplyInfo.External.ContentVariant, GiveawayInfo.OptionallyStars, GiveawayInfo.OptionallyPremium { ReplyInfo.External.ContentVariant, GiveawayInfo.OptionallyStars, GiveawayInfo.OptionallyPremium, WithPreviewChat {
val count: Int val count: Int
val winners: List<PreviewUser> val winners: List<PreviewUser>
val additionalChats: Int val additionalChats: Int

View File

@ -6,6 +6,6 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
sealed interface GiveawayResults : WithPreviewChat { sealed interface GiveawayResults : ChatEvent, PublicChatEvent {
val unclaimedCount: Int val unclaimedCount: Int
} }

View File

@ -103,7 +103,7 @@ internal data class RawMessage(
private val successful_payment: SuccessfulPayment? = null, private val successful_payment: SuccessfulPayment? = null,
private val refunded_payment: RefundedPayment? = null, private val refunded_payment: RefundedPayment? = null,
private val giveaway: Giveaway? = null, private val giveaway: Giveaway? = null,
private val giveaway_winners: GiveawayResults? = null, private val giveaway_winners: GiveawayPublicResults? = null,
private val sender_boost_count: Int? = null, private val sender_boost_count: Int? = null,
private val users_shared: UsersShared? = null, private val users_shared: UsersShared? = null,
@ -279,7 +279,7 @@ internal data class RawMessage(
users_shared != null -> users_shared users_shared != null -> users_shared
chat_shared != null -> chat_shared chat_shared != null -> chat_shared
giveaway_created != null -> giveaway_created giveaway_created != null -> giveaway_created
giveaway_winners is GiveawayPrivateResults -> giveaway_winners giveaway_winners != null -> giveaway_winners
giveaway_completed != null -> giveaway_completed giveaway_completed != null -> giveaway_completed
boost_added != null -> boost_added boost_added != null -> boost_added
chat_background_set != null -> chat_background_set chat_background_set != null -> chat_background_set

View File

@ -1445,6 +1445,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun giveawayPrivateResultsOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults; public static final fun giveawayPrivateResultsOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPrivateResults;
public static final fun giveawayPublicResultsContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent; public static final fun giveawayPublicResultsContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent;
public static final fun giveawayPublicResultsContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent; public static final fun giveawayPublicResultsContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/GiveawayPublicResultsContent;
public static final fun giveawayPublicResultsOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults;
public static final fun giveawayPublicResultsOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayPublicResults;
public static final fun giveawayResultsOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayResults;
public static final fun giveawayResultsOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayResults;
public static final fun gradientOrNull (Ldev/inmo/tgbotapi/types/BackgroundFill;)Ldev/inmo/tgbotapi/types/BackgroundFill$Gradient; public static final fun gradientOrNull (Ldev/inmo/tgbotapi/types/BackgroundFill;)Ldev/inmo/tgbotapi/types/BackgroundFill$Gradient;
public static final fun gradientOrThrow (Ldev/inmo/tgbotapi/types/BackgroundFill;)Ldev/inmo/tgbotapi/types/BackgroundFill$Gradient; public static final fun gradientOrThrow (Ldev/inmo/tgbotapi/types/BackgroundFill;)Ldev/inmo/tgbotapi/types/BackgroundFill$Gradient;
public static final fun groupChatCreatedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/GroupChatCreated; public static final fun groupChatCreatedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/GroupChatCreated;
@ -1662,7 +1666,9 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifGiveawayContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveawayContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiveawayCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveawayCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiveawayPrivateResults (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveawayPrivateResults (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiveawayPublicResults (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiveawayPublicResultsContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveawayPublicResultsContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGiveawayResults (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGradient (Ldev/inmo/tgbotapi/types/BackgroundFill;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGradient (Ldev/inmo/tgbotapi/types/BackgroundFill;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGroupChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGroupChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifGroupChatCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGroupChatCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;

View File

@ -215,6 +215,8 @@ import dev.inmo.tgbotapi.types.files.VideoSticker
import dev.inmo.tgbotapi.types.files.VoiceFile import dev.inmo.tgbotapi.types.files.VoiceFile
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults
import dev.inmo.tgbotapi.types.giveaway.GiveawayResults
import dev.inmo.tgbotapi.types.location.LiveLocation import dev.inmo.tgbotapi.types.location.LiveLocation
import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.location.StaticLocation import dev.inmo.tgbotapi.types.location.StaticLocation
@ -3269,6 +3271,24 @@ public inline fun ChatEvent.giveawayPrivateResultsOrThrow(): GiveawayPrivateResu
public inline fun <T> ChatEvent.ifGiveawayPrivateResults(block: (GiveawayPrivateResults) -> T): T? = public inline fun <T> ChatEvent.ifGiveawayPrivateResults(block: (GiveawayPrivateResults) -> T): T? =
giveawayPrivateResultsOrNull() ?.let(block) giveawayPrivateResultsOrNull() ?.let(block)
public inline fun ChatEvent.giveawayPublicResultsOrNull(): GiveawayPublicResults? = this as?
dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults
public inline fun ChatEvent.giveawayPublicResultsOrThrow(): GiveawayPublicResults = this as
dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults
public inline fun <T> ChatEvent.ifGiveawayPublicResults(block: (GiveawayPublicResults) -> T): T? =
giveawayPublicResultsOrNull() ?.let(block)
public inline fun ChatEvent.giveawayResultsOrNull(): GiveawayResults? = this as?
dev.inmo.tgbotapi.types.giveaway.GiveawayResults
public inline fun ChatEvent.giveawayResultsOrThrow(): GiveawayResults = this as
dev.inmo.tgbotapi.types.giveaway.GiveawayResults
public inline fun <T> ChatEvent.ifGiveawayResults(block: (GiveawayResults) -> T): T? =
giveawayResultsOrNull() ?.let(block)
public inline fun ChatEvent.channelChatCreatedOrNull(): ChannelChatCreated? = this as? public inline fun ChatEvent.channelChatCreatedOrNull(): ChannelChatCreated? = this as?
dev.inmo.tgbotapi.types.message.ChatEvents.ChannelChatCreated dev.inmo.tgbotapi.types.message.ChatEvents.ChannelChatCreated