Message

class pyrogram.raw.types.Message

A message.

Constructor type of Message.

Details
  • Layer: 126

  • ID: 0xbce383d2

Parameters
  • id (int 32-bit) – ID of the message.

  • peer_id (Peer) – Peer ID, the chat where this message was sent.

  • date (int 32-bit) – Date of the message.

  • message (str) – The message.

  • 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 message.

  • 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.

  • pinned (bool, optional) – Whether this message is pinned.

  • from_id (Peer, optional) – ID of the sender of the message.

  • fwd_from (MessageFwdHeader, optional) – Info about forwarded messages.

  • via_bot_id (int 32-bit, optional) – ID of the inline bot that generated the message.

  • reply_to (MessageReplyHeader, optional) – Reply information.

  • media (MessageMedia, optional) – Media attachment.

  • reply_markup (ReplyMarkup, optional) – Reply markup (bot/inline keyboards).

  • entities (List of MessageEntity, optional) – Message entities for styled text.

  • views (int 32-bit, optional) – View count for channel posts.

  • forwards (int 32-bit, optional) – Forward counter.

  • replies (MessageReplies, optional) – Info about post comments (for channels) or message replies (for groups).

  • edit_date (int 32-bit, optional) – Last edit date of this message.

  • post_author (str, optional) – Name of the author of this message for channel posts (with signatures enabled).

  • grouped_id (int 64-bit, optional) – Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group.

  • restriction_reason (List of RestrictionReason, optional) – Contains the reason why access to this message must be restricted.

  • ttl_period (int 32-bit, optional) – Telegram API parameter.