From 914a0662a97ff953e361d1426e9e1aa9421be649 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 22 Apr 2020 14:11:46 +0600 Subject: [PATCH] CallbackGameInlineKeyboardButton now have only one income parameter --- CHANGELOG.md | 1 + .../buttons/InlineKeyboardButtons/InlineKeyboardButton.kt | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a25cf9aaa0..ccdc4a2965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ `SerializationException` or `NotImplemented` error * `CallbackGame` currently is an object * It is possible to use `CallbackGame` for now + * `CallbackGameInlineKeyboardButton` now will not accept `callbackGame` as income object * Now it is possible to pass exception handler in webhook ### 0.26.3 diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt index 0e5c18508e..c8ea32297b 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/buttons/InlineKeyboardButtons/InlineKeyboardButton.kt @@ -36,10 +36,11 @@ data class CallbackDataInlineKeyboardButton( @Serializable data class CallbackGameInlineKeyboardButton( @SerialName(textField) - override val text: String, + override val text: String +) : InlineKeyboardButton() { @SerialName(callbackGameField) - val callbackGame: CallbackGame -) : InlineKeyboardButton() + private val callbackGame = CallbackGame +} @Serializable data class LoginURLInlineKeyboardButton(