DocumentAttribute

class pyrogram.raw.base.DocumentAttribute

Various possible attributes of a document (used to define if it’s a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on)

Constructors:

This base type has 8 constructors available.

DocumentAttributeAnimated

Defines an animated GIF

DocumentAttributeAudio

Represents an audio file

DocumentAttributeCustomEmoji

Info about a custom emoji

DocumentAttributeFilename

A simple document with a file name

DocumentAttributeHasStickers

Whether the current document has stickers attached

DocumentAttributeImageSize

Defines the width and height of an image uploaded as document

DocumentAttributeSticker

Defines a sticker

DocumentAttributeVideo

Defines a video

TL Schema


Parameter Tree

DocumentAttribute
│ ├── w → int
│ └── h → int
│ ├── mask → true (optional)
│ ├── alt → string
│ ├── stickerset → InputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ │ ├── id → long
│ │ │ └── access_hash → long
│ │ ├── InputStickerSetShortName
│ │ │ └── short_name → string
│ │ ├── 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 → string

Example