Layer 227
InputMediaDocument
Forwarded document
constructor
inputMediaDocument#a8763ab5 flags:# spoiler:flags.2?true id:InputDocument video_cover:flags.3?InputPhoto video_timestamp:flags.4?int ttl_seconds:flags.0?int query:flags.1?string = InputMedia;
Parameters
| Name | Type | Description |
|---|---|---|
| Spoiler | flags .2? true | Whether this media should be hidden behind a spoiler warning |
| Id | InputDocument | The document to be forwarded. |
| VideoCover | flags .3? InputPhoto | Custom video cover. |
| VideoTimestamp | flags .4? int | Start playing the video at the specified timestamp (seconds). |
| TtlSeconds | flags .0? int | Time to live of self-destructing document, can be 0 to disable self-destruction, 0 x 7 FFFFFFF to self-destruct the document immediately after it's played; otherwise self-destructs ttl_seconds after it's played. |
| Query | flags .1? string | Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance. |
Returns
InputMediaGogram Example
// Creating InputMediaDocument constructor obj := &tg.InputMediaDocument{ Spoiler: nil, Id: &tg.InputDocument{ID: int64(5678901234567890), AccessHash: int64(1234567890123456), FileReference: []byte{0x01, 0x02}}, VideoCover: nil, VideoTimestamp: nil, TtlSeconds: nil, Query: "Hello, World!", }