Builder.Prompts.text does not work after remote hosting

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.

  • Bots show that when testing on the BOT Framework page
  • The bot receives messages through WebChat and Slack
  • 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.

+4
1

builder.Prompts.number() .text()? ( , ) . . .

, , , ( builder.Prompts.number), , , , , .

, . , session.conversationData.count HHCC.getNews(). .

0

Source: https://habr.com/ru/post/1671617/


All Articles