Charca / bootbot

Facebook Messenger Bot Framework for Node.js
MIT License
970 stars 252 forks source link

Bootbot Request #177

Open Scylin232 opened 5 years ago

Scylin232 commented 5 years ago

I have a part of code:

bot.on('postback:PERSISTENT_MENU_CON', (payload, chat) => {
   chat.say('*Thats must be some contacts*');
   chat.say('You can right your contact request here:')
   bot.on('message', (payload, chat) => {
     const text = payload.message.text;
     chat.say('Your request sended!');
     console.log(`Request from Contacts: ${text}`)
   });
});

And i have this part:

bot.on('postback:PERSISTENT_MENU_ANT', (payload, chat) => {
   chat.say('Write your question here:')
   bot.on('message', (payload, chat) => {
     const text = payload.message.text;
     chat.say('Your question sended!');
     console.log(`Question from User: ${text}`)
   });
});

They intertwine, asking several times how to fix it?