Skip to content

Commit

Permalink
Reduced bot message delay to 500 ms
Browse files Browse the repository at this point in the history
  • Loading branch information
harrymt committed Aug 22, 2017
1 parent c3ec5ad commit f6961a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@
console.log('-- from bot to user vv --');
console.log(JSON.stringify(reply));

FB.send(senderFbid, reply, 4000, () => {
FB.send(senderFbid, reply, 500, () => {
if (typeof anotherReply !== 'undefined' && anotherReply !== null) {
FB.send(senderFbid, anotherReply, 4000, () => {
FB.send(senderFbid, anotherReply, 500, () => {
if (typeof thirdReply !== 'undefined' && thirdReply !== null) {
FB.send(senderFbid, thirdReply, 4000, () => {
FB.send(senderFbid, thirdReply, 500, () => {
if (typeof fourthReply !== 'undefined' && fourthReply !== null) {
FB.send(senderFbid, thirdReply, 4000, () => {
FB.send(senderFbid, thirdReply, 500, () => {
if (typeof fifthReply !== 'undefined' && fifthReply !== null) {
FB.send(senderFbid, fifthReply, 4000, () => {
FB.send(senderFbid, fifthReply, 500, () => {
console.log('Sent all messages to user');
});
}
Expand Down

0 comments on commit f6961a9

Please sign in to comment.