Share via


Extensions.SayAsync Method

Definition

Post a message and optional SSML to be sent to the user, using previous messages to establish a conversation context.

public static System.Threading.Tasks.Task SayAsync (this Microsoft.Bot.Builder.Dialogs.Internals.IBotToUser botToUser, string text, string speak = default, Microsoft.Bot.Builder.Dialogs.MessageOptions options = default, string locale = default, System.Threading.CancellationToken cancellationToken = default);

Parameters

botToUser
IBotToUser

Communication channel to use.

text
String

The message text.

speak
String

The SSML markup for text to speech.

options
MessageOptions

The options for the message.

locale
String

The locale of the text.

cancellationToken
CancellationToken

The cancellation token.

Returns

A task that represents the post operation.

Remarks

If the locale parameter is not set, locale of the incoming message will be used for reply.

Applies to

Product Versions
Microsoft.Bot.Builder 3.0