mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
add support of availableReactions
This commit is contained in:
parent
3026c8708d
commit
90225a9380
@ -464,6 +464,7 @@ const val userField = "user"
|
||||
const val dateField = "date"
|
||||
const val reactionsField = "reactions"
|
||||
const val reactionField = "reaction"
|
||||
const val availableReactionsField = "available_reactions"
|
||||
const val isBigField = "is_big"
|
||||
const val oldReactionField = "old_reaction"
|
||||
const val newReactionField = "new_reaction"
|
||||
|
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.chat
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||
import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import korlibs.time.DateTime
|
||||
import kotlinx.serialization.SerialName
|
||||
@ -32,7 +33,9 @@ data class ExtendedChannelChatImpl(
|
||||
@SerialName(linkedChatIdField)
|
||||
override val linkedGroupChatId: IdChatIdentifier? = null,
|
||||
@SerialName(hasHiddenMembersField)
|
||||
override val membersHidden: Boolean = false
|
||||
override val membersHidden: Boolean = false,
|
||||
@SerialName(availableReactionsField)
|
||||
override val availableReactions: List<Reaction>? = null
|
||||
) : ExtendedChannelChat
|
||||
|
||||
@Serializable
|
||||
@ -54,7 +57,9 @@ data class ExtendedGroupChatImpl(
|
||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||
override val pinnedMessage: Message? = null,
|
||||
@SerialName(hasHiddenMembersField)
|
||||
override val membersHidden: Boolean = false
|
||||
override val membersHidden: Boolean = false,
|
||||
@SerialName(availableReactionsField)
|
||||
override val availableReactions: List<Reaction>? = null
|
||||
) : ExtendedGroupChat
|
||||
|
||||
@Serializable
|
||||
@ -125,7 +130,9 @@ data class ExtendedSupergroupChatImpl(
|
||||
@SerialName(hasAggressiveAntiSpamEnabledField)
|
||||
override val isAggressiveAntiSpamEnabled: Boolean = false,
|
||||
@SerialName(hasHiddenMembersField)
|
||||
override val membersHidden: Boolean = false
|
||||
override val membersHidden: Boolean = false,
|
||||
@SerialName(availableReactionsField)
|
||||
override val availableReactions: List<Reaction>? = null
|
||||
) : ExtendedSupergroupChat
|
||||
|
||||
@Serializable
|
||||
@ -167,7 +174,9 @@ data class ExtendedForumChatImpl(
|
||||
@SerialName(hasAggressiveAntiSpamEnabledField)
|
||||
override val isAggressiveAntiSpamEnabled: Boolean = false,
|
||||
@SerialName(hasHiddenMembersField)
|
||||
override val membersHidden: Boolean = false
|
||||
override val membersHidden: Boolean = false,
|
||||
@SerialName(availableReactionsField)
|
||||
override val availableReactions: List<Reaction>? = null
|
||||
) : ExtendedForumChat
|
||||
|
||||
@Serializable
|
||||
|
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types.chat
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||
import dev.inmo.tgbotapi.types.reactions.Reaction
|
||||
import korlibs.time.DateTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@ -34,6 +35,7 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat {
|
||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||
val pinnedMessage: Message?
|
||||
val membersHidden: Boolean
|
||||
val availableReactions: List<Reaction>?
|
||||
}
|
||||
|
||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||
|
Loading…
Reference in New Issue
Block a user