I'm still completely new. I use pyTelegramBotAPI:

The user enters some command, the bot sends a message with an example of how to enter data and waits for the next message, receiving records in a variable. The question is how to get a new message?

My code is:

@bot.message_handler(func=lambda c:True, content_types=['text']) def info_message(message): msg = message.text.lower() if msg == 'добавить примечание': bot.send_message(message.chat.id, 'Следующее сообщение станет примечанием:') note = message.text print(note) 

Returns 'add note', but I need the following message.

  • show all the code - Anatol
  • Code 500 lines .... What exactly to show? - Garison
  • what exactly is the problem? How to understand "how to get a new message"? from the server how to get a new update or what? - Anatol
  • and what does "return add note " mean? where returns, prints to the console? - Anatol
  • (yes, it prints to the console) I am writing to the user 'The following message will become a note:' and the user sends the bot any message, how can I get the text of this message (which the user wrote to the bot after seeing the message 'The next message will become a note:')? - Garison 3:32 pm

0