I have a simple bot that retrieves news articles based on user prompts. The whole thread works fine using the emulator, but after deployment on the server, the bot fails when it falls into the builder.Prompts.text block. Below is my code and you will see the “Ask for an article” prompt in which it stops in the stream.
The bot also shows 0 problems for each channel after interaction
var bot = new builder.UniversalBot(connector); var intents = new builder.IntentDialog(); bot.dialog('/', intents); var HHCC = require('./hhcc.js'); intents.matches(/^news/i, [ function(session) { console.log("Intent Given!"); session.beginDialog('/news'); }, function(session, results) { session.send('Enjoy reading!'); } ]); bot.dialog('/news', [ function(session) { console.log("Asking article count"); builder.Prompts.text(session, 'How many articles would you like to see?'); }, function(session, results) { session.sendTyping(); session.conversationData.count = results.response; HHCC.getNews(session.conversationData.count, session, function(newsArticles) { newsArticles.forEach(function(newsCard) { session.send(newsCard); }); session.conversationData.news = newsArticles; console.log(newsArticles); session.endDialog(); }); } ]); server.post('/api/messages', connector.listen());
Ive checked all the logs and seems to be unable to find any clues, as he failed quite quietly.
builder.Prompts.number() .text()? ( , ) . . .
, , , ( builder.Prompts.number), , , , , .
, . , session.conversationData.count HHCC.getNews(). .
Source: https://habr.com/ru/post/1671617/More articles:Can I set the color of a ScrollWindow? - c ++What are the pros and cons of using AWS CodePipeline vs Jenkins - jenkinsHow to approach refactoring this code (C #, Types) - c #How to use .babelrc plugin parameters in webpack.config.js - javascriptis the aggregate less efficient than cycles? - loopsC # draw a circle around the label - c #Using less-plugin-glob with webpack - webpackTwig Setting dropdown menu option - phpУровень Keras Lambda не имеет выходной тензорной формы, ошибка при компиляции модели - pythonAre javascript caching operations? - javascriptAll Articles