Hi,
I'm facing a problem using bot.startConversation, I use it for send messages(batch) sequentially.
The problem is the bot receives, from Facebook Messenger, but not process all the messages (not enter in controller.hears or controller.on); in fact it receives all the messages but some are not captured by controller.hears or controller.on. It happen when arrived a batch of messages(a lot of messages) in input.
It does not happen when I use bot.reply: all messages arrive and are answered.
I tried to capture messages both with
controller.hears("(.*)", ["message_received","direct_message","direct_mention","mention"]...
and
var messages = await someFunction(parameter); //returns a promise
for (let msg of messages) {
bot.reply(message, msg); //'message' is the message arrived from a user(from Facebook)
}
}
Doesn't works
var messages = await someFunction(parameter); //returns a promise
bot.startConversation(message, (err, convo) => {
for (let msg of messages) {
convo.say(msg);
}
});
Could it be a problem with bot.startConversation?
Can I send messages sequentially in other ways?
Thanks
Hi, I'm facing a problem using
bot.startConversation
, I use it for send messages(batch) sequentially. The problem is the bot receives, from Facebook Messenger, but not process all the messages (not enter incontroller.hears
orcontroller.on
); in fact it receives all the messages but some are not captured bycontroller.hears
orcontroller.on
. It happen when arrived a batch of messages(a lot of messages) in input. It does not happen when I use bot.reply: all messages arrive and are answered.I tried to capture messages both with
controller.hears("(.*)", ["message_received","direct_message","direct_mention","mention"]...
andcontroller.on(["message_received","direct_message","direct_mention","mention"]...
Examples of how I send messages
Could it be a problem with
bot.startConversation
? Can I send messages sequentially in other ways? Thanks