Skip to content

API Reference parrot.integrations.msteams.handler

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.integrations.msteams.handler

View source

Class MessageHandler

Interface for handling messages sent by Bot.

Supports text, images, documents, and Adaptive Cards.

Method MessageHandler.send_image

Send an image to the user.

send_image(url: str, turn_context: TurnContext, mimetype: str = 'image/png')

Parameter Type Default Description
url str
turn_context TurnContext
mimetype str 'image/png'

Method MessageHandler.send_text

Send a text message to the user.

send_text(text: str, turn_context: TurnContext)

Parameter Type Default Description
text str
turn_context TurnContext

Method MessageHandler.text_message

text_message(message_data: str) -> MessageFactory

Parameter Type Default Description
message_data str

Returns: MessageFactory

Method MessageHandler.send_message

Send a message to the user.

send_message(message: Activity, turn_context: TurnContext)

Parameter Type Default Description
message Activity
turn_context TurnContext

Method MessageHandler.get_card

get_card(card_data: str) -> CardFactory

Parameter Type Default Description
card_data str

Returns: CardFactory

Method MessageHandler.create_card

create_card(card_data) -> Attachment

Parameter Type Default Description
card_data

Returns: Attachment

Method MessageHandler.send_card

Send an Adaptive Card to the user.

send_card(card_data: Dict[str, Any], turn_context: TurnContext) -> None

Parameter Type Default Description
card_data Dict[str, Any] Adaptive Card JSON structure
turn_context TurnContext The turn context for sending

Method MessageHandler.send_document

Send a document as an attachment.

send_document(file_path: Path, turn_context: TurnContext, filename: Optional[str] = None) -> None

Parameter Type Default Description
file_path Path Path to the file to send
turn_context TurnContext The turn context for sending
filename Optional[str] None Optional display name for the file

Method MessageHandler.send_file_attachment

Send a file attachment with optional caption.

send_file_attachment(file_path: Path, turn_context: TurnContext, caption: Optional[str] = None) -> None

Parameter Type Default Description
file_path Path Path to the file
turn_context TurnContext The turn context for sending
caption Optional[str] None Optional caption for the file

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally