Я новичок в боте python-telegram, я хотел бы создать новую встроенную клавиатуру, когда я нажимаю старую встроенную клавиатуру, не заменяя старую.Я использовал «editMessageText» для обработки запроса обратного вызова. Но он заменяет только встроенную клавиатуру на «reply_markup», но я хочу создать новую встроенную клавиатуру.Как решить эту проблему?Я много раз искал в переполнении стека. Но я не смог найти решение до сих пор?Пожалуйста, помогите мне решить проблему! Мой образ
Это мой старт (CommandHandler)
def start(bot, update):
bot.sendChatAction(update.message.chat_id, action=ChatAction.TYPING)
bot.send_message(chat_id=update.message.chat_id, text=Message.CLAIM,parse_mode='html')
reply_markup = telegram.InlineKeyboardMarkup([[telegram.InlineKeyboardButton("Check New Model",callback_data="New Model")],
[telegram.InlineKeyboardButton("Reasses my Insurance",callback_data="Reasses")],
[telegram.InlineKeyboardButton("File a Claim",callback_data="claim")]])
bot.sendMessage(chat_id=update.message.chat_id, text="Choose the above one?", reply_markup=reply_markup)
Это мой обработчик обратного вызова
def callback(bot,update):
query=update.callback_query
if query.data=="claim":
reply_markup = telegram.InlineKeyboardMarkup([[telegram.InlineKeyboardButton("Vehicle",callback_data="vehicle")],
[telegram.InlineKeyboardButton("Personal Accident",callback_data="accident")],
[telegram.InlineKeyboardButton("Other",callback_data="other")]])
bot.editMessageText(
message_id = update.callback_query.message.message_id,
chat_id = update.callback_query.message.chat.id,
text = "Choose the one below",
reply_markup=reply_markup
)