Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
429 views
in Technique[技术] by (71.8m points)

python 3.x - Whatsapp bot using Twilio and Flask- Wait for Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...