4.0 KiB
4.0 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 |
---|---|---|---|
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 |
silent | Bool | Optional | Whether this is a silent message (no notification triggered) |
post | Bool | Optional | Whether this is a channel post |
from_scheduled | Bool | Optional | Whether this is a scheduled post |
legacy | Bool | Optional | This is a legacy message: it has to be refetched with the new layer |
edit_hide | Bool | Optional | Whether the message should be shown as not modified to the user, even if an edit date is present |
id | int | Yes | ID of the message |
from_id | Peer | Optional | |
peer_id | Peer | Yes | |
fwd_from | MessageFwdHeader | Optional | Info about forwarded messages |
via_bot_id | int | Optional | ID of the inline bot that generated the message |
reply_to | MessageReplyHeader | Optional | |
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 | Message entities for styled text |
views | int | Optional | View count for channel posts |
forwards | int | Optional | |
replies | MessageReplies | Optional | |
edit_date | int | Optional | Last edit date of this message |
post_author | string | Optional | Name of the author of this message for channel posts (with signatures enabled) |
grouped_id | long | Optional | Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album |
restriction_reason | Array of RestrictionReason | Optional | Contains the reason why access to this message must be restricted. |
Type: Message
Example:
$message = ['_' => 'message', 'out' => Bool, 'mentioned' => Bool, 'media_unread' => Bool, 'silent' => Bool, 'post' => Bool, 'from_scheduled' => Bool, 'legacy' => Bool, 'edit_hide' => Bool, 'id' => int, 'from_id' => Peer, 'peer_id' => Peer, 'fwd_from' => MessageFwdHeader, 'via_bot_id' => int, 'reply_to' => MessageReplyHeader, 'date' => int, 'message' => 'string', 'media' => MessageMedia, 'reply_markup' => ReplyMarkup, 'entities' => [MessageEntity, MessageEntity], 'views' => int, 'forwards' => int, 'replies' => MessageReplies, 'edit_date' => int, 'post_author' => 'string', 'grouped_id' => long, 'restriction_reason' => [RestrictionReason, RestrictionReason]];
Or, if you're into Lua:
message={_='message', out=Bool, mentioned=Bool, media_unread=Bool, silent=Bool, post=Bool, from_scheduled=Bool, legacy=Bool, edit_hide=Bool, id=int, from_id=Peer, peer_id=Peer, fwd_from=MessageFwdHeader, via_bot_id=int, reply_to=MessageReplyHeader, date=int, message='string', media=MessageMedia, reply_markup=ReplyMarkup, entities={MessageEntity}, views=int, forwards=int, replies=MessageReplies, edit_date=int, post_author='string', grouped_id=long, restriction_reason={RestrictionReason}}
Usage of reply_markup
You can provide bot API reply_markup objects here.