mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 15:19:30 +00:00
refactor: replaced Gift
with Gift.Regular
across APIs and data models
This commit is contained in:
@@ -22,7 +22,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
@@ -49,7 +49,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
@@ -76,7 +76,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
@@ -101,7 +101,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
|
@@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
@@ -43,7 +43,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
@@ -54,7 +54,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
@@ -63,7 +63,7 @@ public suspend fun TelegramBot.sendGift(
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
|
@@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
@@ -43,7 +43,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
@@ -54,7 +54,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
@@ -63,7 +63,7 @@ public suspend fun TelegramBot.sendGiftToChat(
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
|
@@ -7,5 +7,5 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class Gifts(
|
||||
@SerialName(giftsField)
|
||||
val gifts: List<Gift>
|
||||
val gifts: List<Gift.Regular>
|
||||
)
|
||||
|
@@ -60,7 +60,7 @@ sealed interface TransactionPartner {
|
||||
@SerialName(paidMediaPayloadField)
|
||||
val paidMediaPayload: PaidMediaPayload? = null,
|
||||
@SerialName(giftField)
|
||||
val gift: Gift? = null
|
||||
val gift: Gift.Regular? = null
|
||||
) : TransactionPartner, SubscriptionPeriodInfo {
|
||||
@EncodeDefault
|
||||
override val type: String = Companion.type
|
||||
@@ -75,7 +75,7 @@ sealed interface TransactionPartner {
|
||||
@SerialName(chatField)
|
||||
val chat: PreviewChat,
|
||||
@SerialName(giftField)
|
||||
val gift: Gift? = null
|
||||
val gift: Gift.Regular? = null
|
||||
) : TransactionPartner {
|
||||
@EncodeDefault
|
||||
override val type: String = Companion.type
|
||||
@@ -150,7 +150,7 @@ sealed interface TransactionPartner {
|
||||
val subscription_period: TimeSpan? = null,
|
||||
val paid_media: List<PaidMedia>? = null,
|
||||
val paid_media_payload: PaidMediaPayload? = null,
|
||||
val gift: Gift? = null,
|
||||
val gift: Gift.Regular? = null,
|
||||
val request_count: Int? = null,
|
||||
val sponsor_user: PreviewBot? = null,
|
||||
val commission_per_mille: Int? = null,
|
||||
|
Reference in New Issue
Block a user