DraftMessage

class pyrogram.types.DraftMessage

Contains information about a message draft.

Parameters:
  • reply_to_message_id (int, optional) – The id of the message which this draft directly replied to.

  • reply_to_message (Message, optional) – Information about the message to be replied.

  • date (datetime, optional) – Date the message was sent.

  • text (str, optional) – For text messages, the actual UTF-8 text of the message, 0-4096 characters. If the message contains entities (bold, italic, …) you can access text.markdown or text.html to get the marked up message text. In case there is no entity, the fields will contain the same text as text.

  • entities (List of MessageEntity, optional) – For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.

  • link_preview_options (LinkPreviewOptions, optional) – Options used for link preview generation for the draft message, if it is a text message and link preview options were changed.

  • effect_id (str, optional) – Unique identifier of the message effect added to the message. Use get_message_effects() to get the list of available message effect ids.

  • video_note (VideoNote, optional) – Message is a video note, information about the video message.

  • voice (Voice, optional) – Message is a voice message, information about the file.

  • show_caption_above_media (bool, optional) – True, if the caption must be shown above the message media.

  • media (MessageMediaType, optional) – The message is a media message. This field will contain the enumeration type of the media message. You can use media = getattr(message, message.media.value) to access the media message.

  • empty (bool, optional) – The message is empty. A message can be empty in case it was deleted or you tried to retrieve a message that doesn’t exist yet.

  • chat (Chat, optional) – Conversation the message belongs to. Can be None if unknown.