Answer the question
In order to leave comments, you need to log in
Why does ConversationStartedOnFinishCallback not work correctly in Viber bot?
All the best! While writing a small bot for Viber, I encountered a problem when calling the onFinish callback in the onConversationStarted method
https://github.com/Viber/viber-bot-node#Conversati...
In principle, the code from the example works
bot.onConversationStarted((userProfile, isSubscribed, context, onFinish) =>
onFinish(new TextMessage(`Hi, ${userProfile.name}! Nice to meet you.`)));
bot.onConversationStarted((userProfile, isSubscribed, context, onFinish) =>
doSomeRequest(context)
.then(responseData =>{
onFinish(new TextMessage(`Hi! here is data from responseData ${responseData}`))
})
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question