Message Reference¶
The Message model represents a message sent or received in Shad Messenger.
- class aioshad.types.Message(id: str, text: str, author_guid: str, chat_guid: str, message_type: str = 'Text', reply_to_message_id: str | None = None, is_edited: bool = False, time: int | None = None, file_inline: Optional[Dict[str, Any]]=None, raw: Dict[str, Any]=<factory>, _client: Client | None = None)[source]¶
Bases:
objectRepresents a Shad message.
- author_guid: str¶
- chat_guid: str¶
- property chat_id: str¶
Alias for chat_guid for filter and middleware compatibility.
- file_inline: Dict[str, Any] | None = None¶
- id: str¶
- is_edited: bool = False¶
- property is_outgoing: bool¶
Returns True if this message was sent by the currently authenticated client.
- property message_id: str¶
Alias for id.
- message_type: str = 'Text'¶
- raw: Dict[str, Any]¶
- async reply_file(file: str | bytes | Path, file_name: str | None = None, mime: str | None = None, caption: str | None = None) Message[source]¶
Replies to this message with a document/file.
- async reply_photo(photo: str | bytes | Path, caption: str | None = None) Message[source]¶
Replies to this message with a photo.
- reply_to_message_id: str | None = None¶
- property sender_id: str¶
Alias for author_guid for filter and middleware compatibility.
- text: str¶
- time: int | None = None¶