I\'m playing around with building a simple Facebook Messenger chatbot and I\'m having trouble sending messages in sequence.
In the example above, it should
You can achieve QUEUING by promises.
QUEUING
function delay(time) { return new Promise(function(resolve, reject) { setTimeout(resolve, time); }); } delay(2000).then(() => { console.log('hi'); delay(2000).then(() => { console.log('hello'); delay(2000).then(() => { console.log('welcome'); }) }) })