botas-core
    Preparing search index...

    Class TeamsActivityBuilder

    Fluent builder for constructing outbound TeamsActivity instances.

    const reply = new TeamsActivityBuilder()
    .withConversationReference(incomingActivity)
    .withText('Hello!')
    .addMention(activity.from)
    .build()
    Index

    Constructors

    Methods

    • Creates a mention entity for the account and adds it to entities. Does NOT modify the activity text — caller must include <at>Name</at> markup.

      Parameters

      • account: ChannelAccount

        The channel account to mention.

      • OptionalmentionText: string

        Optional custom mention text; defaults to <at>account.name</at>.

      Returns this

      this for method chaining.

      If account is falsy.

    • Parses JSON string or accepts a pre-parsed object as an Adaptive Card and appends it as an attachment.

      Parameters

      • card: string | Record<string, unknown>

        JSON string or pre-parsed Adaptive Card object.

      Returns this

      this for method chaining.

      If card is a string and not valid JSON.

    • Parses JSON string or accepts a pre-parsed object as an Adaptive Card and sets it as the only attachment.

      Parameters

      • card: string | Record<string, unknown>

        JSON string or pre-parsed Adaptive Card object.

      Returns this

      this for method chaining.

      If card is a string and not valid JSON.