Edit

Share via


Dialog class

Base class for all dialogs. Dialogs are the core component of the BotBuilder framework. Bots use Dialogs to manage arbitrarily complex conversations with a user.

Methods

begin<T>(CallSession, T)

Called when a new dialog session is being started.

dialogResumed<T>(CallSession, IDialogResult<T>)

A child dialog has ended and the current one is being resumed.

replyReceived(CallSession)

Called when a new reply message has been recieved from a user. Derived classes should implement this to process the message recieved from the user.

Method Details

begin<T>(CallSession, T)

Called when a new dialog session is being started.

function begin<T>(session: CallSession, args?: T)

Parameters

session
CallSession

Session object for the current conversation.

args

T

(Optional) arguments passed to the dialog by its parent.

dialogResumed<T>(CallSession, IDialogResult<T>)

A child dialog has ended and the current one is being resumed.

function dialogResumed<T>(session: CallSession, result: IDialogResult<T>)

Parameters

session
CallSession

Session object for the current conversation.

result

IDialogResult<T>

Result returned by the child dialog.

replyReceived(CallSession)

Called when a new reply message has been recieved from a user. Derived classes should implement this to process the message recieved from the user.

function replyReceived(session: CallSession)

Parameters

session
CallSession

Session object for the current conversation.