How to use the botbuilder-core.InputHints.ExpectingInput function in botbuilder-core

To help you get started, we’ve selected a few botbuilder-core 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 BotBuilderCommunity / botbuilder-community-js / libraries / botbuilder-dialog-prompts / src / internet.ts View on Github external
protected async onPrompt(context: TurnContext, state: any, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
github BotBuilderCommunity / botbuilder-community-js / libraries / botbuilder-dialog-prompts / src / guid.ts View on Github external
protected async onPrompt(context: TurnContext, state: any, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
github microsoft / botbuilder-js / libraries / botbuilder-dialogs / src / prompts / activityPrompt.ts View on Github external
public async beginDialog(dc: DialogContext, options: PromptOptions): Promise {
        // Ensure prompts have input hint set
        const opt: Partial = {...options};
        if (opt.prompt && typeof opt.prompt === 'object' && typeof opt.prompt.inputHint !== 'string') {
            opt.prompt.inputHint = InputHints.ExpectingInput;
        }
        if (opt.retryPrompt && typeof opt.retryPrompt === 'object' && typeof opt.retryPrompt.inputHint !== 'string') {
            opt.retryPrompt.inputHint = InputHints.ExpectingInput;
        }

        // Initialize prompt state
        const state: any = dc.activeDialog.state as ActivityPromptState;
        state.options = opt;
        state.state = {};

        // Send initial prompt
        await this.onPrompt(dc.context, state.state, state.options, false);

        return Dialog.EndOfTurn;
    }
github BotBuilderCommunity / botbuilder-community-js / libraries / botbuilder-dialog-prompts / src / numberWithUnit.ts View on Github external
protected async onPrompt(context: TurnContext, state: any, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
github BotBuilderCommunity / botbuilder-community-js / libraries / botbuilder-dialog-prompts / src / socialMedia.ts View on Github external
protected async onPrompt(context: TurnContext, state: any, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
github microsoft / botbuilder-js / libraries / botbuilder-dialogs / src / prompts / activityPrompt.ts View on Github external
protected async onPrompt(context: TurnContext, state: object, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
github microsoft / botbuilder-js / libraries / botbuilder-dialogs / src / prompts / textPrompt.ts View on Github external
protected async onPrompt(context: TurnContext, state: any, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
github microsoft / botbuilder-js / libraries / botbuilder-dialogs / src / prompts / activityPrompt.ts View on Github external
protected async onPrompt(context: TurnContext, state: object, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }
github microsoft / botbuilder-js / libraries / botbuilder-dialogs / src / prompts / datetimePrompt.ts View on Github external
protected async onPrompt(context: TurnContext, state: any, options: PromptOptions, isRetry: boolean): Promise {
        if (isRetry && options.retryPrompt) {
            await context.sendActivity(options.retryPrompt, undefined, InputHints.ExpectingInput);
        } else if (options.prompt) {
            await context.sendActivity(options.prompt, undefined, InputHints.ExpectingInput);
        }
    }