Answer the question
In order to leave comments, you need to log in
How to reset register_next_step_handler in a bot?
There is such a code, but the problem is that when you press the "Back" button, waiting for the register_next_step_handler response is not reset. How can reset be implemented?
@bot.callback_query_handler(func=lambda call: True)
def callback_worker(call):
keyboard = types.InlineKeyboardMarkup()
keyboard.add(types.InlineKeyboardButton(text='<<Назад', callback_data='goadminmenu'))
mes = bot.edit_message_text(chat_id=call.message.chat.id,message_id=call.message.message_id,
text="Введите имя пользователя для поиска. ", reply_markup=keyboard)
bot.register_next_step_handler(mes, show_logs_from_bd)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question