botbuilder-core
Version:
Core components for Microsoft Bot Builder. Components in this library can run either in a browser or on the server.
36 lines • 1.54 kB
TypeScript
import { Middleware } from './middlewareSet';
import { TurnContext } from './turnContext';
/**
* Middleware that will send a typing indicator automatically for each message.
*
* @remarks
* When added, this middleware will send typing activities back to the user when a Message activity
* is received to let them know that the bot has received the message and is working on the response.
* You can specify a delay in milliseconds before the first typing activity is sent and then a frequency,
* also in milliseconds which determines how often another typing activity is sent. Typing activities
* will continue to be sent until your bot sends another message back to the user
*/
export declare class ShowTypingMiddleware implements Middleware {
private readonly delay;
private readonly period;
/**
* Create the SendTypingIndicator middleware
*
* @param delay {number} Number of milliseconds to wait before sending the first typing indicator.
* @param period {number} Number of milliseconds to wait before sending each following indicator.
*/
constructor(delay?: number, period?: number);
/**
* Processes an incoming activity.
*
* @param context {TurnContext} An incoming TurnContext object.
* @param next {function} The next delegate function.
*/
onTurn(context: TurnContext, next: () => Promise<void>): Promise<void>;
private isSkillBot;
/**
* @private
*/
private sendTypingActivity;
}
//# sourceMappingURL=showTypingMiddleware.d.ts.map