I
I
InternetMaster2021-10-20 14:09:40
Python
InternetMaster, 2021-10-20 14:09:40

Why does the bot not immediately receive a message through register_next_step_handler?

Question, there is a script: (PyTelegramBotAPI library)

@bot.callback_query_handler(func = lambda call: True)
def answer(call):
    if call.message:
        if call.data == 'dbv_tlz':
            bot.send_message(call.message.chat.id, '*Введите список!* Каждая позиция с новой строки', parse_mode='Markdown')
            bot.register_next_step_handler(call.message, tolek_dob)


For some reason, sometimes when a user writes a message, he immediately goes on, and sometimes when you write to the bot, he is idle and you need to resend the message for it to work. In this case, immediately or not immediately, the bot will go to the next. step he "determines himself." What's the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question