From 593463f46b78c5b6917bd9344b48c35ab62dbae7 Mon Sep 17 00:00:00 2001 From: Wizou Date: Fri, 20 Aug 2021 14:45:39 +0200 Subject: [PATCH] Upgrade to layer 131 not available as JSON on official website https://core.telegram.org/schema but found as TL files at https://github.com/telegramdesktop/tdesktop/tree/dev/Telegram/Resources/tl --- README.md | 2 +- src/Generator.cs | 98 +- src/Helpers.TL.cs | 5 + src/TL.MTProto.cs | 211 +- src/TL.Schema.cs | 5490 ++++++++++++++++++++++++++------------------- src/TL.Secret.cs | 31 +- src/TL.Table.cs | 735 +++--- src/TL.cs | 47 +- 8 files changed, 3907 insertions(+), 2712 deletions(-) diff --git a/README.md b/README.md index 39ca123..7c06ad0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![NuGet version](https://img.shields.io/nuget/v/WTelegramClient)](https://www.nuget.org/packages/WTelegramClient/) [![Dev nuget](https://img.shields.io/badge/dynamic/json?color=ffc040&label=Dev%20nuget&query=%24.versions%5B0%5D&url=https%3A%2F%2Fpkgs.dev.azure.com%2Fwiz0u%2F81bd92b7-0bb9-4701-b426-09090b27e037%2F_packaging%2F46ce0497-7803-4bd4-8c6c-030583e7c371%2Fnuget%2Fv3%2Fflat2%2Fwtelegramclient%2Findex.json)](https://dev.azure.com/wiz0u/WTelegramClient/_packaging?_a=package&feed=WTelegramClient&package=WTelegramClient&protocolType=NuGet) [![Build Status](https://img.shields.io/azure-devops/build/wiz0u/WTelegramClient/7)](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7) -[![API Layer](https://img.shields.io/badge/API_Layer-121-blueviolet)](https://core.telegram.org/api/layers) +[![API Layer](https://img.shields.io/badge/API_Layer-131-blueviolet)](https://schema.horner.tj) [![Support Chat](https://img.shields.io/badge/Chat_with_us-on_Telegram-0088cc)](https://t.me/WTelegramClient) # WTelegramClient diff --git a/src/Generator.cs b/src/Generator.cs index df38a2a..f4fce93 100644 --- a/src/Generator.cs +++ b/src/Generator.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Http; +using System.Text; using System.Text.Json; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -27,23 +28,74 @@ namespace WTelegram currentLayer = await Task.FromResult(TL.Schema.Layer); #else using var http = new HttpClient(); - var html = await http.GetStringAsync("https://core.telegram.org/api/layers"); - currentLayer = int.Parse(Regex.Match(html, @"#layer-(\d+)").Groups[1].Value); - File.WriteAllBytes("TL.MTProto.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/mtproto-json")); - File.WriteAllBytes("TL.Schema.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/json")); + //var html = await http.GetStringAsync("https://core.telegram.org/api/layers"); + //currentLayer = int.Parse(Regex.Match(html, @"#layer-(\d+)").Groups[1].Value); + //File.WriteAllBytes("TL.MTProto.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/mtproto-json")); + //File.WriteAllBytes("TL.Schema.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/json")); + File.WriteAllBytes("TL.MTProto.tl", await http.GetByteArrayAsync("https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/Resources/tl/mtproto.tl")); + File.WriteAllBytes("TL.Schema.tl", await http.GetByteArrayAsync("https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/Resources/tl/api.tl")); File.WriteAllBytes("TL.Secret.json", await http.GetByteArrayAsync("https://core.telegram.org/schema/end-to-end-json")); #endif - FromJson("TL.MTProto.json", "TL.MTProto.cs", @"TL.Table.cs"); - FromJson("TL.Schema.json", "TL.Schema.cs", @"TL.Table.cs"); - FromJson("TL.Secret.json", "TL.Secret.cs", @"TL.Table.cs"); + //FromJson("TL.MTProto.json", "TL.MTProto.cs", @"TL.Table.cs"); + //FromJson("TL.Schema.json", "TL.Schema.cs", @"TL.Table.cs"); + FromTL("TL.MTProto.tl", "TL.MTProto.cs"); + FromTL("TL.Schema.tl", "TL.Schema.cs"); + FromJson("TL.Secret.json", "TL.Secret.cs"); } - public void FromJson(string jsonPath, string outputCs, string tableCs = null) + private void FromTL(string tlPath, string outputCs) + { + using var sr = new StreamReader(tlPath); + var schema = new SchemaJson { constructors = new(), methods = new() }; + string line; + bool inFunctions = false; + while ((line = sr.ReadLine()) != null) + { + line = line.Trim(); + if (line == "---functions---") + inFunctions = true; + else if (line == "---types---") + inFunctions = false; + else if (line.StartsWith("// LAYER ")) + currentLayer = int.Parse(line[9..]); + else if (line != "" && !line.StartsWith("//")) + { + if (!line.EndsWith(";")) System.Diagnostics.Debugger.Break(); + var words = line.Split(' '); + int hash = words[0].IndexOf('#'); + if (hash == -1) { Console.WriteLine(line); continue; } + if (words[^2] != "=") { Console.WriteLine(line); continue; } + string name = words[0][0..hash]; + int id = int.Parse(words[0][(hash + 1)..], System.Globalization.NumberStyles.HexNumber); + string type = words[^1].TrimEnd(';'); + var @params = words[1..^2].Where(word => word != "{X:Type}").Select(word => + { + int colon = word.IndexOf(':'); + string name = word[0..colon]; + string type = word[(colon + 1)..]; + if (type == "string" && outputCs == "TL.MTProto.cs" && !name.Contains("message")) type = "bytes"; + return new Param { name = name, type = type }; + }).ToArray(); + if (inFunctions) + schema.methods.Add(new Method { id = id.ToString(), method = name, type = type, @params = @params }); + else + schema.constructors.Add(new Constructor { id = id.ToString(), predicate = name, type = type, @params = @params }); + } + } + FromSchema(schema, outputCs); + } + + public void FromJson(string jsonPath, string outputCs) { Console.WriteLine("Parsing " + jsonPath); - currentJson = Path.GetFileNameWithoutExtension(jsonPath); var schema = JsonSerializer.Deserialize(File.ReadAllText(jsonPath)); - using var sw = File.CreateText(outputCs); + FromSchema(schema, outputCs); + } + + public void FromSchema(SchemaJson schema, string outputCs) + { + currentJson = Path.GetFileNameWithoutExtension(outputCs); + using var sw = new StreamWriter(outputCs, false, Encoding.UTF8); sw.WriteLine("// This file is (mainly) generated automatically using the Generator class"); sw.WriteLine("using System;"); if (schema.methods.Count != 0) sw.WriteLine("using System.Threading.Tasks;"); @@ -77,7 +129,12 @@ namespace WTelegram } foreach (var (name, typeInfo) in typeInfos) { - if (allTypes.Contains(typeInfo.ReturnName)) { typeInfo.NeedAbstract = -2; continue; } + if (allTypes.Contains(typeInfo.ReturnName)) + { + if (typeInfosByLayer[0].TryGetValue(typeInfo.ReturnName, out var existingType)) + typeInfo.ReturnName = existingType.ReturnName; + typeInfo.NeedAbstract = -2; continue; + } if (typeInfo.SameName == null) { typeInfo.NeedAbstract = -1; @@ -119,7 +176,7 @@ namespace WTelegram tabIndent = tabIndent[1..]; } } - if (typeInfosByLayer[0]["Message"].SameName.ID == 0x5BB8E511) typeInfosByLayer[0].Remove("Message"); + if (typeInfosByLayer[0].GetValueOrDefault("Message")?.SameName.ID == 0x5BB8E511) typeInfosByLayer[0].Remove("Message"); if (schema.methods.Count != 0) { @@ -155,7 +212,7 @@ namespace WTelegram } sw.WriteLine("}"); - if (tableCs != null) UpdateTable(tableCs); + UpdateTable("TL.Table.cs"); } void WriteTypeInfo(StreamWriter sw, TypeInfo typeInfo, string layerPrefix, bool isMethod) @@ -300,8 +357,6 @@ namespace WTelegram return "ITLObject"; else if (type == "!X") return "ITLFunction"; - else if (typeInfos.TryGetValue(type, out var typeInfo)) - return typeInfo.ReturnName; else if (type == "int") { var name2 = '_' + name + '_'; @@ -313,8 +368,17 @@ namespace WTelegram } else if (type == "string") return name.StartsWith("md5") ? "byte[]" : "string"; - else + else if (type == "long" || type == "double" || type == "X") return type; + else if (typeInfos.TryGetValue(type, out var typeInfo)) + return typeInfo.ReturnName; + else + { // try to find type in a lower layer + foreach (var layer in typeInfosByLayer.OrderByDescending(kvp => kvp.Key)) + if (layer.Value.TryGetValue(type, out typeInfo)) + return layer.Key == 0 ? typeInfo.ReturnName : $"Layer{layer.Key}.{typeInfo.ReturnName}"; + return CSharpName(type); + } } private string MapOptionalType(string type, string name) @@ -464,7 +528,7 @@ namespace WTelegram var myTag = $"\t\t\t// from {currentJson}:"; var seen_ids = new HashSet(); using (var sr = new StreamReader(tableCs)) - using (var sw = new StreamWriter(tableCs + ".new")) + using (var sw = new StreamWriter(tableCs + ".new", false, Encoding.UTF8)) { string line; while ((line = sr.ReadLine()) != null) diff --git a/src/Helpers.TL.cs b/src/Helpers.TL.cs index 166f39e..c952b4f 100644 --- a/src/Helpers.TL.cs +++ b/src/Helpers.TL.cs @@ -108,6 +108,11 @@ namespace TL partial class PhotoStrippedSize { public override string Type => type; } partial class PhotoSizeProgressive { public override string Type => type; } partial class PhotoPathSize { public override string Type => type; } + namespace Layer23 + { + partial class PhotoSize { public override string Type => type; } + partial class PhotoCachedSize { public override string Type => type; } + } partial class DocumentBase { diff --git a/src/TL.MTProto.cs b/src/TL.MTProto.cs index 987031e..15c789c 100644 --- a/src/TL.MTProto.cs +++ b/src/TL.MTProto.cs @@ -13,7 +13,8 @@ namespace TL public long[] server_public_key_fingerprints; } - public abstract partial class PQInnerData : ITLObject + [TLDef(0x83C95AEC)] //p_q_inner_data#83c95aec pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data + public partial class PQInnerData : ITLObject { public byte[] pq; public byte[] p; @@ -21,21 +22,37 @@ namespace TL public Int128 nonce; public Int128 server_nonce; public Int256 new_nonce; - public int dc; } [TLDef(0xA9F55F95)] //p_q_inner_data_dc#a9f55f95 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data - public partial class PQInnerDataDc : PQInnerData { } + public partial class PQInnerDataDc : PQInnerData { public int dc; } + [TLDef(0x3C6A84D4)] //p_q_inner_data_temp#3c6a84d4 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data + public partial class PQInnerDataTemp : PQInnerData { public int expires_in; } [TLDef(0x56FDDF88)] //p_q_inner_data_temp_dc#56fddf88 pq:bytes p:bytes q:bytes nonce:int128 server_nonce:int128 new_nonce:int256 dc:int expires_in:int = P_Q_inner_data - public partial class PQInnerDataTempDc : PQInnerData { public int expires_in; } + public partial class PQInnerDataTempDc : PQInnerData + { + public int dc; + public int expires_in; + } - public abstract partial class ServerDHParams : ITLObject { } - [TLDef(0xD0E8075C)] //server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:bytes = Server_DH_Params - public partial class ServerDHParamsOk : ServerDHParams + [TLDef(0x75A3F765)] //bind_auth_key_inner#75a3f765 nonce:long temp_auth_key_id:long perm_auth_key_id:long temp_session_id:long expires_at:int = BindAuthKeyInner + public partial class BindAuthKeyInner : ITLObject + { + public long nonce; + public long temp_auth_key_id; + public long perm_auth_key_id; + public long temp_session_id; + public DateTime expires_at; + } + + public abstract partial class ServerDHParams : ITLObject { public Int128 nonce; public Int128 server_nonce; - public byte[] encrypted_answer; } + [TLDef(0x79CB045D)] //server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params + public partial class ServerDHParamsFail : ServerDHParams { public Int128 new_nonce_hash; } + [TLDef(0xD0E8075C)] //server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:bytes = Server_DH_Params + public partial class ServerDHParamsOk : ServerDHParams { public byte[] encrypted_answer; } [TLDef(0xB5890DBA)] //server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:bytes g_a:bytes server_time:int = Server_DH_inner_data public partial class ServerDHInnerData : ITLObject @@ -69,23 +86,64 @@ namespace TL [TLDef(0xA69DAE02)] //dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer public partial class DhGenFail : SetClientDHParamsAnswer { public Int128 new_nonce_hash3; } - [TLDef(0x75A3F765)] //bind_auth_key_inner#75a3f765 nonce:long temp_auth_key_id:long perm_auth_key_id:long temp_session_id:long expires_at:int = BindAuthKeyInner - public partial class BindAuthKeyInner : ITLObject - { - public long nonce; - public long temp_auth_key_id; - public long perm_auth_key_id; - public long temp_session_id; - public DateTime expires_at; - } + public abstract partial class DestroyAuthKeyRes : ITLObject { } + [TLDef(0xF660E1D4)] //destroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes + public partial class DestroyAuthKeyOk : DestroyAuthKeyRes { } + [TLDef(0x0A9F2259)] //destroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes + public partial class DestroyAuthKeyNone : DestroyAuthKeyRes { } + [TLDef(0xEA109B13)] //destroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes + public partial class DestroyAuthKeyFail : DestroyAuthKeyRes { } - [TLDef(0xF35C6D01)] //rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult - public partial class RpcResult : ITLObject + [TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector = MsgsAck + public partial class MsgsAck : ITLObject { public long[] msg_ids; } + + [TLDef(0xA7EFF811)] //bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification + public partial class BadMsgNotification : ITLObject + { + public long bad_msg_id; + public int bad_msg_seqno; + public int error_code; + } + [TLDef(0xEDAB447B)] //bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification + public partial class BadServerSalt : BadMsgNotification { public long new_server_salt; } + + [TLDef(0xDA69FB52)] //msgs_state_req#da69fb52 msg_ids:Vector = MsgsStateReq + public partial class MsgsStateReq : ITLObject { public long[] msg_ids; } + + [TLDef(0x04DEB57D)] //msgs_state_info#04deb57d req_msg_id:long info:bytes = MsgsStateInfo + public partial class MsgsStateInfo : ITLObject { public long req_msg_id; - public object result; + public byte[] info; } + [TLDef(0x8CC0D131)] //msgs_all_info#8cc0d131 msg_ids:Vector info:bytes = MsgsAllInfo + public partial class MsgsAllInfo : ITLObject + { + public long[] msg_ids; + public byte[] info; + } + + public abstract partial class MsgDetailedInfoBase : ITLObject { } + [TLDef(0x276D3EC6)] //msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo + public partial class MsgDetailedInfo : MsgDetailedInfoBase + { + public long msg_id; + public long answer_msg_id; + public int bytes; + public int status; + } + [TLDef(0x809DB6DF)] //msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo + public partial class MsgNewDetailedInfo : MsgDetailedInfoBase + { + public long answer_msg_id; + public int bytes; + public int status; + } + + [TLDef(0x7D861A08)] //msg_resend_req#7d861a08 msg_ids:Vector = MsgResendReq + public partial class MsgResendReq : ITLObject { public long[] msg_ids; } + [TLDef(0x2144CA19)] //rpc_error#2144ca19 error_code:int error_message:string = RpcError public partial class RpcError : ITLObject { @@ -144,85 +202,39 @@ namespace TL public long server_salt; } - public abstract partial class MessageContainer : ITLObject { } - [TLDef(0x73F1F8DC)] //msg_container#73f1f8dc messages:vector<%Message> = MessageContainer - public partial class MsgContainer : MessageContainer { public _Message[] messages; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006")] - [TLDef(0x5BB8E511)] //message#5bb8e511 msg_id:long seqno:int bytes:int body:Object = Message - public partial class _Message + [TLDef(0x9299359F)] //http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait + public partial class HttpWait : ITLObject { - public long msg_id; - public int seqno; - public int bytes; - public ITLObject body; + public int max_delay; + public int wait_after; + public int max_wait; } - public abstract partial class MessageCopy : ITLObject { } - [TLDef(0xE06046B2)] //msg_copy#e06046b2 orig_message:Message = MessageCopy - public partial class MsgCopy : MessageCopy { public _Message orig_message; } - - [TLDef(0x3072CFA1)] //gzip_packed#3072cfa1 packed_data:bytes = Object - public partial class GzipPacked : ITLObject { public byte[] packed_data; } - - [TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector = MsgsAck - public partial class MsgsAck : ITLObject { public long[] msg_ids; } - - [TLDef(0xA7EFF811)] //bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification - public partial class BadMsgNotification : ITLObject + [TLDef(0xD433AD73)] //ipPort#d433ad73 ipv4:int port:int = IpPort + public partial class IpPort : ITLObject { - public long bad_msg_id; - public int bad_msg_seqno; - public int error_code; + public int ipv4; + public int port; } - [TLDef(0xEDAB447B)] //bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification - public partial class BadServerSalt : BadMsgNotification { public long new_server_salt; } + [TLDef(0x37982646)] //ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort + public partial class IpPortSecret : IpPort { public byte[] secret; } - [TLDef(0x7D861A08)] //msg_resend_req#7d861a08 msg_ids:Vector = MsgResendReq - public partial class MsgResendReq : ITLObject { public long[] msg_ids; } - - [TLDef(0xDA69FB52)] //msgs_state_req#da69fb52 msg_ids:Vector = MsgsStateReq - public partial class MsgsStateReq : ITLObject { public long[] msg_ids; } - - [TLDef(0x04DEB57D)] //msgs_state_info#04deb57d req_msg_id:long info:bytes = MsgsStateInfo - public partial class MsgsStateInfo : ITLObject + [TLDef(0x4679B65F)] //accessPointRule#4679b65f phone_prefix_rules:bytes dc_id:int ips:vector = AccessPointRule + public partial class AccessPointRule : ITLObject { - public long req_msg_id; - public byte[] info; + public byte[] phone_prefix_rules; + public int dc_id; + public IpPort[] ips; } - [TLDef(0x8CC0D131)] //msgs_all_info#8cc0d131 msg_ids:Vector info:bytes = MsgsAllInfo - public partial class MsgsAllInfo : ITLObject + [TLDef(0x5A592A6C)] //help.configSimple#5a592a6c date:int expires:int rules:vector = help.ConfigSimple + public partial class Help_ConfigSimple : ITLObject { - public long[] msg_ids; - public byte[] info; + public DateTime date; + public DateTime expires; + public AccessPointRule[] rules; } - public abstract partial class MsgDetailedInfoBase : ITLObject { } - [TLDef(0x276D3EC6)] //msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo - public partial class MsgDetailedInfo : MsgDetailedInfoBase - { - public long msg_id; - public long answer_msg_id; - public int bytes; - public int status; - } - [TLDef(0x809DB6DF)] //msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo - public partial class MsgNewDetailedInfo : MsgDetailedInfoBase - { - public long answer_msg_id; - public int bytes; - public int status; - } - - public abstract partial class DestroyAuthKeyRes : ITLObject { } - [TLDef(0xF660E1D4)] //destroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes - public partial class DestroyAuthKeyOk : DestroyAuthKeyRes { } - [TLDef(0x0A9F2259)] //destroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes - public partial class DestroyAuthKeyNone : DestroyAuthKeyRes { } - [TLDef(0xEA109B13)] //destroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes - public partial class DestroyAuthKeyFail : DestroyAuthKeyRes { } - [TLDef(0x7ABE77EC)] //ping#7abe77ec ping_id:long = Pong public partial class Ping : ITLObject { public long ping_id; } } @@ -234,6 +246,15 @@ namespace WTelegram // ---functions--- public partial class Client { + //req_pq#60469778 nonce:int128 = ResPQ + public Task ReqPq(Int128 nonce) + => CallBareAsync(writer => + { + writer.Write(0x60469778); + writer.Write(nonce); + return "ReqPq"; + }); + //req_pq_multi#be7e8ef1 nonce:int128 = ResPQ public Task ReqPqMulti(Int128 nonce) => CallBareAsync(writer => @@ -268,6 +289,14 @@ namespace WTelegram // ---functions--- return "SetClientDHParams"; }); + //destroy_auth_key#d1435160 = DestroyAuthKeyRes + public Task DestroyAuthKey() + => CallBareAsync(writer => + { + writer.Write(0xD1435160); + return "DestroyAuthKey"; + }); + //rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer public Task RpcDropAnswer(long req_msg_id) => CallBareAsync(writer => @@ -313,13 +342,5 @@ namespace WTelegram // ---functions--- writer.Write(session_id); return "DestroySession"; }); - - //destroy_auth_key#d1435160 = DestroyAuthKeyRes - public Task DestroyAuthKey() - => CallBareAsync(writer => - { - writer.Write(0xD1435160); - return "DestroyAuthKey"; - }); } } diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 746d2c2..bb6374f 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -1,4 +1,4 @@ -// This file is (mainly) generated automatically using the Generator class +// This file is (mainly) generated automatically using the Generator class using System; using System.Threading.Tasks; @@ -177,13 +177,14 @@ namespace TL [IfFlag(1)] public int ttl_seconds; } ///See - [TLDef(0x23AB23D2)] + [TLDef(0x33473058)] public partial class InputMediaDocument : InputMedia { - [Flags] public enum Flags { has_ttl_seconds = 0x1 } + [Flags] public enum Flags { has_ttl_seconds = 0x1, has_query = 0x2 } public Flags flags; public InputDocumentBase id; [IfFlag(0)] public int ttl_seconds; + [IfFlag(1)] public string query; } ///See [TLDef(0xC13D1C11)] @@ -218,10 +219,10 @@ namespace TL [TLDef(0xD33F43F3)] public partial class InputMediaGame : InputMedia { public InputGame id; } ///See - [TLDef(0xF4E096C3)] + [TLDef(0xD9799874)] public partial class InputMediaInvoice : InputMedia { - [Flags] public enum Flags { has_photo = 0x1 } + [Flags] public enum Flags { has_photo = 0x1, has_start_param = 0x2 } public Flags flags; public string title; public string description; @@ -230,7 +231,7 @@ namespace TL public byte[] payload; public string provider; public DataJSON provider_data; - public string start_param; + [IfFlag(1)] public string start_param; } ///See [TLDef(0x971FA843)] @@ -365,22 +366,28 @@ namespace TL public long secret; } ///See - [TLDef(0x27D69997)] + [TLDef(0x37257E99)] public partial class InputPeerPhotoFileLocation : InputFileLocationBase { [Flags] public enum Flags { big = 0x1 } public Flags flags; public InputPeer peer; - public long volume_id; - public int local_id; + public long photo_id; } ///See - [TLDef(0x0DBAEAE9)] + [TLDef(0x9D84F3DB)] public partial class InputStickerSetThumb : InputFileLocationBase { public InputStickerSet stickerset; - public long volume_id; - public int local_id; + public int thumb_version; + } + ///See + [TLDef(0xBBA51639)] + public partial class InputGroupCallStream : InputFileLocationBase + { + public InputGroupCall call; + public long time_ms; + public int scale; } ///See @@ -441,7 +448,7 @@ namespace TL has_phone = 0x10, has_photo = 0x20, has_status = 0x40, self = 0x400, contact = 0x800, mutual_contact = 0x1000, deleted = 0x2000, bot = 0x4000, bot_chat_history = 0x8000, bot_nochats = 0x10000, verified = 0x20000, restricted = 0x40000, has_bot_inline_placeholder = 0x80000, min = 0x100000, bot_inline_geo = 0x200000, has_lang_code = 0x400000, support = 0x800000, - scam = 0x1000000, apply_min_photo = 0x2000000 } + scam = 0x1000000, apply_min_photo = 0x2000000, fake = 0x4000000 } public Flags flags; public int id; [IfFlag(0)] public long access_hash; @@ -463,14 +470,13 @@ namespace TL [TLDef(0x4F11BAE1)] public partial class UserProfilePhotoEmpty : UserProfilePhotoBase { } ///See - [TLDef(0x69D3AB26)] + [TLDef(0x82D1F706)] public partial class UserProfilePhoto : UserProfilePhotoBase { - [Flags] public enum Flags { has_video = 0x1 } + [Flags] public enum Flags { has_video = 0x1, has_stripped_thumb = 0x2 } public Flags flags; public long photo_id; - public FileLocation photo_small; - public FileLocation photo_big; + [IfFlag(1)] public byte[] stripped_thumb; public int dc_id; } @@ -531,7 +537,8 @@ namespace TL [Flags] public enum Flags { creator = 0x1, left = 0x4, broadcast = 0x20, has_username = 0x40, verified = 0x80, megagroup = 0x100, restricted = 0x200, signatures = 0x800, min = 0x1000, has_access_hash = 0x2000, has_admin_rights = 0x4000, has_banned_rights = 0x8000, has_participants_count = 0x20000, has_default_banned_rights = 0x40000, scam = 0x80000, - has_link = 0x100000, has_geo = 0x200000, slowmode_enabled = 0x400000, call_active = 0x800000, call_not_empty = 0x1000000 } + has_link = 0x100000, has_geo = 0x200000, slowmode_enabled = 0x400000, call_active = 0x800000, call_not_empty = 0x1000000, + fake = 0x2000000, gigagroup = 0x4000000 } public Flags flags; public int id; [IfFlag(13)] public long access_hash; @@ -561,24 +568,28 @@ namespace TL ///See public abstract partial class ChatFullBase : ITLObject { } ///See - [TLDef(0x1B7C9DB3)] + [TLDef(0x8A1E2983)] public partial class ChatFull : ChatFullBase { [Flags] public enum Flags { has_chat_photo = 0x4, has_bot_info = 0x8, has_pinned_msg_id = 0x40, can_set_username = 0x80, - has_scheduled = 0x100, has_folder_id = 0x800 } + has_scheduled = 0x100, has_folder_id = 0x800, has_call = 0x1000, has_exported_invite = 0x2000, has_ttl_period = 0x4000, + has_groupcall_default_join_as = 0x8000 } public Flags flags; public int id; public string about; public ChatParticipantsBase participants; [IfFlag(2)] public PhotoBase chat_photo; public PeerNotifySettings notify_settings; - public ExportedChatInvite exported_invite; + [IfFlag(13)] public ExportedChatInvite exported_invite; [IfFlag(3)] public BotInfo[] bot_info; [IfFlag(6)] public int pinned_msg_id; [IfFlag(11)] public int folder_id; + [IfFlag(12)] public InputGroupCall call; + [IfFlag(14)] public int ttl_period; + [IfFlag(15)] public Peer groupcall_default_join_as; } ///See - [TLDef(0xF0E6672A)] + [TLDef(0x548C3F93)] public partial class ChannelFull : ChatFullBase { [Flags] public enum Flags { has_participants_count = 0x1, has_admins_count = 0x2, has_kicked_count = 0x4, @@ -586,7 +597,8 @@ namespace TL can_set_stickers = 0x80, has_stickerset = 0x100, has_available_min_id = 0x200, hidden_prehistory = 0x400, has_folder_id = 0x800, has_stats_dc = 0x1000, has_online_count = 0x2000, has_linked_chat_id = 0x4000, has_location = 0x8000, can_set_location = 0x10000, has_slowmode_seconds = 0x20000, has_slowmode_next_send_date = 0x40000, has_scheduled = 0x80000, - can_view_stats = 0x100000, blocked = 0x400000 } + can_view_stats = 0x100000, has_call = 0x200000, blocked = 0x400000, has_exported_invite = 0x800000, + has_ttl_period = 0x1000000, has_pending_suggestions = 0x2000000, has_groupcall_default_join_as = 0x4000000 } public Flags flags; public int id; public string about; @@ -600,7 +612,7 @@ namespace TL public int unread_count; public PhotoBase chat_photo; public PeerNotifySettings notify_settings; - public ExportedChatInvite exported_invite; + [IfFlag(23)] public ExportedChatInvite exported_invite; public BotInfo[] bot_info; [IfFlag(4)] public int migrated_from_chat_id; [IfFlag(4)] public int migrated_from_max_id; @@ -614,6 +626,10 @@ namespace TL [IfFlag(18)] public DateTime slowmode_next_send_date; [IfFlag(12)] public int stats_dc; public int pts; + [IfFlag(21)] public InputGroupCall call; + [IfFlag(24)] public int ttl_period; + [IfFlag(25)] public string[] pending_suggestions; + [IfFlag(26)] public Peer groupcall_default_join_as; } ///See @@ -664,30 +680,36 @@ namespace TL [TLDef(0x37C1011C)] public partial class ChatPhotoEmpty : ChatPhotoBase { } ///See - [TLDef(0xD20B9F3C)] + [TLDef(0x1C6E1C11)] public partial class ChatPhoto : ChatPhotoBase { - [Flags] public enum Flags { has_video = 0x1 } + [Flags] public enum Flags { has_video = 0x1, has_stripped_thumb = 0x2 } public Flags flags; - public FileLocation photo_small; - public FileLocation photo_big; + public long photo_id; + [IfFlag(1)] public byte[] stripped_thumb; public int dc_id; } ///See public abstract partial class MessageBase : ITLObject { } ///See - [TLDef(0x83E5DE54)] - public partial class MessageEmpty : MessageBase { public int id; } + [TLDef(0x90A6CA84)] + public partial class MessageEmpty : MessageBase + { + [Flags] public enum Flags { has_peer_id = 0x1 } + public Flags flags; + public int id; + [IfFlag(0)] public Peer peer_id; + } ///See - [TLDef(0x58AE39C9)] + [TLDef(0xBCE383D2)] public partial class Message : MessageBase { [Flags] public enum Flags { out_ = 0x2, has_fwd_from = 0x4, has_reply_to = 0x8, mentioned = 0x10, media_unread = 0x20, has_reply_markup = 0x40, has_entities = 0x80, has_from_id = 0x100, has_media = 0x200, has_views = 0x400, has_via_bot_id = 0x800, silent = 0x2000, post = 0x4000, has_edit_date = 0x8000, has_post_author = 0x10000, has_grouped_id = 0x20000, from_scheduled = 0x40000, legacy = 0x80000, edit_hide = 0x200000, has_restriction_reason = 0x400000, - has_replies = 0x800000, pinned = 0x1000000 } + has_replies = 0x800000, pinned = 0x1000000, has_ttl_period = 0x2000000 } public Flags flags; public int id; [IfFlag(8)] public Peer from_id; @@ -707,13 +729,14 @@ namespace TL [IfFlag(16)] public string post_author; [IfFlag(17)] public long grouped_id; [IfFlag(22)] public RestrictionReason[] restriction_reason; + [IfFlag(25)] public int ttl_period; } ///See - [TLDef(0x286FA604)] + [TLDef(0x2B085862)] public partial class MessageService : MessageBase { [Flags] public enum Flags { out_ = 0x2, has_reply_to = 0x8, mentioned = 0x10, media_unread = 0x20, has_from_id = 0x100, - silent = 0x2000, post = 0x4000, legacy = 0x80000 } + silent = 0x2000, post = 0x4000, legacy = 0x80000, has_ttl_period = 0x2000000 } public Flags flags; public int id; [IfFlag(8)] public Peer from_id; @@ -721,6 +744,7 @@ namespace TL [IfFlag(3)] public MessageReplyHeader reply_to; public DateTime date; public MessageAction action; + [IfFlag(25)] public int ttl_period; } ///See @@ -935,6 +959,32 @@ namespace TL public Peer to_id; public int distance; } + ///See + [TLDef(0x7A0D7F42)] + public partial class MessageActionGroupCall : MessageAction + { + [Flags] public enum Flags { has_duration = 0x1 } + public Flags flags; + public InputGroupCall call; + [IfFlag(0)] public int duration; + } + ///See + [TLDef(0x76B9F11A)] + public partial class MessageActionInviteToGroupCall : MessageAction + { + public InputGroupCall call; + public int[] users; + } + ///See + [TLDef(0xAA1AFBFD)] + public partial class MessageActionSetMessagesTTL : MessageAction { public int period; } + ///See + [TLDef(0xB3A07661)] + public partial class MessageActionGroupCallScheduled : MessageAction + { + public InputGroupCall call; + public DateTime schedule_date; + } ///See public abstract partial class DialogBase : ITLObject { } @@ -996,21 +1046,19 @@ namespace TL [TLDef(0x0E17E23C)] public partial class PhotoSizeEmpty : PhotoSizeBase { public string type; } ///See - [TLDef(0x77BFB61B)] + [TLDef(0x75C78E60)] public partial class PhotoSize : PhotoSizeBase { public string type; - public FileLocation location; public int w; public int h; public int size; } ///See - [TLDef(0xE9A734FA)] + [TLDef(0x021E1AD6)] public partial class PhotoCachedSize : PhotoSizeBase { public string type; - public FileLocation location; public int w; public int h; public byte[] bytes; @@ -1023,11 +1071,10 @@ namespace TL public byte[] bytes; } ///See - [TLDef(0x5AA86A51)] + [TLDef(0xFA3EFB95)] public partial class PhotoSizeProgressive : PhotoSizeBase { public string type; - public FileLocation location; public int w; public int h; public int[] sizes; @@ -1161,10 +1208,11 @@ namespace TL [IfFlag(2)] public WallPaperSettings settings; } ///See - [TLDef(0x8AF40B25)] + [TLDef(0xE0804116)] public partial class WallPaperNoFile : WallPaperBase { [Flags] public enum Flags { default_ = 0x2, has_settings = 0x4, dark = 0x10 } + public long id; public Flags flags; [IfFlag(2)] public WallPaperSettings settings; } @@ -1184,22 +1232,25 @@ namespace TL [TLDef(0xADF44EE3)] public partial class InputReportReasonChildAbuse : ReportReason { } ///See - [TLDef(0xE1746D0A)] - public partial class InputReportReasonOther : ReportReason { public string text; } + [TLDef(0xC1E4A2B1)] + public partial class InputReportReasonOther : ReportReason { } ///See [TLDef(0x9B89F93A)] public partial class InputReportReasonCopyright : ReportReason { } ///See [TLDef(0xDBD4FEED)] public partial class InputReportReasonGeoIrrelevant : ReportReason { } + ///See + [TLDef(0xF5DDD6E7)] + public partial class InputReportReasonFake : ReportReason { } ///See - [TLDef(0xEDF17C12)] + [TLDef(0x139A9A77)] public partial class UserFull : ITLObject { [Flags] public enum Flags { blocked = 0x1, has_about = 0x2, has_profile_photo = 0x4, has_bot_info = 0x8, phone_calls_available = 0x10, phone_calls_private = 0x20, has_pinned_msg_id = 0x40, can_pin_message = 0x80, - has_folder_id = 0x800, has_scheduled = 0x1000, video_calls_available = 0x2000 } + has_folder_id = 0x800, has_scheduled = 0x1000, video_calls_available = 0x2000, has_ttl_period = 0x4000 } public Flags flags; public UserBase user; [IfFlag(1)] public string about; @@ -1210,6 +1261,7 @@ namespace TL [IfFlag(6)] public int pinned_msg_id; public int common_chats_count; [IfFlag(11)] public int folder_id; + [IfFlag(14)] public int ttl_period; } ///See @@ -1467,11 +1519,11 @@ namespace TL public SendMessageAction action; } ///See - [TLDef(0x9A65EA1F)] + [TLDef(0x86CADB6C)] public partial class UpdateChatUserTyping : Update { public int chat_id; - public int user_id; + public Peer from_id; public SendMessageAction action; } ///See @@ -1695,15 +1747,16 @@ namespace TL [TLDef(0x9375341E)] public partial class UpdateSavedGifs : Update { } ///See - [TLDef(0x54826690)] + [TLDef(0x3F2038DB)] public partial class UpdateBotInlineQuery : Update { - [Flags] public enum Flags { has_geo = 0x1 } + [Flags] public enum Flags { has_geo = 0x1, has_peer_type = 0x2 } public Flags flags; public long query_id; public int user_id; public string query; [IfFlag(0)] public GeoPointBase geo; + [IfFlag(1)] public InlineQueryPeerType peer_type; public string offset; } ///See @@ -1945,12 +1998,13 @@ namespace TL [TLDef(0x564FE691)] public partial class UpdateLoginToken : Update { } ///See - [TLDef(0x42F88F2C)] + [TLDef(0x37F69F0B)] public partial class UpdateMessagePollVote : Update { public long poll_id; public int user_id; public byte[][] options; + public int qts; } ///See [TLDef(0x26FFDE7D)] @@ -2010,14 +2064,14 @@ namespace TL public bool blocked; } ///See - [TLDef(0xFF2ABE9F)] + [TLDef(0x6B171718)] public partial class UpdateChannelUserTyping : Update { [Flags] public enum Flags { has_top_msg_id = 0x1 } public Flags flags; public int channel_id; [IfFlag(0)] public int top_msg_id; - public int user_id; + public Peer from_id; public SendMessageAction action; } ///See @@ -2042,6 +2096,88 @@ namespace TL public int pts; public int pts_count; } + ///See + [TLDef(0x1330A196)] + public partial class UpdateChat : Update { public int chat_id; } + ///See + [TLDef(0xF2EBDB4E)] + public partial class UpdateGroupCallParticipants : Update + { + public InputGroupCall call; + public GroupCallParticipant[] participants; + public int version; + } + ///See + [TLDef(0xA45EB99B)] + public partial class UpdateGroupCall : Update + { + public int chat_id; + public GroupCallBase call; + } + ///See + [TLDef(0xBB9BB9A5)] + public partial class UpdatePeerHistoryTTL : Update + { + [Flags] public enum Flags { has_ttl_period = 0x1 } + public Flags flags; + public Peer peer; + [IfFlag(0)] public int ttl_period; + } + ///See + [TLDef(0xF3B3781F)] + public partial class UpdateChatParticipant : Update + { + [Flags] public enum Flags { has_prev_participant = 0x1, has_new_participant = 0x2, has_invite = 0x4 } + public Flags flags; + public int chat_id; + public DateTime date; + public int actor_id; + public int user_id; + [IfFlag(0)] public ChatParticipantBase prev_participant; + [IfFlag(1)] public ChatParticipantBase new_participant; + [IfFlag(2)] public ExportedChatInvite invite; + public int qts; + } + ///See + [TLDef(0x7FECB1EC)] + public partial class UpdateChannelParticipant : Update + { + [Flags] public enum Flags { has_prev_participant = 0x1, has_new_participant = 0x2, has_invite = 0x4 } + public Flags flags; + public int channel_id; + public DateTime date; + public int actor_id; + public int user_id; + [IfFlag(0)] public ChannelParticipantBase prev_participant; + [IfFlag(1)] public ChannelParticipantBase new_participant; + [IfFlag(2)] public ExportedChatInvite invite; + public int qts; + } + ///See + [TLDef(0x07F9488A)] + public partial class UpdateBotStopped : Update + { + public int user_id; + public DateTime date; + public bool stopped; + public int qts; + } + ///See + [TLDef(0x0B783982)] + public partial class UpdateGroupCallConnection : Update + { + [Flags] public enum Flags { presentation = 0x1 } + public Flags flags; + public DataJSON params_; + } + ///See + [TLDef(0xCF7E0873)] + public partial class UpdateBotCommands : Update + { + public Peer peer; + public int bot_id; + public BotCommand[] commands; + } ///See [TLDef(0xA56C2A3E)] @@ -2095,11 +2231,11 @@ namespace TL [TLDef(0xE317AF7E)] public partial class UpdatesTooLong : UpdatesBase { } ///See - [TLDef(0x2296D2C8)] + [TLDef(0xFAEFF833)] public partial class UpdateShortMessage : UpdatesBase { [Flags] public enum Flags { out_ = 0x2, has_fwd_from = 0x4, has_reply_to = 0x8, mentioned = 0x10, media_unread = 0x20, - has_entities = 0x80, has_via_bot_id = 0x800, silent = 0x2000 } + has_entities = 0x80, has_via_bot_id = 0x800, silent = 0x2000, has_ttl_period = 0x2000000 } public Flags flags; public int id; public int user_id; @@ -2111,13 +2247,14 @@ namespace TL [IfFlag(11)] public int via_bot_id; [IfFlag(3)] public MessageReplyHeader reply_to; [IfFlag(7)] public MessageEntity[] entities; + [IfFlag(25)] public int ttl_period; } ///See - [TLDef(0x402D5DBB)] + [TLDef(0x1157B858)] public partial class UpdateShortChatMessage : UpdatesBase { [Flags] public enum Flags { out_ = 0x2, has_fwd_from = 0x4, has_reply_to = 0x8, mentioned = 0x10, media_unread = 0x20, - has_entities = 0x80, has_via_bot_id = 0x800, silent = 0x2000 } + has_entities = 0x80, has_via_bot_id = 0x800, silent = 0x2000, has_ttl_period = 0x2000000 } public Flags flags; public int id; public int from_id; @@ -2130,6 +2267,7 @@ namespace TL [IfFlag(11)] public int via_bot_id; [IfFlag(3)] public MessageReplyHeader reply_to; [IfFlag(7)] public MessageEntity[] entities; + [IfFlag(25)] public int ttl_period; } ///See [TLDef(0x78D4DEC1)] @@ -2160,10 +2298,10 @@ namespace TL public int seq; } ///See - [TLDef(0x11F1331C)] + [TLDef(0x9015E101)] public partial class UpdateShortSentMessage : UpdatesBase { - [Flags] public enum Flags { out_ = 0x2, has_entities = 0x80, has_media = 0x200 } + [Flags] public enum Flags { out_ = 0x2, has_entities = 0x80, has_media = 0x200, has_ttl_period = 0x2000000 } public Flags flags; public int id; public int pts; @@ -2171,6 +2309,7 @@ namespace TL public DateTime date; [IfFlag(9)] public MessageMedia media; [IfFlag(7)] public MessageEntity[] entities; + [IfFlag(25)] public int ttl_period; } ///See @@ -2299,10 +2438,10 @@ namespace TL ///See public abstract partial class Help_AppUpdateBase : ITLObject { } ///See - [TLDef(0x1DA7158F)] + [TLDef(0xCCBBCE30)] public partial class Help_AppUpdate : Help_AppUpdateBase { - [Flags] public enum Flags { can_not_skip = 0x1, has_document = 0x2, has_url = 0x4 } + [Flags] public enum Flags { can_not_skip = 0x1, has_document = 0x2, has_url = 0x4, has_sticker = 0x8 } public Flags flags; public int id; public string version; @@ -2310,6 +2449,7 @@ namespace TL public MessageEntity[] entities; [IfFlag(1)] public DocumentBase document; [IfFlag(2)] public string url; + [IfFlag(3)] public DocumentBase sticker; } ///See [TLDef(0xC45A6536)] @@ -2361,8 +2501,13 @@ namespace TL public long key_fingerprint; } ///See - [TLDef(0x13D6DD27)] - public partial class EncryptedChatDiscarded : EncryptedChatBase { public int id; } + [TLDef(0x1E1C7C45)] + public partial class EncryptedChatDiscarded : EncryptedChatBase + { + [Flags] public enum Flags { history_deleted = 0x1 } + public Flags flags; + public int id; + } ///See [TLDef(0xF141B5E1)] @@ -2563,6 +2708,12 @@ namespace TL ///See [TLDef(0x243E1C66)] public partial class SendMessageUploadRoundAction : SendMessageAction { public int progress; } + ///See + [TLDef(0xD92C2285)] + public partial class SpeakingInGroupCallAction : SendMessageAction { } + ///See + [TLDef(0xDBDA9246)] + public partial class SendMessageHistoryImportAction : SendMessageAction { public int progress; } ///See [TLDef(0xB3134D9D)] @@ -2860,11 +3011,11 @@ namespace TL public partial class Account_Authorizations : ITLObject { public Authorization[] authorizations; } ///See - [TLDef(0xAD2641F8)] + [TLDef(0x185B184F)] public partial class Account_Password : ITLObject { [Flags] public enum Flags { has_recovery = 0x1, has_secure_values = 0x2, has_password = 0x4, has_hint = 0x8, - has_email_unconfirmed_pattern = 0x10 } + has_email_unconfirmed_pattern = 0x10, has_pending_reset_date = 0x20 } public Flags flags; [IfFlag(2)] public PasswordKdfAlgo current_algo; [IfFlag(2)] public byte[] srp_B; @@ -2874,6 +3025,7 @@ namespace TL public PasswordKdfAlgo new_algo; public SecurePasswordKdfAlgo new_secure_algo; public byte[] secure_random; + [IfFlag(5)] public DateTime pending_reset_date; } ///See @@ -2913,12 +3065,21 @@ namespace TL ///See public abstract partial class ExportedChatInvite : ITLObject { } - ///See - [TLDef(0x69DF3769)] - public partial class ChatInviteEmpty : ExportedChatInvite { } ///See - [TLDef(0xFC2E05BC)] - public partial class ChatInviteExported : ExportedChatInvite { public string link; } + [TLDef(0x6E24FC9D)] + public partial class ChatInviteExported : ExportedChatInvite + { + [Flags] public enum Flags { revoked = 0x1, has_expire_date = 0x2, has_usage_limit = 0x4, has_usage = 0x8, + has_start_date = 0x10, permanent = 0x20 } + public Flags flags; + public string link; + public int admin_id; + public DateTime date; + [IfFlag(4)] public DateTime start_date; + [IfFlag(1)] public DateTime expire_date; + [IfFlag(2)] public int usage_limit; + [IfFlag(3)] public int usage; + } ///See public abstract partial class ChatInviteBase : ITLObject { } @@ -2967,10 +3128,10 @@ namespace TL public partial class InputStickerSetDice : InputStickerSet { public string emoticon; } ///See - [TLDef(0xEEB46F27)] + [TLDef(0xD7DF217A)] public partial class StickerSet : ITLObject { - [Flags] public enum Flags { has_installed_date = 0x1, archived = 0x2, official = 0x4, masks = 0x8, has_thumb = 0x10, + [Flags] public enum Flags { has_installed_date = 0x1, archived = 0x2, official = 0x4, masks = 0x8, has_thumbs = 0x10, animated = 0x20 } public Flags flags; [IfFlag(0)] public DateTime installed_date; @@ -2978,8 +3139,9 @@ namespace TL public long access_hash; public string title; public string short_name; - [IfFlag(4)] public PhotoSizeBase thumb; + [IfFlag(4)] public PhotoSizeBase[] thumbs; [IfFlag(4)] public int thumb_dc_id; + [IfFlag(4)] public int thumb_version; public int count; public int hash; } @@ -3098,19 +3260,21 @@ namespace TL public Flags flags; } ///See - [TLDef(0xF4108AA0)] + [TLDef(0x86B40B08)] public partial class ReplyKeyboardForceReply : ReplyMarkup { - [Flags] public enum Flags { single_use = 0x2, selective = 0x4 } + [Flags] public enum Flags { single_use = 0x2, selective = 0x4, has_placeholder = 0x8 } public Flags flags; + [IfFlag(3)] public string placeholder; } ///See - [TLDef(0x3502758C)] + [TLDef(0x85DD99D1)] public partial class ReplyKeyboardMarkup : ReplyMarkup { - [Flags] public enum Flags { resize = 0x1, single_use = 0x2, selective = 0x4 } + [Flags] public enum Flags { resize = 0x1, single_use = 0x2, selective = 0x4, has_placeholder = 0x8 } public Flags flags; public KeyboardButtonRow[] rows; + [IfFlag(3)] public string placeholder; } ///See [TLDef(0x48A30254)] @@ -3310,19 +3474,19 @@ namespace TL [IfFlag(2)] public string rank; } ///See - [TLDef(0x1C0FACAF)] + [TLDef(0x50A1DFD6)] public partial class ChannelParticipantBanned : ChannelParticipantBase { [Flags] public enum Flags { left = 0x1 } public Flags flags; - public int user_id; + public Peer peer; public int kicked_by; public DateTime date; public ChatBannedRights banned_rights; } ///See - [TLDef(0xC3C6796B)] - public partial class ChannelParticipantLeft : ChannelParticipantBase { public int user_id; } + [TLDef(0x1B03F006)] + public partial class ChannelParticipantLeft : ChannelParticipantBase { public Peer peer; } ///See public abstract partial class ChannelParticipantsFilter : ITLObject { } @@ -3360,11 +3524,12 @@ namespace TL ///See public abstract partial class Channels_ChannelParticipantsBase : ITLObject { } ///See - [TLDef(0xF56EE2A8)] + [TLDef(0x9AB0FEAF)] public partial class Channels_ChannelParticipants : Channels_ChannelParticipantsBase { public int count; public ChannelParticipantBase[] participants; + public ChatBase[] chats; public UserBase[] users; } ///See @@ -3372,10 +3537,11 @@ namespace TL public partial class Channels_ChannelParticipantsNotModified : Channels_ChannelParticipantsBase { } ///See - [TLDef(0xD0D9B163)] + [TLDef(0xDFB80317)] public partial class Channels_ChannelParticipant : ITLObject { public ChannelParticipantBase participant; + public ChatBase[] chats; public UserBase[] users; } @@ -3467,6 +3633,20 @@ namespace TL [Flags] public enum Flags { has_reply_markup = 0x4 } [IfFlag(2)] public ReplyMarkup reply_markup; } + ///See + [TLDef(0xD7E78225)] + public partial class InputBotInlineMessageMediaInvoice : InputBotInlineMessage + { + [Flags] public enum Flags { has_photo = 0x1, has_reply_markup = 0x4 } + public string title; + public string description; + [IfFlag(0)] public InputWebDocument photo; + public Invoice invoice; + public byte[] payload; + public string provider; + public DataJSON provider_data; + [IfFlag(2)] public ReplyMarkup reply_markup; + } ///See public abstract partial class InputBotInlineResultBase : ITLObject { } @@ -3572,6 +3752,18 @@ namespace TL public string vcard; [IfFlag(2)] public ReplyMarkup reply_markup; } + ///See + [TLDef(0x354A9B09)] + public partial class BotInlineMessageMediaInvoice : BotInlineMessage + { + [Flags] public enum Flags { has_photo = 0x1, shipping_address_requested = 0x2, has_reply_markup = 0x4, test = 0x8 } + public string title; + public string description; + [IfFlag(0)] public WebDocumentBase photo; + public string currency; + public long total_amount; + [IfFlag(2)] public ReplyMarkup reply_markup; + } ///See public abstract partial class BotInlineResultBase : ITLObject { } @@ -4209,14 +4401,17 @@ namespace TL } ///See - [TLDef(0xC30AA358)] + [TLDef(0x0CD886E0)] public partial class Invoice : ITLObject { [Flags] public enum Flags { test = 0x1, name_requested = 0x2, phone_requested = 0x4, email_requested = 0x8, - shipping_address_requested = 0x10, flexible = 0x20, phone_to_provider = 0x40, email_to_provider = 0x80 } + shipping_address_requested = 0x10, flexible = 0x20, phone_to_provider = 0x40, email_to_provider = 0x80, + has_max_tip_amount = 0x100 } public Flags flags; public string currency; public LabeledPrice[] prices; + [IfFlag(8)] public long max_tip_amount; + [IfFlag(8)] public long[] suggested_tip_amounts; } ///See @@ -4326,12 +4521,13 @@ namespace TL } ///See - [TLDef(0x3F56AEA3)] + [TLDef(0x8D0B2415)] public partial class Payments_PaymentForm : ITLObject { [Flags] public enum Flags { has_saved_info = 0x1, has_saved_credentials = 0x2, can_save_credentials = 0x4, password_missing = 0x8, has_native_provider = 0x10 } public Flags flags; + public long form_id; public int bot_id; public Invoice invoice; public int provider_id; @@ -4363,17 +4559,21 @@ namespace TL public partial class Payments_PaymentVerificationNeeded : Payments_PaymentResultBase { public string url; } ///See - [TLDef(0x500911E1)] + [TLDef(0x10B555D0)] public partial class Payments_PaymentReceipt : ITLObject { - [Flags] public enum Flags { has_info = 0x1, has_shipping = 0x2 } + [Flags] public enum Flags { has_info = 0x1, has_shipping = 0x2, has_photo = 0x4, has_tip_amount = 0x8 } public Flags flags; public DateTime date; public int bot_id; - public Invoice invoice; public int provider_id; + public string title; + public string description; + [IfFlag(2)] public WebDocumentBase photo; + public Invoice invoice; [IfFlag(0)] public PaymentRequestedInfo info; [IfFlag(1)] public ShippingOption shipping; + [IfFlag(3)] public long tip_amount; public string currency; public long total_amount; public string credentials_title; @@ -4409,13 +4609,9 @@ namespace TL ///See [TLDef(0x0AA1C39F)] public partial class InputPaymentCredentialsApplePay : InputPaymentCredentialsBase { public DataJSON payment_data; } - ///See - [TLDef(0xCA05D50E)] - public partial class InputPaymentCredentialsAndroidPay : InputPaymentCredentialsBase - { - public DataJSON payment_token; - public string google_transaction_id; - } + ///See + [TLDef(0x8AC32801)] + public partial class InputPaymentCredentialsGooglePay : InputPaymentCredentialsBase { public DataJSON payment_token; } ///See [TLDef(0xDB64FD34)] @@ -4761,6 +4957,47 @@ namespace TL public int prev_value; public int new_value; } + ///See + [TLDef(0x23209745)] + public partial class ChannelAdminLogEventActionStartGroupCall : ChannelAdminLogEventAction { public InputGroupCall call; } + ///See + [TLDef(0xDB9F9140)] + public partial class ChannelAdminLogEventActionDiscardGroupCall : ChannelAdminLogEventAction { public InputGroupCall call; } + ///See + [TLDef(0xF92424D2)] + public partial class ChannelAdminLogEventActionParticipantMute : ChannelAdminLogEventAction { public GroupCallParticipant participant; } + ///See + [TLDef(0xE64429C0)] + public partial class ChannelAdminLogEventActionParticipantUnmute : ChannelAdminLogEventAction { public GroupCallParticipant participant; } + ///See + [TLDef(0x56D6A247)] + public partial class ChannelAdminLogEventActionToggleGroupCallSetting : ChannelAdminLogEventAction { public bool join_muted; } + ///See + [TLDef(0x5CDADA77)] + public partial class ChannelAdminLogEventActionParticipantJoinByInvite : ChannelAdminLogEventAction { public ExportedChatInvite invite; } + ///See + [TLDef(0x5A50FCA4)] + public partial class ChannelAdminLogEventActionExportedInviteDelete : ChannelAdminLogEventAction { public ExportedChatInvite invite; } + ///See + [TLDef(0x410A134E)] + public partial class ChannelAdminLogEventActionExportedInviteRevoke : ChannelAdminLogEventAction { public ExportedChatInvite invite; } + ///See + [TLDef(0xE90EBB59)] + public partial class ChannelAdminLogEventActionExportedInviteEdit : ChannelAdminLogEventAction + { + public ExportedChatInvite prev_invite; + public ExportedChatInvite new_invite; + } + ///See + [TLDef(0x3E7F6847)] + public partial class ChannelAdminLogEventActionParticipantVolume : ChannelAdminLogEventAction { public GroupCallParticipant participant; } + ///See + [TLDef(0x6E941A38)] + public partial class ChannelAdminLogEventActionChangeHistoryTTL : ChannelAdminLogEventAction + { + public int prev_value; + public int new_value; + } ///See [TLDef(0x3B5A3E40)] @@ -5528,8 +5765,8 @@ namespace TL [TLDef(0x72091C80)] public partial class InputWallPaperSlug : InputWallPaperBase { public string slug; } ///See - [TLDef(0x8427BBAC)] - public partial class InputWallPaperNoFile : InputWallPaperBase { } + [TLDef(0x967A462E)] + public partial class InputWallPaperNoFile : InputWallPaperBase { public long id; } ///See public abstract partial class Account_WallPapersBase : ITLObject { } @@ -5553,14 +5790,16 @@ namespace TL } ///See - [TLDef(0x05086CF8)] + [TLDef(0x1DC1BCA4)] public partial class WallPaperSettings : ITLObject { [Flags] public enum Flags { has_background_color = 0x1, blur = 0x2, motion = 0x4, has_intensity = 0x8, - has_second_background_color = 0x10 } + has_second_background_color = 0x10, has_third_background_color = 0x20, has_fourth_background_color = 0x40 } public Flags flags; [IfFlag(0)] public int background_color; [IfFlag(4)] public int second_background_color; + [IfFlag(5)] public int third_background_color; + [IfFlag(6)] public int fourth_background_color; [IfFlag(3)] public int intensity; [IfFlag(4)] public int rotation; } @@ -5615,16 +5854,6 @@ namespace TL [TLDef(0xB3FB5361)] public partial class EmojiLanguage : ITLObject { public string lang_code; } - ///See - public abstract partial class FileLocation : ITLObject { } - ///See - [TLDef(0xBC7FC6CD)] - public partial class FileLocationToBeDeprecated : FileLocation - { - public long volume_id; - public int local_id; - } - ///See [TLDef(0xFF544E65)] public partial class Folder : ITLObject @@ -6021,13 +6250,12 @@ namespace TL } ///See - [TLDef(0xE831C556)] + [TLDef(0xDE33B094)] public partial class VideoSize : ITLObject { [Flags] public enum Flags { has_video_start_ts = 0x1 } public Flags flags; public string type; - public FileLocation location; public int w; public int h; public int size; @@ -6199,6 +6427,268 @@ namespace TL ///See [TLDef(0x8999F295)] public partial class Stats_MessageStats : ITLObject { public StatsGraphBase views_graph; } + + ///See + public abstract partial class GroupCallBase : ITLObject { } + ///See + [TLDef(0x7780BCB4)] + public partial class GroupCallDiscarded : GroupCallBase + { + public long id; + public long access_hash; + public int duration; + } + ///See + [TLDef(0xD597650C)] + public partial class GroupCall : GroupCallBase + { + [Flags] public enum Flags { join_muted = 0x2, can_change_join_muted = 0x4, has_title = 0x8, has_stream_dc_id = 0x10, + has_record_start_date = 0x20, join_date_asc = 0x40, has_schedule_date = 0x80, schedule_start_subscribed = 0x100, + can_start_video = 0x200, has_unmuted_video_count = 0x400 } + public Flags flags; + public long id; + public long access_hash; + public int participants_count; + [IfFlag(3)] public string title; + [IfFlag(4)] public int stream_dc_id; + [IfFlag(5)] public DateTime record_start_date; + [IfFlag(7)] public DateTime schedule_date; + [IfFlag(10)] public int unmuted_video_count; + public int unmuted_video_limit; + public int version; + } + + ///See + [TLDef(0xD8AA840F)] + public partial class InputGroupCall : ITLObject + { + public long id; + public long access_hash; + } + + ///See + [TLDef(0xEBA636FE)] + public partial class GroupCallParticipant : ITLObject + { + [Flags] public enum Flags { muted = 0x1, left = 0x2, can_self_unmute = 0x4, has_active_date = 0x8, just_joined = 0x10, + versioned = 0x20, has_video = 0x40, has_volume = 0x80, min = 0x100, muted_by_you = 0x200, volume_by_admin = 0x400, + has_about = 0x800, self = 0x1000, has_raise_hand_rating = 0x2000, has_presentation = 0x4000, video_joined = 0x8000 } + public Flags flags; + public Peer peer; + public DateTime date; + [IfFlag(3)] public DateTime active_date; + public int source; + [IfFlag(7)] public int volume; + [IfFlag(11)] public string about; + [IfFlag(13)] public long raise_hand_rating; + [IfFlag(6)] public GroupCallParticipantVideo video; + [IfFlag(14)] public GroupCallParticipantVideo presentation; + } + + ///See + [TLDef(0x9E727AAD)] + public partial class Phone_GroupCall : ITLObject + { + public GroupCallBase call; + public GroupCallParticipant[] participants; + public string participants_next_offset; + public ChatBase[] chats; + public UserBase[] users; + } + + ///See + [TLDef(0xF47751B6)] + public partial class Phone_GroupParticipants : ITLObject + { + public int count; + public GroupCallParticipant[] participants; + public string next_offset; + public ChatBase[] chats; + public UserBase[] users; + public int version; + } + + ///See + public abstract partial class InlineQueryPeerType : ITLObject { } + ///See + [TLDef(0x3081ED9D)] + public partial class InlineQueryPeerTypeSameBotPM : InlineQueryPeerType { } + ///See + [TLDef(0x833C0FAC)] + public partial class InlineQueryPeerTypePM : InlineQueryPeerType { } + ///See + [TLDef(0xD766C50A)] + public partial class InlineQueryPeerTypeChat : InlineQueryPeerType { } + ///See + [TLDef(0x5EC4BE43)] + public partial class InlineQueryPeerTypeMegagroup : InlineQueryPeerType { } + ///See + [TLDef(0x6334EE9A)] + public partial class InlineQueryPeerTypeBroadcast : InlineQueryPeerType { } + + ///See + [TLDef(0x1662AF0B)] + public partial class Messages_HistoryImport : ITLObject { public long id; } + + ///See + [TLDef(0x5E0FB7B9)] + public partial class Messages_HistoryImportParsed : ITLObject + { + [Flags] public enum Flags { pm = 0x1, group = 0x2, has_title = 0x4 } + public Flags flags; + [IfFlag(2)] public string title; + } + + ///See + [TLDef(0xEF8D3E6C)] + public partial class Messages_AffectedFoundMessages : ITLObject + { + public int pts; + public int pts_count; + public int offset; + public int[] messages; + } + + ///See + [TLDef(0x1E3E6680)] + public partial class ChatInviteImporter : ITLObject + { + public int user_id; + public DateTime date; + } + + ///See + [TLDef(0xBDC62DCC)] + public partial class Messages_ExportedChatInvites : ITLObject + { + public int count; + public ExportedChatInvite[] invites; + public UserBase[] users; + } + + ///See + public abstract partial class Messages_ExportedChatInviteBase : ITLObject { } + ///See + [TLDef(0x1871BE50)] + public partial class Messages_ExportedChatInvite : Messages_ExportedChatInviteBase + { + public ExportedChatInvite invite; + public UserBase[] users; + } + ///See + [TLDef(0x222600EF)] + public partial class Messages_ExportedChatInviteReplaced : Messages_ExportedChatInviteBase + { + public ExportedChatInvite invite; + public ExportedChatInvite new_invite; + public UserBase[] users; + } + + ///See + [TLDef(0x81B6B00A)] + public partial class Messages_ChatInviteImporters : ITLObject + { + public int count; + public ChatInviteImporter[] importers; + public UserBase[] users; + } + + ///See + [TLDef(0xDFD2330F)] + public partial class ChatAdminWithInvites : ITLObject + { + public int admin_id; + public int invites_count; + public int revoked_invites_count; + } + + ///See + [TLDef(0xB69B72D7)] + public partial class Messages_ChatAdminsWithInvites : ITLObject + { + public ChatAdminWithInvites[] admins; + public UserBase[] users; + } + + ///See + [TLDef(0xA24DE717)] + public partial class Messages_CheckedHistoryImportPeer : ITLObject { public string confirm_text; } + + ///See + [TLDef(0xAFE5623F)] + public partial class Phone_JoinAsPeers : ITLObject + { + public Peer[] peers; + public ChatBase[] chats; + public UserBase[] users; + } + + ///See + [TLDef(0x204BD158)] + public partial class Phone_ExportedGroupCallInvite : ITLObject { public string link; } + + ///See + [TLDef(0xDCB118B7)] + public partial class GroupCallParticipantVideoSourceGroup : ITLObject + { + public string semantics; + public int[] sources; + } + + ///See + [TLDef(0x67753AC8)] + public partial class GroupCallParticipantVideo : ITLObject + { + [Flags] public enum Flags { paused = 0x1, has_audio_source = 0x2 } + public Flags flags; + public string endpoint; + public GroupCallParticipantVideoSourceGroup[] source_groups; + [IfFlag(1)] public int audio_source; + } + + ///See + [TLDef(0x85FEA03F)] + public partial class Stickers_SuggestedShortName : ITLObject { public string short_name; } + + ///See + public abstract partial class BotCommandScope : ITLObject { } + ///See + [TLDef(0x2F6CB2AB)] + public partial class BotCommandScopeDefault : BotCommandScope { } + ///See + [TLDef(0x3C4F04D8)] + public partial class BotCommandScopeUsers : BotCommandScope { } + ///See + [TLDef(0x6FE1A881)] + public partial class BotCommandScopeChats : BotCommandScope { } + ///See + [TLDef(0xB9AA606A)] + public partial class BotCommandScopeChatAdmins : BotCommandScope { } + ///See + [TLDef(0xDB9D897D)] + public partial class BotCommandScopePeer : BotCommandScope { public InputPeer peer; } + ///See + [TLDef(0x3FD863D1)] + public partial class BotCommandScopePeerAdmins : BotCommandScope { public InputPeer peer; } + ///See + [TLDef(0x0A1321F3)] + public partial class BotCommandScopePeerUser : BotCommandScope + { + public InputPeer peer; + public InputUserBase user_id; + } + + ///See + public abstract partial class Account_ResetPasswordResult : ITLObject { } + ///See + [TLDef(0xE3779861)] + public partial class Account_ResetPasswordFailedWait : Account_ResetPasswordResult { public DateTime retry_date; } + ///See + [TLDef(0xE9EFFC7D)] + public partial class Account_ResetPasswordRequestedWait : Account_ResetPasswordResult { public DateTime until_date; } + ///See + [TLDef(0xE926D63E)] + public partial class Account_ResetPasswordOk : Account_ResetPasswordResult { } } namespace WTelegram // ---functions--- @@ -6228,6 +6718,66 @@ namespace WTelegram // ---functions--- return "InvokeAfterMsgs"; }); + ///See + public static ITLFunction InitConnection(int api_id, string device_model, string system_version, string app_version, string system_lang_code, string lang_pack, string lang_code, ITLFunction query, InputClientProxy proxy = null, JSONValue params_ = null) + => writer => + { + writer.Write(0xC1CD5EA9); + writer.Write((proxy != null ? 0x1 : 0) | (params_ != null ? 0x2 : 0)); + writer.Write(api_id); + writer.WriteTLString(device_model); + writer.WriteTLString(system_version); + writer.WriteTLString(app_version); + writer.WriteTLString(system_lang_code); + writer.WriteTLString(lang_pack); + writer.WriteTLString(lang_code); + if (proxy != null) + writer.WriteTLObject(proxy); + if (params_ != null) + writer.WriteTLObject(params_); + query(writer); + return "InitConnection"; + }; + + ///See + public Task InvokeWithLayer(int layer, ITLFunction query) + => CallAsync(writer => + { + writer.Write(0xDA9B0D0D); + writer.Write(layer); + query(writer); + return "InvokeWithLayer"; + }); + + ///See + public Task InvokeWithoutUpdates(ITLFunction query) + => CallAsync(writer => + { + writer.Write(0xBF9459B7); + query(writer); + return "InvokeWithoutUpdates"; + }); + + ///See + public Task InvokeWithMessagesRange(MessageRange range, ITLFunction query) + => CallAsync(writer => + { + writer.Write(0x365275F2); + writer.WriteTLObject(range); + query(writer); + return "InvokeWithMessagesRange"; + }); + + ///See + public Task InvokeWithTakeout(long takeout_id, ITLFunction query) + => CallAsync(writer => + { + writer.Write(0xACA9FD2E); + writer.Write(takeout_id); + query(writer); + return "InvokeWithTakeout"; + }); + ///See public Task Auth_SendCode(string phone_number, int api_id, string api_hash, CodeSettings settings) => CallAsync(writer => @@ -6310,6 +6860,114 @@ namespace WTelegram // ---functions--- return "Auth_BindTempAuthKey"; }); + ///See + public Task Auth_ImportBotAuthorization(int flags, int api_id, string api_hash, string bot_auth_token) + => CallAsync(writer => + { + writer.Write(0x67A3FF2C); + writer.Write(flags); + writer.Write(api_id); + writer.WriteTLString(api_hash); + writer.WriteTLString(bot_auth_token); + return "Auth_ImportBotAuthorization"; + }); + + ///See + public Task Auth_CheckPassword(InputCheckPasswordSRPBase password) + => CallAsync(writer => + { + writer.Write(0xD18B4D16); + writer.WriteTLObject(password); + return "Auth_CheckPassword"; + }); + + ///See + public Task Auth_RequestPasswordRecovery() + => CallAsync(writer => + { + writer.Write(0xD897BC66); + return "Auth_RequestPasswordRecovery"; + }); + + ///See + public Task Auth_RecoverPassword(string code, Account_PasswordInputSettings new_settings = null) + => CallAsync(writer => + { + writer.Write(0x37096C70); + writer.Write(new_settings != null ? 0x1 : 0); + writer.WriteTLString(code); + if (new_settings != null) + writer.WriteTLObject(new_settings); + return "Auth_RecoverPassword"; + }); + + ///See + public Task Auth_ResendCode(string phone_number, string phone_code_hash) + => CallAsync(writer => + { + writer.Write(0x3EF1A9BF); + writer.WriteTLString(phone_number); + writer.WriteTLString(phone_code_hash); + return "Auth_ResendCode"; + }); + + ///See + public Task Auth_CancelCode(string phone_number, string phone_code_hash) + => CallAsync(writer => + { + writer.Write(0x1F040578); + writer.WriteTLString(phone_number); + writer.WriteTLString(phone_code_hash); + return "Auth_CancelCode"; + }); + + ///See + public Task Auth_DropTempAuthKeys(long[] except_auth_keys) + => CallAsync(writer => + { + writer.Write(0x8E48A188); + writer.WriteTLVector(except_auth_keys); + return "Auth_DropTempAuthKeys"; + }); + + ///See + public Task Auth_ExportLoginToken(int api_id, string api_hash, int[] except_ids) + => CallAsync(writer => + { + writer.Write(0xB1B41517); + writer.Write(api_id); + writer.WriteTLString(api_hash); + writer.WriteTLVector(except_ids); + return "Auth_ExportLoginToken"; + }); + + ///See + public Task Auth_ImportLoginToken(byte[] token) + => CallAsync(writer => + { + writer.Write(0x95AC5CE4); + writer.WriteTLBytes(token); + return "Auth_ImportLoginToken"; + }); + + ///See + public Task Auth_AcceptLoginToken(byte[] token) + => CallAsync(writer => + { + writer.Write(0xE894AD4D); + writer.WriteTLBytes(token); + return "Auth_AcceptLoginToken"; + }); + + ///See + public Task Auth_CheckRecoveryPassword(string code) + => CallAsync(writer => + { + writer.Write(0x0D36BF79); + writer.WriteTLString(code); + return "Auth_CheckRecoveryPassword"; + }); + ///See public Task Account_RegisterDevice(int token_type, string token, bool app_sandbox, byte[] secret, int[] other_uids, bool no_muted = false) => CallAsync(writer => @@ -6396,15 +7054,611 @@ namespace WTelegram // ---functions--- }); ///See - public Task Account_ReportPeer(InputPeer peer, ReportReason reason) + public Task Account_ReportPeer(InputPeer peer, ReportReason reason, string message) => CallAsync(writer => { - writer.Write(0xAE189D5F); + writer.Write(0xC5BA3D86); writer.WriteTLObject(peer); writer.WriteTLObject(reason); + writer.WriteTLString(message); return "Account_ReportPeer"; }); + ///See + public Task Account_CheckUsername(string username) + => CallAsync(writer => + { + writer.Write(0x2714D86C); + writer.WriteTLString(username); + return "Account_CheckUsername"; + }); + + ///See + public Task Account_UpdateUsername(string username) + => CallAsync(writer => + { + writer.Write(0x3E0BDD7C); + writer.WriteTLString(username); + return "Account_UpdateUsername"; + }); + + ///See + public Task Account_GetPrivacy(InputPrivacyKey key) + => CallAsync(writer => + { + writer.Write(0xDADBC950); + writer.WriteTLObject(key); + return "Account_GetPrivacy"; + }); + + ///See + public Task Account_SetPrivacy(InputPrivacyKey key, InputPrivacyRule[] rules) + => CallAsync(writer => + { + writer.Write(0xC9F81CE8); + writer.WriteTLObject(key); + writer.WriteTLVector(rules); + return "Account_SetPrivacy"; + }); + + ///See + public Task Account_DeleteAccount(string reason) + => CallAsync(writer => + { + writer.Write(0x418D4E0B); + writer.WriteTLString(reason); + return "Account_DeleteAccount"; + }); + + ///See + public Task Account_GetAccountTTL() + => CallAsync(writer => + { + writer.Write(0x08FC711D); + return "Account_GetAccountTTL"; + }); + + ///See + public Task Account_SetAccountTTL(AccountDaysTTL ttl) + => CallAsync(writer => + { + writer.Write(0x2442485E); + writer.WriteTLObject(ttl); + return "Account_SetAccountTTL"; + }); + + ///See + public Task Account_SendChangePhoneCode(string phone_number, CodeSettings settings) + => CallAsync(writer => + { + writer.Write(0x82574AE5); + writer.WriteTLString(phone_number); + writer.WriteTLObject(settings); + return "Account_SendChangePhoneCode"; + }); + + ///See + public Task Account_ChangePhone(string phone_number, string phone_code_hash, string phone_code) + => CallAsync(writer => + { + writer.Write(0x70C32EDB); + writer.WriteTLString(phone_number); + writer.WriteTLString(phone_code_hash); + writer.WriteTLString(phone_code); + return "Account_ChangePhone"; + }); + + ///See + public Task Account_UpdateDeviceLocked(int period) + => CallAsync(writer => + { + writer.Write(0x38DF3532); + writer.Write(period); + return "Account_UpdateDeviceLocked"; + }); + + ///See + public Task Account_GetAuthorizations() + => CallAsync(writer => + { + writer.Write(0xE320C158); + return "Account_GetAuthorizations"; + }); + + ///See + public Task Account_ResetAuthorization(long hash) + => CallAsync(writer => + { + writer.Write(0xDF77F3BC); + writer.Write(hash); + return "Account_ResetAuthorization"; + }); + + ///See + public Task Account_GetPassword() + => CallAsync(writer => + { + writer.Write(0x548A30F5); + return "Account_GetPassword"; + }); + + ///See + public Task Account_GetPasswordSettings(InputCheckPasswordSRPBase password) + => CallAsync(writer => + { + writer.Write(0x9CD4EAF9); + writer.WriteTLObject(password); + return "Account_GetPasswordSettings"; + }); + + ///See + public Task Account_UpdatePasswordSettings(InputCheckPasswordSRPBase password, Account_PasswordInputSettings new_settings) + => CallAsync(writer => + { + writer.Write(0xA59B102F); + writer.WriteTLObject(password); + writer.WriteTLObject(new_settings); + return "Account_UpdatePasswordSettings"; + }); + + ///See + public Task Account_SendConfirmPhoneCode(string hash, CodeSettings settings) + => CallAsync(writer => + { + writer.Write(0x1B3FAA88); + writer.WriteTLString(hash); + writer.WriteTLObject(settings); + return "Account_SendConfirmPhoneCode"; + }); + + ///See + public Task Account_ConfirmPhone(string phone_code_hash, string phone_code) + => CallAsync(writer => + { + writer.Write(0x5F2178C3); + writer.WriteTLString(phone_code_hash); + writer.WriteTLString(phone_code); + return "Account_ConfirmPhone"; + }); + + ///See + public Task Account_GetTmpPassword(InputCheckPasswordSRPBase password, int period) + => CallAsync(writer => + { + writer.Write(0x449E0B51); + writer.WriteTLObject(password); + writer.Write(period); + return "Account_GetTmpPassword"; + }); + + ///See + public Task Account_GetWebAuthorizations() + => CallAsync(writer => + { + writer.Write(0x182E6D6F); + return "Account_GetWebAuthorizations"; + }); + + ///See + public Task Account_ResetWebAuthorization(long hash) + => CallAsync(writer => + { + writer.Write(0x2D01B9EF); + writer.Write(hash); + return "Account_ResetWebAuthorization"; + }); + + ///See + public Task Account_ResetWebAuthorizations() + => CallAsync(writer => + { + writer.Write(0x682D2594); + return "Account_ResetWebAuthorizations"; + }); + + ///See + public Task Account_GetAllSecureValues() + => CallAsync(writer => + { + writer.Write(0xB288BC7D); + return "Account_GetAllSecureValues"; + }); + + ///See + public Task Account_GetSecureValue(SecureValueType[] types) + => CallAsync(writer => + { + writer.Write(0x73665BC2); + writer.WriteTLVector(types); + return "Account_GetSecureValue"; + }); + + ///See + public Task Account_SaveSecureValue(InputSecureValue value, long secure_secret_id) + => CallAsync(writer => + { + writer.Write(0x899FE31D); + writer.WriteTLObject(value); + writer.Write(secure_secret_id); + return "Account_SaveSecureValue"; + }); + + ///See + public Task Account_DeleteSecureValue(SecureValueType[] types) + => CallAsync(writer => + { + writer.Write(0xB880BC4B); + writer.WriteTLVector(types); + return "Account_DeleteSecureValue"; + }); + + ///See + public Task Account_GetAuthorizationForm(int bot_id, string scope, string public_key) + => CallAsync(writer => + { + writer.Write(0xB86BA8E1); + writer.Write(bot_id); + writer.WriteTLString(scope); + writer.WriteTLString(public_key); + return "Account_GetAuthorizationForm"; + }); + + ///See + public Task Account_AcceptAuthorization(int bot_id, string scope, string public_key, SecureValueHash[] value_hashes, SecureCredentialsEncrypted credentials) + => CallAsync(writer => + { + writer.Write(0xE7027C94); + writer.Write(bot_id); + writer.WriteTLString(scope); + writer.WriteTLString(public_key); + writer.WriteTLVector(value_hashes); + writer.WriteTLObject(credentials); + return "Account_AcceptAuthorization"; + }); + + ///See + public Task Account_SendVerifyPhoneCode(string phone_number, CodeSettings settings) + => CallAsync(writer => + { + writer.Write(0xA5A356F9); + writer.WriteTLString(phone_number); + writer.WriteTLObject(settings); + return "Account_SendVerifyPhoneCode"; + }); + + ///See + public Task Account_VerifyPhone(string phone_number, string phone_code_hash, string phone_code) + => CallAsync(writer => + { + writer.Write(0x4DD3A7F6); + writer.WriteTLString(phone_number); + writer.WriteTLString(phone_code_hash); + writer.WriteTLString(phone_code); + return "Account_VerifyPhone"; + }); + + ///See + public Task Account_SendVerifyEmailCode(string email) + => CallAsync(writer => + { + writer.Write(0x7011509F); + writer.WriteTLString(email); + return "Account_SendVerifyEmailCode"; + }); + + ///See + public Task Account_VerifyEmail(string email, string code) + => CallAsync(writer => + { + writer.Write(0xECBA39DB); + writer.WriteTLString(email); + writer.WriteTLString(code); + return "Account_VerifyEmail"; + }); + + ///See + public Task Account_InitTakeoutSession(bool contacts = false, bool message_users = false, bool message_chats = false, bool message_megagroups = false, bool message_channels = false, bool files = false, int? file_max_size = null) + => CallAsync(writer => + { + writer.Write(0xF05B4804); + writer.Write((contacts ? 0x1 : 0) | (message_users ? 0x2 : 0) | (message_chats ? 0x4 : 0) | (message_megagroups ? 0x8 : 0) | (message_channels ? 0x10 : 0) | (files ? 0x20 : 0) | (file_max_size != null ? 0x20 : 0)); + if (file_max_size != null) + writer.Write(file_max_size.Value); + return "Account_InitTakeoutSession"; + }); + + ///See + public Task Account_FinishTakeoutSession(bool success = false) + => CallAsync(writer => + { + writer.Write(0x1D2652EE); + writer.Write(success ? 0x1 : 0); + return "Account_FinishTakeoutSession"; + }); + + ///See + public Task Account_ConfirmPasswordEmail(string code) + => CallAsync(writer => + { + writer.Write(0x8FDF1920); + writer.WriteTLString(code); + return "Account_ConfirmPasswordEmail"; + }); + + ///See + public Task Account_ResendPasswordEmail() + => CallAsync(writer => + { + writer.Write(0x7A7F2A15); + return "Account_ResendPasswordEmail"; + }); + + ///See + public Task Account_CancelPasswordEmail() + => CallAsync(writer => + { + writer.Write(0xC1CBD5B6); + return "Account_CancelPasswordEmail"; + }); + + ///See + public Task Account_GetContactSignUpNotification() + => CallAsync(writer => + { + writer.Write(0x9F07C728); + return "Account_GetContactSignUpNotification"; + }); + + ///See + public Task Account_SetContactSignUpNotification(bool silent) + => CallAsync(writer => + { + writer.Write(0xCFF43F61); + writer.Write(silent ? 0x997275B5 : 0xBC799737); + return "Account_SetContactSignUpNotification"; + }); + + ///See + public Task Account_GetNotifyExceptions(bool compare_sound = false, InputNotifyPeerBase peer = null) + => CallAsync(writer => + { + writer.Write(0x53577479); + writer.Write((compare_sound ? 0x2 : 0) | (peer != null ? 0x1 : 0)); + if (peer != null) + writer.WriteTLObject(peer); + return "Account_GetNotifyExceptions"; + }); + + ///See + public Task Account_GetWallPaper(InputWallPaperBase wallpaper) + => CallAsync(writer => + { + writer.Write(0xFC8DDBEA); + writer.WriteTLObject(wallpaper); + return "Account_GetWallPaper"; + }); + + ///See + public Task Account_UploadWallPaper(InputFileBase file, string mime_type, WallPaperSettings settings) + => CallAsync(writer => + { + writer.Write(0xDD853661); + writer.WriteTLObject(file); + writer.WriteTLString(mime_type); + writer.WriteTLObject(settings); + return "Account_UploadWallPaper"; + }); + + ///See + public Task Account_SaveWallPaper(InputWallPaperBase wallpaper, bool unsave, WallPaperSettings settings) + => CallAsync(writer => + { + writer.Write(0x6C5A5B37); + writer.WriteTLObject(wallpaper); + writer.Write(unsave ? 0x997275B5 : 0xBC799737); + writer.WriteTLObject(settings); + return "Account_SaveWallPaper"; + }); + + ///See + public Task Account_InstallWallPaper(InputWallPaperBase wallpaper, WallPaperSettings settings) + => CallAsync(writer => + { + writer.Write(0xFEED5769); + writer.WriteTLObject(wallpaper); + writer.WriteTLObject(settings); + return "Account_InstallWallPaper"; + }); + + ///See + public Task Account_ResetWallPapers() + => CallAsync(writer => + { + writer.Write(0xBB3B9804); + return "Account_ResetWallPapers"; + }); + + ///See + public Task Account_GetAutoDownloadSettings() + => CallAsync(writer => + { + writer.Write(0x56DA0B3F); + return "Account_GetAutoDownloadSettings"; + }); + + ///See + public Task Account_SaveAutoDownloadSettings(AutoDownloadSettings settings, bool low = false, bool high = false) + => CallAsync(writer => + { + writer.Write(0x76F36233); + writer.Write((low ? 0x1 : 0) | (high ? 0x2 : 0)); + writer.WriteTLObject(settings); + return "Account_SaveAutoDownloadSettings"; + }); + + ///See + public Task Account_UploadTheme(InputFileBase file, string file_name, string mime_type, InputFileBase thumb = null) + => CallAsync(writer => + { + writer.Write(0x1C3DB333); + writer.Write(thumb != null ? 0x1 : 0); + writer.WriteTLObject(file); + if (thumb != null) + writer.WriteTLObject(thumb); + writer.WriteTLString(file_name); + writer.WriteTLString(mime_type); + return "Account_UploadTheme"; + }); + + ///See + public Task Account_CreateTheme(string slug, string title, InputDocumentBase document = null, InputThemeSettings settings = null) + => CallAsync(writer => + { + writer.Write(0x8432C21F); + writer.Write((document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)); + writer.WriteTLString(slug); + writer.WriteTLString(title); + if (document != null) + writer.WriteTLObject(document); + if (settings != null) + writer.WriteTLObject(settings); + return "Account_CreateTheme"; + }); + + ///See + public Task Account_UpdateTheme(string format, InputThemeBase theme, string slug = null, string title = null, InputDocumentBase document = null, InputThemeSettings settings = null) + => CallAsync(writer => + { + writer.Write(0x5CB367D5); + writer.Write((slug != null ? 0x1 : 0) | (title != null ? 0x2 : 0) | (document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)); + writer.WriteTLString(format); + writer.WriteTLObject(theme); + if (slug != null) + writer.WriteTLString(slug); + if (title != null) + writer.WriteTLString(title); + if (document != null) + writer.WriteTLObject(document); + if (settings != null) + writer.WriteTLObject(settings); + return "Account_UpdateTheme"; + }); + + ///See + public Task Account_SaveTheme(InputThemeBase theme, bool unsave) + => CallAsync(writer => + { + writer.Write(0xF257106C); + writer.WriteTLObject(theme); + writer.Write(unsave ? 0x997275B5 : 0xBC799737); + return "Account_SaveTheme"; + }); + + ///See + public Task Account_InstallTheme(bool dark = false, string format = null, InputThemeBase theme = null) + => CallAsync(writer => + { + writer.Write(0x7AE43737); + writer.Write((dark ? 0x1 : 0) | (format != null ? 0x2 : 0) | (theme != null ? 0x2 : 0)); + if (format != null) + writer.WriteTLString(format); + if (theme != null) + writer.WriteTLObject(theme); + return "Account_InstallTheme"; + }); + + ///See + public Task Account_GetTheme(string format, InputThemeBase theme, long document_id) + => CallAsync(writer => + { + writer.Write(0x8D9D742B); + writer.WriteTLString(format); + writer.WriteTLObject(theme); + writer.Write(document_id); + return "Account_GetTheme"; + }); + + ///See + public Task Account_GetThemes(string format, int hash) + => CallAsync(writer => + { + writer.Write(0x285946F8); + writer.WriteTLString(format); + writer.Write(hash); + return "Account_GetThemes"; + }); + + ///See + public Task Account_SetContentSettings(bool sensitive_enabled = false) + => CallAsync(writer => + { + writer.Write(0xB574B16B); + writer.Write(sensitive_enabled ? 0x1 : 0); + return "Account_SetContentSettings"; + }); + + ///See + public Task Account_GetContentSettings() + => CallAsync(writer => + { + writer.Write(0x8B9B4DAE); + return "Account_GetContentSettings"; + }); + + ///See + public Task Account_GetMultiWallPapers(InputWallPaperBase[] wallpapers) + => CallAsync(writer => + { + writer.Write(0x65AD71DC); + writer.WriteTLVector(wallpapers); + return "Account_GetMultiWallPapers"; + }); + + ///See + public Task Account_GetGlobalPrivacySettings() + => CallAsync(writer => + { + writer.Write(0xEB2B4CF6); + return "Account_GetGlobalPrivacySettings"; + }); + + ///See + public Task Account_SetGlobalPrivacySettings(GlobalPrivacySettings settings) + => CallAsync(writer => + { + writer.Write(0x1EDAAAC2); + writer.WriteTLObject(settings); + return "Account_SetGlobalPrivacySettings"; + }); + + ///See + public Task Account_ReportProfilePhoto(InputPeer peer, InputPhotoBase photo_id, ReportReason reason, string message) + => CallAsync(writer => + { + writer.Write(0xFA8CC6F5); + writer.WriteTLObject(peer); + writer.WriteTLObject(photo_id); + writer.WriteTLObject(reason); + writer.WriteTLString(message); + return "Account_ReportProfilePhoto"; + }); + + ///See + public Task Account_ResetPassword() + => CallAsync(writer => + { + writer.Write(0x9308CE1B); + return "Account_ResetPassword"; + }); + + ///See + public Task Account_DeclinePasswordReset() + => CallAsync(writer => + { + writer.Write(0x4C9409F6); + return "Account_DeclinePasswordReset"; + }); + ///See public Task Users_GetUsers(InputUserBase[] id) => CallAsync(writer => @@ -6423,6 +7677,16 @@ namespace WTelegram // ---functions--- return "Users_GetFullUser"; }); + ///See + public Task Users_SetSecureValueErrors(InputUserBase id, SecureValueErrorBase[] errors) + => CallAsync(writer => + { + writer.Write(0x90C894B5); + writer.WriteTLObject(id); + writer.WriteTLVector(errors); + return "Users_SetSecureValueErrors"; + }); + ///See public Task Contacts_GetContactIDs(int hash) => CallAsync(writer => @@ -6504,6 +7768,116 @@ namespace WTelegram // ---functions--- return "Contacts_GetBlocked"; }); + ///See + public Task Contacts_Search(string q, int limit) + => CallAsync(writer => + { + writer.Write(0x11F812D8); + writer.WriteTLString(q); + writer.Write(limit); + return "Contacts_Search"; + }); + + ///See + public Task Contacts_ResolveUsername(string username) + => CallAsync(writer => + { + writer.Write(0xF93CCBA3); + writer.WriteTLString(username); + return "Contacts_ResolveUsername"; + }); + + ///See + public Task Contacts_GetTopPeers(int offset, int limit, int hash, bool correspondents = false, bool bots_pm = false, bool bots_inline = false, bool phone_calls = false, bool forward_users = false, bool forward_chats = false, bool groups = false, bool channels = false) + => CallAsync(writer => + { + writer.Write(0xD4982DB5); + writer.Write((correspondents ? 0x1 : 0) | (bots_pm ? 0x2 : 0) | (bots_inline ? 0x4 : 0) | (phone_calls ? 0x8 : 0) | (forward_users ? 0x10 : 0) | (forward_chats ? 0x20 : 0) | (groups ? 0x400 : 0) | (channels ? 0x8000 : 0)); + writer.Write(offset); + writer.Write(limit); + writer.Write(hash); + return "Contacts_GetTopPeers"; + }); + + ///See + public Task Contacts_ResetTopPeerRating(TopPeerCategory category, InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x1AE373AC); + writer.WriteTLObject(category); + writer.WriteTLObject(peer); + return "Contacts_ResetTopPeerRating"; + }); + + ///See + public Task Contacts_ResetSaved() + => CallAsync(writer => + { + writer.Write(0x879537F1); + return "Contacts_ResetSaved"; + }); + + ///See + public Task Contacts_GetSaved() + => CallAsync(writer => + { + writer.Write(0x82F1E39F); + return "Contacts_GetSaved"; + }); + + ///See + public Task Contacts_ToggleTopPeers(bool enabled) + => CallAsync(writer => + { + writer.Write(0x8514BDDA); + writer.Write(enabled ? 0x997275B5 : 0xBC799737); + return "Contacts_ToggleTopPeers"; + }); + + ///See + public Task Contacts_AddContact(InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false) + => CallAsync(writer => + { + writer.Write(0xE8F463D0); + writer.Write(add_phone_privacy_exception ? 0x1 : 0); + writer.WriteTLObject(id); + writer.WriteTLString(first_name); + writer.WriteTLString(last_name); + writer.WriteTLString(phone); + return "Contacts_AddContact"; + }); + + ///See + public Task Contacts_AcceptContact(InputUserBase id) + => CallAsync(writer => + { + writer.Write(0xF831A20F); + writer.WriteTLObject(id); + return "Contacts_AcceptContact"; + }); + + ///See + public Task Contacts_GetLocated(InputGeoPointBase geo_point, bool background = false, int? self_expires = null) + => CallAsync(writer => + { + writer.Write(0xD348BC44); + writer.Write((background ? 0x2 : 0) | (self_expires != null ? 0x1 : 0)); + writer.WriteTLObject(geo_point); + if (self_expires != null) + writer.Write(self_expires.Value); + return "Contacts_GetLocated"; + }); + + ///See + public Task Contacts_BlockFromReplies(int msg_id, bool delete_message = false, bool delete_history = false, bool report_spam = false) + => CallAsync(writer => + { + writer.Write(0x29A8962C); + writer.Write((delete_message ? 0x1 : 0) | (delete_history ? 0x2 : 0) | (report_spam ? 0x4 : 0)); + writer.Write(msg_id); + return "Contacts_BlockFromReplies"; + }); + ///See public Task Messages_GetMessages(InputMessage[] id) => CallAsync(writer => @@ -6697,13 +8071,14 @@ namespace WTelegram // ---functions--- }); ///See - public Task Messages_Report(InputPeer peer, int[] id, ReportReason reason) + public Task Messages_Report(InputPeer peer, int[] id, ReportReason reason, string message) => CallAsync(writer => { - writer.Write(0xBD82B658); + writer.Write(0x8953AB4E); writer.WriteTLObject(peer); writer.WriteTLVector(id); writer.WriteTLObject(reason); + writer.WriteTLString(message); return "Messages_Report"; }); @@ -6757,10 +8132,11 @@ namespace WTelegram // ---functions--- }); ///See - public Task Messages_DeleteChatUser(int chat_id, InputUserBase user_id) + public Task Messages_DeleteChatUser(int chat_id, InputUserBase user_id, bool revoke_history = false) => CallAsync(writer => { - writer.Write(0xE0611F16); + writer.Write(0xC534459A); + writer.Write(revoke_history ? 0x1 : 0); writer.Write(chat_id); writer.WriteTLObject(user_id); return "Messages_DeleteChatUser"; @@ -6776,129 +8152,6 @@ namespace WTelegram // ---functions--- return "Messages_CreateChat"; }); - ///See - public Task Updates_GetState() - => CallAsync(writer => - { - writer.Write(0xEDD4882A); - return "Updates_GetState"; - }); - - ///See - public Task Updates_GetDifference(int pts, DateTime date, int qts, int? pts_total_limit = null) - => CallAsync(writer => - { - writer.Write(0x25939651); - writer.Write(pts_total_limit != null ? 0x1 : 0); - writer.Write(pts); - if (pts_total_limit != null) - writer.Write(pts_total_limit.Value); - writer.WriteTLStamp(date); - writer.Write(qts); - return "Updates_GetDifference"; - }); - - ///See - public Task Photos_UpdateProfilePhoto(InputPhotoBase id) - => CallAsync(writer => - { - writer.Write(0x72D4742C); - writer.WriteTLObject(id); - return "Photos_UpdateProfilePhoto"; - }); - - ///See - public Task Photos_UploadProfilePhoto(InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null) - => CallAsync(writer => - { - writer.Write(0x89F30F69); - writer.Write((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0)); - if (file != null) - writer.WriteTLObject(file); - if (video != null) - writer.WriteTLObject(video); - if (video_start_ts != null) - writer.Write(video_start_ts.Value); - return "Photos_UploadProfilePhoto"; - }); - - ///See - public Task Photos_DeletePhotos(InputPhotoBase[] id) - => CallAsync(writer => - { - writer.Write(0x87CF7F2F); - writer.WriteTLVector(id); - return "Photos_DeletePhotos"; - }); - - ///See - public Task Upload_SaveFilePart(long file_id, int file_part, byte[] bytes) - => CallAsync(writer => - { - writer.Write(0xB304A621); - writer.Write(file_id); - writer.Write(file_part); - writer.WriteTLBytes(bytes); - return "Upload_SaveFilePart"; - }); - - ///See - public Task Upload_GetFile(InputFileLocationBase location, int offset, int limit, bool precise = false, bool cdn_supported = false) - => CallAsync(writer => - { - writer.Write(0xB15A9AFC); - writer.Write((precise ? 0x1 : 0) | (cdn_supported ? 0x2 : 0)); - writer.WriteTLObject(location); - writer.Write(offset); - writer.Write(limit); - return "Upload_GetFile"; - }); - - ///See - public Task Help_GetConfig() => CallAsync(Help_GetConfig); - public static string Help_GetConfig(BinaryWriter writer) - { - writer.Write(0xC4F9186B); - return "Help_GetConfig"; - } - - ///See - public Task Help_GetNearestDc() - => CallAsync(writer => - { - writer.Write(0x1FB33026); - return "Help_GetNearestDc"; - }); - - ///See - public Task Help_GetAppUpdate(string source) - => CallAsync(writer => - { - writer.Write(0x522D5A7D); - writer.WriteTLString(source); - return "Help_GetAppUpdate"; - }); - - ///See - public Task Help_GetInviteText() - => CallAsync(writer => - { - writer.Write(0x4D392343); - return "Help_GetInviteText"; - }); - - ///See - public Task Photos_GetUserPhotos(InputUserBase user_id, int offset, long max_id, int limit) - => CallAsync(writer => - { - writer.Write(0x91CD32A8); - writer.WriteTLObject(user_id); - writer.Write(offset); - writer.Write(max_id); - writer.Write(limit); - return "Photos_GetUserPhotos"; - }); - ///See public Task Messages_GetDhConfig(int version, int random_length) => CallAsync(writer => @@ -6932,10 +8185,11 @@ namespace WTelegram // ---functions--- }); ///See - public Task Messages_DiscardEncryption(int chat_id) + public Task Messages_DiscardEncryption(int chat_id, bool delete_history = false) => CallAsync(writer => { - writer.Write(0xEDD923C5); + writer.Write(0xF393AEA0); + writer.Write(delete_history ? 0x1 : 0); writer.Write(chat_id); return "Messages_DiscardEncryption"; }); @@ -7014,47 +8268,6 @@ namespace WTelegram // ---functions--- return "Messages_ReportEncryptedSpam"; }); - ///See - public Task Upload_SaveBigFilePart(long file_id, int file_part, int file_total_parts, byte[] bytes) - => CallAsync(writer => - { - writer.Write(0xDE7B673D); - writer.Write(file_id); - writer.Write(file_part); - writer.Write(file_total_parts); - writer.WriteTLBytes(bytes); - return "Upload_SaveBigFilePart"; - }); - - ///See - public static ITLFunction InitConnection(int api_id, string device_model, string system_version, string app_version, string system_lang_code, string lang_pack, string lang_code, ITLFunction query, InputClientProxy proxy = null, JSONValue params_ = null) - => writer => - { - writer.Write(0xC1CD5EA9); - writer.Write((proxy != null ? 0x1 : 0) | (params_ != null ? 0x2 : 0)); - writer.Write(api_id); - writer.WriteTLString(device_model); - writer.WriteTLString(system_version); - writer.WriteTLString(app_version); - writer.WriteTLString(system_lang_code); - writer.WriteTLString(lang_pack); - writer.WriteTLString(lang_code); - if (proxy != null) - writer.WriteTLObject(proxy); - if (params_ != null) - writer.WriteTLObject(params_); - query(writer); - return "InitConnection"; - }; - - ///See - public Task Help_GetSupport() - => CallAsync(writer => - { - writer.Write(0x9CDF08CD); - return "Help_GetSupport"; - }); - ///See public Task Messages_ReadMessageContents(int[] id) => CallAsync(writer => @@ -7064,119 +8277,6 @@ namespace WTelegram // ---functions--- return "Messages_ReadMessageContents"; }); - ///See - public Task Account_CheckUsername(string username) - => CallAsync(writer => - { - writer.Write(0x2714D86C); - writer.WriteTLString(username); - return "Account_CheckUsername"; - }); - - ///See - public Task Account_UpdateUsername(string username) - => CallAsync(writer => - { - writer.Write(0x3E0BDD7C); - writer.WriteTLString(username); - return "Account_UpdateUsername"; - }); - - ///See - public Task Contacts_Search(string q, int limit) - => CallAsync(writer => - { - writer.Write(0x11F812D8); - writer.WriteTLString(q); - writer.Write(limit); - return "Contacts_Search"; - }); - - ///See - public Task Account_GetPrivacy(InputPrivacyKey key) - => CallAsync(writer => - { - writer.Write(0xDADBC950); - writer.WriteTLObject(key); - return "Account_GetPrivacy"; - }); - - ///See - public Task Account_SetPrivacy(InputPrivacyKey key, InputPrivacyRule[] rules) - => CallAsync(writer => - { - writer.Write(0xC9F81CE8); - writer.WriteTLObject(key); - writer.WriteTLVector(rules); - return "Account_SetPrivacy"; - }); - - ///See - public Task Account_DeleteAccount(string reason) - => CallAsync(writer => - { - writer.Write(0x418D4E0B); - writer.WriteTLString(reason); - return "Account_DeleteAccount"; - }); - - ///See - public Task Account_GetAccountTTL() - => CallAsync(writer => - { - writer.Write(0x08FC711D); - return "Account_GetAccountTTL"; - }); - - ///See - public Task Account_SetAccountTTL(AccountDaysTTL ttl) - => CallAsync(writer => - { - writer.Write(0x2442485E); - writer.WriteTLObject(ttl); - return "Account_SetAccountTTL"; - }); - - ///See - public Task InvokeWithLayer(int layer, ITLFunction query) - => CallAsync(writer => - { - writer.Write(0xDA9B0D0D); - writer.Write(layer); - query(writer); - return "InvokeWithLayer"; - }); - - ///See - public Task Contacts_ResolveUsername(string username) - => CallAsync(writer => - { - writer.Write(0xF93CCBA3); - writer.WriteTLString(username); - return "Contacts_ResolveUsername"; - }); - - ///See - public Task Account_SendChangePhoneCode(string phone_number, CodeSettings settings) - => CallAsync(writer => - { - writer.Write(0x82574AE5); - writer.WriteTLString(phone_number); - writer.WriteTLObject(settings); - return "Account_SendChangePhoneCode"; - }); - - ///See - public Task Account_ChangePhone(string phone_number, string phone_code_hash, string phone_code) - => CallAsync(writer => - { - writer.Write(0x70C32EDB); - writer.WriteTLString(phone_number); - writer.WriteTLString(phone_code_hash); - writer.WriteTLString(phone_code); - return "Account_ChangePhone"; - }); - ///See public Task Messages_GetStickers(string emoticon, int hash) => CallAsync(writer => @@ -7196,27 +8296,6 @@ namespace WTelegram // ---functions--- return "Messages_GetAllStickers"; }); - ///See - public Task Account_UpdateDeviceLocked(int period) - => CallAsync(writer => - { - writer.Write(0x38DF3532); - writer.Write(period); - return "Account_UpdateDeviceLocked"; - }); - - ///See - public Task Auth_ImportBotAuthorization(int flags, int api_id, string api_hash, string bot_auth_token) - => CallAsync(writer => - { - writer.Write(0x67A3FF2C); - writer.Write(flags); - writer.Write(api_id); - writer.WriteTLString(api_hash); - writer.WriteTLString(bot_auth_token); - return "Auth_ImportBotAuthorization"; - }); - ///See public Task Messages_GetWebPagePreview(string message, MessageEntity[] entities = null) => CallAsync(writer => @@ -7229,91 +8308,17 @@ namespace WTelegram // ---functions--- return "Messages_GetWebPagePreview"; }); - ///See - public Task Account_GetAuthorizations() - => CallAsync(writer => - { - writer.Write(0xE320C158); - return "Account_GetAuthorizations"; - }); - - ///See - public Task Account_ResetAuthorization(long hash) - => CallAsync(writer => - { - writer.Write(0xDF77F3BC); - writer.Write(hash); - return "Account_ResetAuthorization"; - }); - - ///See - public Task Account_GetPassword() - => CallAsync(writer => - { - writer.Write(0x548A30F5); - return "Account_GetPassword"; - }); - - ///See - public Task Account_GetPasswordSettings(InputCheckPasswordSRPBase password) - => CallAsync(writer => - { - writer.Write(0x9CD4EAF9); - writer.WriteTLObject(password); - return "Account_GetPasswordSettings"; - }); - - ///See - public Task Account_UpdatePasswordSettings(InputCheckPasswordSRPBase password, Account_PasswordInputSettings new_settings) - => CallAsync(writer => - { - writer.Write(0xA59B102F); - writer.WriteTLObject(password); - writer.WriteTLObject(new_settings); - return "Account_UpdatePasswordSettings"; - }); - - ///See - public Task Auth_CheckPassword(InputCheckPasswordSRPBase password) - => CallAsync(writer => - { - writer.Write(0xD18B4D16); - writer.WriteTLObject(password); - return "Auth_CheckPassword"; - }); - - ///See - public Task Auth_RequestPasswordRecovery() - => CallAsync(writer => - { - writer.Write(0xD897BC66); - return "Auth_RequestPasswordRecovery"; - }); - - ///See - public Task Auth_RecoverPassword(string code) - => CallAsync(writer => - { - writer.Write(0x4EA56E92); - writer.WriteTLString(code); - return "Auth_RecoverPassword"; - }); - - ///See - public Task InvokeWithoutUpdates(ITLFunction query) - => CallAsync(writer => - { - writer.Write(0xBF9459B7); - query(writer); - return "InvokeWithoutUpdates"; - }); - ///See - public Task Messages_ExportChatInvite(InputPeer peer) + public Task Messages_ExportChatInvite(InputPeer peer, bool legacy_revoke_permanent = false, DateTime? expire_date = null, int? usage_limit = null) => CallAsync(writer => { - writer.Write(0x0DF7534C); + writer.Write(0x14B9BCD7); + writer.Write((legacy_revoke_permanent ? 0x4 : 0) | (expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0)); writer.WriteTLObject(peer); + if (expire_date != null) + writer.WriteTLStamp(expire_date.Value); + if (usage_limit != null) + writer.Write(usage_limit.Value); return "Messages_ExportChatInvite"; }); @@ -7375,15 +8380,6 @@ namespace WTelegram // ---functions--- return "Messages_StartBot"; }); - ///See - public Task Help_GetAppChangelog(string prev_app_version) - => CallAsync(writer => - { - writer.Write(0x9010EF6F); - writer.WriteTLString(prev_app_version); - return "Help_GetAppChangelog"; - }); - ///See public Task Messages_GetMessagesViews(InputPeer peer, int[] id, bool increment) => CallAsync(writer => @@ -7395,215 +8391,6 @@ namespace WTelegram // ---functions--- return "Messages_GetMessagesViews"; }); - ///See - public Task Channels_ReadHistory(InputChannelBase channel, int max_id) - => CallAsync(writer => - { - writer.Write(0xCC104937); - writer.WriteTLObject(channel); - writer.Write(max_id); - return "Channels_ReadHistory"; - }); - - ///See - public Task Channels_DeleteMessages(InputChannelBase channel, int[] id) - => CallAsync(writer => - { - writer.Write(0x84C1FD4E); - writer.WriteTLObject(channel); - writer.WriteTLVector(id); - return "Channels_DeleteMessages"; - }); - - ///See - public Task Channels_DeleteUserHistory(InputChannelBase channel, InputUserBase user_id) - => CallAsync(writer => - { - writer.Write(0xD10DD71B); - writer.WriteTLObject(channel); - writer.WriteTLObject(user_id); - return "Channels_DeleteUserHistory"; - }); - - ///See - public Task Channels_ReportSpam(InputChannelBase channel, InputUserBase user_id, int[] id) - => CallAsync(writer => - { - writer.Write(0xFE087810); - writer.WriteTLObject(channel); - writer.WriteTLObject(user_id); - writer.WriteTLVector(id); - return "Channels_ReportSpam"; - }); - - ///See - public Task Channels_GetMessages(InputChannelBase channel, InputMessage[] id) - => CallAsync(writer => - { - writer.Write(0xAD8C9A23); - writer.WriteTLObject(channel); - writer.WriteTLVector(id); - return "Channels_GetMessages"; - }); - - ///See - public Task Channels_GetParticipants(InputChannelBase channel, ChannelParticipantsFilter filter, int offset, int limit, int hash) - => CallAsync(writer => - { - writer.Write(0x123E05E9); - writer.WriteTLObject(channel); - writer.WriteTLObject(filter); - writer.Write(offset); - writer.Write(limit); - writer.Write(hash); - return "Channels_GetParticipants"; - }); - - ///See - public Task Channels_GetParticipant(InputChannelBase channel, InputUserBase user_id) - => CallAsync(writer => - { - writer.Write(0x546DD7A6); - writer.WriteTLObject(channel); - writer.WriteTLObject(user_id); - return "Channels_GetParticipant"; - }); - - ///See - public Task Channels_GetChannels(InputChannelBase[] id) - => CallAsync(writer => - { - writer.Write(0x0A7F6BBB); - writer.WriteTLVector(id); - return "Channels_GetChannels"; - }); - - ///See - public Task Channels_GetFullChannel(InputChannelBase channel) - => CallAsync(writer => - { - writer.Write(0x08736A09); - writer.WriteTLObject(channel); - return "Channels_GetFullChannel"; - }); - - ///See - public Task Channels_CreateChannel(string title, string about, bool broadcast = false, bool megagroup = false, bool for_import = false, InputGeoPointBase geo_point = null, string address = null) - => CallAsync(writer => - { - writer.Write(0x3D5FB10F); - writer.Write((broadcast ? 0x1 : 0) | (megagroup ? 0x2 : 0) | (for_import ? 0x8 : 0) | (geo_point != null ? 0x4 : 0) | (address != null ? 0x4 : 0)); - writer.WriteTLString(title); - writer.WriteTLString(about); - if (geo_point != null) - writer.WriteTLObject(geo_point); - if (address != null) - writer.WriteTLString(address); - return "Channels_CreateChannel"; - }); - - ///See - public Task Channels_EditAdmin(InputChannelBase channel, InputUserBase user_id, ChatAdminRights admin_rights, string rank) - => CallAsync(writer => - { - writer.Write(0xD33C8902); - writer.WriteTLObject(channel); - writer.WriteTLObject(user_id); - writer.WriteTLObject(admin_rights); - writer.WriteTLString(rank); - return "Channels_EditAdmin"; - }); - - ///See - public Task Channels_EditTitle(InputChannelBase channel, string title) - => CallAsync(writer => - { - writer.Write(0x566DECD0); - writer.WriteTLObject(channel); - writer.WriteTLString(title); - return "Channels_EditTitle"; - }); - - ///See - public Task Channels_EditPhoto(InputChannelBase channel, InputChatPhotoBase photo) - => CallAsync(writer => - { - writer.Write(0xF12E57C9); - writer.WriteTLObject(channel); - writer.WriteTLObject(photo); - return "Channels_EditPhoto"; - }); - - ///See - public Task Channels_CheckUsername(InputChannelBase channel, string username) - => CallAsync(writer => - { - writer.Write(0x10E6BD2C); - writer.WriteTLObject(channel); - writer.WriteTLString(username); - return "Channels_CheckUsername"; - }); - - ///See - public Task Channels_UpdateUsername(InputChannelBase channel, string username) - => CallAsync(writer => - { - writer.Write(0x3514B3DE); - writer.WriteTLObject(channel); - writer.WriteTLString(username); - return "Channels_UpdateUsername"; - }); - - ///See - public Task Channels_JoinChannel(InputChannelBase channel) - => CallAsync(writer => - { - writer.Write(0x24B524C5); - writer.WriteTLObject(channel); - return "Channels_JoinChannel"; - }); - - ///See - public Task Channels_LeaveChannel(InputChannelBase channel) - => CallAsync(writer => - { - writer.Write(0xF836AA95); - writer.WriteTLObject(channel); - return "Channels_LeaveChannel"; - }); - - ///See - public Task Channels_InviteToChannel(InputChannelBase channel, InputUserBase[] users) - => CallAsync(writer => - { - writer.Write(0x199F3A6C); - writer.WriteTLObject(channel); - writer.WriteTLVector(users); - return "Channels_InviteToChannel"; - }); - - ///See - public Task Channels_DeleteChannel(InputChannelBase channel) - => CallAsync(writer => - { - writer.Write(0xC0111FE3); - writer.WriteTLObject(channel); - return "Channels_DeleteChannel"; - }); - - ///See - public Task Updates_GetChannelDifference(InputChannelBase channel, ChannelMessagesFilterBase filter, int pts, int limit, bool force = false) - => CallAsync(writer => - { - writer.Write(0x03173D78); - writer.Write(force ? 0x1 : 0); - writer.WriteTLObject(channel); - writer.WriteTLObject(filter); - writer.Write(pts); - writer.Write(limit); - return "Updates_GetChannelDifference"; - }); - ///See public Task Messages_EditChatAdmin(int chat_id, InputUserBase user_id, bool is_admin) => CallAsync(writer => @@ -7731,47 +8518,6 @@ namespace WTelegram // ---functions--- return "Messages_SendInlineBotResult"; }); - ///See - public Task Channels_ExportMessageLink(InputChannelBase channel, int id, bool grouped = false, bool thread = false) - => CallAsync(writer => - { - writer.Write(0xE63FADEB); - writer.Write((grouped ? 0x1 : 0) | (thread ? 0x2 : 0)); - writer.WriteTLObject(channel); - writer.Write(id); - return "Channels_ExportMessageLink"; - }); - - ///See - public Task Channels_ToggleSignatures(InputChannelBase channel, bool enabled) - => CallAsync(writer => - { - writer.Write(0x1F69B606); - writer.WriteTLObject(channel); - writer.Write(enabled ? 0x997275B5 : 0xBC799737); - return "Channels_ToggleSignatures"; - }); - - ///See - public Task Auth_ResendCode(string phone_number, string phone_code_hash) - => CallAsync(writer => - { - writer.Write(0x3EF1A9BF); - writer.WriteTLString(phone_number); - writer.WriteTLString(phone_code_hash); - return "Auth_ResendCode"; - }); - - ///See - public Task Auth_CancelCode(string phone_number, string phone_code_hash) - => CallAsync(writer => - { - writer.Write(0x1F040578); - writer.WriteTLString(phone_number); - writer.WriteTLString(phone_code_hash); - return "Auth_CancelCode"; - }); - ///See public Task Messages_GetMessageEditData(InputPeer peer, int id) => CallAsync(writer => @@ -7851,28 +8597,6 @@ namespace WTelegram // ---functions--- return "Messages_SetBotCallbackAnswer"; }); - ///See - public Task Contacts_GetTopPeers(int offset, int limit, int hash, bool correspondents = false, bool bots_pm = false, bool bots_inline = false, bool phone_calls = false, bool forward_users = false, bool forward_chats = false, bool groups = false, bool channels = false) - => CallAsync(writer => - { - writer.Write(0xD4982DB5); - writer.Write((correspondents ? 0x1 : 0) | (bots_pm ? 0x2 : 0) | (bots_inline ? 0x4 : 0) | (phone_calls ? 0x8 : 0) | (forward_users ? 0x10 : 0) | (forward_chats ? 0x20 : 0) | (groups ? 0x400 : 0) | (channels ? 0x8000 : 0)); - writer.Write(offset); - writer.Write(limit); - writer.Write(hash); - return "Contacts_GetTopPeers"; - }); - - ///See - public Task Contacts_ResetTopPeerRating(TopPeerCategory category, InputPeer peer) - => CallAsync(writer => - { - writer.Write(0x1AE373AC); - writer.WriteTLObject(category); - writer.WriteTLObject(peer); - return "Contacts_ResetTopPeerRating"; - }); - ///See public Task Messages_GetPeerDialogs(InputDialogPeerBase[] peers) => CallAsync(writer => @@ -7964,35 +8688,6 @@ namespace WTelegram // ---functions--- return "Messages_GetArchivedStickers"; }); - ///See - public Task Account_SendConfirmPhoneCode(string hash, CodeSettings settings) - => CallAsync(writer => - { - writer.Write(0x1B3FAA88); - writer.WriteTLString(hash); - writer.WriteTLObject(settings); - return "Account_SendConfirmPhoneCode"; - }); - - ///See - public Task Account_ConfirmPhone(string phone_code_hash, string phone_code) - => CallAsync(writer => - { - writer.Write(0x5F2178C3); - writer.WriteTLString(phone_code_hash); - writer.WriteTLString(phone_code); - return "Account_ConfirmPhone"; - }); - - ///See - public Task Channels_GetAdminedPublicChannels(bool by_location = false, bool check_limit = false) - => CallAsync(writer => - { - writer.Write(0xF8B036AF); - writer.Write((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0)); - return "Channels_GetAdminedPublicChannels"; - }); - ///See public Task Messages_GetMaskStickers(int hash) => CallAsync(writer => @@ -8011,15 +8706,6 @@ namespace WTelegram // ---functions--- return "Messages_GetAttachedStickers"; }); - ///See - public Task Auth_DropTempAuthKeys(long[] except_auth_keys) - => CallAsync(writer => - { - writer.Write(0x8E48A188); - writer.WriteTLVector(except_auth_keys); - return "Auth_DropTempAuthKeys"; - }); - ///See public Task Messages_SetGameScore(InputPeer peer, int id, InputUserBase user_id, int score, bool edit_message = false, bool force = false) => CallAsync(writer => @@ -8086,16 +8772,6 @@ namespace WTelegram // ---functions--- return "Messages_GetAllChats"; }); - ///See - public Task Help_SetBotUpdatesStatus(int pending_updates_count, string message) - => CallAsync(writer => - { - writer.Write(0xEC22CFCD); - writer.Write(pending_updates_count); - writer.WriteTLString(message); - return "Help_SetBotUpdatesStatus"; - }); - ///See public Task Messages_GetWebPage(string url, int hash) => CallAsync(writer => @@ -8136,108 +8812,6 @@ namespace WTelegram // ---functions--- return "Messages_GetPinnedDialogs"; }); - ///See - public Task Bots_SendCustomRequest(string custom_method, DataJSON params_) - => CallAsync(writer => - { - writer.Write(0xAA2769ED); - writer.WriteTLString(custom_method); - writer.WriteTLObject(params_); - return "Bots_SendCustomRequest"; - }); - - ///See - public Task Bots_AnswerWebhookJSONQuery(long query_id, DataJSON data) - => CallAsync(writer => - { - writer.Write(0xE6213F4D); - writer.Write(query_id); - writer.WriteTLObject(data); - return "Bots_AnswerWebhookJSONQuery"; - }); - - ///See - public Task Upload_GetWebFile(InputWebFileLocationBase location, int offset, int limit) - => CallAsync(writer => - { - writer.Write(0x24E6818D); - writer.WriteTLObject(location); - writer.Write(offset); - writer.Write(limit); - return "Upload_GetWebFile"; - }); - - ///See - public Task Payments_GetPaymentForm(int msg_id) - => CallAsync(writer => - { - writer.Write(0x99F09745); - writer.Write(msg_id); - return "Payments_GetPaymentForm"; - }); - - ///See - public Task Payments_GetPaymentReceipt(int msg_id) - => CallAsync(writer => - { - writer.Write(0xA092A980); - writer.Write(msg_id); - return "Payments_GetPaymentReceipt"; - }); - - ///See - public Task Payments_ValidateRequestedInfo(int msg_id, PaymentRequestedInfo info, bool save = false) - => CallAsync(writer => - { - writer.Write(0x770A8E74); - writer.Write(save ? 0x1 : 0); - writer.Write(msg_id); - writer.WriteTLObject(info); - return "Payments_ValidateRequestedInfo"; - }); - - ///See - public Task Payments_SendPaymentForm(int msg_id, InputPaymentCredentialsBase credentials, string requested_info_id = null, string shipping_option_id = null) - => CallAsync(writer => - { - writer.Write(0x2B8879B3); - writer.Write((requested_info_id != null ? 0x1 : 0) | (shipping_option_id != null ? 0x2 : 0)); - writer.Write(msg_id); - if (requested_info_id != null) - writer.WriteTLString(requested_info_id); - if (shipping_option_id != null) - writer.WriteTLString(shipping_option_id); - writer.WriteTLObject(credentials); - return "Payments_SendPaymentForm"; - }); - - ///See - public Task Account_GetTmpPassword(InputCheckPasswordSRPBase password, int period) - => CallAsync(writer => - { - writer.Write(0x449E0B51); - writer.WriteTLObject(password); - writer.Write(period); - return "Account_GetTmpPassword"; - }); - - ///See - public Task Payments_GetSavedInfo() - => CallAsync(writer => - { - writer.Write(0x227D824B); - return "Payments_GetSavedInfo"; - }); - - ///See - public Task Payments_ClearSavedInfo(bool credentials = false, bool info = false) - => CallAsync(writer => - { - writer.Write(0xD83D70C1); - writer.Write((credentials ? 0x1 : 0) | (info ? 0x2 : 0)); - return "Payments_ClearSavedInfo"; - }); - ///See public Task Messages_SetBotShippingResults(long query_id, string error = null, ShippingOption[] shipping_options = null) => CallAsync(writer => @@ -8264,18 +8838,1512 @@ namespace WTelegram // ---functions--- return "Messages_SetBotPrecheckoutResults"; }); + ///See + public Task Messages_UploadMedia(InputPeer peer, InputMedia media) + => CallAsync(writer => + { + writer.Write(0x519BC2B1); + writer.WriteTLObject(peer); + writer.WriteTLObject(media); + return "Messages_UploadMedia"; + }); + + ///See + public Task Messages_SendScreenshotNotification(InputPeer peer, int reply_to_msg_id, long random_id) + => CallAsync(writer => + { + writer.Write(0xC97DF020); + writer.WriteTLObject(peer); + writer.Write(reply_to_msg_id); + writer.Write(random_id); + return "Messages_SendScreenshotNotification"; + }); + + ///See + public Task Messages_GetFavedStickers(int hash) + => CallAsync(writer => + { + writer.Write(0x21CE0B0E); + writer.Write(hash); + return "Messages_GetFavedStickers"; + }); + + ///See + public Task Messages_FaveSticker(InputDocumentBase id, bool unfave) + => CallAsync(writer => + { + writer.Write(0xB9FFC55B); + writer.WriteTLObject(id); + writer.Write(unfave ? 0x997275B5 : 0xBC799737); + return "Messages_FaveSticker"; + }); + + ///See + public Task Messages_GetUnreadMentions(InputPeer peer, int offset_id, int add_offset, int limit, int max_id, int min_id) + => CallAsync(writer => + { + writer.Write(0x46578472); + writer.WriteTLObject(peer); + writer.Write(offset_id); + writer.Write(add_offset); + writer.Write(limit); + writer.Write(max_id); + writer.Write(min_id); + return "Messages_GetUnreadMentions"; + }); + + ///See + public Task Messages_ReadMentions(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x0F0189D3); + writer.WriteTLObject(peer); + return "Messages_ReadMentions"; + }); + + ///See + public Task Messages_GetRecentLocations(InputPeer peer, int limit, int hash) + => CallAsync(writer => + { + writer.Write(0xBBC45B09); + writer.WriteTLObject(peer); + writer.Write(limit); + writer.Write(hash); + return "Messages_GetRecentLocations"; + }); + + ///See + public Task Messages_SendMultiMedia(InputPeer peer, InputSingleMedia[] multi_media, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, DateTime? schedule_date = null) + => CallAsync(writer => + { + writer.Write(0xCC0110CB); + writer.Write((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0)); + writer.WriteTLObject(peer); + if (reply_to_msg_id != null) + writer.Write(reply_to_msg_id.Value); + writer.WriteTLVector(multi_media); + if (schedule_date != null) + writer.WriteTLStamp(schedule_date.Value); + return "Messages_SendMultiMedia"; + }); + + ///See + public Task Messages_UploadEncryptedFile(InputEncryptedChat peer, InputEncryptedFileBase file) + => CallAsync(writer => + { + writer.Write(0x5057C497); + writer.WriteTLObject(peer); + writer.WriteTLObject(file); + return "Messages_UploadEncryptedFile"; + }); + + ///See + public Task Messages_SearchStickerSets(string q, int hash, bool exclude_featured = false) + => CallAsync(writer => + { + writer.Write(0xC2B7D08B); + writer.Write(exclude_featured ? 0x1 : 0); + writer.WriteTLString(q); + writer.Write(hash); + return "Messages_SearchStickerSets"; + }); + + ///See + public Task Messages_GetSplitRanges() + => CallAsync(writer => + { + writer.Write(0x1CFF7E08); + return "Messages_GetSplitRanges"; + }); + + ///See + public Task Messages_MarkDialogUnread(InputDialogPeerBase peer, bool unread = false) + => CallAsync(writer => + { + writer.Write(0xC286D98F); + writer.Write(unread ? 0x1 : 0); + writer.WriteTLObject(peer); + return "Messages_MarkDialogUnread"; + }); + + ///See + public Task Messages_GetDialogUnreadMarks() + => CallAsync(writer => + { + writer.Write(0x22E24E22); + return "Messages_GetDialogUnreadMarks"; + }); + + ///See + public Task Messages_ClearAllDrafts() + => CallAsync(writer => + { + writer.Write(0x7E58EE9C); + return "Messages_ClearAllDrafts"; + }); + + ///See + public Task Messages_UpdatePinnedMessage(InputPeer peer, int id, bool silent = false, bool unpin = false, bool pm_oneside = false) + => CallAsync(writer => + { + writer.Write(0xD2AAF7EC); + writer.Write((silent ? 0x1 : 0) | (unpin ? 0x2 : 0) | (pm_oneside ? 0x4 : 0)); + writer.WriteTLObject(peer); + writer.Write(id); + return "Messages_UpdatePinnedMessage"; + }); + + ///See + public Task Messages_SendVote(InputPeer peer, int msg_id, byte[][] options) + => CallAsync(writer => + { + writer.Write(0x10EA6184); + writer.WriteTLObject(peer); + writer.Write(msg_id); + writer.WriteTLVector(options); + return "Messages_SendVote"; + }); + + ///See + public Task Messages_GetPollResults(InputPeer peer, int msg_id) + => CallAsync(writer => + { + writer.Write(0x73BB643B); + writer.WriteTLObject(peer); + writer.Write(msg_id); + return "Messages_GetPollResults"; + }); + + ///See + public Task Messages_GetOnlines(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x6E2BE050); + writer.WriteTLObject(peer); + return "Messages_GetOnlines"; + }); + + ///See + public Task Messages_GetStatsURL(InputPeer peer, string params_, bool dark = false) + => CallAsync(writer => + { + writer.Write(0x812C2AE6); + writer.Write(dark ? 0x1 : 0); + writer.WriteTLObject(peer); + writer.WriteTLString(params_); + return "Messages_GetStatsURL"; + }); + + ///See + public Task Messages_EditChatAbout(InputPeer peer, string about) + => CallAsync(writer => + { + writer.Write(0xDEF60797); + writer.WriteTLObject(peer); + writer.WriteTLString(about); + return "Messages_EditChatAbout"; + }); + + ///See + public Task Messages_EditChatDefaultBannedRights(InputPeer peer, ChatBannedRights banned_rights) + => CallAsync(writer => + { + writer.Write(0xA5866B41); + writer.WriteTLObject(peer); + writer.WriteTLObject(banned_rights); + return "Messages_EditChatDefaultBannedRights"; + }); + + ///See + public Task Messages_GetEmojiKeywords(string lang_code) + => CallAsync(writer => + { + writer.Write(0x35A0E062); + writer.WriteTLString(lang_code); + return "Messages_GetEmojiKeywords"; + }); + + ///See + public Task Messages_GetEmojiKeywordsDifference(string lang_code, int from_version) + => CallAsync(writer => + { + writer.Write(0x1508B6AF); + writer.WriteTLString(lang_code); + writer.Write(from_version); + return "Messages_GetEmojiKeywordsDifference"; + }); + + ///See + public Task Messages_GetEmojiKeywordsLanguages(string[] lang_codes) + => CallAsync(writer => + { + writer.Write(0x4E9963B2); + writer.WriteTLVector(lang_codes); + return "Messages_GetEmojiKeywordsLanguages"; + }); + + ///See + public Task Messages_GetEmojiURL(string lang_code) + => CallAsync(writer => + { + writer.Write(0xD5B10C26); + writer.WriteTLString(lang_code); + return "Messages_GetEmojiURL"; + }); + + ///See + public Task Messages_GetSearchCounters(InputPeer peer, MessagesFilter[] filters) + => CallAsync(writer => + { + writer.Write(0x732EEF00); + writer.WriteTLObject(peer); + writer.WriteTLVector(filters); + return "Messages_GetSearchCounters"; + }); + + ///See + public Task Messages_RequestUrlAuth(InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) + => CallAsync(writer => + { + writer.Write(0x198FB446); + writer.Write((peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0)); + if (peer != null) + writer.WriteTLObject(peer); + if (msg_id != null) + writer.Write(msg_id.Value); + if (button_id != null) + writer.Write(button_id.Value); + if (url != null) + writer.WriteTLString(url); + return "Messages_RequestUrlAuth"; + }); + + ///See + public Task Messages_AcceptUrlAuth(bool write_allowed = false, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) + => CallAsync(writer => + { + writer.Write(0xB12C7125); + writer.Write((write_allowed ? 0x1 : 0) | (peer != null ? 0x2 : 0) | (msg_id != null ? 0x2 : 0) | (button_id != null ? 0x2 : 0) | (url != null ? 0x4 : 0)); + if (peer != null) + writer.WriteTLObject(peer); + if (msg_id != null) + writer.Write(msg_id.Value); + if (button_id != null) + writer.Write(button_id.Value); + if (url != null) + writer.WriteTLString(url); + return "Messages_AcceptUrlAuth"; + }); + + ///See + public Task Messages_HidePeerSettingsBar(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x4FACB138); + writer.WriteTLObject(peer); + return "Messages_HidePeerSettingsBar"; + }); + + ///See + public Task Messages_GetScheduledHistory(InputPeer peer, int hash) + => CallAsync(writer => + { + writer.Write(0xE2C2685B); + writer.WriteTLObject(peer); + writer.Write(hash); + return "Messages_GetScheduledHistory"; + }); + + ///See + public Task Messages_GetScheduledMessages(InputPeer peer, int[] id) + => CallAsync(writer => + { + writer.Write(0xBDBB0464); + writer.WriteTLObject(peer); + writer.WriteTLVector(id); + return "Messages_GetScheduledMessages"; + }); + + ///See + public Task Messages_SendScheduledMessages(InputPeer peer, int[] id) + => CallAsync(writer => + { + writer.Write(0xBD38850A); + writer.WriteTLObject(peer); + writer.WriteTLVector(id); + return "Messages_SendScheduledMessages"; + }); + + ///See + public Task Messages_DeleteScheduledMessages(InputPeer peer, int[] id) + => CallAsync(writer => + { + writer.Write(0x59AE2B16); + writer.WriteTLObject(peer); + writer.WriteTLVector(id); + return "Messages_DeleteScheduledMessages"; + }); + + ///See + public Task Messages_GetPollVotes(InputPeer peer, int id, int limit, byte[] option = null, string offset = null) + => CallAsync(writer => + { + writer.Write(0xB86E380E); + writer.Write((option != null ? 0x1 : 0) | (offset != null ? 0x2 : 0)); + writer.WriteTLObject(peer); + writer.Write(id); + if (option != null) + writer.WriteTLBytes(option); + if (offset != null) + writer.WriteTLString(offset); + writer.Write(limit); + return "Messages_GetPollVotes"; + }); + + ///See + public Task Messages_ToggleStickerSets(InputStickerSet[] stickersets, bool uninstall = false, bool archive = false, bool unarchive = false) + => CallAsync(writer => + { + writer.Write(0xB5052FEA); + writer.Write((uninstall ? 0x1 : 0) | (archive ? 0x2 : 0) | (unarchive ? 0x4 : 0)); + writer.WriteTLVector(stickersets); + return "Messages_ToggleStickerSets"; + }); + + ///See + public Task Messages_GetDialogFilters() + => CallAsync(writer => + { + writer.Write(0xF19ED96D); + return "Messages_GetDialogFilters"; + }); + + ///See + public Task Messages_GetSuggestedDialogFilters() + => CallAsync(writer => + { + writer.Write(0xA29CD42C); + return "Messages_GetSuggestedDialogFilters"; + }); + + ///See + public Task Messages_UpdateDialogFilter(int id, DialogFilter filter = null) + => CallAsync(writer => + { + writer.Write(0x1AD4A04A); + writer.Write(filter != null ? 0x1 : 0); + writer.Write(id); + if (filter != null) + writer.WriteTLObject(filter); + return "Messages_UpdateDialogFilter"; + }); + + ///See + public Task Messages_UpdateDialogFiltersOrder(int[] order) + => CallAsync(writer => + { + writer.Write(0xC563C1E4); + writer.WriteTLVector(order); + return "Messages_UpdateDialogFiltersOrder"; + }); + + ///See + public Task Messages_GetOldFeaturedStickers(int offset, int limit, int hash) + => CallAsync(writer => + { + writer.Write(0x5FE7025B); + writer.Write(offset); + writer.Write(limit); + writer.Write(hash); + return "Messages_GetOldFeaturedStickers"; + }); + + ///See + public Task Messages_GetReplies(InputPeer peer, int msg_id, int offset_id, DateTime offset_date, int add_offset, int limit, int max_id, int min_id, int hash) + => CallAsync(writer => + { + writer.Write(0x24B581BA); + writer.WriteTLObject(peer); + writer.Write(msg_id); + writer.Write(offset_id); + writer.WriteTLStamp(offset_date); + writer.Write(add_offset); + writer.Write(limit); + writer.Write(max_id); + writer.Write(min_id); + writer.Write(hash); + return "Messages_GetReplies"; + }); + + ///See + public Task Messages_GetDiscussionMessage(InputPeer peer, int msg_id) + => CallAsync(writer => + { + writer.Write(0x446972FD); + writer.WriteTLObject(peer); + writer.Write(msg_id); + return "Messages_GetDiscussionMessage"; + }); + + ///See + public Task Messages_ReadDiscussion(InputPeer peer, int msg_id, int read_max_id) + => CallAsync(writer => + { + writer.Write(0xF731A9F4); + writer.WriteTLObject(peer); + writer.Write(msg_id); + writer.Write(read_max_id); + return "Messages_ReadDiscussion"; + }); + + ///See + public Task Messages_UnpinAllMessages(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0xF025BC8B); + writer.WriteTLObject(peer); + return "Messages_UnpinAllMessages"; + }); + + ///See + public Task Messages_DeleteChat(int chat_id) + => CallAsync(writer => + { + writer.Write(0x83247D11); + writer.Write(chat_id); + return "Messages_DeleteChat"; + }); + + ///See + public Task Messages_DeletePhoneCallHistory(bool revoke = false) + => CallAsync(writer => + { + writer.Write(0xF9CBE409); + writer.Write(revoke ? 0x1 : 0); + return "Messages_DeletePhoneCallHistory"; + }); + + ///See + public Task Messages_CheckHistoryImport(string import_head) + => CallAsync(writer => + { + writer.Write(0x43FE19F3); + writer.WriteTLString(import_head); + return "Messages_CheckHistoryImport"; + }); + + ///See + public Task Messages_InitHistoryImport(InputPeer peer, InputFileBase file, int media_count) + => CallAsync(writer => + { + writer.Write(0x34090C3B); + writer.WriteTLObject(peer); + writer.WriteTLObject(file); + writer.Write(media_count); + return "Messages_InitHistoryImport"; + }); + + ///See + public Task Messages_UploadImportedMedia(InputPeer peer, long import_id, string file_name, InputMedia media) + => CallAsync(writer => + { + writer.Write(0x2A862092); + writer.WriteTLObject(peer); + writer.Write(import_id); + writer.WriteTLString(file_name); + writer.WriteTLObject(media); + return "Messages_UploadImportedMedia"; + }); + + ///See + public Task Messages_StartHistoryImport(InputPeer peer, long import_id) + => CallAsync(writer => + { + writer.Write(0xB43DF344); + writer.WriteTLObject(peer); + writer.Write(import_id); + return "Messages_StartHistoryImport"; + }); + + ///See + public Task Messages_GetExportedChatInvites(InputPeer peer, InputUserBase admin_id, int limit, bool revoked = false, DateTime? offset_date = null, string offset_link = null) + => CallAsync(writer => + { + writer.Write(0xA2B5A3F6); + writer.Write((revoked ? 0x8 : 0) | (offset_date != null ? 0x4 : 0) | (offset_link != null ? 0x4 : 0)); + writer.WriteTLObject(peer); + writer.WriteTLObject(admin_id); + if (offset_date != null) + writer.WriteTLStamp(offset_date.Value); + if (offset_link != null) + writer.WriteTLString(offset_link); + writer.Write(limit); + return "Messages_GetExportedChatInvites"; + }); + + ///See + public Task Messages_GetExportedChatInvite(InputPeer peer, string link) + => CallAsync(writer => + { + writer.Write(0x73746F5C); + writer.WriteTLObject(peer); + writer.WriteTLString(link); + return "Messages_GetExportedChatInvite"; + }); + + ///See + public Task Messages_EditExportedChatInvite(InputPeer peer, string link, bool revoked = false, DateTime? expire_date = null, int? usage_limit = null) + => CallAsync(writer => + { + writer.Write(0x02E4FFBE); + writer.Write((revoked ? 0x4 : 0) | (expire_date != null ? 0x1 : 0) | (usage_limit != null ? 0x2 : 0)); + writer.WriteTLObject(peer); + writer.WriteTLString(link); + if (expire_date != null) + writer.WriteTLStamp(expire_date.Value); + if (usage_limit != null) + writer.Write(usage_limit.Value); + return "Messages_EditExportedChatInvite"; + }); + + ///See + public Task Messages_DeleteRevokedExportedChatInvites(InputPeer peer, InputUserBase admin_id) + => CallAsync(writer => + { + writer.Write(0x56987BD5); + writer.WriteTLObject(peer); + writer.WriteTLObject(admin_id); + return "Messages_DeleteRevokedExportedChatInvites"; + }); + + ///See + public Task Messages_DeleteExportedChatInvite(InputPeer peer, string link) + => CallAsync(writer => + { + writer.Write(0xD464A42B); + writer.WriteTLObject(peer); + writer.WriteTLString(link); + return "Messages_DeleteExportedChatInvite"; + }); + + ///See + public Task Messages_GetAdminsWithInvites(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x3920E6EF); + writer.WriteTLObject(peer); + return "Messages_GetAdminsWithInvites"; + }); + + ///See + public Task Messages_GetChatInviteImporters(InputPeer peer, string link, DateTime offset_date, InputUserBase offset_user, int limit) + => CallAsync(writer => + { + writer.Write(0x26FB7289); + writer.WriteTLObject(peer); + writer.WriteTLString(link); + writer.WriteTLStamp(offset_date); + writer.WriteTLObject(offset_user); + writer.Write(limit); + return "Messages_GetChatInviteImporters"; + }); + + ///See + public Task Messages_SetHistoryTTL(InputPeer peer, int period) + => CallAsync(writer => + { + writer.Write(0xB80E5FE4); + writer.WriteTLObject(peer); + writer.Write(period); + return "Messages_SetHistoryTTL"; + }); + + ///See + public Task Messages_CheckHistoryImportPeer(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x5DC60F03); + writer.WriteTLObject(peer); + return "Messages_CheckHistoryImportPeer"; + }); + + ///See + public Task Updates_GetState() + => CallAsync(writer => + { + writer.Write(0xEDD4882A); + return "Updates_GetState"; + }); + + ///See + public Task Updates_GetDifference(int pts, DateTime date, int qts, int? pts_total_limit = null) + => CallAsync(writer => + { + writer.Write(0x25939651); + writer.Write(pts_total_limit != null ? 0x1 : 0); + writer.Write(pts); + if (pts_total_limit != null) + writer.Write(pts_total_limit.Value); + writer.WriteTLStamp(date); + writer.Write(qts); + return "Updates_GetDifference"; + }); + + ///See + public Task Updates_GetChannelDifference(InputChannelBase channel, ChannelMessagesFilterBase filter, int pts, int limit, bool force = false) + => CallAsync(writer => + { + writer.Write(0x03173D78); + writer.Write(force ? 0x1 : 0); + writer.WriteTLObject(channel); + writer.WriteTLObject(filter); + writer.Write(pts); + writer.Write(limit); + return "Updates_GetChannelDifference"; + }); + + ///See + public Task Photos_UpdateProfilePhoto(InputPhotoBase id) + => CallAsync(writer => + { + writer.Write(0x72D4742C); + writer.WriteTLObject(id); + return "Photos_UpdateProfilePhoto"; + }); + + ///See + public Task Photos_UploadProfilePhoto(InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null) + => CallAsync(writer => + { + writer.Write(0x89F30F69); + writer.Write((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0)); + if (file != null) + writer.WriteTLObject(file); + if (video != null) + writer.WriteTLObject(video); + if (video_start_ts != null) + writer.Write(video_start_ts.Value); + return "Photos_UploadProfilePhoto"; + }); + + ///See + public Task Photos_DeletePhotos(InputPhotoBase[] id) + => CallAsync(writer => + { + writer.Write(0x87CF7F2F); + writer.WriteTLVector(id); + return "Photos_DeletePhotos"; + }); + + ///See + public Task Photos_GetUserPhotos(InputUserBase user_id, int offset, long max_id, int limit) + => CallAsync(writer => + { + writer.Write(0x91CD32A8); + writer.WriteTLObject(user_id); + writer.Write(offset); + writer.Write(max_id); + writer.Write(limit); + return "Photos_GetUserPhotos"; + }); + + ///See + public Task Upload_SaveFilePart(long file_id, int file_part, byte[] bytes) + => CallAsync(writer => + { + writer.Write(0xB304A621); + writer.Write(file_id); + writer.Write(file_part); + writer.WriteTLBytes(bytes); + return "Upload_SaveFilePart"; + }); + + ///See + public Task Upload_GetFile(InputFileLocationBase location, int offset, int limit, bool precise = false, bool cdn_supported = false) + => CallAsync(writer => + { + writer.Write(0xB15A9AFC); + writer.Write((precise ? 0x1 : 0) | (cdn_supported ? 0x2 : 0)); + writer.WriteTLObject(location); + writer.Write(offset); + writer.Write(limit); + return "Upload_GetFile"; + }); + + ///See + public Task Upload_SaveBigFilePart(long file_id, int file_part, int file_total_parts, byte[] bytes) + => CallAsync(writer => + { + writer.Write(0xDE7B673D); + writer.Write(file_id); + writer.Write(file_part); + writer.Write(file_total_parts); + writer.WriteTLBytes(bytes); + return "Upload_SaveBigFilePart"; + }); + + ///See + public Task Upload_GetWebFile(InputWebFileLocationBase location, int offset, int limit) + => CallAsync(writer => + { + writer.Write(0x24E6818D); + writer.WriteTLObject(location); + writer.Write(offset); + writer.Write(limit); + return "Upload_GetWebFile"; + }); + + ///See + public Task Upload_GetCdnFile(byte[] file_token, int offset, int limit) + => CallAsync(writer => + { + writer.Write(0x2000BCC3); + writer.WriteTLBytes(file_token); + writer.Write(offset); + writer.Write(limit); + return "Upload_GetCdnFile"; + }); + + ///See + public Task Upload_ReuploadCdnFile(byte[] file_token, byte[] request_token) + => CallAsync(writer => + { + writer.Write(0x9B2754A8); + writer.WriteTLBytes(file_token); + writer.WriteTLBytes(request_token); + return "Upload_ReuploadCdnFile"; + }); + + ///See + public Task Upload_GetCdnFileHashes(byte[] file_token, int offset) + => CallAsync(writer => + { + writer.Write(0x4DA54231); + writer.WriteTLBytes(file_token); + writer.Write(offset); + return "Upload_GetCdnFileHashes"; + }); + + ///See + public Task Upload_GetFileHashes(InputFileLocationBase location, int offset) + => CallAsync(writer => + { + writer.Write(0xC7025931); + writer.WriteTLObject(location); + writer.Write(offset); + return "Upload_GetFileHashes"; + }); + + ///See + public Task Help_GetConfig() => CallAsync(Help_GetConfig); + public static string Help_GetConfig(BinaryWriter writer) + { + writer.Write(0xC4F9186B); + return "Help_GetConfig"; + } + + ///See + public Task Help_GetNearestDc() + => CallAsync(writer => + { + writer.Write(0x1FB33026); + return "Help_GetNearestDc"; + }); + + ///See + public Task Help_GetAppUpdate(string source) + => CallAsync(writer => + { + writer.Write(0x522D5A7D); + writer.WriteTLString(source); + return "Help_GetAppUpdate"; + }); + + ///See + public Task Help_GetInviteText() + => CallAsync(writer => + { + writer.Write(0x4D392343); + return "Help_GetInviteText"; + }); + + ///See + public Task Help_GetSupport() + => CallAsync(writer => + { + writer.Write(0x9CDF08CD); + return "Help_GetSupport"; + }); + + ///See + public Task Help_GetAppChangelog(string prev_app_version) + => CallAsync(writer => + { + writer.Write(0x9010EF6F); + writer.WriteTLString(prev_app_version); + return "Help_GetAppChangelog"; + }); + + ///See + public Task Help_SetBotUpdatesStatus(int pending_updates_count, string message) + => CallAsync(writer => + { + writer.Write(0xEC22CFCD); + writer.Write(pending_updates_count); + writer.WriteTLString(message); + return "Help_SetBotUpdatesStatus"; + }); + + ///See + public Task Help_GetCdnConfig() + => CallAsync(writer => + { + writer.Write(0x52029342); + return "Help_GetCdnConfig"; + }); + + ///See + public Task Help_GetRecentMeUrls(string referer) + => CallAsync(writer => + { + writer.Write(0x3DC0F114); + writer.WriteTLString(referer); + return "Help_GetRecentMeUrls"; + }); + + ///See + public Task Help_GetTermsOfServiceUpdate() + => CallAsync(writer => + { + writer.Write(0x2CA51FD1); + return "Help_GetTermsOfServiceUpdate"; + }); + + ///See + public Task Help_AcceptTermsOfService(DataJSON id) + => CallAsync(writer => + { + writer.Write(0xEE72F79A); + writer.WriteTLObject(id); + return "Help_AcceptTermsOfService"; + }); + + ///See + public Task Help_GetDeepLinkInfo(string path) + => CallAsync(writer => + { + writer.Write(0x3FEDC75F); + writer.WriteTLString(path); + return "Help_GetDeepLinkInfo"; + }); + + ///See + public Task Help_GetAppConfig() + => CallAsync(writer => + { + writer.Write(0x98914110); + return "Help_GetAppConfig"; + }); + + ///See + public Task Help_SaveAppLog(InputAppEvent[] events) + => CallAsync(writer => + { + writer.Write(0x6F02F748); + writer.WriteTLVector(events); + return "Help_SaveAppLog"; + }); + + ///See + public Task Help_GetPassportConfig(int hash) + => CallAsync(writer => + { + writer.Write(0xC661AD08); + writer.Write(hash); + return "Help_GetPassportConfig"; + }); + + ///See + public Task Help_GetSupportName() + => CallAsync(writer => + { + writer.Write(0xD360E72C); + return "Help_GetSupportName"; + }); + + ///See + public Task Help_GetUserInfo(InputUserBase user_id) + => CallAsync(writer => + { + writer.Write(0x038A08D3); + writer.WriteTLObject(user_id); + return "Help_GetUserInfo"; + }); + + ///See + public Task Help_EditUserInfo(InputUserBase user_id, string message, MessageEntity[] entities) + => CallAsync(writer => + { + writer.Write(0x66B91B70); + writer.WriteTLObject(user_id); + writer.WriteTLString(message); + writer.WriteTLVector(entities); + return "Help_EditUserInfo"; + }); + + ///See + public Task Help_GetPromoData() + => CallAsync(writer => + { + writer.Write(0xC0977421); + return "Help_GetPromoData"; + }); + + ///See + public Task Help_HidePromoData(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0x1E251C95); + writer.WriteTLObject(peer); + return "Help_HidePromoData"; + }); + + ///See + public Task Help_DismissSuggestion(InputPeer peer, string suggestion) + => CallAsync(writer => + { + writer.Write(0xF50DBAA1); + writer.WriteTLObject(peer); + writer.WriteTLString(suggestion); + return "Help_DismissSuggestion"; + }); + + ///See + public Task Help_GetCountriesList(string lang_code, int hash) + => CallAsync(writer => + { + writer.Write(0x735787A8); + writer.WriteTLString(lang_code); + writer.Write(hash); + return "Help_GetCountriesList"; + }); + + ///See + public Task Channels_ReadHistory(InputChannelBase channel, int max_id) + => CallAsync(writer => + { + writer.Write(0xCC104937); + writer.WriteTLObject(channel); + writer.Write(max_id); + return "Channels_ReadHistory"; + }); + + ///See + public Task Channels_DeleteMessages(InputChannelBase channel, int[] id) + => CallAsync(writer => + { + writer.Write(0x84C1FD4E); + writer.WriteTLObject(channel); + writer.WriteTLVector(id); + return "Channels_DeleteMessages"; + }); + + ///See + public Task Channels_DeleteUserHistory(InputChannelBase channel, InputUserBase user_id) + => CallAsync(writer => + { + writer.Write(0xD10DD71B); + writer.WriteTLObject(channel); + writer.WriteTLObject(user_id); + return "Channels_DeleteUserHistory"; + }); + + ///See + public Task Channels_ReportSpam(InputChannelBase channel, InputUserBase user_id, int[] id) + => CallAsync(writer => + { + writer.Write(0xFE087810); + writer.WriteTLObject(channel); + writer.WriteTLObject(user_id); + writer.WriteTLVector(id); + return "Channels_ReportSpam"; + }); + + ///See + public Task Channels_GetMessages(InputChannelBase channel, InputMessage[] id) + => CallAsync(writer => + { + writer.Write(0xAD8C9A23); + writer.WriteTLObject(channel); + writer.WriteTLVector(id); + return "Channels_GetMessages"; + }); + + ///See + public Task Channels_GetParticipants(InputChannelBase channel, ChannelParticipantsFilter filter, int offset, int limit, int hash) + => CallAsync(writer => + { + writer.Write(0x123E05E9); + writer.WriteTLObject(channel); + writer.WriteTLObject(filter); + writer.Write(offset); + writer.Write(limit); + writer.Write(hash); + return "Channels_GetParticipants"; + }); + + ///See + public Task Channels_GetParticipant(InputChannelBase channel, InputPeer participant) + => CallAsync(writer => + { + writer.Write(0xA0AB6CC6); + writer.WriteTLObject(channel); + writer.WriteTLObject(participant); + return "Channels_GetParticipant"; + }); + + ///See + public Task Channels_GetChannels(InputChannelBase[] id) + => CallAsync(writer => + { + writer.Write(0x0A7F6BBB); + writer.WriteTLVector(id); + return "Channels_GetChannels"; + }); + + ///See + public Task Channels_GetFullChannel(InputChannelBase channel) + => CallAsync(writer => + { + writer.Write(0x08736A09); + writer.WriteTLObject(channel); + return "Channels_GetFullChannel"; + }); + + ///See + public Task Channels_CreateChannel(string title, string about, bool broadcast = false, bool megagroup = false, bool for_import = false, InputGeoPointBase geo_point = null, string address = null) + => CallAsync(writer => + { + writer.Write(0x3D5FB10F); + writer.Write((broadcast ? 0x1 : 0) | (megagroup ? 0x2 : 0) | (for_import ? 0x8 : 0) | (geo_point != null ? 0x4 : 0) | (address != null ? 0x4 : 0)); + writer.WriteTLString(title); + writer.WriteTLString(about); + if (geo_point != null) + writer.WriteTLObject(geo_point); + if (address != null) + writer.WriteTLString(address); + return "Channels_CreateChannel"; + }); + + ///See + public Task Channels_EditAdmin(InputChannelBase channel, InputUserBase user_id, ChatAdminRights admin_rights, string rank) + => CallAsync(writer => + { + writer.Write(0xD33C8902); + writer.WriteTLObject(channel); + writer.WriteTLObject(user_id); + writer.WriteTLObject(admin_rights); + writer.WriteTLString(rank); + return "Channels_EditAdmin"; + }); + + ///See + public Task Channels_EditTitle(InputChannelBase channel, string title) + => CallAsync(writer => + { + writer.Write(0x566DECD0); + writer.WriteTLObject(channel); + writer.WriteTLString(title); + return "Channels_EditTitle"; + }); + + ///See + public Task Channels_EditPhoto(InputChannelBase channel, InputChatPhotoBase photo) + => CallAsync(writer => + { + writer.Write(0xF12E57C9); + writer.WriteTLObject(channel); + writer.WriteTLObject(photo); + return "Channels_EditPhoto"; + }); + + ///See + public Task Channels_CheckUsername(InputChannelBase channel, string username) + => CallAsync(writer => + { + writer.Write(0x10E6BD2C); + writer.WriteTLObject(channel); + writer.WriteTLString(username); + return "Channels_CheckUsername"; + }); + + ///See + public Task Channels_UpdateUsername(InputChannelBase channel, string username) + => CallAsync(writer => + { + writer.Write(0x3514B3DE); + writer.WriteTLObject(channel); + writer.WriteTLString(username); + return "Channels_UpdateUsername"; + }); + + ///See + public Task Channels_JoinChannel(InputChannelBase channel) + => CallAsync(writer => + { + writer.Write(0x24B524C5); + writer.WriteTLObject(channel); + return "Channels_JoinChannel"; + }); + + ///See + public Task Channels_LeaveChannel(InputChannelBase channel) + => CallAsync(writer => + { + writer.Write(0xF836AA95); + writer.WriteTLObject(channel); + return "Channels_LeaveChannel"; + }); + + ///See + public Task Channels_InviteToChannel(InputChannelBase channel, InputUserBase[] users) + => CallAsync(writer => + { + writer.Write(0x199F3A6C); + writer.WriteTLObject(channel); + writer.WriteTLVector(users); + return "Channels_InviteToChannel"; + }); + + ///See + public Task Channels_DeleteChannel(InputChannelBase channel) + => CallAsync(writer => + { + writer.Write(0xC0111FE3); + writer.WriteTLObject(channel); + return "Channels_DeleteChannel"; + }); + + ///See + public Task Channels_ExportMessageLink(InputChannelBase channel, int id, bool grouped = false, bool thread = false) + => CallAsync(writer => + { + writer.Write(0xE63FADEB); + writer.Write((grouped ? 0x1 : 0) | (thread ? 0x2 : 0)); + writer.WriteTLObject(channel); + writer.Write(id); + return "Channels_ExportMessageLink"; + }); + + ///See + public Task Channels_ToggleSignatures(InputChannelBase channel, bool enabled) + => CallAsync(writer => + { + writer.Write(0x1F69B606); + writer.WriteTLObject(channel); + writer.Write(enabled ? 0x997275B5 : 0xBC799737); + return "Channels_ToggleSignatures"; + }); + + ///See + public Task Channels_GetAdminedPublicChannels(bool by_location = false, bool check_limit = false) + => CallAsync(writer => + { + writer.Write(0xF8B036AF); + writer.Write((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0)); + return "Channels_GetAdminedPublicChannels"; + }); + + ///See + public Task Channels_EditBanned(InputChannelBase channel, InputPeer participant, ChatBannedRights banned_rights) + => CallAsync(writer => + { + writer.Write(0x96E6CD81); + writer.WriteTLObject(channel); + writer.WriteTLObject(participant); + writer.WriteTLObject(banned_rights); + return "Channels_EditBanned"; + }); + + ///See + public Task Channels_GetAdminLog(InputChannelBase channel, string q, long max_id, long min_id, int limit, ChannelAdminLogEventsFilter events_filter = null, InputUserBase[] admins = null) + => CallAsync(writer => + { + writer.Write(0x33DDF480); + writer.Write((events_filter != null ? 0x1 : 0) | (admins != null ? 0x2 : 0)); + writer.WriteTLObject(channel); + writer.WriteTLString(q); + if (events_filter != null) + writer.WriteTLObject(events_filter); + if (admins != null) + writer.WriteTLVector(admins); + writer.Write(max_id); + writer.Write(min_id); + writer.Write(limit); + return "Channels_GetAdminLog"; + }); + + ///See + public Task Channels_SetStickers(InputChannelBase channel, InputStickerSet stickerset) + => CallAsync(writer => + { + writer.Write(0xEA8CA4F9); + writer.WriteTLObject(channel); + writer.WriteTLObject(stickerset); + return "Channels_SetStickers"; + }); + + ///See + public Task Channels_ReadMessageContents(InputChannelBase channel, int[] id) + => CallAsync(writer => + { + writer.Write(0xEAB5DC38); + writer.WriteTLObject(channel); + writer.WriteTLVector(id); + return "Channels_ReadMessageContents"; + }); + + ///See + public Task Channels_DeleteHistory(InputChannelBase channel, int max_id) + => CallAsync(writer => + { + writer.Write(0xAF369D42); + writer.WriteTLObject(channel); + writer.Write(max_id); + return "Channels_DeleteHistory"; + }); + + ///See + public Task Channels_TogglePreHistoryHidden(InputChannelBase channel, bool enabled) + => CallAsync(writer => + { + writer.Write(0xEABBB94C); + writer.WriteTLObject(channel); + writer.Write(enabled ? 0x997275B5 : 0xBC799737); + return "Channels_TogglePreHistoryHidden"; + }); + + ///See + public Task Channels_GetLeftChannels(int offset) + => CallAsync(writer => + { + writer.Write(0x8341ECC0); + writer.Write(offset); + return "Channels_GetLeftChannels"; + }); + + ///See + public Task Channels_GetGroupsForDiscussion() + => CallAsync(writer => + { + writer.Write(0xF5DAD378); + return "Channels_GetGroupsForDiscussion"; + }); + + ///See + public Task Channels_SetDiscussionGroup(InputChannelBase broadcast, InputChannelBase group) + => CallAsync(writer => + { + writer.Write(0x40582BB2); + writer.WriteTLObject(broadcast); + writer.WriteTLObject(group); + return "Channels_SetDiscussionGroup"; + }); + + ///See + public Task Channels_EditCreator(InputChannelBase channel, InputUserBase user_id, InputCheckPasswordSRPBase password) + => CallAsync(writer => + { + writer.Write(0x8F38CD1F); + writer.WriteTLObject(channel); + writer.WriteTLObject(user_id); + writer.WriteTLObject(password); + return "Channels_EditCreator"; + }); + + ///See + public Task Channels_EditLocation(InputChannelBase channel, InputGeoPointBase geo_point, string address) + => CallAsync(writer => + { + writer.Write(0x58E63F6D); + writer.WriteTLObject(channel); + writer.WriteTLObject(geo_point); + writer.WriteTLString(address); + return "Channels_EditLocation"; + }); + + ///See + public Task Channels_ToggleSlowMode(InputChannelBase channel, int seconds) + => CallAsync(writer => + { + writer.Write(0xEDD49EF0); + writer.WriteTLObject(channel); + writer.Write(seconds); + return "Channels_ToggleSlowMode"; + }); + + ///See + public Task Channels_GetInactiveChannels() + => CallAsync(writer => + { + writer.Write(0x11E831EE); + return "Channels_GetInactiveChannels"; + }); + + ///See + public Task Channels_ConvertToGigagroup(InputChannelBase channel) + => CallAsync(writer => + { + writer.Write(0x0B290C69); + writer.WriteTLObject(channel); + return "Channels_ConvertToGigagroup"; + }); + + ///See + public Task Bots_SendCustomRequest(string custom_method, DataJSON params_) + => CallAsync(writer => + { + writer.Write(0xAA2769ED); + writer.WriteTLString(custom_method); + writer.WriteTLObject(params_); + return "Bots_SendCustomRequest"; + }); + + ///See + public Task Bots_AnswerWebhookJSONQuery(long query_id, DataJSON data) + => CallAsync(writer => + { + writer.Write(0xE6213F4D); + writer.Write(query_id); + writer.WriteTLObject(data); + return "Bots_AnswerWebhookJSONQuery"; + }); + + ///See + public Task Bots_SetBotCommands(BotCommandScope scope, string lang_code, BotCommand[] commands) + => CallAsync(writer => + { + writer.Write(0x0517165A); + writer.WriteTLObject(scope); + writer.WriteTLString(lang_code); + writer.WriteTLVector(commands); + return "Bots_SetBotCommands"; + }); + + ///See + public Task Bots_ResetBotCommands(BotCommandScope scope, string lang_code) + => CallAsync(writer => + { + writer.Write(0x3D8DE0F9); + writer.WriteTLObject(scope); + writer.WriteTLString(lang_code); + return "Bots_ResetBotCommands"; + }); + + ///See + public Task Bots_GetBotCommands(BotCommandScope scope, string lang_code) + => CallAsync(writer => + { + writer.Write(0xE34C0DD6); + writer.WriteTLObject(scope); + writer.WriteTLString(lang_code); + return "Bots_GetBotCommands"; + }); + + ///See + public Task Payments_GetPaymentForm(InputPeer peer, int msg_id, DataJSON theme_params = null) + => CallAsync(writer => + { + writer.Write(0x8A333C8D); + writer.Write(theme_params != null ? 0x1 : 0); + writer.WriteTLObject(peer); + writer.Write(msg_id); + if (theme_params != null) + writer.WriteTLObject(theme_params); + return "Payments_GetPaymentForm"; + }); + + ///See + public Task Payments_GetPaymentReceipt(InputPeer peer, int msg_id) + => CallAsync(writer => + { + writer.Write(0x2478D1CC); + writer.WriteTLObject(peer); + writer.Write(msg_id); + return "Payments_GetPaymentReceipt"; + }); + + ///See + public Task Payments_ValidateRequestedInfo(InputPeer peer, int msg_id, PaymentRequestedInfo info, bool save = false) + => CallAsync(writer => + { + writer.Write(0xDB103170); + writer.Write(save ? 0x1 : 0); + writer.WriteTLObject(peer); + writer.Write(msg_id); + writer.WriteTLObject(info); + return "Payments_ValidateRequestedInfo"; + }); + + ///See + public Task Payments_SendPaymentForm(long form_id, InputPeer peer, int msg_id, InputPaymentCredentialsBase credentials, string requested_info_id = null, string shipping_option_id = null, long? tip_amount = null) + => CallAsync(writer => + { + writer.Write(0x30C3BC9D); + writer.Write((requested_info_id != null ? 0x1 : 0) | (shipping_option_id != null ? 0x2 : 0) | (tip_amount != null ? 0x4 : 0)); + writer.Write(form_id); + writer.WriteTLObject(peer); + writer.Write(msg_id); + if (requested_info_id != null) + writer.WriteTLString(requested_info_id); + if (shipping_option_id != null) + writer.WriteTLString(shipping_option_id); + writer.WriteTLObject(credentials); + if (tip_amount != null) + writer.Write(tip_amount.Value); + return "Payments_SendPaymentForm"; + }); + + ///See + public Task Payments_GetSavedInfo() + => CallAsync(writer => + { + writer.Write(0x227D824B); + return "Payments_GetSavedInfo"; + }); + + ///See + public Task Payments_ClearSavedInfo(bool credentials = false, bool info = false) + => CallAsync(writer => + { + writer.Write(0xD83D70C1); + writer.Write((credentials ? 0x1 : 0) | (info ? 0x2 : 0)); + return "Payments_ClearSavedInfo"; + }); + + ///See + public Task Payments_GetBankCardData(string number) + => CallAsync(writer => + { + writer.Write(0x2E79D779); + writer.WriteTLString(number); + return "Payments_GetBankCardData"; + }); + ///See - public Task Stickers_CreateStickerSet(InputUserBase user_id, string title, string short_name, InputStickerSetItem[] stickers, bool masks = false, bool animated = false, InputDocumentBase thumb = null) + public Task Stickers_CreateStickerSet(InputUserBase user_id, string title, string short_name, InputStickerSetItem[] stickers, bool masks = false, bool animated = false, InputDocumentBase thumb = null, string software = null) => CallAsync(writer => { - writer.Write(0xF1036780); - writer.Write((masks ? 0x1 : 0) | (animated ? 0x2 : 0) | (thumb != null ? 0x4 : 0)); + writer.Write(0x9021AB67); + writer.Write((masks ? 0x1 : 0) | (animated ? 0x2 : 0) | (thumb != null ? 0x4 : 0) | (software != null ? 0x8 : 0)); writer.WriteTLObject(user_id); writer.WriteTLString(title); writer.WriteTLString(short_name); if (thumb != null) writer.WriteTLObject(thumb); writer.WriteTLVector(stickers); + if (software != null) + writer.WriteTLString(software); return "Stickers_CreateStickerSet"; }); @@ -8308,14 +10376,32 @@ namespace WTelegram // ---functions--- return "Stickers_AddStickerToSet"; }); - ///See - public Task Messages_UploadMedia(InputPeer peer, InputMedia media) - => CallAsync(writer => + ///See + public Task Stickers_SetStickerSetThumb(InputStickerSet stickerset, InputDocumentBase thumb) + => CallAsync(writer => { - writer.Write(0x519BC2B1); - writer.WriteTLObject(peer); - writer.WriteTLObject(media); - return "Messages_UploadMedia"; + writer.Write(0x9A364E30); + writer.WriteTLObject(stickerset); + writer.WriteTLObject(thumb); + return "Stickers_SetStickerSetThumb"; + }); + + ///See + public Task Stickers_CheckShortName(string short_name) + => CallAsync(writer => + { + writer.Write(0x284B3639); + writer.WriteTLString(short_name); + return "Stickers_CheckShortName"; + }); + + ///See + public Task Stickers_SuggestShortName(string title) + => CallAsync(writer => + { + writer.Write(0x4DAFC503); + writer.WriteTLString(title); + return "Stickers_SuggestShortName"; }); ///See @@ -8406,33 +10492,228 @@ namespace WTelegram // ---functions--- return "Phone_SaveCallDebug"; }); - ///See - public Task Upload_GetCdnFile(byte[] file_token, int offset, int limit) - => CallAsync(writer => + ///See + public Task Phone_SendSignalingData(InputPhoneCall peer, byte[] data) + => CallAsync(writer => { - writer.Write(0x2000BCC3); - writer.WriteTLBytes(file_token); - writer.Write(offset); + writer.Write(0xFF7A9383); + writer.WriteTLObject(peer); + writer.WriteTLBytes(data); + return "Phone_SendSignalingData"; + }); + + ///See + public Task Phone_CreateGroupCall(InputPeer peer, int random_id, string title = null, DateTime? schedule_date = null) + => CallAsync(writer => + { + writer.Write(0x48CDC6D8); + writer.Write((title != null ? 0x1 : 0) | (schedule_date != null ? 0x2 : 0)); + writer.WriteTLObject(peer); + writer.Write(random_id); + if (title != null) + writer.WriteTLString(title); + if (schedule_date != null) + writer.WriteTLStamp(schedule_date.Value); + return "Phone_CreateGroupCall"; + }); + + ///See + public Task Phone_JoinGroupCall(InputGroupCall call, InputPeer join_as, DataJSON params_, bool muted = false, bool video_stopped = false, string invite_hash = null) + => CallAsync(writer => + { + writer.Write(0xB132FF7B); + writer.Write((muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0) | (invite_hash != null ? 0x2 : 0)); + writer.WriteTLObject(call); + writer.WriteTLObject(join_as); + if (invite_hash != null) + writer.WriteTLString(invite_hash); + writer.WriteTLObject(params_); + return "Phone_JoinGroupCall"; + }); + + ///See + public Task Phone_LeaveGroupCall(InputGroupCall call, int source) + => CallAsync(writer => + { + writer.Write(0x500377F9); + writer.WriteTLObject(call); + writer.Write(source); + return "Phone_LeaveGroupCall"; + }); + + ///See + public Task Phone_InviteToGroupCall(InputGroupCall call, InputUserBase[] users) + => CallAsync(writer => + { + writer.Write(0x7B393160); + writer.WriteTLObject(call); + writer.WriteTLVector(users); + return "Phone_InviteToGroupCall"; + }); + + ///See + public Task Phone_DiscardGroupCall(InputGroupCall call) + => CallAsync(writer => + { + writer.Write(0x7A777135); + writer.WriteTLObject(call); + return "Phone_DiscardGroupCall"; + }); + + ///See + public Task Phone_ToggleGroupCallSettings(InputGroupCall call, bool reset_invite_hash = false, bool? join_muted = null) + => CallAsync(writer => + { + writer.Write(0x74BBB43D); + writer.Write((reset_invite_hash ? 0x2 : 0) | (join_muted != null ? 0x1 : 0)); + writer.WriteTLObject(call); + if (join_muted != null) + writer.Write(join_muted.Value ? 0x997275B5 : 0xBC799737); + return "Phone_ToggleGroupCallSettings"; + }); + + ///See + public Task Phone_GetGroupCall(InputGroupCall call) + => CallAsync(writer => + { + writer.Write(0x0C7CB017); + writer.WriteTLObject(call); + return "Phone_GetGroupCall"; + }); + + ///See + public Task Phone_GetGroupParticipants(InputGroupCall call, InputPeer[] ids, int[] sources, string offset, int limit) + => CallAsync(writer => + { + writer.Write(0xC558D8AB); + writer.WriteTLObject(call); + writer.WriteTLVector(ids); + writer.WriteTLVector(sources); + writer.WriteTLString(offset); writer.Write(limit); - return "Upload_GetCdnFile"; + return "Phone_GetGroupParticipants"; }); - ///See - public Task Upload_ReuploadCdnFile(byte[] file_token, byte[] request_token) - => CallAsync(writer => + ///See + public Task Phone_CheckGroupCall(InputGroupCall call, int[] sources) + => CallAsync(writer => { - writer.Write(0x9B2754A8); - writer.WriteTLBytes(file_token); - writer.WriteTLBytes(request_token); - return "Upload_ReuploadCdnFile"; + writer.Write(0xB59CF977); + writer.WriteTLObject(call); + writer.WriteTLVector(sources); + return "Phone_CheckGroupCall"; }); - ///See - public Task Help_GetCdnConfig() - => CallAsync(writer => + ///See + public Task Phone_ToggleGroupCallRecord(InputGroupCall call, bool start = false, string title = null) + => CallAsync(writer => { - writer.Write(0x52029342); - return "Help_GetCdnConfig"; + writer.Write(0xC02A66D7); + writer.Write((start ? 0x1 : 0) | (title != null ? 0x2 : 0)); + writer.WriteTLObject(call); + if (title != null) + writer.WriteTLString(title); + return "Phone_ToggleGroupCallRecord"; + }); + + ///See + public Task Phone_EditGroupCallParticipant(InputGroupCall call, InputPeer participant, bool? muted = null, int? volume = null, bool? raise_hand = null, bool? video_stopped = null, bool? video_paused = null, bool? presentation_paused = null) + => CallAsync(writer => + { + writer.Write(0xA5273ABF); + writer.Write((muted != null ? 0x1 : 0) | (volume != null ? 0x2 : 0) | (raise_hand != null ? 0x4 : 0) | (video_stopped != null ? 0x8 : 0) | (video_paused != null ? 0x10 : 0) | (presentation_paused != null ? 0x20 : 0)); + writer.WriteTLObject(call); + writer.WriteTLObject(participant); + if (muted != null) + writer.Write(muted.Value ? 0x997275B5 : 0xBC799737); + if (volume != null) + writer.Write(volume.Value); + if (raise_hand != null) + writer.Write(raise_hand.Value ? 0x997275B5 : 0xBC799737); + if (video_stopped != null) + writer.Write(video_stopped.Value ? 0x997275B5 : 0xBC799737); + if (video_paused != null) + writer.Write(video_paused.Value ? 0x997275B5 : 0xBC799737); + if (presentation_paused != null) + writer.Write(presentation_paused.Value ? 0x997275B5 : 0xBC799737); + return "Phone_EditGroupCallParticipant"; + }); + + ///See + public Task Phone_EditGroupCallTitle(InputGroupCall call, string title) + => CallAsync(writer => + { + writer.Write(0x1CA6AC0A); + writer.WriteTLObject(call); + writer.WriteTLString(title); + return "Phone_EditGroupCallTitle"; + }); + + ///See + public Task Phone_GetGroupCallJoinAs(InputPeer peer) + => CallAsync(writer => + { + writer.Write(0xEF7C213A); + writer.WriteTLObject(peer); + return "Phone_GetGroupCallJoinAs"; + }); + + ///See + public Task Phone_ExportGroupCallInvite(InputGroupCall call, bool can_self_unmute = false) + => CallAsync(writer => + { + writer.Write(0xE6AA647F); + writer.Write(can_self_unmute ? 0x1 : 0); + writer.WriteTLObject(call); + return "Phone_ExportGroupCallInvite"; + }); + + ///See + public Task Phone_ToggleGroupCallStartSubscription(InputGroupCall call, bool subscribed) + => CallAsync(writer => + { + writer.Write(0x219C34E6); + writer.WriteTLObject(call); + writer.Write(subscribed ? 0x997275B5 : 0xBC799737); + return "Phone_ToggleGroupCallStartSubscription"; + }); + + ///See + public Task Phone_StartScheduledGroupCall(InputGroupCall call) + => CallAsync(writer => + { + writer.Write(0x5680E342); + writer.WriteTLObject(call); + return "Phone_StartScheduledGroupCall"; + }); + + ///See + public Task Phone_SaveDefaultGroupCallJoinAs(InputPeer peer, InputPeer join_as) + => CallAsync(writer => + { + writer.Write(0x575E1F8C); + writer.WriteTLObject(peer); + writer.WriteTLObject(join_as); + return "Phone_SaveDefaultGroupCallJoinAs"; + }); + + ///See + public Task Phone_JoinGroupCallPresentation(InputGroupCall call, DataJSON params_) + => CallAsync(writer => + { + writer.Write(0xCBEA6BC4); + writer.WriteTLObject(call); + writer.WriteTLObject(params_); + return "Phone_JoinGroupCallPresentation"; + }); + + ///See + public Task Phone_LeaveGroupCallPresentation(InputGroupCall call) + => CallAsync(writer => + { + writer.Write(0x1C50D144); + writer.WriteTLObject(call); + return "Phone_LeaveGroupCallPresentation"; }); ///See @@ -8476,499 +10757,6 @@ namespace WTelegram // ---functions--- return "Langpack_GetLanguages"; }); - ///See - public Task Channels_EditBanned(InputChannelBase channel, InputUserBase user_id, ChatBannedRights banned_rights) - => CallAsync(writer => - { - writer.Write(0x72796912); - writer.WriteTLObject(channel); - writer.WriteTLObject(user_id); - writer.WriteTLObject(banned_rights); - return "Channels_EditBanned"; - }); - - ///See - public Task Channels_GetAdminLog(InputChannelBase channel, string q, long max_id, long min_id, int limit, ChannelAdminLogEventsFilter events_filter = null, InputUserBase[] admins = null) - => CallAsync(writer => - { - writer.Write(0x33DDF480); - writer.Write((events_filter != null ? 0x1 : 0) | (admins != null ? 0x2 : 0)); - writer.WriteTLObject(channel); - writer.WriteTLString(q); - if (events_filter != null) - writer.WriteTLObject(events_filter); - if (admins != null) - writer.WriteTLVector(admins); - writer.Write(max_id); - writer.Write(min_id); - writer.Write(limit); - return "Channels_GetAdminLog"; - }); - - ///See - public Task Upload_GetCdnFileHashes(byte[] file_token, int offset) - => CallAsync(writer => - { - writer.Write(0x4DA54231); - writer.WriteTLBytes(file_token); - writer.Write(offset); - return "Upload_GetCdnFileHashes"; - }); - - ///See - public Task Messages_SendScreenshotNotification(InputPeer peer, int reply_to_msg_id, long random_id) - => CallAsync(writer => - { - writer.Write(0xC97DF020); - writer.WriteTLObject(peer); - writer.Write(reply_to_msg_id); - writer.Write(random_id); - return "Messages_SendScreenshotNotification"; - }); - - ///See - public Task Channels_SetStickers(InputChannelBase channel, InputStickerSet stickerset) - => CallAsync(writer => - { - writer.Write(0xEA8CA4F9); - writer.WriteTLObject(channel); - writer.WriteTLObject(stickerset); - return "Channels_SetStickers"; - }); - - ///See - public Task Messages_GetFavedStickers(int hash) - => CallAsync(writer => - { - writer.Write(0x21CE0B0E); - writer.Write(hash); - return "Messages_GetFavedStickers"; - }); - - ///See - public Task Messages_FaveSticker(InputDocumentBase id, bool unfave) - => CallAsync(writer => - { - writer.Write(0xB9FFC55B); - writer.WriteTLObject(id); - writer.Write(unfave ? 0x997275B5 : 0xBC799737); - return "Messages_FaveSticker"; - }); - - ///See - public Task Channels_ReadMessageContents(InputChannelBase channel, int[] id) - => CallAsync(writer => - { - writer.Write(0xEAB5DC38); - writer.WriteTLObject(channel); - writer.WriteTLVector(id); - return "Channels_ReadMessageContents"; - }); - - ///See - public Task Contacts_ResetSaved() - => CallAsync(writer => - { - writer.Write(0x879537F1); - return "Contacts_ResetSaved"; - }); - - ///See - public Task Messages_GetUnreadMentions(InputPeer peer, int offset_id, int add_offset, int limit, int max_id, int min_id) - => CallAsync(writer => - { - writer.Write(0x46578472); - writer.WriteTLObject(peer); - writer.Write(offset_id); - writer.Write(add_offset); - writer.Write(limit); - writer.Write(max_id); - writer.Write(min_id); - return "Messages_GetUnreadMentions"; - }); - - ///See - public Task Channels_DeleteHistory(InputChannelBase channel, int max_id) - => CallAsync(writer => - { - writer.Write(0xAF369D42); - writer.WriteTLObject(channel); - writer.Write(max_id); - return "Channels_DeleteHistory"; - }); - - ///See - public Task Help_GetRecentMeUrls(string referer) - => CallAsync(writer => - { - writer.Write(0x3DC0F114); - writer.WriteTLString(referer); - return "Help_GetRecentMeUrls"; - }); - - ///See - public Task Channels_TogglePreHistoryHidden(InputChannelBase channel, bool enabled) - => CallAsync(writer => - { - writer.Write(0xEABBB94C); - writer.WriteTLObject(channel); - writer.Write(enabled ? 0x997275B5 : 0xBC799737); - return "Channels_TogglePreHistoryHidden"; - }); - - ///See - public Task Messages_ReadMentions(InputPeer peer) - => CallAsync(writer => - { - writer.Write(0x0F0189D3); - writer.WriteTLObject(peer); - return "Messages_ReadMentions"; - }); - - ///See - public Task Messages_GetRecentLocations(InputPeer peer, int limit, int hash) - => CallAsync(writer => - { - writer.Write(0xBBC45B09); - writer.WriteTLObject(peer); - writer.Write(limit); - writer.Write(hash); - return "Messages_GetRecentLocations"; - }); - - ///See - public Task Messages_SendMultiMedia(InputPeer peer, InputSingleMedia[] multi_media, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, DateTime? schedule_date = null) - => CallAsync(writer => - { - writer.Write(0xCC0110CB); - writer.Write((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0)); - writer.WriteTLObject(peer); - if (reply_to_msg_id != null) - writer.Write(reply_to_msg_id.Value); - writer.WriteTLVector(multi_media); - if (schedule_date != null) - writer.WriteTLStamp(schedule_date.Value); - return "Messages_SendMultiMedia"; - }); - - ///See - public Task Messages_UploadEncryptedFile(InputEncryptedChat peer, InputEncryptedFileBase file) - => CallAsync(writer => - { - writer.Write(0x5057C497); - writer.WriteTLObject(peer); - writer.WriteTLObject(file); - return "Messages_UploadEncryptedFile"; - }); - - ///See - public Task Account_GetWebAuthorizations() - => CallAsync(writer => - { - writer.Write(0x182E6D6F); - return "Account_GetWebAuthorizations"; - }); - - ///See - public Task Account_ResetWebAuthorization(long hash) - => CallAsync(writer => - { - writer.Write(0x2D01B9EF); - writer.Write(hash); - return "Account_ResetWebAuthorization"; - }); - - ///See - public Task Account_ResetWebAuthorizations() - => CallAsync(writer => - { - writer.Write(0x682D2594); - return "Account_ResetWebAuthorizations"; - }); - - ///See - public Task Messages_SearchStickerSets(string q, int hash, bool exclude_featured = false) - => CallAsync(writer => - { - writer.Write(0xC2B7D08B); - writer.Write(exclude_featured ? 0x1 : 0); - writer.WriteTLString(q); - writer.Write(hash); - return "Messages_SearchStickerSets"; - }); - - ///See - public Task Upload_GetFileHashes(InputFileLocationBase location, int offset) - => CallAsync(writer => - { - writer.Write(0xC7025931); - writer.WriteTLObject(location); - writer.Write(offset); - return "Upload_GetFileHashes"; - }); - - ///See - public Task Help_GetTermsOfServiceUpdate() - => CallAsync(writer => - { - writer.Write(0x2CA51FD1); - return "Help_GetTermsOfServiceUpdate"; - }); - - ///See - public Task Help_AcceptTermsOfService(DataJSON id) - => CallAsync(writer => - { - writer.Write(0xEE72F79A); - writer.WriteTLObject(id); - return "Help_AcceptTermsOfService"; - }); - - ///See - public Task Account_GetAllSecureValues() - => CallAsync(writer => - { - writer.Write(0xB288BC7D); - return "Account_GetAllSecureValues"; - }); - - ///See - public Task Account_GetSecureValue(SecureValueType[] types) - => CallAsync(writer => - { - writer.Write(0x73665BC2); - writer.WriteTLVector(types); - return "Account_GetSecureValue"; - }); - - ///See - public Task Account_SaveSecureValue(InputSecureValue value, long secure_secret_id) - => CallAsync(writer => - { - writer.Write(0x899FE31D); - writer.WriteTLObject(value); - writer.Write(secure_secret_id); - return "Account_SaveSecureValue"; - }); - - ///See - public Task Account_DeleteSecureValue(SecureValueType[] types) - => CallAsync(writer => - { - writer.Write(0xB880BC4B); - writer.WriteTLVector(types); - return "Account_DeleteSecureValue"; - }); - - ///See - public Task Users_SetSecureValueErrors(InputUserBase id, SecureValueErrorBase[] errors) - => CallAsync(writer => - { - writer.Write(0x90C894B5); - writer.WriteTLObject(id); - writer.WriteTLVector(errors); - return "Users_SetSecureValueErrors"; - }); - - ///See - public Task Account_GetAuthorizationForm(int bot_id, string scope, string public_key) - => CallAsync(writer => - { - writer.Write(0xB86BA8E1); - writer.Write(bot_id); - writer.WriteTLString(scope); - writer.WriteTLString(public_key); - return "Account_GetAuthorizationForm"; - }); - - ///See - public Task Account_AcceptAuthorization(int bot_id, string scope, string public_key, SecureValueHash[] value_hashes, SecureCredentialsEncrypted credentials) - => CallAsync(writer => - { - writer.Write(0xE7027C94); - writer.Write(bot_id); - writer.WriteTLString(scope); - writer.WriteTLString(public_key); - writer.WriteTLVector(value_hashes); - writer.WriteTLObject(credentials); - return "Account_AcceptAuthorization"; - }); - - ///See - public Task Account_SendVerifyPhoneCode(string phone_number, CodeSettings settings) - => CallAsync(writer => - { - writer.Write(0xA5A356F9); - writer.WriteTLString(phone_number); - writer.WriteTLObject(settings); - return "Account_SendVerifyPhoneCode"; - }); - - ///See - public Task Account_VerifyPhone(string phone_number, string phone_code_hash, string phone_code) - => CallAsync(writer => - { - writer.Write(0x4DD3A7F6); - writer.WriteTLString(phone_number); - writer.WriteTLString(phone_code_hash); - writer.WriteTLString(phone_code); - return "Account_VerifyPhone"; - }); - - ///See - public Task Account_SendVerifyEmailCode(string email) - => CallAsync(writer => - { - writer.Write(0x7011509F); - writer.WriteTLString(email); - return "Account_SendVerifyEmailCode"; - }); - - ///See - public Task Account_VerifyEmail(string email, string code) - => CallAsync(writer => - { - writer.Write(0xECBA39DB); - writer.WriteTLString(email); - writer.WriteTLString(code); - return "Account_VerifyEmail"; - }); - - ///See - public Task Help_GetDeepLinkInfo(string path) - => CallAsync(writer => - { - writer.Write(0x3FEDC75F); - writer.WriteTLString(path); - return "Help_GetDeepLinkInfo"; - }); - - ///See - public Task Contacts_GetSaved() - => CallAsync(writer => - { - writer.Write(0x82F1E39F); - return "Contacts_GetSaved"; - }); - - ///See - public Task Channels_GetLeftChannels(int offset) - => CallAsync(writer => - { - writer.Write(0x8341ECC0); - writer.Write(offset); - return "Channels_GetLeftChannels"; - }); - - ///See - public Task Account_InitTakeoutSession(bool contacts = false, bool message_users = false, bool message_chats = false, bool message_megagroups = false, bool message_channels = false, bool files = false, int? file_max_size = null) - => CallAsync(writer => - { - writer.Write(0xF05B4804); - writer.Write((contacts ? 0x1 : 0) | (message_users ? 0x2 : 0) | (message_chats ? 0x4 : 0) | (message_megagroups ? 0x8 : 0) | (message_channels ? 0x10 : 0) | (files ? 0x20 : 0) | (file_max_size != null ? 0x20 : 0)); - if (file_max_size != null) - writer.Write(file_max_size.Value); - return "Account_InitTakeoutSession"; - }); - - ///See - public Task Account_FinishTakeoutSession(bool success = false) - => CallAsync(writer => - { - writer.Write(0x1D2652EE); - writer.Write(success ? 0x1 : 0); - return "Account_FinishTakeoutSession"; - }); - - ///See - public Task Messages_GetSplitRanges() - => CallAsync(writer => - { - writer.Write(0x1CFF7E08); - return "Messages_GetSplitRanges"; - }); - - ///See - public Task InvokeWithMessagesRange(MessageRange range, ITLFunction query) - => CallAsync(writer => - { - writer.Write(0x365275F2); - writer.WriteTLObject(range); - query(writer); - return "InvokeWithMessagesRange"; - }); - - ///See - public Task InvokeWithTakeout(long takeout_id, ITLFunction query) - => CallAsync(writer => - { - writer.Write(0xACA9FD2E); - writer.Write(takeout_id); - query(writer); - return "InvokeWithTakeout"; - }); - - ///See - public Task Messages_MarkDialogUnread(InputDialogPeerBase peer, bool unread = false) - => CallAsync(writer => - { - writer.Write(0xC286D98F); - writer.Write(unread ? 0x1 : 0); - writer.WriteTLObject(peer); - return "Messages_MarkDialogUnread"; - }); - - ///See - public Task Messages_GetDialogUnreadMarks() - => CallAsync(writer => - { - writer.Write(0x22E24E22); - return "Messages_GetDialogUnreadMarks"; - }); - - ///See - public Task Contacts_ToggleTopPeers(bool enabled) - => CallAsync(writer => - { - writer.Write(0x8514BDDA); - writer.Write(enabled ? 0x997275B5 : 0xBC799737); - return "Contacts_ToggleTopPeers"; - }); - - ///See - public Task Messages_ClearAllDrafts() - => CallAsync(writer => - { - writer.Write(0x7E58EE9C); - return "Messages_ClearAllDrafts"; - }); - - ///See - public Task Help_GetAppConfig() - => CallAsync(writer => - { - writer.Write(0x98914110); - return "Help_GetAppConfig"; - }); - - ///See - public Task Help_SaveAppLog(InputAppEvent[] events) - => CallAsync(writer => - { - writer.Write(0x6F02F748); - writer.WriteTLVector(events); - return "Help_SaveAppLog"; - }); - - ///See - public Task Help_GetPassportConfig(int hash) - => CallAsync(writer => - { - writer.Write(0xC661AD08); - writer.Write(hash); - return "Help_GetPassportConfig"; - }); - ///See public Task Langpack_GetLanguage(string lang_pack, string lang_code) => CallAsync(writer => @@ -8979,263 +10767,6 @@ namespace WTelegram // ---functions--- return "Langpack_GetLanguage"; }); - ///See - public Task Messages_UpdatePinnedMessage(InputPeer peer, int id, bool silent = false, bool unpin = false, bool pm_oneside = false) - => CallAsync(writer => - { - writer.Write(0xD2AAF7EC); - writer.Write((silent ? 0x1 : 0) | (unpin ? 0x2 : 0) | (pm_oneside ? 0x4 : 0)); - writer.WriteTLObject(peer); - writer.Write(id); - return "Messages_UpdatePinnedMessage"; - }); - - ///See - public Task Account_ConfirmPasswordEmail(string code) - => CallAsync(writer => - { - writer.Write(0x8FDF1920); - writer.WriteTLString(code); - return "Account_ConfirmPasswordEmail"; - }); - - ///See - public Task Account_ResendPasswordEmail() - => CallAsync(writer => - { - writer.Write(0x7A7F2A15); - return "Account_ResendPasswordEmail"; - }); - - ///See - public Task Account_CancelPasswordEmail() - => CallAsync(writer => - { - writer.Write(0xC1CBD5B6); - return "Account_CancelPasswordEmail"; - }); - - ///See - public Task Help_GetSupportName() - => CallAsync(writer => - { - writer.Write(0xD360E72C); - return "Help_GetSupportName"; - }); - - ///See - public Task Help_GetUserInfo(InputUserBase user_id) - => CallAsync(writer => - { - writer.Write(0x038A08D3); - writer.WriteTLObject(user_id); - return "Help_GetUserInfo"; - }); - - ///See - public Task Help_EditUserInfo(InputUserBase user_id, string message, MessageEntity[] entities) - => CallAsync(writer => - { - writer.Write(0x66B91B70); - writer.WriteTLObject(user_id); - writer.WriteTLString(message); - writer.WriteTLVector(entities); - return "Help_EditUserInfo"; - }); - - ///See - public Task Account_GetContactSignUpNotification() - => CallAsync(writer => - { - writer.Write(0x9F07C728); - return "Account_GetContactSignUpNotification"; - }); - - ///See - public Task Account_SetContactSignUpNotification(bool silent) - => CallAsync(writer => - { - writer.Write(0xCFF43F61); - writer.Write(silent ? 0x997275B5 : 0xBC799737); - return "Account_SetContactSignUpNotification"; - }); - - ///See - public Task Account_GetNotifyExceptions(bool compare_sound = false, InputNotifyPeerBase peer = null) - => CallAsync(writer => - { - writer.Write(0x53577479); - writer.Write((compare_sound ? 0x2 : 0) | (peer != null ? 0x1 : 0)); - if (peer != null) - writer.WriteTLObject(peer); - return "Account_GetNotifyExceptions"; - }); - - ///See - public Task Messages_SendVote(InputPeer peer, int msg_id, byte[][] options) - => CallAsync(writer => - { - writer.Write(0x10EA6184); - writer.WriteTLObject(peer); - writer.Write(msg_id); - writer.WriteTLVector(options); - return "Messages_SendVote"; - }); - - ///See - public Task Messages_GetPollResults(InputPeer peer, int msg_id) - => CallAsync(writer => - { - writer.Write(0x73BB643B); - writer.WriteTLObject(peer); - writer.Write(msg_id); - return "Messages_GetPollResults"; - }); - - ///See - public Task Messages_GetOnlines(InputPeer peer) - => CallAsync(writer => - { - writer.Write(0x6E2BE050); - writer.WriteTLObject(peer); - return "Messages_GetOnlines"; - }); - - ///See - public Task Messages_GetStatsURL(InputPeer peer, string params_, bool dark = false) - => CallAsync(writer => - { - writer.Write(0x812C2AE6); - writer.Write(dark ? 0x1 : 0); - writer.WriteTLObject(peer); - writer.WriteTLString(params_); - return "Messages_GetStatsURL"; - }); - - ///See - public Task Messages_EditChatAbout(InputPeer peer, string about) - => CallAsync(writer => - { - writer.Write(0xDEF60797); - writer.WriteTLObject(peer); - writer.WriteTLString(about); - return "Messages_EditChatAbout"; - }); - - ///See - public Task Messages_EditChatDefaultBannedRights(InputPeer peer, ChatBannedRights banned_rights) - => CallAsync(writer => - { - writer.Write(0xA5866B41); - writer.WriteTLObject(peer); - writer.WriteTLObject(banned_rights); - return "Messages_EditChatDefaultBannedRights"; - }); - - ///See - public Task Account_GetWallPaper(InputWallPaperBase wallpaper) - => CallAsync(writer => - { - writer.Write(0xFC8DDBEA); - writer.WriteTLObject(wallpaper); - return "Account_GetWallPaper"; - }); - - ///See - public Task Account_UploadWallPaper(InputFileBase file, string mime_type, WallPaperSettings settings) - => CallAsync(writer => - { - writer.Write(0xDD853661); - writer.WriteTLObject(file); - writer.WriteTLString(mime_type); - writer.WriteTLObject(settings); - return "Account_UploadWallPaper"; - }); - - ///See - public Task Account_SaveWallPaper(InputWallPaperBase wallpaper, bool unsave, WallPaperSettings settings) - => CallAsync(writer => - { - writer.Write(0x6C5A5B37); - writer.WriteTLObject(wallpaper); - writer.Write(unsave ? 0x997275B5 : 0xBC799737); - writer.WriteTLObject(settings); - return "Account_SaveWallPaper"; - }); - - ///See - public Task Account_InstallWallPaper(InputWallPaperBase wallpaper, WallPaperSettings settings) - => CallAsync(writer => - { - writer.Write(0xFEED5769); - writer.WriteTLObject(wallpaper); - writer.WriteTLObject(settings); - return "Account_InstallWallPaper"; - }); - - ///See - public Task Account_ResetWallPapers() - => CallAsync(writer => - { - writer.Write(0xBB3B9804); - return "Account_ResetWallPapers"; - }); - - ///See - public Task Account_GetAutoDownloadSettings() - => CallAsync(writer => - { - writer.Write(0x56DA0B3F); - return "Account_GetAutoDownloadSettings"; - }); - - ///See - public Task Account_SaveAutoDownloadSettings(AutoDownloadSettings settings, bool low = false, bool high = false) - => CallAsync(writer => - { - writer.Write(0x76F36233); - writer.Write((low ? 0x1 : 0) | (high ? 0x2 : 0)); - writer.WriteTLObject(settings); - return "Account_SaveAutoDownloadSettings"; - }); - - ///See - public Task Messages_GetEmojiKeywords(string lang_code) - => CallAsync(writer => - { - writer.Write(0x35A0E062); - writer.WriteTLString(lang_code); - return "Messages_GetEmojiKeywords"; - }); - - ///See - public Task Messages_GetEmojiKeywordsDifference(string lang_code, int from_version) - => CallAsync(writer => - { - writer.Write(0x1508B6AF); - writer.WriteTLString(lang_code); - writer.Write(from_version); - return "Messages_GetEmojiKeywordsDifference"; - }); - - ///See - public Task Messages_GetEmojiKeywordsLanguages(string[] lang_codes) - => CallAsync(writer => - { - writer.Write(0x4E9963B2); - writer.WriteTLVector(lang_codes); - return "Messages_GetEmojiKeywordsLanguages"; - }); - - ///See - public Task Messages_GetEmojiURL(string lang_code) - => CallAsync(writer => - { - writer.Write(0xD5B10C26); - writer.WriteTLString(lang_code); - return "Messages_GetEmojiURL"; - }); - ///See public Task Folders_EditPeerFolders(InputFolderPeer[] folder_peers) => CallAsync(writer => @@ -9254,399 +10785,6 @@ namespace WTelegram // ---functions--- return "Folders_DeleteFolder"; }); - ///See - public Task Messages_GetSearchCounters(InputPeer peer, MessagesFilter[] filters) - => CallAsync(writer => - { - writer.Write(0x732EEF00); - writer.WriteTLObject(peer); - writer.WriteTLVector(filters); - return "Messages_GetSearchCounters"; - }); - - ///See - public Task Channels_GetGroupsForDiscussion() - => CallAsync(writer => - { - writer.Write(0xF5DAD378); - return "Channels_GetGroupsForDiscussion"; - }); - - ///See - public Task Channels_SetDiscussionGroup(InputChannelBase broadcast, InputChannelBase group) - => CallAsync(writer => - { - writer.Write(0x40582BB2); - writer.WriteTLObject(broadcast); - writer.WriteTLObject(group); - return "Channels_SetDiscussionGroup"; - }); - - ///See - public Task Messages_RequestUrlAuth(InputPeer peer, int msg_id, int button_id) - => CallAsync(writer => - { - writer.Write(0xE33F5613); - writer.WriteTLObject(peer); - writer.Write(msg_id); - writer.Write(button_id); - return "Messages_RequestUrlAuth"; - }); - - ///See - public Task Messages_AcceptUrlAuth(InputPeer peer, int msg_id, int button_id, bool write_allowed = false) - => CallAsync(writer => - { - writer.Write(0xF729EA98); - writer.Write(write_allowed ? 0x1 : 0); - writer.WriteTLObject(peer); - writer.Write(msg_id); - writer.Write(button_id); - return "Messages_AcceptUrlAuth"; - }); - - ///See - public Task Messages_HidePeerSettingsBar(InputPeer peer) - => CallAsync(writer => - { - writer.Write(0x4FACB138); - writer.WriteTLObject(peer); - return "Messages_HidePeerSettingsBar"; - }); - - ///See - public Task Contacts_AddContact(InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false) - => CallAsync(writer => - { - writer.Write(0xE8F463D0); - writer.Write(add_phone_privacy_exception ? 0x1 : 0); - writer.WriteTLObject(id); - writer.WriteTLString(first_name); - writer.WriteTLString(last_name); - writer.WriteTLString(phone); - return "Contacts_AddContact"; - }); - - ///See - public Task Contacts_AcceptContact(InputUserBase id) - => CallAsync(writer => - { - writer.Write(0xF831A20F); - writer.WriteTLObject(id); - return "Contacts_AcceptContact"; - }); - - ///See - public Task Channels_EditCreator(InputChannelBase channel, InputUserBase user_id, InputCheckPasswordSRPBase password) - => CallAsync(writer => - { - writer.Write(0x8F38CD1F); - writer.WriteTLObject(channel); - writer.WriteTLObject(user_id); - writer.WriteTLObject(password); - return "Channels_EditCreator"; - }); - - ///See - public Task Contacts_GetLocated(InputGeoPointBase geo_point, bool background = false, int? self_expires = null) - => CallAsync(writer => - { - writer.Write(0xD348BC44); - writer.Write((background ? 0x2 : 0) | (self_expires != null ? 0x1 : 0)); - writer.WriteTLObject(geo_point); - if (self_expires != null) - writer.Write(self_expires.Value); - return "Contacts_GetLocated"; - }); - - ///See - public Task Channels_EditLocation(InputChannelBase channel, InputGeoPointBase geo_point, string address) - => CallAsync(writer => - { - writer.Write(0x58E63F6D); - writer.WriteTLObject(channel); - writer.WriteTLObject(geo_point); - writer.WriteTLString(address); - return "Channels_EditLocation"; - }); - - ///See - public Task Channels_ToggleSlowMode(InputChannelBase channel, int seconds) - => CallAsync(writer => - { - writer.Write(0xEDD49EF0); - writer.WriteTLObject(channel); - writer.Write(seconds); - return "Channels_ToggleSlowMode"; - }); - - ///See - public Task Messages_GetScheduledHistory(InputPeer peer, int hash) - => CallAsync(writer => - { - writer.Write(0xE2C2685B); - writer.WriteTLObject(peer); - writer.Write(hash); - return "Messages_GetScheduledHistory"; - }); - - ///See - public Task Messages_GetScheduledMessages(InputPeer peer, int[] id) - => CallAsync(writer => - { - writer.Write(0xBDBB0464); - writer.WriteTLObject(peer); - writer.WriteTLVector(id); - return "Messages_GetScheduledMessages"; - }); - - ///See - public Task Messages_SendScheduledMessages(InputPeer peer, int[] id) - => CallAsync(writer => - { - writer.Write(0xBD38850A); - writer.WriteTLObject(peer); - writer.WriteTLVector(id); - return "Messages_SendScheduledMessages"; - }); - - ///See - public Task Messages_DeleteScheduledMessages(InputPeer peer, int[] id) - => CallAsync(writer => - { - writer.Write(0x59AE2B16); - writer.WriteTLObject(peer); - writer.WriteTLVector(id); - return "Messages_DeleteScheduledMessages"; - }); - - ///See - public Task Account_UploadTheme(InputFileBase file, string file_name, string mime_type, InputFileBase thumb = null) - => CallAsync(writer => - { - writer.Write(0x1C3DB333); - writer.Write(thumb != null ? 0x1 : 0); - writer.WriteTLObject(file); - if (thumb != null) - writer.WriteTLObject(thumb); - writer.WriteTLString(file_name); - writer.WriteTLString(mime_type); - return "Account_UploadTheme"; - }); - - ///See - public Task Account_CreateTheme(string slug, string title, InputDocumentBase document = null, InputThemeSettings settings = null) - => CallAsync(writer => - { - writer.Write(0x8432C21F); - writer.Write((document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)); - writer.WriteTLString(slug); - writer.WriteTLString(title); - if (document != null) - writer.WriteTLObject(document); - if (settings != null) - writer.WriteTLObject(settings); - return "Account_CreateTheme"; - }); - - ///See - public Task Account_UpdateTheme(string format, InputThemeBase theme, string slug = null, string title = null, InputDocumentBase document = null, InputThemeSettings settings = null) - => CallAsync(writer => - { - writer.Write(0x5CB367D5); - writer.Write((slug != null ? 0x1 : 0) | (title != null ? 0x2 : 0) | (document != null ? 0x4 : 0) | (settings != null ? 0x8 : 0)); - writer.WriteTLString(format); - writer.WriteTLObject(theme); - if (slug != null) - writer.WriteTLString(slug); - if (title != null) - writer.WriteTLString(title); - if (document != null) - writer.WriteTLObject(document); - if (settings != null) - writer.WriteTLObject(settings); - return "Account_UpdateTheme"; - }); - - ///See - public Task Account_SaveTheme(InputThemeBase theme, bool unsave) - => CallAsync(writer => - { - writer.Write(0xF257106C); - writer.WriteTLObject(theme); - writer.Write(unsave ? 0x997275B5 : 0xBC799737); - return "Account_SaveTheme"; - }); - - ///See - public Task Account_InstallTheme(bool dark = false, string format = null, InputThemeBase theme = null) - => CallAsync(writer => - { - writer.Write(0x7AE43737); - writer.Write((dark ? 0x1 : 0) | (format != null ? 0x2 : 0) | (theme != null ? 0x2 : 0)); - if (format != null) - writer.WriteTLString(format); - if (theme != null) - writer.WriteTLObject(theme); - return "Account_InstallTheme"; - }); - - ///See - public Task Account_GetTheme(string format, InputThemeBase theme, long document_id) - => CallAsync(writer => - { - writer.Write(0x8D9D742B); - writer.WriteTLString(format); - writer.WriteTLObject(theme); - writer.Write(document_id); - return "Account_GetTheme"; - }); - - ///See - public Task Account_GetThemes(string format, int hash) - => CallAsync(writer => - { - writer.Write(0x285946F8); - writer.WriteTLString(format); - writer.Write(hash); - return "Account_GetThemes"; - }); - - ///See - public Task Auth_ExportLoginToken(int api_id, string api_hash, int[] except_ids) - => CallAsync(writer => - { - writer.Write(0xB1B41517); - writer.Write(api_id); - writer.WriteTLString(api_hash); - writer.WriteTLVector(except_ids); - return "Auth_ExportLoginToken"; - }); - - ///See - public Task Auth_ImportLoginToken(byte[] token) - => CallAsync(writer => - { - writer.Write(0x95AC5CE4); - writer.WriteTLBytes(token); - return "Auth_ImportLoginToken"; - }); - - ///See - public Task Auth_AcceptLoginToken(byte[] token) - => CallAsync(writer => - { - writer.Write(0xE894AD4D); - writer.WriteTLBytes(token); - return "Auth_AcceptLoginToken"; - }); - - ///See - public Task Account_SetContentSettings(bool sensitive_enabled = false) - => CallAsync(writer => - { - writer.Write(0xB574B16B); - writer.Write(sensitive_enabled ? 0x1 : 0); - return "Account_SetContentSettings"; - }); - - ///See - public Task Account_GetContentSettings() - => CallAsync(writer => - { - writer.Write(0x8B9B4DAE); - return "Account_GetContentSettings"; - }); - - ///See - public Task Channels_GetInactiveChannels() - => CallAsync(writer => - { - writer.Write(0x11E831EE); - return "Channels_GetInactiveChannels"; - }); - - ///See - public Task Account_GetMultiWallPapers(InputWallPaperBase[] wallpapers) - => CallAsync(writer => - { - writer.Write(0x65AD71DC); - writer.WriteTLVector(wallpapers); - return "Account_GetMultiWallPapers"; - }); - - ///See - public Task Messages_GetPollVotes(InputPeer peer, int id, int limit, byte[] option = null, string offset = null) - => CallAsync(writer => - { - writer.Write(0xB86E380E); - writer.Write((option != null ? 0x1 : 0) | (offset != null ? 0x2 : 0)); - writer.WriteTLObject(peer); - writer.Write(id); - if (option != null) - writer.WriteTLBytes(option); - if (offset != null) - writer.WriteTLString(offset); - writer.Write(limit); - return "Messages_GetPollVotes"; - }); - - ///See - public Task Messages_ToggleStickerSets(InputStickerSet[] stickersets, bool uninstall = false, bool archive = false, bool unarchive = false) - => CallAsync(writer => - { - writer.Write(0xB5052FEA); - writer.Write((uninstall ? 0x1 : 0) | (archive ? 0x2 : 0) | (unarchive ? 0x4 : 0)); - writer.WriteTLVector(stickersets); - return "Messages_ToggleStickerSets"; - }); - - ///See - public Task Payments_GetBankCardData(string number) - => CallAsync(writer => - { - writer.Write(0x2E79D779); - writer.WriteTLString(number); - return "Payments_GetBankCardData"; - }); - - ///See - public Task Messages_GetDialogFilters() - => CallAsync(writer => - { - writer.Write(0xF19ED96D); - return "Messages_GetDialogFilters"; - }); - - ///See - public Task Messages_GetSuggestedDialogFilters() - => CallAsync(writer => - { - writer.Write(0xA29CD42C); - return "Messages_GetSuggestedDialogFilters"; - }); - - ///See - public Task Messages_UpdateDialogFilter(int id, DialogFilter filter = null) - => CallAsync(writer => - { - writer.Write(0x1AD4A04A); - writer.Write(filter != null ? 0x1 : 0); - writer.Write(id); - if (filter != null) - writer.WriteTLObject(filter); - return "Messages_UpdateDialogFilter"; - }); - - ///See - public Task Messages_UpdateDialogFiltersOrder(int[] order) - => CallAsync(writer => - { - writer.Write(0xC563C1E4); - writer.WriteTLVector(order); - return "Messages_UpdateDialogFiltersOrder"; - }); - ///See public Task Stats_GetBroadcastStats(InputChannelBase channel, bool dark = false) => CallAsync(writer => @@ -9669,63 +10807,6 @@ namespace WTelegram // ---functions--- return "Stats_LoadAsyncGraph"; }); - ///See - public Task Stickers_SetStickerSetThumb(InputStickerSet stickerset, InputDocumentBase thumb) - => CallAsync(writer => - { - writer.Write(0x9A364E30); - writer.WriteTLObject(stickerset); - writer.WriteTLObject(thumb); - return "Stickers_SetStickerSetThumb"; - }); - - ///See - public Task Bots_SetBotCommands(BotCommand[] commands) - => CallAsync(writer => - { - writer.Write(0x805D46F6); - writer.WriteTLVector(commands); - return "Bots_SetBotCommands"; - }); - - ///See - public Task Messages_GetOldFeaturedStickers(int offset, int limit, int hash) - => CallAsync(writer => - { - writer.Write(0x5FE7025B); - writer.Write(offset); - writer.Write(limit); - writer.Write(hash); - return "Messages_GetOldFeaturedStickers"; - }); - - ///See - public Task Help_GetPromoData() - => CallAsync(writer => - { - writer.Write(0xC0977421); - return "Help_GetPromoData"; - }); - - ///See - public Task Help_HidePromoData(InputPeer peer) - => CallAsync(writer => - { - writer.Write(0x1E251C95); - writer.WriteTLObject(peer); - return "Help_HidePromoData"; - }); - - ///See - public Task Phone_SendSignalingData(InputPhoneCall peer, byte[] data) - => CallAsync(writer => - { - writer.Write(0xFF7A9383); - writer.WriteTLObject(peer); - writer.WriteTLBytes(data); - return "Phone_SendSignalingData"; - }); - ///See public Task Stats_GetMegagroupStats(InputChannelBase channel, bool dark = false) => CallAsync(writer => @@ -9736,90 +10817,6 @@ namespace WTelegram // ---functions--- return "Stats_GetMegagroupStats"; }); - ///See - public Task Account_GetGlobalPrivacySettings() - => CallAsync(writer => - { - writer.Write(0xEB2B4CF6); - return "Account_GetGlobalPrivacySettings"; - }); - - ///See - public Task Account_SetGlobalPrivacySettings(GlobalPrivacySettings settings) - => CallAsync(writer => - { - writer.Write(0x1EDAAAC2); - writer.WriteTLObject(settings); - return "Account_SetGlobalPrivacySettings"; - }); - - ///See - public Task Help_DismissSuggestion(string suggestion) - => CallAsync(writer => - { - writer.Write(0x077FA99F); - writer.WriteTLString(suggestion); - return "Help_DismissSuggestion"; - }); - - ///See - public Task Help_GetCountriesList(string lang_code, int hash) - => CallAsync(writer => - { - writer.Write(0x735787A8); - writer.WriteTLString(lang_code); - writer.Write(hash); - return "Help_GetCountriesList"; - }); - - ///See - public Task Messages_GetReplies(InputPeer peer, int msg_id, int offset_id, DateTime offset_date, int add_offset, int limit, int max_id, int min_id, int hash) - => CallAsync(writer => - { - writer.Write(0x24B581BA); - writer.WriteTLObject(peer); - writer.Write(msg_id); - writer.Write(offset_id); - writer.WriteTLStamp(offset_date); - writer.Write(add_offset); - writer.Write(limit); - writer.Write(max_id); - writer.Write(min_id); - writer.Write(hash); - return "Messages_GetReplies"; - }); - - ///See - public Task Messages_GetDiscussionMessage(InputPeer peer, int msg_id) - => CallAsync(writer => - { - writer.Write(0x446972FD); - writer.WriteTLObject(peer); - writer.Write(msg_id); - return "Messages_GetDiscussionMessage"; - }); - - ///See - public Task Messages_ReadDiscussion(InputPeer peer, int msg_id, int read_max_id) - => CallAsync(writer => - { - writer.Write(0xF731A9F4); - writer.WriteTLObject(peer); - writer.Write(msg_id); - writer.Write(read_max_id); - return "Messages_ReadDiscussion"; - }); - - ///See - public Task Contacts_BlockFromReplies(int msg_id, bool delete_message = false, bool delete_history = false, bool report_spam = false) - => CallAsync(writer => - { - writer.Write(0x29A8962C); - writer.Write((delete_message ? 0x1 : 0) | (delete_history ? 0x2 : 0) | (report_spam ? 0x4 : 0)); - writer.Write(msg_id); - return "Contacts_BlockFromReplies"; - }); - ///See public Task Stats_GetMessagePublicForwards(InputChannelBase channel, int msg_id, int offset_rate, InputPeer offset_peer, int offset_id, int limit) => CallAsync(writer => @@ -9844,14 +10841,5 @@ namespace WTelegram // ---functions--- writer.Write(msg_id); return "Stats_GetMessageStats"; }); - - ///See - public Task Messages_UnpinAllMessages(InputPeer peer) - => CallAsync(writer => - { - writer.Write(0xF025BC8B); - writer.WriteTLObject(peer); - return "Messages_UnpinAllMessages"; - }); } } diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs index 7d699c9..398bf8d 100644 --- a/src/TL.Secret.cs +++ b/src/TL.Secret.cs @@ -1,4 +1,4 @@ -// This file is (mainly) generated automatically using the Generator class +// This file is (mainly) generated automatically using the Generator class using System; namespace TL @@ -256,9 +256,32 @@ namespace TL [TLDef(0x051448E5)] public partial class DocumentAttributeAudio : DocumentAttribute { public int duration; } + ///See + [TLDef(0x77BFB61B)] + public partial class PhotoSize : PhotoSizeBase + { + public string type; + public FileLocationBase location; + public int w; + public int h; + public int size; + } + ///See + [TLDef(0xE9A734FA)] + public partial class PhotoCachedSize : PhotoSizeBase + { + public string type; + public FileLocationBase location; + public int w; + public int h; + public byte[] bytes; + } + + ///See + public abstract partial class FileLocationBase : ITLObject { } ///See [TLDef(0x7C596B46)] - public partial class FileLocationUnavailable : FileLocation + public partial class FileLocationUnavailable : FileLocationBase { public long volume_id; public int local_id; @@ -266,7 +289,7 @@ namespace TL } ///See [TLDef(0x53D69076)] - public partial class FileLocation_ : FileLocation + public partial class FileLocation : FileLocationBase { public int dc_id; public long volume_id; @@ -285,7 +308,7 @@ namespace TL public DateTime date; public string mime_type; public int size; - public PhotoSize thumb; + public PhotoSizeBase thumb; public int dc_id; public DocumentAttribute[] attributes; } diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 80172bf..5f206a8 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -6,7 +6,7 @@ namespace TL { static partial class Schema { - public const int Layer = 121; // fetched 10/08/2021 11:46:24 + public const int Layer = 131; // fetched 20/08/2021 12:21:02 public const uint VectorCtor = 0x1CB5C415; public const uint NullCtor = 0x56730BCC; public const uint RpcResult = 0xF35C6D01; @@ -14,18 +14,37 @@ namespace TL internal readonly static Dictionary Table = new() { + [0xF35C6D01] = typeof(RpcResult), + [0x5BB8E511] = typeof(_Message), + [0x73F1F8DC] = typeof(MsgContainer), + [0xE06046B2] = typeof(MsgCopy), + [0x3072CFA1] = typeof(GzipPacked), // from TL.MTProto: [0x05162463] = typeof(ResPQ), + [0x83C95AEC] = typeof(PQInnerData), [0xA9F55F95] = typeof(PQInnerDataDc), + [0x3C6A84D4] = typeof(PQInnerDataTemp), [0x56FDDF88] = typeof(PQInnerDataTempDc), + [0x75A3F765] = typeof(BindAuthKeyInner), + [0x79CB045D] = typeof(ServerDHParamsFail), [0xD0E8075C] = typeof(ServerDHParamsOk), [0xB5890DBA] = typeof(ServerDHInnerData), [0x6643B654] = typeof(ClientDHInnerData), [0x3BCBF734] = typeof(DhGenOk), [0x46DC1FB9] = typeof(DhGenRetry), [0xA69DAE02] = typeof(DhGenFail), - [0x75A3F765] = typeof(BindAuthKeyInner), - [0xF35C6D01] = typeof(RpcResult), + [0xF660E1D4] = typeof(DestroyAuthKeyOk), + [0x0A9F2259] = typeof(DestroyAuthKeyNone), + [0xEA109B13] = typeof(DestroyAuthKeyFail), + [0x62D6B459] = typeof(MsgsAck), + [0xA7EFF811] = typeof(BadMsgNotification), + [0xEDAB447B] = typeof(BadServerSalt), + [0xDA69FB52] = typeof(MsgsStateReq), + [0x04DEB57D] = typeof(MsgsStateInfo), + [0x8CC0D131] = typeof(MsgsAllInfo), + [0x276D3EC6] = typeof(MsgDetailedInfo), + [0x809DB6DF] = typeof(MsgNewDetailedInfo), + [0x7D861A08] = typeof(MsgResendReq), [0x2144CA19] = typeof(RpcError), [0x5E2AD36E] = typeof(RpcAnswerUnknown), [0xCD78E586] = typeof(RpcAnswerDroppedRunning), @@ -36,22 +55,11 @@ namespace TL [0xE22045FC] = typeof(DestroySessionOk), [0x62D350C9] = typeof(DestroySessionNone), [0x9EC20908] = typeof(NewSessionCreated), - [0x73F1F8DC] = typeof(MsgContainer), - [0x5BB8E511] = typeof(_Message), - [0xE06046B2] = typeof(MsgCopy), - [0x3072CFA1] = typeof(GzipPacked), - [0x62D6B459] = typeof(MsgsAck), - [0xA7EFF811] = typeof(BadMsgNotification), - [0xEDAB447B] = typeof(BadServerSalt), - [0x7D861A08] = typeof(MsgResendReq), - [0xDA69FB52] = typeof(MsgsStateReq), - [0x04DEB57D] = typeof(MsgsStateInfo), - [0x8CC0D131] = typeof(MsgsAllInfo), - [0x276D3EC6] = typeof(MsgDetailedInfo), - [0x809DB6DF] = typeof(MsgNewDetailedInfo), - [0xF660E1D4] = typeof(DestroyAuthKeyOk), - [0x0A9F2259] = typeof(DestroyAuthKeyNone), - [0xEA109B13] = typeof(DestroyAuthKeyFail), + [0x9299359F] = typeof(HttpWait), + [0xD433AD73] = typeof(IpPort), + [0x37982646] = typeof(IpPortSecret), + [0x4679B65F] = typeof(AccessPointRule), + [0x5A592A6C] = typeof(Help_ConfigSimple), [0x7ABE77EC] = typeof(Ping), // from TL.Schema: [0xBC799737] = typeof(BoolFalse), @@ -62,15 +70,32 @@ namespace TL [0x7F3B18EA] = typeof(InputPeerEmpty), [0x7DA07EC9] = typeof(InputPeerSelf), [0x179BE863] = typeof(InputPeerChat), + [0x7B8E7DE6] = typeof(InputPeerUser), + [0x20ADAEF8] = typeof(InputPeerChannel), + [0x17BAE2E6] = typeof(InputPeerUserFromMessage), + [0x9C95F7BB] = typeof(InputPeerChannelFromMessage), [0xB98886CF] = typeof(InputUserEmpty), [0xF7C1B13F] = typeof(InputUserSelf), + [0xD8292816] = typeof(InputUser), + [0x2D117597] = typeof(InputUserFromMessage), [0xF392B7F4] = typeof(InputPhoneContact), [0xF52FF27F] = typeof(InputFile), + [0xFA4F0BB5] = typeof(InputFileBig), [0x9664F57F] = typeof(InputMediaEmpty), [0x1E287D04] = typeof(InputMediaUploadedPhoto), [0xB3BA0635] = typeof(InputMediaPhoto), [0xF9C44144] = typeof(InputMediaGeoPoint), [0xF8AB7DFB] = typeof(InputMediaContact), + [0x5B38C6C1] = typeof(InputMediaUploadedDocument), + [0x33473058] = typeof(InputMediaDocument), + [0xC13D1C11] = typeof(InputMediaVenue), + [0xE5BBFE1A] = typeof(InputMediaPhotoExternal), + [0xFB52DC99] = typeof(InputMediaDocumentExternal), + [0xD33F43F3] = typeof(InputMediaGame), + [0xD9799874] = typeof(InputMediaInvoice), + [0x971FA843] = typeof(InputMediaGeoLive), + [0x0F94E5F1] = typeof(InputMediaPoll), + [0xE66FBF7B] = typeof(InputMediaDice), [0x1CA48F57] = typeof(InputChatPhotoEmpty), [0xC642724E] = typeof(InputChatUploadedPhoto), [0x8953AD37] = typeof(InputChatPhoto), @@ -79,8 +104,18 @@ namespace TL [0x1CD7BF0D] = typeof(InputPhotoEmpty), [0x3BB3B94A] = typeof(InputPhoto), [0xDFDAABE1] = typeof(InputFileLocation), + [0xF5235D55] = typeof(InputEncryptedFileLocation), + [0xBAD07584] = typeof(InputDocumentFileLocation), + [0xCBC7EE28] = typeof(InputSecureFileLocation), + [0x29BE5899] = typeof(InputTakeoutFileLocation), + [0x40181FFE] = typeof(InputPhotoFileLocation), + [0xD83466F3] = typeof(InputPhotoLegacyFileLocation), + [0x37257E99] = typeof(InputPeerPhotoFileLocation), + [0x9D84F3DB] = typeof(InputStickerSetThumb), + [0xBBA51639] = typeof(InputGroupCallStream), [0x9DB1BC6D] = typeof(PeerUser), [0xBAD0E5BB] = typeof(PeerChat), + [0xBDDDE532] = typeof(PeerChannel), [0xAA963B05] = typeof(Storage_FileUnknown), [0x40BC6F52] = typeof(Storage_FilePartial), [0x007EFE0E] = typeof(Storage_FileJpeg), @@ -92,28 +127,45 @@ namespace TL [0xB3CEA0E4] = typeof(Storage_FileMp4), [0x1081464C] = typeof(Storage_FileWebp), [0x200250BA] = typeof(UserEmpty), + [0x938458C1] = typeof(User), [0x4F11BAE1] = typeof(UserProfilePhotoEmpty), - [0x69D3AB26] = typeof(UserProfilePhoto), + [0x82D1F706] = typeof(UserProfilePhoto), [0x09D05049] = typeof(UserStatusEmpty), [0xEDB93949] = typeof(UserStatusOnline), [0x008C703F] = typeof(UserStatusOffline), + [0xE26F42F1] = typeof(UserStatusRecently), + [0x07BF09FC] = typeof(UserStatusLastWeek), + [0x77EBC742] = typeof(UserStatusLastMonth), [0x9BA2D800] = typeof(ChatEmpty), [0x3BDA1BDE] = typeof(Chat), [0x07328BDB] = typeof(ChatForbidden), - [0x1B7C9DB3] = typeof(ChatFull), + [0xD31A961E] = typeof(Channel), + [0x289DA732] = typeof(ChannelForbidden), + [0x8A1E2983] = typeof(ChatFull), + [0x548C3F93] = typeof(ChannelFull), [0xC8D7493E] = typeof(ChatParticipant), + [0xDA13538A] = typeof(ChatParticipantCreator), + [0xE2D6E436] = typeof(ChatParticipantAdmin), [0xFC900C2B] = typeof(ChatParticipantsForbidden), [0x3F460FED] = typeof(ChatParticipants), [0x37C1011C] = typeof(ChatPhotoEmpty), - [0xD20B9F3C] = typeof(ChatPhoto), - [0x83E5DE54] = typeof(MessageEmpty), - [0x58AE39C9] = typeof(Message), - [0x286FA604] = typeof(MessageService), + [0x1C6E1C11] = typeof(ChatPhoto), + [0x90A6CA84] = typeof(MessageEmpty), + [0xBCE383D2] = typeof(Message), + [0x2B085862] = typeof(MessageService), [0x3DED6320] = typeof(MessageMediaEmpty), [0x695150D7] = typeof(MessageMediaPhoto), [0x56E0D474] = typeof(MessageMediaGeo), [0xCBF24940] = typeof(MessageMediaContact), [0x9F84F49E] = typeof(MessageMediaUnsupported), + [0x9CB070D7] = typeof(MessageMediaDocument), + [0xA32DD600] = typeof(MessageMediaWebPage), + [0x2EC0533F] = typeof(MessageMediaVenue), + [0xFDB19008] = typeof(MessageMediaGame), + [0x84551347] = typeof(MessageMediaInvoice), + [0xB940C666] = typeof(MessageMediaGeoLive), + [0x4BD6E798] = typeof(MessageMediaPoll), + [0x3F7EE58B] = typeof(MessageMediaDice), [0xB6AEF7B0] = typeof(MessageActionEmpty), [0xA6638B9A] = typeof(MessageActionChatCreate), [0xB5A1CE5A] = typeof(MessageActionChatEditTitle), @@ -121,30 +173,61 @@ namespace TL [0x95E3FBEF] = typeof(MessageActionChatDeletePhoto), [0x488A7337] = typeof(MessageActionChatAddUser), [0xB2AE9B0C] = typeof(MessageActionChatDeleteUser), + [0xF89CF5E8] = typeof(MessageActionChatJoinedByLink), + [0x95D2AC92] = typeof(MessageActionChannelCreate), + [0x51BDB021] = typeof(MessageActionChatMigrateTo), + [0xB055EAEE] = typeof(MessageActionChannelMigrateFrom), + [0x94BD38ED] = typeof(MessageActionPinMessage), + [0x9FBAB604] = typeof(MessageActionHistoryClear), + [0x92A72876] = typeof(MessageActionGameScore), + [0x8F31B327] = typeof(MessageActionPaymentSentMe), + [0x40699CD0] = typeof(MessageActionPaymentSent), + [0x80E11A7F] = typeof(MessageActionPhoneCall), + [0x4792929B] = typeof(MessageActionScreenshotTaken), + [0xFAE69F56] = typeof(MessageActionCustomAction), + [0xABE9AFFE] = typeof(MessageActionBotAllowed), + [0x1B287353] = typeof(MessageActionSecureValuesSentMe), + [0xD95C6154] = typeof(MessageActionSecureValuesSent), + [0xF3F25F76] = typeof(MessageActionContactSignUp), + [0x98E0D697] = typeof(MessageActionGeoProximityReached), + [0x7A0D7F42] = typeof(MessageActionGroupCall), + [0x76B9F11A] = typeof(MessageActionInviteToGroupCall), + [0xAA1AFBFD] = typeof(MessageActionSetMessagesTTL), + [0xB3A07661] = typeof(MessageActionGroupCallScheduled), [0x2C171F72] = typeof(Dialog), + [0x71BD134C] = typeof(DialogFolder), [0x2331B22D] = typeof(PhotoEmpty), [0xFB197A65] = typeof(Photo), [0x0E17E23C] = typeof(PhotoSizeEmpty), - [0x77BFB61B] = typeof(PhotoSize), - [0xE9A734FA] = typeof(PhotoCachedSize), + [0x75C78E60] = typeof(PhotoSize), + [0x021E1AD6] = typeof(PhotoCachedSize), + [0xE0B0BC2E] = typeof(PhotoStrippedSize), + [0xFA3EFB95] = typeof(PhotoSizeProgressive), + [0xD8214D41] = typeof(PhotoPathSize), [0x1117DD5F] = typeof(GeoPointEmpty), [0xB2A2F663] = typeof(GeoPoint), [0x5E002502] = typeof(Auth_SentCode), [0xCD050916] = typeof(Auth_Authorization), + [0x44747E9A] = typeof(Auth_AuthorizationSignUpRequired), [0xDF969C2D] = typeof(Auth_ExportedAuthorization), [0xB8BC5B0C] = typeof(InputNotifyPeer), [0x193B4417] = typeof(InputNotifyUsers), [0x4A95E84E] = typeof(InputNotifyChats), + [0xB1DB7C7E] = typeof(InputNotifyBroadcasts), [0x9C3D198E] = typeof(InputPeerNotifySettings), [0xAF509D20] = typeof(PeerNotifySettings), [0x733F2961] = typeof(PeerSettings), [0xA437C3ED] = typeof(WallPaper), + [0xE0804116] = typeof(WallPaperNoFile), [0x58DBCAB8] = typeof(InputReportReasonSpam), [0x1E22C78D] = typeof(InputReportReasonViolence), [0x2E59D922] = typeof(InputReportReasonPornography), [0xADF44EE3] = typeof(InputReportReasonChildAbuse), - [0xE1746D0A] = typeof(InputReportReasonOther), - [0xEDF17C12] = typeof(UserFull), + [0xC1E4A2B1] = typeof(InputReportReasonOther), + [0x9B89F93A] = typeof(InputReportReasonCopyright), + [0xDBD4FEED] = typeof(InputReportReasonGeoIrrelevant), + [0xF5DDD6E7] = typeof(InputReportReasonFake), + [0x139A9A77] = typeof(UserFull), [0xF911C994] = typeof(Contact), [0xD0028438] = typeof(ImportedContact), [0xD3680C61] = typeof(ContactStatus), @@ -155,9 +238,13 @@ namespace TL [0xE1664194] = typeof(Contacts_BlockedSlice), [0x15BA6C40] = typeof(Messages_Dialogs), [0x71E094F3] = typeof(Messages_DialogsSlice), + [0xF0E3E596] = typeof(Messages_DialogsNotModified), [0x8C718E87] = typeof(Messages_Messages), [0x3A54685E] = typeof(Messages_MessagesSlice), + [0x64479808] = typeof(Messages_ChannelMessages), + [0x74535F21] = typeof(Messages_MessagesNotModified), [0x64FF9FD5] = typeof(Messages_Chats), + [0x9CD81144] = typeof(Messages_ChatsSlice), [0xE5D7D19C] = typeof(Messages_ChatFull), [0xB45C69D1] = typeof(Messages_AffectedHistory), [0x57E2F66C] = typeof(InputMessagesFilterEmpty), @@ -167,75 +254,159 @@ namespace TL [0x9EDDF188] = typeof(InputMessagesFilterDocument), [0x7EF0DD87] = typeof(InputMessagesFilterUrl), [0xFFC86587] = typeof(InputMessagesFilterGif), + [0x50F5C392] = typeof(InputMessagesFilterVoice), + [0x3751B49E] = typeof(InputMessagesFilterMusic), + [0x3A20ECB8] = typeof(InputMessagesFilterChatPhotos), + [0x80C99768] = typeof(InputMessagesFilterPhoneCalls), + [0x7A7C17A4] = typeof(InputMessagesFilterRoundVoice), + [0xB549DA53] = typeof(InputMessagesFilterRoundVideo), + [0xC1F8E69A] = typeof(InputMessagesFilterMyMentions), + [0xE7026D0D] = typeof(InputMessagesFilterGeo), + [0xE062DB83] = typeof(InputMessagesFilterContacts), + [0x1BB00451] = typeof(InputMessagesFilterPinned), [0x1F2B0AFD] = typeof(UpdateNewMessage), [0x4E90BFD6] = typeof(UpdateMessageID), [0xA20DB0E5] = typeof(UpdateDeleteMessages), [0x5C486927] = typeof(UpdateUserTyping), - [0x9A65EA1F] = typeof(UpdateChatUserTyping), + [0x86CADB6C] = typeof(UpdateChatUserTyping), [0x07761198] = typeof(UpdateChatParticipants), [0x1BFBD823] = typeof(UpdateUserStatus), [0xA7332B73] = typeof(UpdateUserName), [0x95313B0C] = typeof(UpdateUserPhoto), - [0xA56C2A3E] = typeof(Updates_State), - [0x5D75A138] = typeof(Updates_DifferenceEmpty), - [0x00F49CA0] = typeof(Updates_Difference), - [0xA8FB1981] = typeof(Updates_DifferenceSlice), - [0xE317AF7E] = typeof(UpdatesTooLong), - [0x2296D2C8] = typeof(UpdateShortMessage), - [0x402D5DBB] = typeof(UpdateShortChatMessage), - [0x78D4DEC1] = typeof(UpdateShort), - [0x725B04C3] = typeof(UpdatesCombined), - [0x74AE4240] = typeof(Updates), - [0x8DCA6AA5] = typeof(Photos_Photos), - [0x15051F54] = typeof(Photos_PhotosSlice), - [0x20212CA8] = typeof(Photos_Photo), - [0x096A18D5] = typeof(Upload_File), - [0x18B7A10D] = typeof(DcOption), - [0x330B4067] = typeof(Config), - [0x8E1A1775] = typeof(NearestDc), - [0x1DA7158F] = typeof(Help_AppUpdate), - [0xC45A6536] = typeof(Help_NoAppUpdate), - [0x18CB9F78] = typeof(Help_InviteText), [0x12BCBD9A] = typeof(UpdateNewEncryptedMessage), [0x1710F156] = typeof(UpdateEncryptedChatTyping), [0xB4A2E88D] = typeof(UpdateEncryption), [0x38FE25B7] = typeof(UpdateEncryptedMessagesRead), + [0xEA4B0E5C] = typeof(UpdateChatParticipantAdd), + [0x6E5F8C22] = typeof(UpdateChatParticipantDelete), + [0x8E5E9873] = typeof(UpdateDcOptions), + [0xBEC268EF] = typeof(UpdateNotifySettings), + [0xEBE46819] = typeof(UpdateServiceNotification), + [0xEE3B272A] = typeof(UpdatePrivacy), + [0x12B9417B] = typeof(UpdateUserPhone), + [0x9C974FDF] = typeof(UpdateReadHistoryInbox), + [0x2F2F21BF] = typeof(UpdateReadHistoryOutbox), + [0x7F891213] = typeof(UpdateWebPage), + [0x68C13933] = typeof(UpdateReadMessagesContents), + [0xEB0467FB] = typeof(UpdateChannelTooLong), + [0xB6D45656] = typeof(UpdateChannel), + [0x62BA04D9] = typeof(UpdateNewChannelMessage), + [0x330B5424] = typeof(UpdateReadChannelInbox), + [0xC37521C9] = typeof(UpdateDeleteChannelMessages), + [0x98A12B4B] = typeof(UpdateChannelMessageViews), + [0xB6901959] = typeof(UpdateChatParticipantAdmin), + [0x688A30AA] = typeof(UpdateNewStickerSet), + [0x0BB2D201] = typeof(UpdateStickerSetsOrder), + [0x43AE3DEC] = typeof(UpdateStickerSets), + [0x9375341E] = typeof(UpdateSavedGifs), + [0x3F2038DB] = typeof(UpdateBotInlineQuery), + [0x0E48F964] = typeof(UpdateBotInlineSend), + [0x1B3F4DF7] = typeof(UpdateEditChannelMessage), + [0xE73547E1] = typeof(UpdateBotCallbackQuery), + [0xE40370A3] = typeof(UpdateEditMessage), + [0xF9D27A5A] = typeof(UpdateInlineBotCallbackQuery), + [0x25D6C9C7] = typeof(UpdateReadChannelOutbox), + [0xEE2BB969] = typeof(UpdateDraftMessage), + [0x571D2742] = typeof(UpdateReadFeaturedStickers), + [0x9A422C20] = typeof(UpdateRecentStickers), + [0xA229DD06] = typeof(UpdateConfig), + [0x3354678F] = typeof(UpdatePtsChanged), + [0x40771900] = typeof(UpdateChannelWebPage), + [0x6E6FE51C] = typeof(UpdateDialogPinned), + [0xFA0F3CA2] = typeof(UpdatePinnedDialogs), + [0x8317C0C3] = typeof(UpdateBotWebhookJSON), + [0x9B9240A6] = typeof(UpdateBotWebhookJSONQuery), + [0xE0CDC940] = typeof(UpdateBotShippingQuery), + [0x5D2F3AA9] = typeof(UpdateBotPrecheckoutQuery), + [0xAB0F6B1E] = typeof(UpdatePhoneCall), + [0x46560264] = typeof(UpdateLangPackTooLong), + [0x56022F4D] = typeof(UpdateLangPack), + [0xE511996D] = typeof(UpdateFavedStickers), + [0x89893B45] = typeof(UpdateChannelReadMessagesContents), + [0x7084A7BE] = typeof(UpdateContactsReset), + [0x70DB6837] = typeof(UpdateChannelAvailableMessages), + [0xE16459C3] = typeof(UpdateDialogUnreadMark), + [0xACA1657B] = typeof(UpdateMessagePoll), + [0x54C01850] = typeof(UpdateChatDefaultBannedRights), + [0x19360DC0] = typeof(UpdateFolderPeers), + [0x6A7E7366] = typeof(UpdatePeerSettings), + [0xB4AFCFB0] = typeof(UpdatePeerLocated), + [0x39A51DFB] = typeof(UpdateNewScheduledMessage), + [0x90866CEE] = typeof(UpdateDeleteScheduledMessages), + [0x8216FBA3] = typeof(UpdateTheme), + [0x871FB939] = typeof(UpdateGeoLiveViewed), + [0x564FE691] = typeof(UpdateLoginToken), + [0x37F69F0B] = typeof(UpdateMessagePollVote), + [0x26FFDE7D] = typeof(UpdateDialogFilter), + [0xA5D72105] = typeof(UpdateDialogFilterOrder), + [0x3504914F] = typeof(UpdateDialogFilters), + [0x2661BF09] = typeof(UpdatePhoneCallSignalingData), + [0x6E8A84DF] = typeof(UpdateChannelMessageForwards), + [0x1CC7DE54] = typeof(UpdateReadChannelDiscussionInbox), + [0x4638A26C] = typeof(UpdateReadChannelDiscussionOutbox), + [0x246A4B22] = typeof(UpdatePeerBlocked), + [0x6B171718] = typeof(UpdateChannelUserTyping), + [0xED85EAB5] = typeof(UpdatePinnedMessages), + [0x8588878B] = typeof(UpdatePinnedChannelMessages), + [0x1330A196] = typeof(UpdateChat), + [0xF2EBDB4E] = typeof(UpdateGroupCallParticipants), + [0xA45EB99B] = typeof(UpdateGroupCall), + [0xBB9BB9A5] = typeof(UpdatePeerHistoryTTL), + [0xF3B3781F] = typeof(UpdateChatParticipant), + [0x7FECB1EC] = typeof(UpdateChannelParticipant), + [0x07F9488A] = typeof(UpdateBotStopped), + [0x0B783982] = typeof(UpdateGroupCallConnection), + [0xCF7E0873] = typeof(UpdateBotCommands), + [0xA56C2A3E] = typeof(Updates_State), + [0x5D75A138] = typeof(Updates_DifferenceEmpty), + [0x00F49CA0] = typeof(Updates_Difference), + [0xA8FB1981] = typeof(Updates_DifferenceSlice), + [0x4AFE8F6D] = typeof(Updates_DifferenceTooLong), + [0xE317AF7E] = typeof(UpdatesTooLong), + [0xFAEFF833] = typeof(UpdateShortMessage), + [0x1157B858] = typeof(UpdateShortChatMessage), + [0x78D4DEC1] = typeof(UpdateShort), + [0x725B04C3] = typeof(UpdatesCombined), + [0x74AE4240] = typeof(Updates), + [0x9015E101] = typeof(UpdateShortSentMessage), + [0x8DCA6AA5] = typeof(Photos_Photos), + [0x15051F54] = typeof(Photos_PhotosSlice), + [0x20212CA8] = typeof(Photos_Photo), + [0x096A18D5] = typeof(Upload_File), + [0xF18CDA44] = typeof(Upload_FileCdnRedirect), + [0x18B7A10D] = typeof(DcOption), + [0x330B4067] = typeof(Config), + [0x8E1A1775] = typeof(NearestDc), + [0xCCBBCE30] = typeof(Help_AppUpdate), + [0xC45A6536] = typeof(Help_NoAppUpdate), + [0x18CB9F78] = typeof(Help_InviteText), [0xAB7EC0A0] = typeof(EncryptedChatEmpty), [0x3BF703DC] = typeof(EncryptedChatWaiting), [0x62718A82] = typeof(EncryptedChatRequested), [0xFA56CE36] = typeof(EncryptedChat), - [0x13D6DD27] = typeof(EncryptedChatDiscarded), + [0x1E1C7C45] = typeof(EncryptedChatDiscarded), [0xF141B5E1] = typeof(InputEncryptedChat), [0xC21F497E] = typeof(EncryptedFileEmpty), [0x4A70994C] = typeof(EncryptedFile), [0x1837C364] = typeof(InputEncryptedFileEmpty), [0x64BD0306] = typeof(InputEncryptedFileUploaded), [0x5A17B5E5] = typeof(InputEncryptedFile), - [0xF5235D55] = typeof(InputEncryptedFileLocation), + [0x2DC173C8] = typeof(InputEncryptedFileBigUploaded), [0xED18C118] = typeof(EncryptedMessage), [0x23734B06] = typeof(EncryptedMessageService), [0xC0E24635] = typeof(Messages_DhConfigNotModified), [0x2C221EDD] = typeof(Messages_DhConfig), [0x560F8935] = typeof(Messages_SentEncryptedMessage), [0x9493FF32] = typeof(Messages_SentEncryptedFile), - [0xFA4F0BB5] = typeof(InputFileBig), - [0x2DC173C8] = typeof(InputEncryptedFileBigUploaded), - [0xEA4B0E5C] = typeof(UpdateChatParticipantAdd), - [0x6E5F8C22] = typeof(UpdateChatParticipantDelete), - [0x8E5E9873] = typeof(UpdateDcOptions), - [0x5B38C6C1] = typeof(InputMediaUploadedDocument), - [0x23AB23D2] = typeof(InputMediaDocument), - [0x9CB070D7] = typeof(MessageMediaDocument), [0x72F0EAAE] = typeof(InputDocumentEmpty), [0x1ABFB575] = typeof(InputDocument), - [0xBAD07584] = typeof(InputDocumentFileLocation), [0x36F8C871] = typeof(DocumentEmpty), [0x1E87342B] = typeof(Document), [0x17C6B5F6] = typeof(Help_Support), [0x9FD40BD8] = typeof(NotifyPeer), [0xB4C83B4C] = typeof(NotifyUsers), [0xC007CEC3] = typeof(NotifyChats), - [0xBEC268EF] = typeof(UpdateNotifySettings), + [0xD612E8EF] = typeof(NotifyBroadcasts), [0x16BF744E] = typeof(SendMessageTypingAction), [0xFD5EC8F5] = typeof(SendMessageCancelAction), [0xA187D66F] = typeof(SendMessageRecordVideoAction), @@ -246,78 +417,99 @@ namespace TL [0xAA0CD9E4] = typeof(SendMessageUploadDocumentAction), [0x176F8BA1] = typeof(SendMessageGeoLocationAction), [0x628CBC6F] = typeof(SendMessageChooseContactAction), + [0xDD6A8F48] = typeof(SendMessageGamePlayAction), + [0x88F27FBC] = typeof(SendMessageRecordRoundAction), + [0x243E1C66] = typeof(SendMessageUploadRoundAction), + [0xD92C2285] = typeof(SpeakingInGroupCallAction), + [0xDBDA9246] = typeof(SendMessageHistoryImportAction), [0xB3134D9D] = typeof(Contacts_Found), - [0xEBE46819] = typeof(UpdateServiceNotification), - [0xE26F42F1] = typeof(UserStatusRecently), - [0x07BF09FC] = typeof(UserStatusLastWeek), - [0x77EBC742] = typeof(UserStatusLastMonth), - [0xEE3B272A] = typeof(UpdatePrivacy), [0x4F96CB18] = typeof(InputPrivacyKeyStatusTimestamp), + [0xBDFB0426] = typeof(InputPrivacyKeyChatInvite), + [0xFABADC5F] = typeof(InputPrivacyKeyPhoneCall), + [0xDB9E70D2] = typeof(InputPrivacyKeyPhoneP2P), + [0xA4DD4C08] = typeof(InputPrivacyKeyForwards), + [0x5719BACC] = typeof(InputPrivacyKeyProfilePhoto), + [0x0352DAFA] = typeof(InputPrivacyKeyPhoneNumber), + [0xD1219BDD] = typeof(InputPrivacyKeyAddedByPhone), [0xBC2EAB30] = typeof(PrivacyKeyStatusTimestamp), + [0x500E6DFA] = typeof(PrivacyKeyChatInvite), + [0x3D662B7B] = typeof(PrivacyKeyPhoneCall), + [0x39491CC8] = typeof(PrivacyKeyPhoneP2P), + [0x69EC56A3] = typeof(PrivacyKeyForwards), + [0x96151FED] = typeof(PrivacyKeyProfilePhoto), + [0xD19AE46D] = typeof(PrivacyKeyPhoneNumber), + [0x42FFD42B] = typeof(PrivacyKeyAddedByPhone), [0x0D09E07B] = typeof(InputPrivacyValueAllowContacts), [0x184B35CE] = typeof(InputPrivacyValueAllowAll), [0x131CC67F] = typeof(InputPrivacyValueAllowUsers), [0x0BA52007] = typeof(InputPrivacyValueDisallowContacts), [0xD66B66C9] = typeof(InputPrivacyValueDisallowAll), [0x90110467] = typeof(InputPrivacyValueDisallowUsers), + [0x4C81C1BA] = typeof(InputPrivacyValueAllowChatParticipants), + [0xD82363AF] = typeof(InputPrivacyValueDisallowChatParticipants), [0xFFFE1BAC] = typeof(PrivacyValueAllowContacts), [0x65427B82] = typeof(PrivacyValueAllowAll), [0x4D5BBE0C] = typeof(PrivacyValueAllowUsers), [0xF888FA1A] = typeof(PrivacyValueDisallowContacts), [0x8B73E763] = typeof(PrivacyValueDisallowAll), [0x0C7F49B7] = typeof(PrivacyValueDisallowUsers), + [0x18BE796B] = typeof(PrivacyValueAllowChatParticipants), + [0xACAE0690] = typeof(PrivacyValueDisallowChatParticipants), [0x50A04E45] = typeof(Account_PrivacyRules), [0xB8D0AFDF] = typeof(AccountDaysTTL), - [0x12B9417B] = typeof(UpdateUserPhone), [0x6C37C15C] = typeof(DocumentAttributeImageSize), [0x11B58939] = typeof(DocumentAttributeAnimated), [0x6319D612] = typeof(DocumentAttributeSticker), [0x0EF02CE6] = typeof(DocumentAttributeVideo), [0x9852F9C6] = typeof(DocumentAttributeAudio), [0x15590068] = typeof(DocumentAttributeFilename), + [0x9801D2F7] = typeof(DocumentAttributeHasStickers), [0xF1749A22] = typeof(Messages_StickersNotModified), [0xE4599BBD] = typeof(Messages_Stickers), [0x12B299D4] = typeof(StickerPack), [0xE86602C3] = typeof(Messages_AllStickersNotModified), [0xEDFD405F] = typeof(Messages_AllStickers), - [0x9C974FDF] = typeof(UpdateReadHistoryInbox), - [0x2F2F21BF] = typeof(UpdateReadHistoryOutbox), [0x84D19185] = typeof(Messages_AffectedMessages), - [0x7F891213] = typeof(UpdateWebPage), [0xEB1477E8] = typeof(WebPageEmpty), [0xC586DA1C] = typeof(WebPagePending), [0xE89C45B2] = typeof(WebPage), - [0xA32DD600] = typeof(MessageMediaWebPage), + [0x7311CA11] = typeof(WebPageNotModified), [0xAD01D61D] = typeof(Authorization), [0x1250ABDE] = typeof(Account_Authorizations), - [0xAD2641F8] = typeof(Account_Password), + [0x185B184F] = typeof(Account_Password), [0x9A5C33E5] = typeof(Account_PasswordSettings), [0xC23727C9] = typeof(Account_PasswordInputSettings), [0x137948A5] = typeof(Auth_PasswordRecovery), - [0xC13D1C11] = typeof(InputMediaVenue), - [0x2EC0533F] = typeof(MessageMediaVenue), [0xA384B779] = typeof(ReceivedNotifyMessage), - [0x69DF3769] = typeof(ChatInviteEmpty), - [0xFC2E05BC] = typeof(ChatInviteExported), + [0x6E24FC9D] = typeof(ChatInviteExported), [0x5A686D7C] = typeof(ChatInviteAlready), [0xDFC2F58E] = typeof(ChatInvite), - [0xF89CF5E8] = typeof(MessageActionChatJoinedByLink), - [0x68C13933] = typeof(UpdateReadMessagesContents), + [0x61695CB0] = typeof(ChatInvitePeek), [0xFFB62B95] = typeof(InputStickerSetEmpty), [0x9DE7A269] = typeof(InputStickerSetID), [0x861CC8A0] = typeof(InputStickerSetShortName), - [0xEEB46F27] = typeof(StickerSet), + [0x028703C8] = typeof(InputStickerSetAnimatedEmoji), + [0xE67F520E] = typeof(InputStickerSetDice), + [0xD7DF217A] = typeof(StickerSet), [0xB60A24A6] = typeof(Messages_StickerSet), - [0x938458C1] = typeof(User), [0xC27AC8C7] = typeof(BotCommand), [0x98E81D3A] = typeof(BotInfo), [0xA2FA4880] = typeof(KeyboardButton), + [0x258AFF05] = typeof(KeyboardButtonUrl), + [0x35BBDB6B] = typeof(KeyboardButtonCallback), + [0xB16A6C29] = typeof(KeyboardButtonRequestPhone), + [0xFC796B3F] = typeof(KeyboardButtonRequestGeoLocation), + [0x0568A748] = typeof(KeyboardButtonSwitchInline), + [0x50F41CCF] = typeof(KeyboardButtonGame), + [0xAFD93FBB] = typeof(KeyboardButtonBuy), + [0x10B78D29] = typeof(KeyboardButtonUrlAuth), + [0xD02E7FD4] = typeof(InputKeyboardButtonUrlAuth), + [0xBBC7515D] = typeof(KeyboardButtonRequestPoll), [0x77608B83] = typeof(KeyboardButtonRow), [0xA03E5B85] = typeof(ReplyKeyboardHide), - [0xF4108AA0] = typeof(ReplyKeyboardForceReply), - [0x3502758C] = typeof(ReplyKeyboardMarkup), - [0x7B8E7DE6] = typeof(InputPeerUser), - [0xD8292816] = typeof(InputUser), + [0x86B40B08] = typeof(ReplyKeyboardForceReply), + [0x85DD99D1] = typeof(ReplyKeyboardMarkup), + [0x48A30254] = typeof(ReplyInlineMarkup), [0xBB92BA95] = typeof(MessageEntityUnknown), [0xFA04579D] = typeof(MessageEntityMention), [0x6F635B0D] = typeof(MessageEntityHashtag), @@ -329,24 +521,19 @@ namespace TL [0x28A20571] = typeof(MessageEntityCode), [0x73924BE0] = typeof(MessageEntityPre), [0x76A6D327] = typeof(MessageEntityTextUrl), - [0x11F1331C] = typeof(UpdateShortSentMessage), + [0x352DCA58] = typeof(MessageEntityMentionName), + [0x208E68C9] = typeof(InputMessageEntityMentionName), + [0x9B69E34B] = typeof(MessageEntityPhone), + [0x4C4E743F] = typeof(MessageEntityCashtag), + [0x9C4E7E8B] = typeof(MessageEntityUnderline), + [0xBF0693D4] = typeof(MessageEntityStrike), + [0x020DF5D0] = typeof(MessageEntityBlockquote), + [0x761E6AF4] = typeof(MessageEntityBankCard), [0xEE8C1E86] = typeof(InputChannelEmpty), [0xAFEB712E] = typeof(InputChannel), - [0xBDDDE532] = typeof(PeerChannel), - [0x20ADAEF8] = typeof(InputPeerChannel), - [0xD31A961E] = typeof(Channel), - [0x289DA732] = typeof(ChannelForbidden), + [0x2A286531] = typeof(InputChannelFromMessage), [0x7F077AD9] = typeof(Contacts_ResolvedPeer), - [0xF0E6672A] = typeof(ChannelFull), [0x0AE30253] = typeof(MessageRange), - [0x64479808] = typeof(Messages_ChannelMessages), - [0x95D2AC92] = typeof(MessageActionChannelCreate), - [0xEB0467FB] = typeof(UpdateChannelTooLong), - [0xB6D45656] = typeof(UpdateChannel), - [0x62BA04D9] = typeof(UpdateNewChannelMessage), - [0x330B5424] = typeof(UpdateReadChannelInbox), - [0xC37521C9] = typeof(UpdateDeleteChannelMessages), - [0x98A12B4B] = typeof(UpdateChannelMessageViews), [0x3E11AFFB] = typeof(Updates_ChannelDifferenceEmpty), [0xA4BCC6FE] = typeof(Updates_ChannelDifferenceTooLong), [0x2064674E] = typeof(Updates_ChannelDifference), @@ -355,41 +542,45 @@ namespace TL [0x15EBAC1D] = typeof(ChannelParticipant), [0xA3289A6D] = typeof(ChannelParticipantSelf), [0x447DCA4B] = typeof(ChannelParticipantCreator), + [0xCCBEBBAF] = typeof(ChannelParticipantAdmin), + [0x50A1DFD6] = typeof(ChannelParticipantBanned), + [0x1B03F006] = typeof(ChannelParticipantLeft), [0xDE3F3C79] = typeof(ChannelParticipantsRecent), [0xB4608969] = typeof(ChannelParticipantsAdmins), [0xA3B54985] = typeof(ChannelParticipantsKicked), - [0xF56EE2A8] = typeof(Channels_ChannelParticipants), - [0xD0D9B163] = typeof(Channels_ChannelParticipant), - [0xDA13538A] = typeof(ChatParticipantCreator), - [0xE2D6E436] = typeof(ChatParticipantAdmin), - [0xB6901959] = typeof(UpdateChatParticipantAdmin), - [0x51BDB021] = typeof(MessageActionChatMigrateTo), - [0xB055EAEE] = typeof(MessageActionChannelMigrateFrom), [0xB0D1865B] = typeof(ChannelParticipantsBots), + [0x1427A5E1] = typeof(ChannelParticipantsBanned), + [0x0656AC4B] = typeof(ChannelParticipantsSearch), + [0xBB6AE88D] = typeof(ChannelParticipantsContacts), + [0xE04B5CEB] = typeof(ChannelParticipantsMentions), + [0x9AB0FEAF] = typeof(Channels_ChannelParticipants), + [0xF0173FE9] = typeof(Channels_ChannelParticipantsNotModified), + [0xDFB80317] = typeof(Channels_ChannelParticipant), [0x780A0310] = typeof(Help_TermsOfService), - [0x688A30AA] = typeof(UpdateNewStickerSet), - [0x0BB2D201] = typeof(UpdateStickerSetsOrder), - [0x43AE3DEC] = typeof(UpdateStickerSets), [0xE8025CA2] = typeof(Messages_SavedGifsNotModified), [0x2E0709A5] = typeof(Messages_SavedGifs), - [0x9375341E] = typeof(UpdateSavedGifs), [0x3380C786] = typeof(InputBotInlineMessageMediaAuto), [0x3DCD7A87] = typeof(InputBotInlineMessageText), + [0x96929A85] = typeof(InputBotInlineMessageMediaGeo), + [0x417BBF11] = typeof(InputBotInlineMessageMediaVenue), + [0xA6EDBFFD] = typeof(InputBotInlineMessageMediaContact), + [0x4B425864] = typeof(InputBotInlineMessageGame), + [0xD7E78225] = typeof(InputBotInlineMessageMediaInvoice), [0x88BF9319] = typeof(InputBotInlineResult), + [0xA8D864A7] = typeof(InputBotInlineResultPhoto), + [0xFFF8FDC4] = typeof(InputBotInlineResultDocument), + [0x4FA417F2] = typeof(InputBotInlineResultGame), [0x764CF810] = typeof(BotInlineMessageMediaAuto), [0x8C7F65E2] = typeof(BotInlineMessageText), + [0x051846FD] = typeof(BotInlineMessageMediaGeo), + [0x8A86659C] = typeof(BotInlineMessageMediaVenue), + [0x18D1CDC2] = typeof(BotInlineMessageMediaContact), + [0x354A9B09] = typeof(BotInlineMessageMediaInvoice), [0x11965F3A] = typeof(BotInlineResult), + [0x17DB940B] = typeof(BotInlineMediaResult), [0x947CA848] = typeof(Messages_BotResults), - [0x54826690] = typeof(UpdateBotInlineQuery), - [0x0E48F964] = typeof(UpdateBotInlineSend), - [0x50F5C392] = typeof(InputMessagesFilterVoice), - [0x3751B49E] = typeof(InputMessagesFilterMusic), - [0xBDFB0426] = typeof(InputPrivacyKeyChatInvite), - [0x500E6DFA] = typeof(PrivacyKeyChatInvite), [0x5DAB1AF4] = typeof(ExportedMessageLink), [0x5F777DCE] = typeof(MessageFwdHeader), - [0x1B3F4DF7] = typeof(UpdateEditChannelMessage), - [0x94BD38ED] = typeof(MessageActionPinMessage), [0x72A3158C] = typeof(Auth_CodeTypeSms), [0x741CD3E3] = typeof(Auth_CodeTypeCall), [0x226CCEFB] = typeof(Auth_CodeTypeFlashCall), @@ -397,27 +588,9 @@ namespace TL [0xC000BBA2] = typeof(Auth_SentCodeTypeSms), [0x5353E5A7] = typeof(Auth_SentCodeTypeCall), [0xAB03C6D9] = typeof(Auth_SentCodeTypeFlashCall), - [0x258AFF05] = typeof(KeyboardButtonUrl), - [0x35BBDB6B] = typeof(KeyboardButtonCallback), - [0xB16A6C29] = typeof(KeyboardButtonRequestPhone), - [0xFC796B3F] = typeof(KeyboardButtonRequestGeoLocation), - [0x0568A748] = typeof(KeyboardButtonSwitchInline), - [0x48A30254] = typeof(ReplyInlineMarkup), [0x36585EA4] = typeof(Messages_BotCallbackAnswer), - [0xE73547E1] = typeof(UpdateBotCallbackQuery), [0x26B5DDE6] = typeof(Messages_MessageEditData), - [0xE40370A3] = typeof(UpdateEditMessage), - [0x96929A85] = typeof(InputBotInlineMessageMediaGeo), - [0x417BBF11] = typeof(InputBotInlineMessageMediaVenue), - [0xA6EDBFFD] = typeof(InputBotInlineMessageMediaContact), - [0x051846FD] = typeof(BotInlineMessageMediaGeo), - [0x8A86659C] = typeof(BotInlineMessageMediaVenue), - [0x18D1CDC2] = typeof(BotInlineMessageMediaContact), - [0xA8D864A7] = typeof(InputBotInlineResultPhoto), - [0xFFF8FDC4] = typeof(InputBotInlineResultDocument), - [0x17DB940B] = typeof(BotInlineMediaResult), [0x890C3D89] = typeof(InputBotInlineMessageID), - [0xF9D27A5A] = typeof(UpdateInlineBotCallbackQuery), [0x3C20629F] = typeof(InlineBotSwitchPM), [0x3371C354] = typeof(Messages_PeerDialogs), [0xEDCDC05B] = typeof(TopPeer), @@ -426,50 +599,32 @@ namespace TL [0x0637B7ED] = typeof(TopPeerCategoryCorrespondents), [0xBD17A14A] = typeof(TopPeerCategoryGroups), [0x161D9628] = typeof(TopPeerCategoryChannels), + [0x1E76A78C] = typeof(TopPeerCategoryPhoneCalls), + [0xA8406CA9] = typeof(TopPeerCategoryForwardUsers), + [0xFBEEC0F0] = typeof(TopPeerCategoryForwardChats), [0xFB834291] = typeof(TopPeerCategoryPeers), [0xDE266EF5] = typeof(Contacts_TopPeersNotModified), [0x70B772A8] = typeof(Contacts_TopPeers), - [0x352DCA58] = typeof(MessageEntityMentionName), - [0x208E68C9] = typeof(InputMessageEntityMentionName), - [0x3A20ECB8] = typeof(InputMessagesFilterChatPhotos), - [0x25D6C9C7] = typeof(UpdateReadChannelOutbox), - [0xEE2BB969] = typeof(UpdateDraftMessage), + [0xB52C939D] = typeof(Contacts_TopPeersDisabled), [0x1B0C841A] = typeof(DraftMessageEmpty), [0xFD8E711F] = typeof(DraftMessage), - [0x9FBAB604] = typeof(MessageActionHistoryClear), [0xC6DC0C66] = typeof(Messages_FeaturedStickersNotModified), [0xB6ABC341] = typeof(Messages_FeaturedStickers), - [0x571D2742] = typeof(UpdateReadFeaturedStickers), [0x0B17F890] = typeof(Messages_RecentStickersNotModified), [0x22F3AFB3] = typeof(Messages_RecentStickers), - [0x9A422C20] = typeof(UpdateRecentStickers), [0x4FCBA9C8] = typeof(Messages_ArchivedStickers), [0x38641628] = typeof(Messages_StickerSetInstallResultSuccess), [0x35E410A8] = typeof(Messages_StickerSetInstallResultArchive), [0x6410A5D2] = typeof(StickerSetCovered), - [0xA229DD06] = typeof(UpdateConfig), - [0x3354678F] = typeof(UpdatePtsChanged), - [0xE5BBFE1A] = typeof(InputMediaPhotoExternal), - [0xFB52DC99] = typeof(InputMediaDocumentExternal), [0x3407E51B] = typeof(StickerSetMultiCovered), [0xAED6DBB2] = typeof(MaskCoords), - [0x9801D2F7] = typeof(DocumentAttributeHasStickers), [0x4A992157] = typeof(InputStickeredMediaPhoto), [0x0438865B] = typeof(InputStickeredMediaDocument), [0xBDF9653B] = typeof(Game), - [0x4FA417F2] = typeof(InputBotInlineResultGame), - [0x4B425864] = typeof(InputBotInlineMessageGame), - [0xFDB19008] = typeof(MessageMediaGame), - [0xD33F43F3] = typeof(InputMediaGame), [0x032C3E77] = typeof(InputGameID), [0xC331E80A] = typeof(InputGameShortName), - [0x50F41CCF] = typeof(KeyboardButtonGame), - [0x92A72876] = typeof(MessageActionGameScore), [0x58FFFCD0] = typeof(HighScore), [0x9A3BFD99] = typeof(Messages_HighScores), - [0x4AFE8F6D] = typeof(Updates_DifferenceTooLong), - [0x40771900] = typeof(UpdateChannelWebPage), - [0x9CD81144] = typeof(Messages_ChatsSlice), [0xDC3D824F] = typeof(TextEmpty), [0x744694E0] = typeof(TextPlain), [0x6724ABC4] = typeof(TextBold), @@ -480,6 +635,12 @@ namespace TL [0x3C2884C1] = typeof(TextUrl), [0xDE5A0DD6] = typeof(TextEmail), [0x7E6260D7] = typeof(TextConcat), + [0xED6A8504] = typeof(TextSubscript), + [0xC7FB5E01] = typeof(TextSuperscript), + [0x034B8621] = typeof(TextMarked), + [0x1CCB966A] = typeof(TextPhone), + [0x081CCF4F] = typeof(TextImage), + [0x35553762] = typeof(TextAnchor), [0x13567E8A] = typeof(PageBlockUnsupported), [0x70ABC3FD] = typeof(PageBlockTitle), [0x8FFA9A1F] = typeof(PageBlockSubtitle), @@ -501,47 +662,44 @@ namespace TL [0xF259A80B] = typeof(PageBlockEmbedPost), [0x65A0FA4D] = typeof(PageBlockCollage), [0x031F9590] = typeof(PageBlockSlideshow), - [0x7311CA11] = typeof(WebPageNotModified), - [0xFABADC5F] = typeof(InputPrivacyKeyPhoneCall), - [0x3D662B7B] = typeof(PrivacyKeyPhoneCall), - [0xDD6A8F48] = typeof(SendMessageGamePlayAction), + [0xEF1751B5] = typeof(PageBlockChannel), + [0x804361EA] = typeof(PageBlockAudio), + [0x1E148390] = typeof(PageBlockKicker), + [0xBF4DEA82] = typeof(PageBlockTable), + [0x9A8AE1E1] = typeof(PageBlockOrderedList), + [0x76768BED] = typeof(PageBlockDetails), + [0x16115A96] = typeof(PageBlockRelatedArticles), + [0xA44F3EF6] = typeof(PageBlockMap), [0x85E42301] = typeof(PhoneCallDiscardReasonMissed), [0xE095C1A0] = typeof(PhoneCallDiscardReasonDisconnect), [0x57ADC690] = typeof(PhoneCallDiscardReasonHangup), [0xFAF7E8C9] = typeof(PhoneCallDiscardReasonBusy), - [0x6E6FE51C] = typeof(UpdateDialogPinned), - [0xFA0F3CA2] = typeof(UpdatePinnedDialogs), [0x7D748D04] = typeof(DataJSON), - [0x8317C0C3] = typeof(UpdateBotWebhookJSON), - [0x9B9240A6] = typeof(UpdateBotWebhookJSONQuery), [0xCB296BF8] = typeof(LabeledPrice), - [0xC30AA358] = typeof(Invoice), - [0xF4E096C3] = typeof(InputMediaInvoice), + [0x0CD886E0] = typeof(Invoice), [0xEA02C27E] = typeof(PaymentCharge), - [0x8F31B327] = typeof(MessageActionPaymentSentMe), - [0x84551347] = typeof(MessageMediaInvoice), [0x1E8CAAEB] = typeof(PostAddress), [0x909C3F94] = typeof(PaymentRequestedInfo), - [0xAFD93FBB] = typeof(KeyboardButtonBuy), - [0x40699CD0] = typeof(MessageActionPaymentSent), [0xCDC27A1F] = typeof(PaymentSavedCredentialsCard), [0x1C570ED1] = typeof(WebDocument), + [0xF9C8BCC6] = typeof(WebDocumentNoProxy), [0x9BED434D] = typeof(InputWebDocument), [0xC239D686] = typeof(InputWebFileLocation), + [0x9F2221C9] = typeof(InputWebFileGeoPointLocation), [0x21E753BC] = typeof(Upload_WebFile), - [0x3F56AEA3] = typeof(Payments_PaymentForm), + [0x8D0B2415] = typeof(Payments_PaymentForm), [0xD1451883] = typeof(Payments_ValidatedRequestedInfo), [0x4E5F810D] = typeof(Payments_PaymentResult), - [0x500911E1] = typeof(Payments_PaymentReceipt), + [0xD8411139] = typeof(Payments_PaymentVerificationNeeded), + [0x10B555D0] = typeof(Payments_PaymentReceipt), [0xFB8FE43C] = typeof(Payments_SavedInfo), [0xC10EB2CF] = typeof(InputPaymentCredentialsSaved), [0x3417D728] = typeof(InputPaymentCredentials), + [0x0AA1C39F] = typeof(InputPaymentCredentialsApplePay), + [0x8AC32801] = typeof(InputPaymentCredentialsGooglePay), [0xDB64FD34] = typeof(Account_TmpPassword), [0xB6213CDF] = typeof(ShippingOption), - [0xE0CDC940] = typeof(UpdateBotShippingQuery), - [0x5D2F3AA9] = typeof(UpdateBotPrecheckoutQuery), [0xFFA0A496] = typeof(InputStickerSetItem), - [0xAB0F6B1E] = typeof(UpdatePhoneCall), [0x1E36FDED] = typeof(InputPhoneCall), [0x5366C915] = typeof(PhoneCallEmpty), [0x1B8F4AD1] = typeof(PhoneCallWaiting), @@ -550,31 +708,18 @@ namespace TL [0x8742AE7F] = typeof(PhoneCall), [0x50CA4DE1] = typeof(PhoneCallDiscarded), [0x9D4C17C0] = typeof(PhoneConnection), + [0x635FE375] = typeof(PhoneConnectionWebrtc), [0xFC878FC8] = typeof(PhoneCallProtocol), [0xEC82E140] = typeof(Phone_PhoneCall), - [0x80C99768] = typeof(InputMessagesFilterPhoneCalls), - [0x80E11A7F] = typeof(MessageActionPhoneCall), - [0x7A7C17A4] = typeof(InputMessagesFilterRoundVoice), - [0xB549DA53] = typeof(InputMessagesFilterRoundVideo), - [0x88F27FBC] = typeof(SendMessageRecordRoundAction), - [0x243E1C66] = typeof(SendMessageUploadRoundAction), - [0xF18CDA44] = typeof(Upload_FileCdnRedirect), [0xEEA8E46E] = typeof(Upload_CdnFileReuploadNeeded), [0xA99FCA4F] = typeof(Upload_CdnFile), [0xC982EABA] = typeof(CdnPublicKey), [0x5725E40A] = typeof(CdnConfig), - [0xEF1751B5] = typeof(PageBlockChannel), [0xCAD181F6] = typeof(LangPackString), [0x6C47AC9F] = typeof(LangPackStringPluralized), [0x2979EEB2] = typeof(LangPackStringDeleted), [0xF385C1F6] = typeof(LangPackDifference), [0xEECA5CE3] = typeof(LangPackLanguage), - [0x46560264] = typeof(UpdateLangPackTooLong), - [0x56022F4D] = typeof(UpdateLangPack), - [0xCCBEBBAF] = typeof(ChannelParticipantAdmin), - [0x1C0FACAF] = typeof(ChannelParticipantBanned), - [0x1427A5E1] = typeof(ChannelParticipantsBanned), - [0x0656AC4B] = typeof(ChannelParticipantsSearch), [0xE6DFB825] = typeof(ChannelAdminLogEventActionChangeTitle), [0x55188A2E] = typeof(ChannelAdminLogEventActionChangeAbout), [0x6A4AFC38] = typeof(ChannelAdminLogEventActionChangeUsername), @@ -589,58 +734,55 @@ namespace TL [0xE31C34D8] = typeof(ChannelAdminLogEventActionParticipantInvite), [0xE6D83D7E] = typeof(ChannelAdminLogEventActionParticipantToggleBan), [0xD5676710] = typeof(ChannelAdminLogEventActionParticipantToggleAdmin), + [0xB1C3CAA7] = typeof(ChannelAdminLogEventActionChangeStickerSet), + [0x5F5C95F1] = typeof(ChannelAdminLogEventActionTogglePreHistoryHidden), + [0x2DF5FC0A] = typeof(ChannelAdminLogEventActionDefaultBannedRights), + [0x8F079643] = typeof(ChannelAdminLogEventActionStopPoll), + [0xA26F881B] = typeof(ChannelAdminLogEventActionChangeLinkedChat), + [0x0E6B76AE] = typeof(ChannelAdminLogEventActionChangeLocation), + [0x53909779] = typeof(ChannelAdminLogEventActionToggleSlowMode), + [0x23209745] = typeof(ChannelAdminLogEventActionStartGroupCall), + [0xDB9F9140] = typeof(ChannelAdminLogEventActionDiscardGroupCall), + [0xF92424D2] = typeof(ChannelAdminLogEventActionParticipantMute), + [0xE64429C0] = typeof(ChannelAdminLogEventActionParticipantUnmute), + [0x56D6A247] = typeof(ChannelAdminLogEventActionToggleGroupCallSetting), + [0x5CDADA77] = typeof(ChannelAdminLogEventActionParticipantJoinByInvite), + [0x5A50FCA4] = typeof(ChannelAdminLogEventActionExportedInviteDelete), + [0x410A134E] = typeof(ChannelAdminLogEventActionExportedInviteRevoke), + [0xE90EBB59] = typeof(ChannelAdminLogEventActionExportedInviteEdit), + [0x3E7F6847] = typeof(ChannelAdminLogEventActionParticipantVolume), + [0x6E941A38] = typeof(ChannelAdminLogEventActionChangeHistoryTTL), [0x3B5A3E40] = typeof(ChannelAdminLogEvent), [0xED8AF74D] = typeof(Channels_AdminLogResults), [0xEA107AE4] = typeof(ChannelAdminLogEventsFilter), - [0x1E76A78C] = typeof(TopPeerCategoryPhoneCalls), - [0x804361EA] = typeof(PageBlockAudio), [0x5CE14175] = typeof(PopularContact), - [0x4792929B] = typeof(MessageActionScreenshotTaken), [0x9E8FA6D3] = typeof(Messages_FavedStickersNotModified), [0xF37F2F16] = typeof(Messages_FavedStickers), - [0xE511996D] = typeof(UpdateFavedStickers), - [0x89893B45] = typeof(UpdateChannelReadMessagesContents), - [0xC1F8E69A] = typeof(InputMessagesFilterMyMentions), - [0x7084A7BE] = typeof(UpdateContactsReset), - [0xB1C3CAA7] = typeof(ChannelAdminLogEventActionChangeStickerSet), - [0xFAE69F56] = typeof(MessageActionCustomAction), - [0x0AA1C39F] = typeof(InputPaymentCredentialsApplePay), - [0xCA05D50E] = typeof(InputPaymentCredentialsAndroidPay), - [0xE7026D0D] = typeof(InputMessagesFilterGeo), - [0xE062DB83] = typeof(InputMessagesFilterContacts), - [0x70DB6837] = typeof(UpdateChannelAvailableMessages), - [0x5F5C95F1] = typeof(ChannelAdminLogEventActionTogglePreHistoryHidden), - [0x971FA843] = typeof(InputMediaGeoLive), - [0xB940C666] = typeof(MessageMediaGeoLive), [0x46E1D13D] = typeof(RecentMeUrlUnknown), [0x8DBC3336] = typeof(RecentMeUrlUser), [0xA01B22F9] = typeof(RecentMeUrlChat), [0xEB49081D] = typeof(RecentMeUrlChatInvite), [0xBC0A57DC] = typeof(RecentMeUrlStickerSet), [0x0E0310D7] = typeof(Help_RecentMeUrls), - [0xF0173FE9] = typeof(Channels_ChannelParticipantsNotModified), - [0x74535F21] = typeof(Messages_MessagesNotModified), [0x1CC6E91F] = typeof(InputSingleMedia), [0xCAC943F2] = typeof(WebAuthorization), [0xED56C9FC] = typeof(Account_WebAuthorizations), [0xA676A322] = typeof(InputMessageID), [0xBAD88395] = typeof(InputMessageReplyTo), [0x86872538] = typeof(InputMessagePinned), - [0x9B69E34B] = typeof(MessageEntityPhone), - [0x4C4E743F] = typeof(MessageEntityCashtag), - [0xABE9AFFE] = typeof(MessageActionBotAllowed), + [0xACFA1A7E] = typeof(InputMessageCallbackQuery), [0xFCAAFEB7] = typeof(InputDialogPeer), + [0x64600527] = typeof(InputDialogPeerFolder), [0xE56DBF05] = typeof(DialogPeer), + [0x514519E2] = typeof(DialogPeerFolder), [0x0D54B65D] = typeof(Messages_FoundStickerSetsNotModified), [0x5108D648] = typeof(Messages_FoundStickerSets), [0x6242C773] = typeof(FileHash), - [0xF9C8BCC6] = typeof(WebDocumentNoProxy), [0x75588B3F] = typeof(InputClientProxy), [0xE3309F7F] = typeof(Help_TermsOfServiceUpdateEmpty), [0x28ECF961] = typeof(Help_TermsOfServiceUpdate), [0x3334B0F0] = typeof(InputSecureFileUploaded), [0x5367E5BE] = typeof(InputSecureFile), - [0xCBC7EE28] = typeof(InputSecureFileLocation), [0x64199744] = typeof(SecureFileEmpty), [0xE0277A62] = typeof(SecureFile), [0x8AEABEC3] = typeof(SecureData), @@ -668,32 +810,24 @@ namespace TL [0xE537CED6] = typeof(SecureValueErrorSelfie), [0x7A700873] = typeof(SecureValueErrorFile), [0x666220E9] = typeof(SecureValueErrorFiles), + [0x869D758F] = typeof(SecureValueError), + [0xA1144770] = typeof(SecureValueErrorTranslationFile), + [0x34636DD8] = typeof(SecureValueErrorTranslationFiles), [0x33F0EA47] = typeof(SecureCredentialsEncrypted), [0xAD2E1CD8] = typeof(Account_AuthorizationForm), [0x811F854F] = typeof(Account_SentEmailCode), - [0x1B287353] = typeof(MessageActionSecureValuesSentMe), - [0xD95C6154] = typeof(MessageActionSecureValuesSent), [0x66AFA166] = typeof(Help_DeepLinkInfoEmpty), [0x6A4EE832] = typeof(Help_DeepLinkInfo), [0x1142BD56] = typeof(SavedPhoneContact), [0x4DBA4501] = typeof(Account_Takeout), - [0x29BE5899] = typeof(InputTakeoutFileLocation), - [0xE16459C3] = typeof(UpdateDialogUnreadMark), - [0xF0E3E596] = typeof(Messages_DialogsNotModified), - [0x9F2221C9] = typeof(InputWebFileGeoPointLocation), - [0xB52C939D] = typeof(Contacts_TopPeersDisabled), - [0x9B89F93A] = typeof(InputReportReasonCopyright), [0xD45AB096] = typeof(PasswordKdfAlgoUnknown), + [0x3A912D4A] = typeof(PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow), [0x004A8537] = typeof(SecurePasswordKdfAlgoUnknown), [0xBBF2DDA0] = typeof(SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000), [0x86471D92] = typeof(SecurePasswordKdfAlgoSHA512), [0x1527BCAC] = typeof(SecureSecretSettings), - [0x3A912D4A] = typeof(PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow), [0x9880F658] = typeof(InputCheckPasswordEmpty), [0xD27FF082] = typeof(InputCheckPasswordSRP), - [0x869D758F] = typeof(SecureValueError), - [0xA1144770] = typeof(SecureValueErrorTranslationFile), - [0x34636DD8] = typeof(SecureValueErrorTranslationFiles), [0x829D99DA] = typeof(SecureRequiredType), [0x027477B4] = typeof(SecureRequiredTypeOneOf), [0xBFB9F457] = typeof(Help_PassportConfigNotModified), @@ -706,57 +840,33 @@ namespace TL [0xB71E767A] = typeof(JsonString), [0xF7444763] = typeof(JsonArray), [0x99C1D49D] = typeof(JsonObject), - [0xB1DB7C7E] = typeof(InputNotifyBroadcasts), - [0xD612E8EF] = typeof(NotifyBroadcasts), - [0xED6A8504] = typeof(TextSubscript), - [0xC7FB5E01] = typeof(TextSuperscript), - [0x034B8621] = typeof(TextMarked), - [0x1CCB966A] = typeof(TextPhone), - [0x081CCF4F] = typeof(TextImage), - [0x1E148390] = typeof(PageBlockKicker), [0x34566B6A] = typeof(PageTableCell), [0xE0C0C5E5] = typeof(PageTableRow), - [0xBF4DEA82] = typeof(PageBlockTable), [0x6F747657] = typeof(PageCaption), [0xB92FB6CD] = typeof(PageListItemText), [0x25E073FC] = typeof(PageListItemBlocks), [0x5E068047] = typeof(PageListOrderedItemText), [0x98DD8936] = typeof(PageListOrderedItemBlocks), - [0x9A8AE1E1] = typeof(PageBlockOrderedList), - [0x76768BED] = typeof(PageBlockDetails), [0xB390DC08] = typeof(PageRelatedArticle), - [0x16115A96] = typeof(PageBlockRelatedArticles), - [0xA44F3EF6] = typeof(PageBlockMap), [0x98657F0D] = typeof(Page), - [0xDB9E70D2] = typeof(InputPrivacyKeyPhoneP2P), - [0x39491CC8] = typeof(PrivacyKeyPhoneP2P), - [0x35553762] = typeof(TextAnchor), [0x8C05F1C9] = typeof(Help_SupportName), [0xF3AE2EED] = typeof(Help_UserInfoEmpty), [0x01EB3758] = typeof(Help_UserInfo), - [0xF3F25F76] = typeof(MessageActionContactSignUp), - [0xACA1657B] = typeof(UpdateMessagePoll), [0x6CA9C2E9] = typeof(PollAnswer), [0x86E18161] = typeof(Poll), [0x3B6DDAD2] = typeof(PollAnswerVoters), [0xBADCC1A3] = typeof(PollResults), - [0x0F94E5F1] = typeof(InputMediaPoll), - [0x4BD6E798] = typeof(MessageMediaPoll), [0xF041E250] = typeof(ChatOnlines), [0x47A971E0] = typeof(StatsURL), - [0xE0B0BC2E] = typeof(PhotoStrippedSize), [0x5FB224D5] = typeof(ChatAdminRights), [0x9F120418] = typeof(ChatBannedRights), - [0x54C01850] = typeof(UpdateChatDefaultBannedRights), [0xE630B979] = typeof(InputWallPaper), [0x72091C80] = typeof(InputWallPaperSlug), - [0xBB6AE88D] = typeof(ChannelParticipantsContacts), - [0x2DF5FC0A] = typeof(ChannelAdminLogEventActionDefaultBannedRights), - [0x8F079643] = typeof(ChannelAdminLogEventActionStopPoll), + [0x967A462E] = typeof(InputWallPaperNoFile), [0x1C199183] = typeof(Account_WallPapersNotModified), [0x702B65A9] = typeof(Account_WallPapers), [0xDEBEBE83] = typeof(CodeSettings), - [0x05086CF8] = typeof(WallPaperSettings), + [0x1DC1BCA4] = typeof(WallPaperSettings), [0xE04232F3] = typeof(AutoDownloadSettings), [0x63CACF26] = typeof(Account_AutoDownloadSettings), [0xD5B3B9F9] = typeof(EmojiKeyword), @@ -764,68 +874,23 @@ namespace TL [0x5CC761BD] = typeof(EmojiKeywordsDifference), [0xA575739D] = typeof(EmojiURL), [0xB3FB5361] = typeof(EmojiLanguage), - [0xA4DD4C08] = typeof(InputPrivacyKeyForwards), - [0x69EC56A3] = typeof(PrivacyKeyForwards), - [0x5719BACC] = typeof(InputPrivacyKeyProfilePhoto), - [0x96151FED] = typeof(PrivacyKeyProfilePhoto), - [0xBC7FC6CD] = typeof(FileLocationToBeDeprecated), - [0x40181FFE] = typeof(InputPhotoFileLocation), - [0xD83466F3] = typeof(InputPhotoLegacyFileLocation), - [0x27D69997] = typeof(InputPeerPhotoFileLocation), - [0x0DBAEAE9] = typeof(InputStickerSetThumb), [0xFF544E65] = typeof(Folder), - [0x71BD134C] = typeof(DialogFolder), - [0x64600527] = typeof(InputDialogPeerFolder), - [0x514519E2] = typeof(DialogPeerFolder), [0xFBD2C296] = typeof(InputFolderPeer), [0xE9BAA668] = typeof(FolderPeer), - [0x19360DC0] = typeof(UpdateFolderPeers), - [0x2D117597] = typeof(InputUserFromMessage), - [0x2A286531] = typeof(InputChannelFromMessage), - [0x17BAE2E6] = typeof(InputPeerUserFromMessage), - [0x9C95F7BB] = typeof(InputPeerChannelFromMessage), - [0x0352DAFA] = typeof(InputPrivacyKeyPhoneNumber), - [0xD19AE46D] = typeof(PrivacyKeyPhoneNumber), - [0xA8406CA9] = typeof(TopPeerCategoryForwardUsers), - [0xFBEEC0F0] = typeof(TopPeerCategoryForwardChats), - [0xA26F881B] = typeof(ChannelAdminLogEventActionChangeLinkedChat), [0xE844EBFF] = typeof(Messages_SearchCounter), - [0x10B78D29] = typeof(KeyboardButtonUrlAuth), - [0xD02E7FD4] = typeof(InputKeyboardButtonUrlAuth), [0x92D33A0E] = typeof(UrlAuthResultRequest), [0x8F8C0E4E] = typeof(UrlAuthResultAccepted), [0xA9D6DB1F] = typeof(UrlAuthResultDefault), - [0x4C81C1BA] = typeof(InputPrivacyValueAllowChatParticipants), - [0xD82363AF] = typeof(InputPrivacyValueDisallowChatParticipants), - [0x18BE796B] = typeof(PrivacyValueAllowChatParticipants), - [0xACAE0690] = typeof(PrivacyValueDisallowChatParticipants), - [0x9C4E7E8B] = typeof(MessageEntityUnderline), - [0xBF0693D4] = typeof(MessageEntityStrike), - [0x020DF5D0] = typeof(MessageEntityBlockquote), - [0x6A7E7366] = typeof(UpdatePeerSettings), [0xBFB5AD8B] = typeof(ChannelLocationEmpty), [0x209B82DB] = typeof(ChannelLocation), [0xCA461B5D] = typeof(PeerLocated), - [0xB4AFCFB0] = typeof(UpdatePeerLocated), - [0x0E6B76AE] = typeof(ChannelAdminLogEventActionChangeLocation), - [0xDBD4FEED] = typeof(InputReportReasonGeoIrrelevant), - [0x53909779] = typeof(ChannelAdminLogEventActionToggleSlowMode), - [0x44747E9A] = typeof(Auth_AuthorizationSignUpRequired), - [0xD8411139] = typeof(Payments_PaymentVerificationNeeded), - [0x028703C8] = typeof(InputStickerSetAnimatedEmoji), - [0x39A51DFB] = typeof(UpdateNewScheduledMessage), - [0x90866CEE] = typeof(UpdateDeleteScheduledMessages), + [0xF8EC284B] = typeof(PeerSelfLocated), [0xD072ACB4] = typeof(RestrictionReason), [0x3C5693E9] = typeof(InputTheme), [0xF5890DF1] = typeof(InputThemeSlug), [0x028F1114] = typeof(Theme), [0xF41EB622] = typeof(Account_ThemesNotModified), [0x7F676421] = typeof(Account_Themes), - [0x8216FBA3] = typeof(UpdateTheme), - [0xD1219BDD] = typeof(InputPrivacyKeyAddedByPhone), - [0x42FFD42B] = typeof(PrivacyKeyAddedByPhone), - [0x871FB939] = typeof(UpdateGeoLiveViewed), - [0x564FE691] = typeof(UpdateLoginToken), [0x629F1980] = typeof(Auth_LoginToken), [0x068E9916] = typeof(Auth_LoginTokenMigrateTo), [0x390D5C5E] = typeof(Auth_LoginTokenSuccess), @@ -836,26 +901,17 @@ namespace TL [0xB7B31EA8] = typeof(BaseThemeNight), [0x6D5F77EE] = typeof(BaseThemeTinted), [0x5B11125A] = typeof(BaseThemeArctic), - [0x8427BBAC] = typeof(InputWallPaperNoFile), - [0x8AF40B25] = typeof(WallPaperNoFile), [0xBD507CD1] = typeof(InputThemeSettings), [0x9C14984A] = typeof(ThemeSettings), [0x54B56617] = typeof(WebPageAttributeTheme), - [0x42F88F2C] = typeof(UpdateMessagePollVote), [0xA28E5559] = typeof(MessageUserVote), [0x36377430] = typeof(MessageUserVoteInputOption), [0x0E8FE0DE] = typeof(MessageUserVoteMultiple), [0x0823F649] = typeof(Messages_VotesList), - [0xBBC7515D] = typeof(KeyboardButtonRequestPoll), - [0x761E6AF4] = typeof(MessageEntityBankCard), [0xF568028A] = typeof(BankCardOpenUrl), [0x3E24E573] = typeof(Payments_BankCardData), - [0xF8EC284B] = typeof(PeerSelfLocated), [0x7438F7E8] = typeof(DialogFilter), [0x77744D4A] = typeof(DialogFilterSuggested), - [0x26FFDE7D] = typeof(UpdateDialogFilter), - [0xA5D72105] = typeof(UpdateDialogFilterOrder), - [0x3504914F] = typeof(UpdateDialogFilters), [0xB637EDAF] = typeof(StatsDateRangeDays), [0xCB43ACDE] = typeof(StatsAbsValueAndPrev), [0xCBCE2FE0] = typeof(StatsPercentValue), @@ -864,45 +920,62 @@ namespace TL [0x8EA464B6] = typeof(StatsGraph), [0xAD4FC9BD] = typeof(MessageInteractionCounters), [0xBDF78394] = typeof(Stats_BroadcastStats), - [0xE66FBF7B] = typeof(InputMediaDice), - [0x3F7EE58B] = typeof(MessageMediaDice), - [0xE67F520E] = typeof(InputStickerSetDice), [0x98F6AC75] = typeof(Help_PromoDataEmpty), [0x8C39793F] = typeof(Help_PromoData), - [0xE831C556] = typeof(VideoSize), - [0x2661BF09] = typeof(UpdatePhoneCallSignalingData), - [0x61695CB0] = typeof(ChatInvitePeek), + [0xDE33B094] = typeof(VideoSize), [0x18F3D0F7] = typeof(StatsGroupTopPoster), [0x6014F412] = typeof(StatsGroupTopAdmin), [0x31962A4C] = typeof(StatsGroupTopInviter), [0xEF7FF916] = typeof(Stats_MegagroupStats), [0xBEA2F424] = typeof(GlobalPrivacySettings), - [0x635FE375] = typeof(PhoneConnectionWebrtc), [0x4203C5EF] = typeof(Help_CountryCode), [0xC3878E23] = typeof(Help_Country), [0x93CC1F32] = typeof(Help_CountriesListNotModified), [0x87D0759E] = typeof(Help_CountriesList), [0x455B853D] = typeof(MessageViews), - [0x6E8A84DF] = typeof(UpdateChannelMessageForwards), - [0x5AA86A51] = typeof(PhotoSizeProgressive), [0xB6C4F543] = typeof(Messages_MessageViews), - [0x1CC7DE54] = typeof(UpdateReadChannelDiscussionInbox), - [0x4638A26C] = typeof(UpdateReadChannelDiscussionOutbox), [0xF5DD8F9D] = typeof(Messages_DiscussionMessage), [0xA6D57763] = typeof(MessageReplyHeader), [0x4128FAAC] = typeof(MessageReplies), - [0x246A4B22] = typeof(UpdatePeerBlocked), [0xE8FD8014] = typeof(PeerBlocked), - [0xFF2ABE9F] = typeof(UpdateChannelUserTyping), - [0xACFA1A7E] = typeof(InputMessageCallbackQuery), - [0xC3C6796B] = typeof(ChannelParticipantLeft), - [0xE04B5CEB] = typeof(ChannelParticipantsMentions), - [0xED85EAB5] = typeof(UpdatePinnedMessages), - [0x8588878B] = typeof(UpdatePinnedChannelMessages), - [0x1BB00451] = typeof(InputMessagesFilterPinned), [0x8999F295] = typeof(Stats_MessageStats), - [0x98E0D697] = typeof(MessageActionGeoProximityReached), - [0xD8214D41] = typeof(PhotoPathSize), + [0x7780BCB4] = typeof(GroupCallDiscarded), + [0xD597650C] = typeof(GroupCall), + [0xD8AA840F] = typeof(InputGroupCall), + [0xEBA636FE] = typeof(GroupCallParticipant), + [0x9E727AAD] = typeof(Phone_GroupCall), + [0xF47751B6] = typeof(Phone_GroupParticipants), + [0x3081ED9D] = typeof(InlineQueryPeerTypeSameBotPM), + [0x833C0FAC] = typeof(InlineQueryPeerTypePM), + [0xD766C50A] = typeof(InlineQueryPeerTypeChat), + [0x5EC4BE43] = typeof(InlineQueryPeerTypeMegagroup), + [0x6334EE9A] = typeof(InlineQueryPeerTypeBroadcast), + [0x1662AF0B] = typeof(Messages_HistoryImport), + [0x5E0FB7B9] = typeof(Messages_HistoryImportParsed), + [0xEF8D3E6C] = typeof(Messages_AffectedFoundMessages), + [0x1E3E6680] = typeof(ChatInviteImporter), + [0xBDC62DCC] = typeof(Messages_ExportedChatInvites), + [0x1871BE50] = typeof(Messages_ExportedChatInvite), + [0x222600EF] = typeof(Messages_ExportedChatInviteReplaced), + [0x81B6B00A] = typeof(Messages_ChatInviteImporters), + [0xDFD2330F] = typeof(ChatAdminWithInvites), + [0xB69B72D7] = typeof(Messages_ChatAdminsWithInvites), + [0xA24DE717] = typeof(Messages_CheckedHistoryImportPeer), + [0xAFE5623F] = typeof(Phone_JoinAsPeers), + [0x204BD158] = typeof(Phone_ExportedGroupCallInvite), + [0xDCB118B7] = typeof(GroupCallParticipantVideoSourceGroup), + [0x67753AC8] = typeof(GroupCallParticipantVideo), + [0x85FEA03F] = typeof(Stickers_SuggestedShortName), + [0x2F6CB2AB] = typeof(BotCommandScopeDefault), + [0x3C4F04D8] = typeof(BotCommandScopeUsers), + [0x6FE1A881] = typeof(BotCommandScopeChats), + [0xB9AA606A] = typeof(BotCommandScopeChatAdmins), + [0xDB9D897D] = typeof(BotCommandScopePeer), + [0x3FD863D1] = typeof(BotCommandScopePeerAdmins), + [0x0A1321F3] = typeof(BotCommandScopePeerUser), + [0xE3779861] = typeof(Account_ResetPasswordFailedWait), + [0xE9EFFC7D] = typeof(Account_ResetPasswordRequestedWait), + [0xE926D63E] = typeof(Account_ResetPasswordOk), // from TL.Secret: [0x1F814F1F] = typeof(Layer8.DecryptedMessage), [0xAA48327D] = typeof(Layer8.DecryptedMessageService), @@ -938,8 +1011,10 @@ namespace TL [0xFB0A5727] = typeof(Layer23.DocumentAttributeSticker), [0x5910CCCB] = typeof(Layer23.DocumentAttributeVideo), [0x051448E5] = typeof(Layer23.DocumentAttributeAudio), + [0x77BFB61B] = typeof(Layer23.PhotoSize), + [0xE9A734FA] = typeof(Layer23.PhotoCachedSize), [0x7C596B46] = typeof(Layer23.FileLocationUnavailable), - [0x53D69076] = typeof(Layer23.FileLocation_), + [0x53D69076] = typeof(Layer23.FileLocation), [0xFA95B0DD] = typeof(Layer23.DecryptedMessageMediaExternalDocument), [0x36B091DE] = typeof(Layer45.DecryptedMessage), [0xF1FA8D78] = typeof(Layer45.DecryptedMessageMediaPhoto), diff --git a/src/TL.cs b/src/TL.cs index 6b276d9..db532f0 100644 --- a/src/TL.cs +++ b/src/TL.cs @@ -1,12 +1,10 @@ using System; -using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Reflection; using System.Security.Cryptography; using System.Text; -using WTelegram; namespace TL { @@ -236,23 +234,11 @@ namespace TL #endif } - public class RpcException : Exception - { - public readonly int Code; - public RpcException(int code, string message) : base(message) => Code = code; - } - [AttributeUsage(AttributeTargets.Class)] public class TLDefAttribute : Attribute { public readonly uint CtorNb; public TLDefAttribute(uint ctorNb) => CtorNb = ctorNb; - /*public TLDefAttribute(string def) - { - var hash = def.IndexOfAny(new[] { '#', ' ' }); - CtorNb = def[hash] == ' ' ? Force.Crc32.Crc32Algorithm.Compute(System.Text.Encoding.UTF8.GetBytes(def)) - : uint.Parse(def[(hash + 1)..def.IndexOf(' ', hash)], System.Globalization.NumberStyles.HexNumber); - }*/ } [AttributeUsage(AttributeTargets.Field)] @@ -287,4 +273,37 @@ namespace TL public override int GetHashCode() => HashCode.Combine(raw[0], raw[1]); public static implicit operator byte[](Int256 int256) => int256.raw; } + + public class RpcException : Exception + { + public readonly int Code; + public RpcException(int code, string message) : base(message) => Code = code; + } + + // Below TL types are commented "parsed manually" from https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/tl/mtproto.tl + + [TLDef(0xF35C6D01)] //rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult + public partial class RpcResult : ITLObject + { + public long req_msg_id; + public object result; + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006")] + [TLDef(0x5BB8E511)] //message#5bb8e511 msg_id:long seqno:int bytes:int body:Object = Message + public partial class _Message + { + public long msg_id; + public int seqno; + public int bytes; + public ITLObject body; + } + + [TLDef(0x73F1F8DC)] //msg_container#73f1f8dc messages:vector<%Message> = MessageContainer + public partial class MsgContainer : ITLObject { public _Message[] messages; } + [TLDef(0xE06046B2)] //msg_copy#e06046b2 orig_message:Message = MessageCopy + public partial class MsgCopy : ITLObject { public _Message orig_message; } + + [TLDef(0x3072CFA1)] //gzip_packed#3072cfa1 packed_data:bytes = Object + public partial class GzipPacked : ITLObject { public byte[] packed_data; } }