@bot.callback_query_handler(func = lambda call: True)
def answer(call):
chat_id = call.message.id
message_id = call.message.id
if call.data == 'item1':
bot.edit_message_text(chat_id, message_id, 'Ответ 1')
elif call.data == 'item2':
bot.edit_message_text(chat_id, message_id, 'Ответ 2')
@bot.callback_query_handler(func = lambda call: True)
def answer(call):
if call.data == 'item1':
bot.edit_message_text(chat_id = call.message.chat.id, message_id = call.message.id, text = 'Ответ 1')
elif call.data == 'item2':
bot.edit_message_text(chat_id, message_id, 'Ответ 2')