Answer the question
In order to leave comments, you need to log in
Telebot python how to make input function?
How can the input function be implemented? more specifically, I need to get a number from the user from 1 to 86, if the number is less than 1 or more than 86, then the user will be prompted to enter the number again
Answer the question
In order to leave comments, you need to log in
@bot.message_handler(content_types=['text'])
def func1(message):
bot.send_message(message.from_user.id, 'Введите текст')
bot.register_next_step_handler(message, func2)
def func2(message):
var = message.text # Текст сообщения от пользователя
bot.send_message(message.from_user.id, var) # Вернет сообщение пользователя обартно
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question