botas-express
    Preparing search index...

    Class CoreActivityBuilder

    Fluent builder for constructing outbound activities.

    const reply = new CoreActivityBuilder()
    .withConversationReference(incomingActivity)
    .withText('Hello!')
    .build()
    Index

    Constructors

    Methods

    • Copy routing fields from an incoming activity and swap from/recipient. Sets serviceUrl, conversation, from (← source recipient), and recipient (← source from).

      Parameters

      • source: CoreActivity

        The incoming activity to copy routing fields from.

      Returns this

      this for method chaining.

    • Set the activity type (default is "message").

      Parameters

      • type: string

        Activity type string.

      Returns this

      this for method chaining.

    • Set the service URL for the channel.

      Parameters

      • serviceUrl: string

        Bot Service service URL.

      Returns this

      this for method chaining.

    • Set the conversation reference.

      Parameters

      • conversation: Conversation

        Conversation to target.

      Returns this

      this for method chaining.

    • Set the sender account.

      Parameters

      • from: ChannelAccount

        Sender's channel account.

      Returns this

      this for method chaining.

    • Set the recipient account.

      Parameters

      • recipient: ChannelAccount

        Recipient's channel account.

      Returns this

      this for method chaining.

    • Set the text content of the activity.

      Parameters

      • text: string

        Message text.

      Returns this

      this for method chaining.

    • Set the entities array.

      Parameters

      • entities: Entity[]

        Entities to attach.

      Returns this

      this for method chaining.

    • Set the attachments array.

      Parameters

      • attachments: Attachment[]

        Attachments to include.

      Returns this

      this for method chaining.

    • Return a shallow copy of the constructed activity.

      Returns Partial<CoreActivity>

      The built activity as a partial CoreActivity.