ConfirmPrompt class

Prompts a user to confirm something with a "yes" or "no" response.

Extends
Prompt<boolean>

Remarks

By default the prompt will return to the calling dialog a boolean representing the users selection.

Constructors

ConfirmPrompt(string, PromptValidator<boolean>, string)

Creates a new ConfirmPrompt instance.

Properties

choiceOptions

Additional options passed to the ChoiceFactory and used to tweak the style of choices rendered to the user.

confirmChoices

Custom list of choices to send for the prompt.

defaultLocale

The prompts default locale that should be recognized.

style

Style of the "yes" and "no" choices rendered to the user when prompting.

Constructor Details

ConfirmPrompt(string, PromptValidator<boolean>, string)

Creates a new ConfirmPrompt instance.

new ConfirmPrompt(dialogId: string, validator?: PromptValidator<boolean>, defaultLocale?: string)

Parameters

dialogId
string

Unique ID of the dialog within its parent DialogSet or ComponentDialog.

validator
PromptValidator<boolean>

(Optional) validator that will be called each time the user responds to the prompt.

defaultLocale
string

(Optional) locale to use if TurnContext.activity.locale is not specified. Defaults to a value of en-us.

Property Details

choiceOptions

Additional options passed to the ChoiceFactory and used to tweak the style of choices rendered to the user.

choiceOptions: ChoiceFactoryOptions | undefined

Property Value

ChoiceFactoryOptions | undefined

confirmChoices

Custom list of choices to send for the prompt.

confirmChoices: string | Choice[] | undefined

Property Value

string | Choice | undefined[]

defaultLocale

The prompts default locale that should be recognized.

defaultLocale: string | undefined

Property Value

string | undefined

style

Style of the "yes" and "no" choices rendered to the user when prompting.

style: ListStyle

Property Value

Remarks

Defaults to ListStyle.auto.