Layer 227
InputMediaUploadedDocument
New document
constructor
inputMediaUploadedDocument#37c9330 flags:# nosound_video:flags.3?true force_file:flags.4?true spoiler:flags.5?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector<DocumentAttribute> stickers:flags.0?Vector<InputDocument> video_cover:flags.6?InputPhoto video_timestamp:flags.7?int ttl_seconds:flags.1?int = InputMedia;
Parameters
| Name | Type | Description |
|---|---|---|
| NosoundVideo | flags .3? true | Whether to send the file as a video even if it doesn't have an audio track (i. e. if set, the document Attribute Animated attribute will not be set even for videos without audio) |
| ForceFile | flags .4? true | Force the media file to be uploaded as document |
| Spoiler | flags .5? true | Whether this media should be hidden behind a spoiler warning |
| File | InputFile | The uploaded file |
| Thumb | flags .2? InputFile | Thumbnail of the document, uploaded as for the file |
| MimeType | string | MIME type of document |
| Attributes | Vector < DocumentAttribute > | Attributes that specify the type of the document (video, audio, voice, sticker, etc.) |
| Stickers | flags .0? Vector < InputDocument > | Attached stickers |
| VideoCover | flags .6? InputPhoto | Start playing the video at the specified timestamp (seconds). |
| VideoTimestamp | flags .7? int | Start playing the video at the specified timestamp (seconds). |
| TtlSeconds | flags .1? 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. |
Returns
InputMediaGogram Example
// Creating InputMediaUploadedDocument constructor obj := &tg.InputMediaUploadedDocument{ NosoundVideo: nil, ForceFile: nil, Spoiler: nil, File: &tg.InputFile{ID: int64(7654321098765), Parts: 3, Name: "upload.dat"}, Thumb: nil, MimeType: "Hello, World!", // ... more required fields }