Answer the question
In order to leave comments, you need to log in
bot.register_next_step_handler not working how to fix?
@bot.message_handler(commands=['go'])
def mess1(message):
bot.send_message(message.chat.id, "Привет!")
print("ГОТОВО")
bot.register_next_step_handler(message, mess2)
def mess2(message):
bot.send_message(message.chat.id, "как дела?")
print("ГОТОВО")
Answer the question
In order to leave comments, you need to log in
See the usage example
https://github.com/eternnoir/pyTelegramBotAPI/blob...
The first argument is the new message you sent
@bot.message_handler(commands=['go'])
def mess1(message):
msg = bot.send_message(message.chat.id, "Привет!")
print("ГОТОВО")
bot.register_next_step_handler(msg, mess2)
def mess2(message):
bot.send_message(message.chat.id, "как дела?")
print("ГОТОВО")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question