mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-11-29 19:05:39 +00:00
add support of pay_for_upgrade and jvmApiDump
This commit is contained in:
@@ -28,6 +28,8 @@ data class SendGift internal constructor(
|
||||
override val parseMode: ParseMode?,
|
||||
@SerialName(textEntitiesField)
|
||||
private val rawEntities: List<RawMessageEntity>? = null,
|
||||
@SerialName(payToUpgradeField)
|
||||
val upgradableToUnique: Boolean
|
||||
) : SimpleRequest<Boolean>, TextedOutput {
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.asTextSources(text)
|
||||
@@ -46,12 +48,28 @@ data class SendGift internal constructor(
|
||||
userId: UserId,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?
|
||||
) : this(userId, giftId, text, parseMode, null)
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
) : this(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
constructor(
|
||||
userId: UserId,
|
||||
giftId: GiftId,
|
||||
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
|
||||
)
|
||||
}
|
||||
|
||||
@@ -655,6 +655,7 @@ const val wasRefundedField = "was_refunded"
|
||||
const val isManualField = "is_manual"
|
||||
const val starCountField = "star_count"
|
||||
const val upgradeStarCountField = "upgrade_star_count"
|
||||
const val payToUpgradeField = "pay_for_upgrade"
|
||||
const val paidMediaField = "paid_media"
|
||||
|
||||
const val businessConnectionIdField = "business_connection_id"
|
||||
|
||||
Reference in New Issue
Block a user