mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
add support of paid emoji
This commit is contained in:
parent
e9a172565e
commit
76eae0a54f
@ -43,6 +43,15 @@ sealed interface Reaction {
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable(Reaction.Companion::class)
|
||||
class Paid : Reaction {
|
||||
override val type: String
|
||||
get() = Companion.type
|
||||
companion object {
|
||||
const val type: String = "paid"
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable(Reaction.Companion::class)
|
||||
data class Unknown(
|
||||
override val type: String,
|
||||
@ -73,6 +82,7 @@ sealed interface Reaction {
|
||||
return when {
|
||||
surrogate.emoji != null -> Emoji(surrogate.emoji)
|
||||
surrogate.customEmojiId != null -> CustomEmoji(surrogate.customEmojiId)
|
||||
surrogate.type == Paid.type -> Paid()
|
||||
else -> Unknown(surrogate.type, json)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user