MadelineProtoDocs/old_docs/API_docs_v18/constructors/message.md
2019-12-27 17:48:04 +01:00

1.1 KiB

title description image
message A message https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: message

Back to constructors index

A message

Attributes:

Name Type Required Description
id int Yes ID of the message
from_id int Yes ID of the sender of the message
to_id Peer Yes ID of the chat were the message was sent
date int Yes Date of the message
message string Yes The message
media MessageMedia Optional Media attachment

Type: Message

Example:

$message = ['_' => 'message', 'id' => int, 'from_id' => int, 'to_id' => Peer, 'date' => int, 'message' => 'string', 'media' => MessageMedia];

Or, if you're into Lua:

message={_='message', id=int, from_id=int, to_id=Peer, date=int, message='string', media=MessageMedia}