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

extract ReplyKeyboardMarkup fields names to the constants

This commit is contained in:
InsanusMokrassar 2022-05-11 12:08:20 +06:00
parent 69d36c5c1b
commit 53e8c53fb1
2 changed files with 5 additions and 4 deletions

View File

@ -391,6 +391,8 @@ const val requireShippingAddressField = "need_shipping_address"
const val shouldSendPhoneNumberToProviderField = "send_phone_number_to_provider"
const val shouldSendEmailToProviderField = "send_email_to_provider"
const val resizeKeyboardField = "resize_keyboard"
const val oneTimeKeyboardField = "one_time_keyboard"
const val inputFieldPlaceholderField = "input_field_placeholder"
const val priceDependOnShipAddressField = "is_flexible"

View File

@ -1,16 +1,15 @@
package dev.inmo.tgbotapi.types.buttons
import dev.inmo.tgbotapi.types.inputFieldPlaceholderField
import dev.inmo.tgbotapi.types.inputFieldPlaceholderLimit
import dev.inmo.tgbotapi.types.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class ReplyKeyboardMarkup(
val keyboard: Matrix<KeyboardButton>,
@SerialName("resize_keyboard")
@SerialName(resizeKeyboardField)
val resizeKeyboard: Boolean? = null,
@SerialName("one_time_keyboard")
@SerialName(oneTimeKeyboardField)
val oneTimeKeyboard: Boolean? = null,
@SerialName(inputFieldPlaceholderField)
val inputFieldPlaceholder: String? = null,