1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-01-09 09:19:55 +00:00

add support of pay_for_upgrade and jvmApiDump

This commit is contained in:
InsanusMokrassar 2025-01-03 09:01:17 +06:00
parent 9952b6c6ae
commit d211afa26a
5 changed files with 110 additions and 54 deletions

View File

@ -1090,14 +1090,22 @@ public final class dev/inmo/tgbotapi/extensions/api/gifts/GetAvailableGiftsKt {
} }
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt { public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt {
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun sendGift-1FWvrZc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun sendGift$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-4iNBclM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun sendGift$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGift-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun sendGift-WnQQACc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun sendGift-0SDnvgk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-xkmhVIQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGift-1FWvrZc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun sendGift-1FWvrZc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-CrS58cM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendGift-CrS58cM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendGift-GROm3fU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendGift-VjR9mJc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun sendGift-ySMgKnk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/api/inline/SavePreparedInlineMessageKt { public final class dev/inmo/tgbotapi/extensions/api/inline/SavePreparedInlineMessageKt {

View File

@ -13,13 +13,15 @@ public suspend fun TelegramBot.sendGift(
userId: UserId, userId: UserId,
giftId: GiftId, giftId: GiftId,
text: String, text: String,
parseMode: ParseMode? parseMode: ParseMode?,
upgradableToUnique: Boolean = false
): Boolean = execute( ): Boolean = execute(
SendGift( SendGift(
userId, userId = userId,
giftId, giftId = giftId,
text, text = text,
parseMode parseMode = parseMode,
upgradableToUnique = upgradableToUnique
) )
) )
@ -27,11 +29,13 @@ public suspend fun TelegramBot.sendGift(
userId: UserId, userId: UserId,
giftId: GiftId, giftId: GiftId,
textSources: TextSourcesList, textSources: TextSourcesList,
upgradableToUnique: Boolean = false,
): Boolean = execute( ): Boolean = execute(
SendGift( SendGift(
userId, userId = userId,
giftId, giftId = giftId,
textSources textSources = textSources,
upgradableToUnique = upgradableToUnique
) )
) )
@ -39,44 +43,52 @@ public suspend fun TelegramBot.sendGift(
user: User, user: User,
giftId: GiftId, giftId: GiftId,
text: String, text: String,
parseMode: ParseMode? parseMode: ParseMode?,
upgradableToUnique: Boolean = false
): Boolean = sendGift( ): Boolean = sendGift(
user.id, userId = user.id,
giftId, giftId = giftId,
text, text = text,
parseMode parseMode = parseMode,
upgradableToUnique = upgradableToUnique
) )
public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift(
user: User, user: User,
giftId: GiftId, giftId: GiftId,
textSources: TextSourcesList, textSources: TextSourcesList,
upgradableToUnique: Boolean = false,
): Boolean = sendGift( ): Boolean = sendGift(
user.id, userId = user.id,
giftId, giftId = giftId,
textSources textSources = textSources,
upgradableToUnique = upgradableToUnique
) )
public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift(
user: UserId, user: UserId,
gift: Gift, gift: Gift,
text: String, text: String,
parseMode: ParseMode? parseMode: ParseMode?,
upgradableToUnique: Boolean = false
): Boolean = sendGift( ): Boolean = sendGift(
user, userId = user,
gift.id, giftId = gift.id,
text, text = text,
parseMode parseMode = parseMode,
upgradableToUnique = upgradableToUnique
) )
public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift(
user: UserId, user: UserId,
gift: Gift, gift: Gift,
textSources: TextSourcesList, textSources: TextSourcesList,
upgradableToUnique: Boolean = false,
): Boolean = sendGift( ): Boolean = sendGift(
user, userId = user,
gift.id, giftId = gift.id,
textSources textSources = textSources,
upgradableToUnique = upgradableToUnique
) )
@ -84,20 +96,24 @@ public suspend fun TelegramBot.sendGift(
user: User, user: User,
gift: Gift, gift: Gift,
text: String, text: String,
parseMode: ParseMode? parseMode: ParseMode?,
upgradableToUnique: Boolean = false
): Boolean = sendGift( ): Boolean = sendGift(
user.id, userId = user.id,
gift.id, giftId = gift.id,
text, text = text,
parseMode parseMode = parseMode,
upgradableToUnique = upgradableToUnique
) )
public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift(
user: User, user: User,
gift: Gift, gift: Gift,
textSources: TextSourcesList, textSources: TextSourcesList,
upgradableToUnique: Boolean = false,
): Boolean = sendGift( ): Boolean = sendGift(
user.id, userId = user.id,
gift.id, giftId = gift.id,
textSources textSources = textSources,
upgradableToUnique = upgradableToUnique
) )

View File

@ -4674,15 +4674,18 @@ public final class dev/inmo/tgbotapi/requests/gifts/GetAvailableGifts : dev/inmo
public final class dev/inmo/tgbotapi/requests/gifts/SendGift : dev/inmo/tgbotapi/abstracts/TextedOutput, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { public final class dev/inmo/tgbotapi/requests/gifts/SendGift : dev/inmo/tgbotapi/abstracts/TextedOutput, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
public static final field Companion Ldev/inmo/tgbotapi/requests/gifts/SendGift$Companion; public static final field Companion Ldev/inmo/tgbotapi/requests/gifts/SendGift$Companion;
public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLjava/lang/String;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLjava/lang/String;Ljava/util/List;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLjava/lang/String;Ljava/util/List;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-tHkBKVM ()J public final fun component1-tHkBKVM ()J
public final fun component2-OyCYJok ()Ljava/lang/String; public final fun component2-OyCYJok ()Ljava/lang/String;
public final fun component3 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Ldev/inmo/tgbotapi/types/message/ParseMode; public final fun component4 ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun copy-LbrZz8c (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;)Ldev/inmo/tgbotapi/requests/gifts/SendGift; public final fun component6 ()Z
public static synthetic fun copy-LbrZz8c$default (Ldev/inmo/tgbotapi/requests/gifts/SendGift;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/gifts/SendGift; public final fun copy-ekxNoiw (JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Z)Ldev/inmo/tgbotapi/requests/gifts/SendGift;
public static synthetic fun copy-ekxNoiw$default (Ldev/inmo/tgbotapi/requests/gifts/SendGift;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/gifts/SendGift;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getEntities ()Ljava/util/List; public fun getEntities ()Ljava/util/List;
public final fun getGiftId-OyCYJok ()Ljava/lang/String; public final fun getGiftId-OyCYJok ()Ljava/lang/String;
@ -4691,6 +4694,7 @@ public final class dev/inmo/tgbotapi/requests/gifts/SendGift : dev/inmo/tgbotapi
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
public fun getText ()Ljava/lang/String; public fun getText ()Ljava/lang/String;
public fun getTextSources ()Ljava/util/List; public fun getTextSources ()Ljava/util/List;
public final fun getUpgradableToUnique ()Z
public final fun getUserId-tHkBKVM ()J public final fun getUserId-tHkBKVM ()J
public fun hashCode ()I public fun hashCode ()I
public fun method ()Ljava/lang/String; public fun method ()Ljava/lang/String;
@ -9115,6 +9119,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
public static final field passportField Ljava/lang/String; public static final field passportField Ljava/lang/String;
public static final field passportRegistrationField Ljava/lang/String; public static final field passportRegistrationField Ljava/lang/String;
public static final field payField Ljava/lang/String; public static final field payField Ljava/lang/String;
public static final field payToUpgradeField Ljava/lang/String;
public static final field payloadField Ljava/lang/String; public static final field payloadField Ljava/lang/String;
public static final field pendingJoinRequestCountField Ljava/lang/String; public static final field pendingJoinRequestCountField Ljava/lang/String;
public static final field pendingUpdateCountField Ljava/lang/String; public static final field pendingUpdateCountField Ljava/lang/String;
@ -9276,6 +9281,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
public static final field unspecifiedField Ljava/lang/String; public static final field unspecifiedField Ljava/lang/String;
public static final field untilDateField Ljava/lang/String; public static final field untilDateField Ljava/lang/String;
public static final field updateIdField Ljava/lang/String; public static final field updateIdField Ljava/lang/String;
public static final field upgradeStarCountField Ljava/lang/String;
public static final field urlField Ljava/lang/String; public static final field urlField Ljava/lang/String;
public static final field useIndependentChatPermissionsField Ljava/lang/String; public static final field useIndependentChatPermissionsField Ljava/lang/String;
public static final field userAdministratorRightsField Ljava/lang/String; public static final field userAdministratorRightsField Ljava/lang/String;
@ -18345,6 +18351,7 @@ public abstract interface class dev/inmo/tgbotapi/types/gifts/Gift {
public abstract fun getStarCount ()I public abstract fun getStarCount ()I
public abstract fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; public abstract fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker;
public abstract fun getTotalCount ()Ljava/lang/Integer; public abstract fun getTotalCount ()Ljava/lang/Integer;
public abstract fun getUpgradeStarCount ()Ljava/lang/Integer;
} }
public final class dev/inmo/tgbotapi/types/gifts/Gift$Companion : kotlinx/serialization/KSerializer { public final class dev/inmo/tgbotapi/types/gifts/Gift$Companion : kotlinx/serialization/KSerializer {
@ -18358,20 +18365,23 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Companion : kotlinx/serial
public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited : dev/inmo/tgbotapi/types/gifts/Gift { public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited : dev/inmo/tgbotapi/types/gifts/Gift {
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Limited$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Limited$Companion;
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-OyCYJok ()Ljava/lang/String; public final fun component1-OyCYJok ()Ljava/lang/String;
public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker; public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker;
public final fun component3 ()I public final fun component3 ()I
public final fun component4 ()I public final fun component4 ()I
public final fun component5 ()I public final fun component5 ()I
public final fun copy-dAh8QC0 (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;III)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited; public final fun component6 ()Ljava/lang/Integer;
public static synthetic fun copy-dAh8QC0$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Limited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIIILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited; public final fun copy-RpW899k (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited;
public static synthetic fun copy-RpW899k$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Limited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getId-OyCYJok ()Ljava/lang/String; public fun getId-OyCYJok ()Ljava/lang/String;
public fun getRemainingCount ()Ljava/lang/Integer; public fun getRemainingCount ()Ljava/lang/Integer;
public fun getStarCount ()I public fun getStarCount ()I
public fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; public fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker;
public fun getTotalCount ()Ljava/lang/Integer; public fun getTotalCount ()Ljava/lang/Integer;
public fun getUpgradeStarCount ()Ljava/lang/Integer;
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
@ -18393,18 +18403,21 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited$Companion {
public final class dev/inmo/tgbotapi/types/gifts/Gift$Unlimited : dev/inmo/tgbotapi/types/gifts/Gift { public final class dev/inmo/tgbotapi/types/gifts/Gift$Unlimited : dev/inmo/tgbotapi/types/gifts/Gift {
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited$Companion; public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited$Companion;
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-OyCYJok ()Ljava/lang/String; public final fun component1-OyCYJok ()Ljava/lang/String;
public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker; public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker;
public final fun component3 ()I public final fun component3 ()I
public final fun copy-IqAKj4o (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;I)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited; public final fun component4 ()Ljava/lang/Integer;
public static synthetic fun copy-IqAKj4o$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited; public final fun copy-Pd50qfQ (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited;
public static synthetic fun copy-Pd50qfQ$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited;
public fun equals (Ljava/lang/Object;)Z public fun equals (Ljava/lang/Object;)Z
public fun getId-OyCYJok ()Ljava/lang/String; public fun getId-OyCYJok ()Ljava/lang/String;
public fun getRemainingCount ()Ljava/lang/Integer; public fun getRemainingCount ()Ljava/lang/Integer;
public fun getStarCount ()I public fun getStarCount ()I
public fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; public fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker;
public fun getTotalCount ()Ljava/lang/Integer; public fun getTotalCount ()Ljava/lang/Integer;
public fun getUpgradeStarCount ()Ljava/lang/Integer;
public fun hashCode ()I public fun hashCode ()I
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }

View File

@ -28,6 +28,8 @@ data class SendGift internal constructor(
override val parseMode: ParseMode?, override val parseMode: ParseMode?,
@SerialName(textEntitiesField) @SerialName(textEntitiesField)
private val rawEntities: List<RawMessageEntity>? = null, private val rawEntities: List<RawMessageEntity>? = null,
@SerialName(payToUpgradeField)
val upgradableToUnique: Boolean
) : SimpleRequest<Boolean>, TextedOutput { ) : SimpleRequest<Boolean>, TextedOutput {
override val textSources: TextSourcesList? by lazy { override val textSources: TextSourcesList? by lazy {
rawEntities ?.asTextSources(text) rawEntities ?.asTextSources(text)
@ -46,12 +48,28 @@ data class SendGift internal constructor(
userId: UserId, userId: UserId,
giftId: GiftId, giftId: GiftId,
text: String, text: String,
parseMode: ParseMode? parseMode: ParseMode?,
) : this(userId, giftId, text, parseMode, null) upgradableToUnique: Boolean = false
) : this(
userId = userId,
giftId = giftId,
text = text,
parseMode = parseMode,
rawEntities = null,
upgradableToUnique = upgradableToUnique
)
constructor( constructor(
userId: UserId, userId: UserId,
giftId: GiftId, giftId: GiftId,
textSources: TextSourcesList, textSources: TextSourcesList,
) : this(userId, giftId, textSources.makeSourceString(), null, textSources.toRawMessageEntities()) upgradableToUnique: Boolean = false,
) : this(
userId = userId,
giftId = giftId,
text = textSources.makeSourceString(),
parseMode = null,
rawEntities = textSources.toRawMessageEntities(),
upgradableToUnique = upgradableToUnique
)
} }

View File

@ -655,6 +655,7 @@ const val wasRefundedField = "was_refunded"
const val isManualField = "is_manual" const val isManualField = "is_manual"
const val starCountField = "star_count" const val starCountField = "star_count"
const val upgradeStarCountField = "upgrade_star_count" const val upgradeStarCountField = "upgrade_star_count"
const val payToUpgradeField = "pay_for_upgrade"
const val paidMediaField = "paid_media" const val paidMediaField = "paid_media"
const val businessConnectionIdField = "business_connection_id" const val businessConnectionIdField = "business_connection_id"