pub fn document(mut self, file: Uploaded) -> Self {
        let mime_type = self.get_file_mime(&file);
        let file_name = file.name().to_string();
        self.media = Some(
            tl::types::InputMediaUploadedDocument {
                nosound_video: false,
                force_file: false,
                file: file.input_file,
                thumb: None,
                mime_type,
                attributes: vec![tl::types::DocumentAttributeFilename { file_name }.into()],
                stickers: None,
                ttl_seconds: self.media_ttl,
            }
            .into(),
        );
        self
    }
/// Include the uploaded file as a document in the message.
///
/// You can use this to send videos, stickers, audios, or uncompressed photos.
///
/// The text will be the caption of the document, which may be empty for no caption.
Include the uploaded file as a document in the message.
You can use this to send videos, stickers, audios, or uncompressed photos.

The text will be the caption of the document, which may be empty for no caption.
Include the uploaded file as a document in the message . You can use this to send videos stickers audios or uncompressed photos . The text will be the caption of the document which may be empty for no caption .
pub fn document(mut self, file: Uploaded) -> Self {
        let mime_type = self.get_file_mime(&file);
        let file_name = file.name().to_string();
        self.media = Some(
            tl::types::InputMediaUploadedDocument {
                nosound_video: false,
                force_file: false,
                file: file.input_file,
                thumb: None,
                mime_type,
                attributes: vec![tl::types::DocumentAttributeFilename { file_name }.into()],
                stickers: None,
                ttl_seconds: self.media_ttl,
            }
            .into(),
        );
        self
    }
pub fn document ( mut self , file : Uploaded ) -> Self { let mime_type = self . get_file_mime ( & file ) ; let file_name = file . name ( ) . to_string ( ) ; self . media = Some ( tl :: types :: InputMediaUploadedDocument { nosound_video : false , force_file : false , file : file . input_file , thumb : None , mime_type , attributes : vec ! [ tl types DocumentAttributeFilename { file_name } into ( ) ] , stickers : None , ttl_seconds : self . media_ttl , } . into ( ) , ) ; self }
Include the uploaded file as a document in the message.
Include the uploaded file as a document in the message .
mut self
file
Uploaded
mut self
file
Uploaded