mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-14 21:00:15 +00:00
fix: brought back the canReceiveGifts
field, marked as deprecated
This commit is contained in:
@@ -21,6 +21,17 @@ sealed interface ExtendedChat : Chat {
|
|||||||
val maxReactionsCount: Int
|
val maxReactionsCount: Int
|
||||||
|
|
||||||
val acceptedGiftTypes: AcceptedGiftTypes
|
val acceptedGiftTypes: AcceptedGiftTypes
|
||||||
|
|
||||||
|
@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.",
|
||||||
|
replaceWith = ReplaceWith("acceptedGiftTypes.uniqueGifts || acceptedGiftTypes.unlimitedGifts || acceptedGiftTypes.limitedGifts || acceptedGiftTypes.premiumSubscription")
|
||||||
|
)
|
||||||
|
val canReceiveGifts: Boolean
|
||||||
|
get() = acceptedGiftTypes.uniqueGifts ||
|
||||||
|
acceptedGiftTypes.unlimitedGifts ||
|
||||||
|
acceptedGiftTypes.limitedGifts ||
|
||||||
|
acceptedGiftTypes.premiumSubscription
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
@@ -60,6 +71,7 @@ sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername, Ex
|
|||||||
sealed interface ExtendedPublicChat : ExtendedChat, PublicChat, ExtendedNonBotChat {
|
sealed interface ExtendedPublicChat : ExtendedChat, PublicChat, ExtendedNonBotChat {
|
||||||
val description: String
|
val description: String
|
||||||
val inviteLink: String?
|
val inviteLink: String?
|
||||||
|
|
||||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||||
val pinnedMessage: Message?
|
val pinnedMessage: Message?
|
||||||
val membersHidden: Boolean
|
val membersHidden: Boolean
|
||||||
|
Reference in New Issue
Block a user