MessageMediaDocument

class pyrogram.raw.types.MessageMediaDocument

Document (video, audio, voice, sticker, any media type except photo)

Constructor of MessageMedia.

Details:
  • Layer: 223

  • ID: 52D8CCD9

Parameters:
  • nopremium (bool, optional) – Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played.

  • spoiler (bool, optional) – Whether this media should be hidden behind a spoiler warning

  • video (bool, optional) – Whether this is a video.

  • round (bool, optional) – Whether this is a round video.

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

  • document (Document, optional) – Attached document

  • alt_documents (List of Document, optional) – Videos only, contains alternative qualities of the video.

  • video_cover (Photo, optional) – Custom video cover.

  • video_timestamp (int 32-bit, optional) – Start playing the video at the specified timestamp (seconds).

  • ttl_seconds (int 32-bit, optional) – Time to live of self-destructing document

Functions:

This object can be returned by 2 functions.

messages.UploadMedia

Upload a file and associate it to a chat (without actually sending it to the chat)

messages.UploadImportedMedia

Upload a media file associated with an imported chat, click here for more info ».

TL Schema

messageMediaDocument#52d8ccd9
flags:#
nopremium:flags.3?true
spoiler:flags.4?true
video:flags.6?true
round:flags.7?true
voice:flags.8?true
document:flags.0?Document
alt_documents:flags.5?Vector<Document>
video_cover:flags.9?Photo
video_timestamp:flags.10?int
ttl_seconds:flags.2?int

= MessageMedia

Parameter Tree

MessageMediaDocument
├── nopremiumtrue (optional)
├── spoilertrue (optional)
├── videotrue (optional)
├── roundtrue (optional)
├── voicetrue (optional)
├── documentDocument (optional)
│ ├── DocumentEmpty
│ │ └── idlong
│ └── Document
│ ├── idlong
│ ├── access_hashlong
│ ├── file_referencebytes
│ ├── dateint
│ ├── mime_typestring
│ ├── sizelong
│ ├── thumbsVector < PhotoSize > (optional)
│ │ ├── PhotoSizeEmpty
│ │ │ └── typestring
│ │ ├── PhotoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizeint
│ │ ├── PhotoCachedSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── bytesbytes
│ │ ├── PhotoStrippedSize
│ │ │ ├── typestring
│ │ │ └── bytesbytes
│ │ ├── PhotoSizeProgressive
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizesVector < int >
│ │ └── PhotoPathSize
│ │ ├── typestring
│ │ └── bytesbytes
│ ├── video_thumbsVector < VideoSize > (optional)
│ │ ├── VideoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ ├── sizeint
│ │ │ └── video_start_tsdouble (optional)
│ │ ├── VideoSizeEmojiMarkup
│ │ │ ├── emoji_idlong
│ │ │ └── background_colorsVector < int >
│ │ └── VideoSizeStickerMarkup
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ ├── sticker_idlong
│ │ └── background_colorsVector < int >
│ ├── dc_idint
│ └── attributesVector < DocumentAttribute >
│ │ ├── wint
│ │ └── hint
│ │ ├── masktrue (optional)
│ │ ├── altstring
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coordsMaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_messagetrue (optional)
│ │ ├── supports_streamingtrue (optional)
│ │ ├── nosoundtrue (optional)
│ │ ├── durationdouble
│ │ ├── wint
│ │ ├── hint
│ │ ├── preload_prefix_sizeint (optional)
│ │ ├── video_start_tsdouble (optional)
│ │ └── video_codecstring (optional)
│ │ ├── voicetrue (optional)
│ │ ├── durationint
│ │ ├── titlestring (optional)
│ │ ├── performerstring (optional)
│ │ └── waveformbytes (optional)
│ │ └── file_namestring
│ ├── freetrue (optional)
│ ├── text_colortrue (optional)
│ ├── altstring
│ └── stickersetInputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
├── alt_documentsVector < Document > (optional)
│ ├── DocumentEmpty
│ │ └── idlong
│ └── Document
│ ├── idlong
│ ├── access_hashlong
│ ├── file_referencebytes
│ ├── dateint
│ ├── mime_typestring
│ ├── sizelong
│ ├── thumbsVector < PhotoSize > (optional)
│ │ ├── PhotoSizeEmpty
│ │ │ └── typestring
│ │ ├── PhotoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizeint
│ │ ├── PhotoCachedSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── bytesbytes
│ │ ├── PhotoStrippedSize
│ │ │ ├── typestring
│ │ │ └── bytesbytes
│ │ ├── PhotoSizeProgressive
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizesVector < int >
│ │ └── PhotoPathSize
│ │ ├── typestring
│ │ └── bytesbytes
│ ├── video_thumbsVector < VideoSize > (optional)
│ │ ├── VideoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ ├── sizeint
│ │ │ └── video_start_tsdouble (optional)
│ │ ├── VideoSizeEmojiMarkup
│ │ │ ├── emoji_idlong
│ │ │ └── background_colorsVector < int >
│ │ └── VideoSizeStickerMarkup
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ ├── sticker_idlong
│ │ └── background_colorsVector < int >
│ ├── dc_idint
│ └── attributesVector < DocumentAttribute >
│ │ ├── wint
│ │ └── hint
│ │ ├── masktrue (optional)
│ │ ├── altstring
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coordsMaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_messagetrue (optional)
│ │ ├── supports_streamingtrue (optional)
│ │ ├── nosoundtrue (optional)
│ │ ├── durationdouble
│ │ ├── wint
│ │ ├── hint
│ │ ├── preload_prefix_sizeint (optional)
│ │ ├── video_start_tsdouble (optional)
│ │ └── video_codecstring (optional)
│ │ ├── voicetrue (optional)
│ │ ├── durationint
│ │ ├── titlestring (optional)
│ │ ├── performerstring (optional)
│ │ └── waveformbytes (optional)
│ │ └── file_namestring
│ ├── freetrue (optional)
│ ├── text_colortrue (optional)
│ ├── altstring
│ └── stickersetInputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
├── video_coverPhoto (optional)
│ ├── PhotoEmpty
│ │ └── idlong
│ └── Photo
│ ├── has_stickerstrue (optional)
│ ├── idlong
│ ├── access_hashlong
│ ├── file_referencebytes
│ ├── dateint
│ ├── sizesVector < PhotoSize >
│ │ ├── PhotoSizeEmpty
│ │ │ └── typestring
│ │ ├── PhotoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizeint
│ │ ├── PhotoCachedSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── bytesbytes
│ │ ├── PhotoStrippedSize
│ │ │ ├── typestring
│ │ │ └── bytesbytes
│ │ ├── PhotoSizeProgressive
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizesVector < int >
│ │ └── PhotoPathSize
│ │ ├── typestring
│ │ └── bytesbytes
│ ├── video_sizesVector < VideoSize > (optional)
│ │ ├── VideoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ ├── sizeint
│ │ │ └── video_start_tsdouble (optional)
│ │ ├── VideoSizeEmojiMarkup
│ │ │ ├── emoji_idlong
│ │ │ └── background_colorsVector < int >
│ │ └── VideoSizeStickerMarkup
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ ├── sticker_idlong
│ │ └── background_colorsVector < int >
│ └── dc_idint
├── video_timestampint (optional)
└── ttl_secondsint (optional)

Example

MessageMediaDocument(
)