> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bot Message • AI Agent SDK

> BotMessage: Represents a message in a messaging platform.

# BotMessage

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Represents a message in a messaging platform.

Attributes:
message\_id: Platform-specific message identifier
content: Message content (text or structured data)
message\_type: Type of message
sender: User who sent the message
channel: Channel where the message was sent
timestamp: Message timestamp
reply\_to: ID of message being replied to
thread\_id: Thread identifier (for threaded conversations)
attachments: List of attachment URLs or data
metadata: Additional platform-specific metadata

## Properties

<ResponseField name="message_id" type="str">
  No description available.
</ResponseField>

<ResponseField name="content" type="Union">
  No description available.
</ResponseField>

<ResponseField name="message_type" type="MessageType">
  No description available.
</ResponseField>

<ResponseField name="sender" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="channel" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="timestamp" type="float">
  No description available.
</ResponseField>

<ResponseField name="reply_to" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="thread_id" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="attachments" type="List">
  No description available.
</ResponseField>

<ResponseField name="metadata" type="Dict">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="text()" icon="function" href="../functions/BotMessage-text">
    Get message text content.
  </Card>

  <Card title="is_command()" icon="function" href="../functions/BotMessage-is_command">
    Check if message is a command.
  </Card>

  <Card title="command()" icon="function" href="../functions/BotMessage-command">
    Extract command name if this is a command message.
  </Card>

  <Card title="command_args()" icon="function" href="../functions/BotMessage-command_args">
    Extract command arguments if this is a command message.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **from\_dict**: Create from dictionary.
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/protocols.py#L128">
  `praisonaiagents/bots/protocols.py` at line 128
</Card>
