1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

fixes in RequestId

This commit is contained in:
InsanusMokrassar 2023-02-05 22:29:21 +06:00
parent 0da0c4e894
commit e235280253
2 changed files with 2 additions and 28 deletions

View File

@ -7,9 +7,9 @@ import kotlin.random.Random
@Serializable @Serializable
@JvmInline @JvmInline
value class RequestId( value class RequestId(
val float: Float val float: Int
) { ) {
companion object { companion object {
fun random() = RequestId(Random.nextFloat()) fun random() = RequestId(Random.nextInt())
} }
} }

View File

@ -107,8 +107,6 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineK
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.RequestChatInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.RequestUserInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton
@ -1884,30 +1882,6 @@ public inline fun <T>
InlineKeyboardButton.ifWebAppInlineKeyboardButton(block: (WebAppInlineKeyboardButton) -> T): T? InlineKeyboardButton.ifWebAppInlineKeyboardButton(block: (WebAppInlineKeyboardButton) -> T): T?
= webAppInlineKeyboardButtonOrNull() ?.let(block) = webAppInlineKeyboardButtonOrNull() ?.let(block)
public inline fun InlineKeyboardButton.requestUserInlineKeyboardButtonOrNull():
RequestUserInlineKeyboardButton? = this as?
dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.RequestUserInlineKeyboardButton
public inline fun InlineKeyboardButton.requestUserInlineKeyboardButtonOrThrow():
RequestUserInlineKeyboardButton = this as
dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.RequestUserInlineKeyboardButton
public inline fun <T>
InlineKeyboardButton.ifRequestUserInlineKeyboardButton(block: (RequestUserInlineKeyboardButton) -> T):
T? = requestUserInlineKeyboardButtonOrNull() ?.let(block)
public inline fun InlineKeyboardButton.requestChatInlineKeyboardButtonOrNull():
RequestChatInlineKeyboardButton? = this as?
dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.RequestChatInlineKeyboardButton
public inline fun InlineKeyboardButton.requestChatInlineKeyboardButtonOrThrow():
RequestChatInlineKeyboardButton = this as
dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.RequestChatInlineKeyboardButton
public inline fun <T>
InlineKeyboardButton.ifRequestChatInlineKeyboardButton(block: (RequestChatInlineKeyboardButton) -> T):
T? = requestChatInlineKeyboardButtonOrNull() ?.let(block)
public inline fun KeyboardMarkup.inlineKeyboardMarkupOrNull(): InlineKeyboardMarkup? = this as? public inline fun KeyboardMarkup.inlineKeyboardMarkupOrNull(): InlineKeyboardMarkup? = this as?
dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup