Hessel
Hessel

Reputation: 762

Optional properties for prompts in bot framework

I am struggling with using optional properties (iPromptOptions) like maxRetries and retryPrompt. Can't get the syntax right for node.js. Does anyone have an example of a prompt with an optional property that actually works?

Upvotes: 1

Views: 443

Answers (2)

Sagar Gohil
Sagar Gohil

Reputation: 21

this is the correct syntax to apply IPromptOptions

builder.Prompts.choice(session, "Please select : ", "Cat|Dog|Fox",
                {
                    listStyle: builder.ListStyle.button,
                    maxRetries: 2,
                    retryPrompt:'Please Provide invoice no'

                })

Upvotes: 2

Hessel
Hessel

Reputation: 762

AndrewMat answered my question by posting his own question. The syntex is something like:

builder.Prompts.number(session, "Cool. What's the number?", { iPromptOptions: "I couldn't understand $%#@. Could you type it again?" });

Upvotes: 0

Related Questions