diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt index 4940bba946..19f79faf4d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt @@ -7,22 +7,22 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonElement @Serializable(InlineKeyboardButtonSerializer::class) -sealed class InlineKeyboardButton { - abstract val text: String +sealed interface InlineKeyboardButton { + val text: String } @Serializable data class UnknownInlineKeyboardButton internal constructor( override val text: String, val rawData: JsonElement -) : InlineKeyboardButton() +) : InlineKeyboardButton @Serializable data class PayInlineKeyboardButton( override val text: String, @SerialName(payField) val pay: Boolean -) : InlineKeyboardButton() +) : InlineKeyboardButton @Serializable data class CallbackDataInlineKeyboardButton( @@ -30,13 +30,13 @@ data class CallbackDataInlineKeyboardButton( override val text: String, @SerialName(callbackDataField) val callbackData: String -) : InlineKeyboardButton() +) : InlineKeyboardButton @Serializable data class CallbackGameInlineKeyboardButton( @SerialName(textField) override val text: String -) : InlineKeyboardButton() { +) : InlineKeyboardButton { @SerialName(callbackGameField) private val callbackGame = CallbackGame } @@ -46,25 +46,25 @@ data class LoginURLInlineKeyboardButton( override val text: String, @SerialName(loginUrlField) val loginUrl: LoginURL -) : InlineKeyboardButton() +) : InlineKeyboardButton @Serializable data class SwitchInlineQueryCurrentChatInlineKeyboardButton( override val text: String, @SerialName(switchInlineQueryCurrentChatField) val switchInlineQueryCurrentChat: String -) : InlineKeyboardButton() +) : InlineKeyboardButton @Serializable data class SwitchInlineQueryInlineKeyboardButton( override val text: String, @SerialName(switchInlineQueryField) val switchInlineQuery: String -) : InlineKeyboardButton() +) : InlineKeyboardButton @Serializable data class URLInlineKeyboardButton( override val text: String, @SerialName(urlField) val url: String -) : InlineKeyboardButton() +) : InlineKeyboardButton