2.5 KiB
2.5 KiB
title | description | image |
---|---|---|
message | A message | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png |
Constructor: message
A message
Attributes:
Name | Type | Required | Description |
---|---|---|---|
unread | Bool | Optional | Unread? |
out | Bool | Optional | Is this an outgoing message |
mentioned | Bool | Optional | Whether we were mentioned in this message |
media_unread | Bool | Optional | Whether there are unread media attachments in this message |
id | int | Yes | ID of the message |
from_id | int | Optional | ID of the sender of the message |
to_id | Peer | Yes | ID of the chat were the message was sent |
fwd_from_id | Peer | Optional | Forwarded from ID |
fwd_date | int | Optional | Forwarded date |
via_bot_id | int | Optional | ID of the inline bot that generated the message |
reply_to_msg_id | int | Optional | ID of the message this message replies to |
date | int | Yes | Date of the message |
message | string | Yes | The message |
media | MessageMedia | Optional | Media attachment |
reply_markup | ReplyMarkup | Optional | Reply markup (bot/inline keyboards) |
entities | Array of MessageEntity | Optional | Entities |
views | int | Optional | View count for channel posts |
Type: Message
Example:
$message = ['_' => 'message', 'unread' => Bool, 'out' => Bool, 'mentioned' => Bool, 'media_unread' => Bool, 'id' => int, 'from_id' => int, 'to_id' => Peer, 'fwd_from_id' => Peer, 'fwd_date' => int, 'via_bot_id' => int, 'reply_to_msg_id' => int, 'date' => int, 'message' => 'string', 'media' => MessageMedia, 'reply_markup' => ReplyMarkup, 'entities' => [MessageEntity, MessageEntity], 'views' => int];
Or, if you're into Lua:
message={_='message', unread=Bool, out=Bool, mentioned=Bool, media_unread=Bool, id=int, from_id=int, to_id=Peer, fwd_from_id=Peer, fwd_date=int, via_bot_id=int, reply_to_msg_id=int, date=int, message='string', media=MessageMedia, reply_markup=ReplyMarkup, entities={MessageEntity}, views=int}
Usage of reply_markup
You can provide bot API reply_markup objects here.