1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-06-29 14:45:17 +00:00

Fix RichTextBotCommand SerialName to bot_command

RichTextBotCommand.botCommand reused botCommandField ("command", shared
with BotCommand.command) but Bot API docs require "bot_command". Add
botCommandFullField = "bot_command" and switch RichTextBotCommand to it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 16:17:56 +06:00
parent df5018ecf5
commit 9fc80fdd4d
2 changed files with 3 additions and 2 deletions

View File

@@ -463,6 +463,7 @@ const val inputMessageContentField = "input_message_content"
const val hideUrlField = "hide_url"
const val botCommandField = "command"
const val botCommandFullField = "bot_command"
const val botCommandsField = "commands"
const val scopeField = "scope"

View File

@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.types.CustomEmojiId
import dev.inmo.tgbotapi.types.alternativeTextField
import dev.inmo.tgbotapi.types.anchorNameField
import dev.inmo.tgbotapi.types.bankCardNumberField
import dev.inmo.tgbotapi.types.botCommandField
import dev.inmo.tgbotapi.types.botCommandFullField
import dev.inmo.tgbotapi.types.cashtagField
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.customEmojiIdField
@@ -436,7 +436,7 @@ data class RichTextCashtag(
data class RichTextBotCommand(
@SerialName(textField)
val text: RichText,
@SerialName(botCommandField)
@SerialName(botCommandFullField)
val botCommand: String
) : RichTextEntity {
@EncodeDefault