mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-16 13:49:26 +00:00
add RequestId.random
This commit is contained in:
@@ -2,9 +2,14 @@ package dev.inmo.tgbotapi.types.request
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
import kotlin.random.Random
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class RequestId(
|
||||
val long: Long
|
||||
)
|
||||
val float: Float
|
||||
) {
|
||||
companion object {
|
||||
fun random() = RequestId(Random.nextFloat())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user