From cd3ba8f480c983286afe7e12356cf678bfc240fd Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 14:26:55 +0300 Subject: [PATCH] feat: Add UniqueGiftBackdropColors data class --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 5 ++++ .../types/UniqueGiftBackdropColors.kt | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index ca073999f0..9b85df9481 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -666,6 +666,11 @@ const val upgradeStarCountField = "upgrade_star_count" const val payToUpgradeField = "pay_for_upgrade" const val paidMediaField = "paid_media" +const val centerColorField = "center_color" +const val edgeColorField = "edge_color" +const val symbolColorField = "symbol_color" +const val textColorField = "text_color" + const val businessConnectionIdField = "business_connection_id" const val businessIntroField = "business_intro" const val businessLocationField = "business_location" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt new file mode 100644 index 0000000000..49a30d98ad --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt @@ -0,0 +1,24 @@ +package dev.inmo.tgbotapi.types + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes the colors of the backdrop of a unique gift. + * + * @param centerColor The color in the center of the backdrop in RGB format + * @param edgeColor The color on the edges of the backdrop in RGB format + * @param symbolColor The color to be applied to the symbol in RGB format + * @param textColor The color for the text on the backdrop in RGB format + */ +@Serializable +data class UniqueGiftBackdropColors( + @SerialName(centerColorField) + val centerColor: Int, + @SerialName(edgeColorField) + val edgeColor: Int, + @SerialName(symbolColorField) + val symbolColor: Int, + @SerialName(textColorField) + val textColor: Int +)