Document
- class pyrogram.raw.types.Document
Document
Constructor of
Document.- Details:
Layer:
223ID:
8FD4C4D8
- Parameters:
id (
int64-bit) – Document IDaccess_hash (
int64-bit) – Check sum, dependent on document IDfile_reference (
bytes) – File referencedate (
int32-bit) – Creation datemime_type (
str) – MIME typesize (
int64-bit) – Sizedc_id (
int32-bit) – DC IDattributes (List of
DocumentAttribute) – Attributesthumbs (List of
PhotoSize, optional) – Thumbnailsvideo_thumbs (List of
VideoSize, optional) – Video thumbnails
- Functions:
This object can be returned by 4 functions.
Upload theme
Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds.
Get a document by its SHA256 hash, mainly used for gifs
Fetch custom emoji stickers ».
TL Schema
document#8fd4c4d8
flags:#
id:long
access_hash:long
file_reference:bytes
date:int
mime_type:string
size:long
thumbs:flags.0?Vector<PhotoSize>
video_thumbs:flags.1?Vector<VideoSize>
dc_id:int
attributes:Vector<DocumentAttribute>
= Document
Parameter Tree
Document
├── id →
long├── access_hash →
long├── file_reference →
bytes├── date →
int├── mime_type →
string├── size →
long├── thumbs →
Vector < PhotoSize > (optional)│ ├──
PhotoSizeEmpty│ │ └── type →
string│ ├──
PhotoSize│ │ ├── type →
string│ │ ├── w →
int│ │ ├── h →
int│ │ └── size →
int│ ├──
PhotoCachedSize│ │ ├── type →
string│ │ ├── w →
int│ │ ├── h →
int│ │ └── bytes →
bytes│ ├──
PhotoStrippedSize│ │ ├── type →
string│ │ └── bytes →
bytes│ ├──
PhotoSizeProgressive│ │ ├── type →
string│ │ ├── w →
int│ │ ├── h →
int│ │ └── sizes →
Vector < int >│ └──
PhotoPathSize│ ├── type →
string│ └── bytes →
bytes├── video_thumbs →
Vector < VideoSize > (optional)│ ├──
VideoSize│ │ ├── type →
string│ │ ├── w →
int│ │ ├── h →
int│ │ ├── size →
int│ │ └── video_start_ts →
double (optional)│ ├──
VideoSizeEmojiMarkup│ │ ├── emoji_id →
long│ │ └── background_colors →
Vector < int >│ └──
VideoSizeStickerMarkup│ ├── stickerset →
InputStickerSet│ │ ├──
InputStickerSetEmpty│ │ ├──
InputStickerSetID│ │ │ ├── id →
long│ │ │ └── access_hash →
long│ │ ├──
InputStickerSetShortName│ │ │ └── short_name →
string│ │ ├──
InputStickerSetAnimatedEmoji│ │ ├──
InputStickerSetDice│ │ │ └── emoticon →
string│ │ ├──
InputStickerSetPremiumGifts│ │ └──
InputStickerSetTonGifts│ ├── sticker_id →
long│ └── background_colors →
Vector < int >├── dc_id →
int└── attributes →
Vector < DocumentAttribute >│ ├── w →
int│ └── h →
int│ ├── mask →
true (optional)│ ├── alt →
string│ ├── stickerset →
InputStickerSet│ │ ├──
InputStickerSetEmpty│ │ ├──
InputStickerSetID│ │ │ ├── id →
long│ │ │ └── access_hash →
long│ │ ├──
InputStickerSetShortName│ │ │ └── short_name →
string│ │ ├──
InputStickerSetAnimatedEmoji│ │ ├──
InputStickerSetDice│ │ │ └── emoticon →
string│ │ ├──
InputStickerSetPremiumGifts│ │ └──
InputStickerSetTonGifts│ └── mask_coords →
MaskCoords (optional)│ └──
MaskCoords│ ├── n →
int│ ├── x →
double│ ├── y →
double│ └── zoom →
double│ ├── round_message →
true (optional)│ ├── supports_streaming →
true (optional)│ ├── nosound →
true (optional)│ ├── duration →
double│ ├── w →
int│ ├── h →
int│ ├── preload_prefix_size →
int (optional)│ ├── video_start_ts →
double (optional)│ └── video_codec →
string (optional)│ ├── voice →
true (optional)│ ├── duration →
int│ ├── title →
string (optional)│ ├── performer →
string (optional)│ └── waveform →
bytes (optional)│ └── file_name →
string├── free →
true (optional)├── text_color →
true (optional)├── alt →
string└── stickerset →
InputStickerSet│ ├── id →
long│ └── access_hash →
long│ └── short_name →
string│ └── emoticon →
stringExample
Document(
id=0,
access_hash=0,
file_reference=b"data",
date=0,
mime_type="text",
size=0,
dc_id=0,
attributes=[
DocumentAttributeImageSize(
w=0,
h=0
)
],
)