How to use the botbuilder.Prompts function in botbuilder

To help you get started, we’ve selected a few botbuilder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / BotBuilder-Samples / Node / demo-ContosoFlowers / bot / dialogs / settings.js View on Github external
function (session) {
        builder.Prompts.choice(session, 'settings_intro', [
            session.gettext(SettingChoice.Email),
            session.gettext(SettingChoice.Phone),
            session.gettext(SettingChoice.Addresses),
            session.gettext(SettingChoice.Cancel)
        ]);
    },
    // Trigger option edit
github microsoft / BotBuilder-Samples / Node / core-AppInsights / app.js View on Github external
bot.dialog('greet', new builder.SimpleDialog(function (session, results) {
    if (results && results.response) {
        session.userData[UserNameKey] = results.response;
        session.privateConversationData[UserWelcomedKey] = true;

        var telemetry = telemetryModule.createTelemetry(session);
        telemetry.userName = results.response; // You can add properties after-the-fact as well
        appInsightsClient.trackEvent({ name: 'new user', properties: telemetry });

        return session.endDialog('Welcome %s! %s', results.response, HelpMessage);
    }

    builder.Prompts.text(session, 'Before get started, please tell me your name?');
}));
github pnp / PnP / Solutions / O365.Modern.Provisioning / VeronicaBot / app.js View on Github external
new builder.ThumbnailCard(session)
        .title("Summary")
        .subtitle("Here the summary of your request")
        .text(
          "Title: " + session.privateConversationData['Title'] + "\n\n" +
          "Owner: " + session.privateConversationData['Owner'] + "\n\n" +
          "Description: " + session.privateConversationData['Description'] + "\n\n" +
          "SiteType: " + session.privateConversationData['SiteType'] + "\n\n" +
          "Alias: " + session.privateConversationData['Alias'])
        // .images([builder.CardImage.create(session, '/images/sp.png')])
        .buttons([
          builder.CardAction.imBack(session, "canceled", "Cancel"),
          builder.CardAction.imBack(session, "confirmed", "Confirm"),
        ])
    ]);
    builder.Prompts.text(session, msg);
  },
  function name(session, results) {
github glaucia86 / hands-on-bots-node / src / Modulo-3 / perguntarIdioma.js View on Github external
session => {
        builder.Prompts.text(session, 'Qual é o idioma que você sabe falar?');
    },
github microsoft / BotBuilder-Samples / Node / core-MultiDialogs / hotels.js View on Github external
function (session) {
            builder.Prompts.time(session, 'When do you want to check in?');
        },
        function (session, results, next) {
github microsoft / BotBuilder-Samples / Node / core-State / app.js View on Github external
bot.dialog('greet', new builder.SimpleDialog(function (session, results) {
    if (results && results.response) {
        session.userData[UserNameKey] = results.response;
        session.privateConversationData[UserWelcomedKey] = true;
        return session.endDialog('Welcome %s! %s', results.response, HelpMessage);
    }

    builder.Prompts.text(session, 'Before get started, please tell me your name?');
}));
github benc-uk / smilr / bot / src / app.js View on Github external
(session) => {
    var msg = new builder.Message(session).addAttachment(createTopicCard(session, session.conversationData.events[0]));
    builder.Prompts.number(session, msg)
    //session.send(msg);
  },
  (session, result) => {