public static async Task <TlAbsUpdates> SendUploadedPhoto(this ITelegramClient client, TlAbsInputPeer peer, TlAbsInputFile file, string caption) { return(await client.SendRequestAsync <TlAbsUpdates>(new TlRequestSendMedia { RandomId = TlHelpers.GenerateRandomLong(), Background = false, ClearDraft = false, Media = new TlInputMediaUploadedPhoto { File = file, Caption = caption }, Peer = peer })); }
public static async Task <TlAbsUpdates> SendUploadedDocument( this ITelegramClient client, TlAbsInputPeer peer, TlAbsInputFile file, string caption, string mimeType, TlVector <TlAbsDocumentAttribute> attributes) { return(await client.SendRequestAsync <TlAbsUpdates>(new TlRequestSendMedia { RandomId = TlHelpers.GenerateRandomLong(), Background = false, ClearDraft = false, Media = new TlInputMediaUploadedDocument { File = file, Caption = caption, MimeType = mimeType, Attributes = attributes }, Peer = peer })); }
public override void DeserializeBody(BinaryReader br) { File = (TlAbsInputFile)ObjectUtils.DeserializeObject(br); }