mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-03 17:32:23 +00:00
add support of unique gift colors
This commit is contained in:
@@ -177,6 +177,8 @@ data class ExtendedPrivateChatImpl(
|
||||
override val firstProfileAudio: AudioFile? = null,
|
||||
@SerialName(ratingField)
|
||||
override val rating: UserRating? = null,
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
) : ExtendedPrivateChat
|
||||
|
||||
@Serializable
|
||||
@@ -237,6 +239,8 @@ data class ExtendedPrivateForumChatImpl(
|
||||
override val firstProfileAudio: AudioFile? = null,
|
||||
@SerialName(ratingField)
|
||||
override val rating: UserRating? = null,
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
) : ExtendedPrivateForumChat
|
||||
|
||||
typealias ExtendedUser = ExtendedPrivateChat
|
||||
@@ -511,6 +515,8 @@ data class ExtendedBot(
|
||||
val allowUsersToCreateTopics: Boolean = false,
|
||||
@SerialName(acceptedGiftTypesField)
|
||||
override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(),
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null,
|
||||
) : Bot(), ExtendedChat {
|
||||
@SerialName(isBotField)
|
||||
private val isBot = true
|
||||
@@ -544,4 +550,6 @@ data class UnknownExtendedChat(
|
||||
override val maxReactionsCount: Int = 3
|
||||
@SerialName(acceptedGiftTypesField)
|
||||
override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes()
|
||||
@SerialName(uniqueGiftColorsField)
|
||||
override val uniqueGiftColors: UniqueGiftColors? = null
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ sealed interface ExtendedChat : Chat {
|
||||
|
||||
val acceptedGiftTypes: AcceptedGiftTypes
|
||||
|
||||
val uniqueGiftColors: UniqueGiftColors?
|
||||
|
||||
@Deprecated(
|
||||
message = "Telegram Bot API v9.0 introduced the new field, `acceptedGiftTypes`, to allow granular" +
|
||||
" control over which types of gifts user, bot, or chat can accept.",
|
||||
@@ -93,7 +95,6 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat, ExtendedNonBotCh
|
||||
val membersHidden: Boolean
|
||||
val availableReactions: List<Reaction>?
|
||||
val newMembersSeeHistory: Boolean
|
||||
val uniqueGiftColors: UniqueGiftColors?
|
||||
}
|
||||
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
|
||||
Reference in New Issue
Block a user