diff --git a/README.md b/README.md
index 39ca123..7c06ad0 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://dev.azure.com/wiz0u/WTelegramClient/_packaging?_a=package&feed=WTelegramClient&package=WTelegramClient&protocolType=NuGet)
[](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7)
-[](https://core.telegram.org/api/layers)
+[](https://schema.horner.tj)
[](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