I was building a WhatsApp bot using Twilio and Flask. So what should I do to make my WhatsApp bot wait for user reply and then execute the rest of the code. For example, my bot asks the user yes or no, the bot should wait for a reply, and based on the message received execute the rest of the code.
msg = request.form.get('Body')
resp = MessagingResponse()
msg = resp.message()
msg.body('Yes or No')
return str(resp)
{Wait For Reply}
if msg == 'yes':
do something
else:
do else
I am a begginer at Python.Please Help me .Thanks in advance
question from:
https://stackoverflow.com/questions/65845336/whatsapp-bot-using-twilio-and-flask-wait-for-reply 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…