Telegram bot to wait for user reply
The code below is for a Telegram Bot which basically takes a person username and password and verifies it to provide his average expenditures. The problem as we see is the bot waits for the user to send his username and password for 10 sec either waste of time (or) not sufficient time was given. How could I program such that the bot waits for user message and then executes the next lines ( wait till the trigger ) def highest(intent,chatid,text): seq=["What is your Username ?","Password?"] send_message(seq[0],chatid) time.sleep(6) name,chatid = reply_function() print name send_message(seq[1]