mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-04 01:42:23 +00:00
fix user rating
This commit is contained in:
@@ -662,6 +662,10 @@ const val uniqueGiftColorsField = "unique_gift_colors"
|
||||
const val paidStarCountField = "paid_star_count"
|
||||
const val isPaidPostField = "is_paid_post"
|
||||
|
||||
const val levelField = "level"
|
||||
const val currentLevelRatingField = "current_level_rating"
|
||||
const val nextLevelRatingField = "next_level_rating"
|
||||
|
||||
const val disableEditMessageField = "disable_edit_message"
|
||||
const val scoreField = "score"
|
||||
const val forceField = "force"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class Level(
|
||||
val int: Int
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class Rating(
|
||||
val int: Int
|
||||
)
|
||||
@@ -1,14 +1,17 @@
|
||||
package dev.inmo.tgbotapi.types.chat
|
||||
|
||||
import dev.inmo.tgbotapi.types.countField
|
||||
import dev.inmo.tgbotapi.types.ratingField
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class UserRating(
|
||||
@SerialName(countField)
|
||||
val count: Int,
|
||||
@SerialName(levelField)
|
||||
val level: Level,
|
||||
@SerialName(ratingField)
|
||||
val rating: Double
|
||||
val rating: Rating,
|
||||
@SerialName(currentLevelRatingField)
|
||||
val currentLevelRating: Rating,
|
||||
@SerialName(nextLevelRatingField)
|
||||
val nextLevelRating: Rating? = null
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user