From a197573258416e99ec173350e982719355ffbce0 Mon Sep 17 00:00:00 2001 From: Wizou Date: Wed, 3 Nov 2021 03:53:48 +0100 Subject: [PATCH] Complete XML documentation of the Telegram API ! --- src/Generator.cs | 266 +- src/TL.MTProto.cs | 70 +- src/TL.Schema.cs | 10661 ++++++++++++++++++++++++++++++++++---------- src/TL.Secret.cs | 364 +- 4 files changed, 8926 insertions(+), 2435 deletions(-) diff --git a/src/Generator.cs b/src/Generator.cs index 49207d9..6fbb029 100644 --- a/src/Generator.cs +++ b/src/Generator.cs @@ -17,6 +17,8 @@ namespace WTelegram readonly Dictionary knownStyles = new() { ["InitConnection"] = 1, ["Help_GetConfig"] = 0, ["HttpWait"] = -1 }; readonly Dictionary typeInfos = new(); readonly HashSet enumTypes = new(); + readonly Dictionary enumValues = new(); + readonly HashSet nullableCtor = new(); int currentLayer; string tabIndent; private string currentJson; @@ -114,7 +116,7 @@ namespace WTelegram ctorToTypes[ctor.ID] = ctor.layer == 0 ? structName : $"Layer{ctor.layer}.{structName}"; var typeInfo = typeInfos.GetOrCreate(ctor.type); if (ctor.ID == 0x5BB8E511) { ctorToTypes[ctor.ID] = structName = ctor.predicate = ctor.type = "_Message"; } - else if (ctor.ID == TL.Layer.NullCtor) { ctorToTypes[ctor.ID] += "=null"; typeInfo.Nullable = ctor; } + else if (ctor.ID == TL.Layer.NullCtor) { ctorToTypes[ctor.ID] += "=null"; typeInfo.Nullable = ctor; nullableCtor.Add(ctor.predicate); } if (typeInfo.ReturnName == null) typeInfo.ReturnName = CSharpName(ctor.type); typeInfo.Structs.Add(ctor); if (structName == typeInfo.ReturnName) typeInfo.MainClass = ctor; @@ -140,6 +142,7 @@ namespace WTelegram typeInfo.Nullable = nullable[0]; typeInfo.Structs.Remove(typeInfo.Nullable); ctorToTypes[typeInfo.Nullable.ID] += "=null"; + nullableCtor.Add(typeInfo.Nullable.predicate); } if (typeInfo.MainClass == null) { @@ -191,7 +194,7 @@ namespace WTelegram int autoPropsCount = 0; foreach (var str in typeInfo.Structs) { - if (str.ID == 0 ||str.predicate.EndsWith("Empty") || str.predicate.EndsWith("TooLong") || str.predicate.EndsWith("NotModified")) continue; + if (str.ID == 0 || str.predicate.EndsWith("Empty") || str.predicate.EndsWith("TooLong") || str.predicate.EndsWith("NotModified")) continue; for (int i = autoProps.Count - 1; i >= 0; i--) if (!str.@params.Contains(autoProps[i])) autoProps.RemoveAt(i); @@ -202,6 +205,25 @@ namespace WTelegram typeInfo.AutoProps = autoProps; } } + if (typeInfo.AsEnum && typeInfo.MainClass.id == null) + { + enumTypes.Add(typeInfo.ReturnName); + bool lowercase = typeInfo.ReturnName == "Storage_FileType"; + string prefix = ""; + while ((prefix += typeInfo.Structs[1].predicate[prefix.Length]) != null) + if (!typeInfo.Structs.All(ctor => ctor.id == null || ctor.predicate.StartsWith(prefix))) + break; + int prefixLen = CSharpName(prefix).Length - 1; + foreach (var ctor in typeInfo.Structs) + { + if (ctor.id == null) continue; + string className = CSharpName(ctor.predicate); + if (!allTypes.Add(className)) continue; + if (lowercase) className = className.ToLowerInvariant(); + enumValues.Add(ctor.predicate, $"{typeInfo.ReturnName}.{className[prefixLen..]}"); + ctorToTypes.Remove(ctor.ID); + } + } } var layers = schema.constructors.Select(c => c.layer).Distinct().ToList(); if (layers.Count > 1) // multi-layer file => generate abstract classes out of layer namespaces first @@ -273,18 +295,21 @@ namespace WTelegram if (needNewLine) { needNewLine = false; sw.WriteLine(); } var parentClass = ctor == typeInfo.MainClass ? "ITLObject" : typeInfo.ReturnName; var parms = ctor.@params; + var webDoc = WriteXmlDoc(sw, typeInfo, ctor); if (ctorId == 0) // abstract parent { - if (currentJson != "TL.MTProto") - sw.WriteLine($"{tabIndent}///See "); - if (typeInfo.Nullable != null) - sw.WriteLine($"{tabIndent}///a null value means {typeInfo.Nullable.predicate}"); if (typeInfo.AsEnum) { - WriteTypeAsEnum(sw, typeInfo); + WriteTypeAsEnum(sw, typeInfo, webDoc); return; } sw.Write($"{tabIndent}public abstract partial class {ctor.predicate}"); + if (webDoc != null && (parms.Length > 0 || typeInfo.AutoProps != null)) + { + var len = Math.Max(parms.Length, typeInfo.AutoProps?.Count ?? 0); + var webDoc2 = ParseWebDoc($"constructor/{typeInfo.Structs.Skip(1).First(s => s.@params.Length >= len).predicate}"); + webDoc["Parameters"] = webDoc2["Parameters"]; + } } else { @@ -323,12 +348,7 @@ namespace WTelegram } } if (currentJson != "TL.MTProto") - { - sw.WriteLine($"{tabIndent}///See "); - if (typeInfo.Nullable != null && ctor == typeInfo.MainClass) - sw.WriteLine($"{tabIndent}///a null value means {typeInfo.Nullable.predicate}"); sw.WriteLine($"{tabIndent}[TLDef(0x{ctor.ID:X8}{tldefReverse})]"); - } else { sw.Write($"{tabIndent}[TLDef(0x{ctor.ID:X8}{tldefReverse})] //{ctor.predicate}#{ctor.ID:x8} "); @@ -347,63 +367,64 @@ namespace WTelegram commonFields = typeInfo.CommonFields; continue; } + var paramDoc = webDoc?.GetValueOrDefault("Parameters").table; var hasFlagEnum = parms.Any(p => p.type.StartsWith("flags.")); - bool multiline = hasFlagEnum || parms.Length > 1 || typeInfo.AbstractUserOrChat || typeInfo.AutoProps != null; - if (multiline) + sw.WriteLine(); + sw.WriteLine(tabIndent + "{"); + foreach (var parm in parms) { - sw.WriteLine(); - sw.WriteLine(tabIndent + "{"); + if (parm.type.EndsWith("?true")) continue; + var doc = paramDoc?.GetValueOrDefault(parm.name); + if (doc != null) sw.WriteLine($"{tabIndent}\t/// {doc}"); + if (parm.type == "#") + sw.WriteLine($"{tabIndent}\tpublic {(hasFlagEnum ? "Flags" : "int")} {parm.name};"); + else + { + if (parm.type.StartsWith("flags.")) + { + int qm = parm.type.IndexOf('?'); + sw.WriteLine($"{tabIndent}\t[IfFlag({parm.type[6..qm]})] public {MapType(parm.type[(qm + 1)..], parm.name)} {MapName(parm.name)};"); + } + else + sw.WriteLine($"{tabIndent}\tpublic {MapType(parm.type, parm.name)} {MapName(parm.name)};"); + } } - else - sw.Write(" { "); if (hasFlagEnum) { + sw.WriteLine(); var list = new SortedList(); + var flagDoc = new Dictionary(); foreach (var parm in parms) { if (!parm.type.StartsWith("flags.") || !parm.type.EndsWith("?true")) continue; var mask = 1 << int.Parse(parm.type[6..parm.type.IndexOf('?')]); - if (!list.ContainsKey(mask)) list[mask] = MapName(parm.name); + if (list.ContainsKey(mask)) continue; + var doc = paramDoc?.GetValueOrDefault(parm.name); + if (doc != null) flagDoc[mask] = doc; + list[mask] = MapName(parm.name); } foreach (var parm in parms) { if (!parm.type.StartsWith("flags.") || parm.type.EndsWith("?true")) continue; var mask = 1 << int.Parse(parm.type[6..parm.type.IndexOf('?')]); if (list.ContainsKey(mask)) continue; + flagDoc[mask] = $"Field has a value"; var name = MapName("has_" + parm.name); if (list.Values.Contains(name)) name += "_field"; list[mask] = name; } - string line = tabIndent + "\t[Flags] public enum Flags { "; + sw.WriteLine(tabIndent + "\t[Flags] public enum Flags"); + sw.WriteLine(tabIndent + "\t{"); foreach (var (mask, name) in list) { - var str = $"{name} = 0x{mask:X}, "; - if (line.Length + str.Length + tabIndent.Length * 3 >= 134) { sw.WriteLine(line); line = tabIndent + "\t\t"; } - line += str; + if (flagDoc.TryGetValue(mask, out var summary)) sw.WriteLine($"{tabIndent}\t\t/// {summary}"); + sw.WriteLine($"{tabIndent}\t\t{name} = 0x{mask:X},"); } - sw.WriteLine(line.TrimEnd(',', ' ') + " }"); - } - foreach (var parm in parms) - { - if (parm.type.EndsWith("?true")) continue; - if (multiline) sw.Write(tabIndent + "\t"); - if (parm.type == "#") - sw.Write($"public {(hasFlagEnum ? "Flags" : "int")} {parm.name};"); - else - { - if (parm.type.StartsWith("flags.")) - { - int qm = parm.type.IndexOf('?'); - sw.Write($"[IfFlag({parm.type[6..qm]})] public {MapType(parm.type[(qm + 1)..], parm.name)} {MapName(parm.name)};"); - } - else - sw.Write($"public {MapType(parm.type, parm.name)} {MapName(parm.name)};"); - } - if (multiline) sw.WriteLine(); + sw.WriteLine(tabIndent + "\t}"); } if (typeInfo.AutoProps != null) { - bool firstLine = parms.Length != 0; + bool firstLine = parms.Length != 0 || hasFlagEnum; string format = $"{tabIndent}\tpublic "; if (ctorId == 0) format += "abstract {0} {1} {{ get; }}"; @@ -422,6 +443,8 @@ namespace WTelegram string csName = CSharpName(parm.name); if (csName.EndsWith("Id") && parm.type != "int" && parm.type != "long") csName = csName[..^2]; if (firstLine) { sw.WriteLine(); firstLine = false; } + var doc = paramDoc?.GetValueOrDefault(parm.name); + if (doc != null) sw.WriteLine($"{tabIndent}\t/// {doc}"); sw.WriteLine(string.Format(format, MapType(parm.type, parm.name), csName, value)); } } @@ -429,8 +452,10 @@ namespace WTelegram if (hasUsersChats || (typeInfo.AbstractUserOrChat && (ctor == typeInfo.MainClass || parentClass == typeInfo.ReturnName))) { var modifier = !typeInfo.AbstractUserOrChat ? null : ctorId == 0 ? "abstract " : "override "; + bool withArg = !hasUsersChats || ctor.@params.Length != 3 || !parms.Contains(ParamPeer); + sw.WriteLine($"{tabIndent}\t/// returns a or for {(withArg ? "the given Peer" : "the result")}"); sw.Write($"{tabIndent}\tpublic {modifier}IPeerInfo UserOrChat"); - if (!hasUsersChats || ctor.@params.Length != 3 || !parms.Contains(ParamPeer)) + if (withArg) sw.Write("(Peer peer)"); if (modifier == "abstract ") sw.WriteLine(";"); @@ -440,13 +465,131 @@ namespace WTelegram sw.WriteLine(" => null;"); } - if (multiline) - sw.WriteLine(tabIndent + "}"); - else - sw.WriteLine(" }"); + sw.WriteLine(tabIndent + "}"); commonFields = typeInfo.CommonFields; } } + + private Dictionary table)> WriteXmlDoc(StreamWriter sw, TypeInfo typeInfo, Constructor ctor) + { + if (currentJson == "TL.MTProto") return null; + var url = ctor.id == null ? $"type/{ctor.type}" : $"constructor/{ctor.predicate}"; + var webDoc = ParseWebDoc(url); + var summary = webDoc?.GetValueOrDefault(ctor.predicate).descr; + var derived = webDoc?.GetValueOrDefault("Constructors").table; + if (derived != null && !typeInfo.AsEnum) + summary += $"\t\t
Derived classes: {string.Join(", ", derived.Keys.Where(k => k != ""))}"; + summary += $"\t\t
See "; + sw.WriteLine($"{tabIndent}/// {summary.Trim()}"); + if (typeInfo.Nullable != null && ctor == typeInfo.MainClass) + sw.WriteLine($"{tabIndent}/// a null value means {typeInfo.Nullable.predicate}"); + return webDoc; + } + + private void WriteXmlDoc(StreamWriter sw, Method method) + { + if (currentJson == "TL.MTProto") return; + var webDoc = ParseWebDoc($"method/{method.method}"); + var summary = webDoc?.GetValueOrDefault(method.method).descr; + var paramDoc = webDoc?.GetValueOrDefault("Parameters").table; + var excepDoc = webDoc?.GetValueOrDefault("Possible errors").table; + summary += $"\t\t
See "; + sw.WriteLine($"{tabIndent}/// {summary.Trim()}"); + if (paramDoc != null) + foreach (var (name, doc) in paramDoc) + if (name != "flags") + sw.WriteLine($"{tabIndent}/// {doc}"); + if (typeInfos.GetValueOrDefault(method.type)?.Nullable is Constructor nullable) + sw.WriteLine($"{tabIndent}/// a null value means {nullable.predicate}"); + } + + /// + private Dictionary table)> ParseWebDoc(string url) + { + var path = $@"{Environment.GetEnvironmentVariable("telegram-crawler")}\data\corefork.telegram.org\{url}"; + if (!File.Exists(path)) + if (!File.Exists(path += ".html")) + return null; + var result = new Dictionary table)>(); + var html = File.ReadAllText(path); + foreach (var section in html[html.IndexOf("" }, StringSplitOptions.None)) + { + var index = 0; + do { index = section.IndexOf('>', index) + 1; } while (section[index] == '<'); + var title = section[index..section.IndexOf("")) >= 0) + { + descr = rest[(index + 3)..rest.IndexOf("

", index)]; + rest = rest[(index + 7 + descr.Length)..].Trim(); + descr = ProcessDescr(descr); + } + Dictionary table = null; + if (rest.StartsWith("", rowIndex)) >= 0) + { + var row = rest[(rowIndex + 4)..rest.IndexOf("", rowIndex)]; + rowIndex += row.Length; + index = row.IndexOf("', index) + 1; + var name = row[index..row.IndexOf("") && name.EndsWith("")) name = name[8..^9]; + index = row.IndexOf("', index) + 1; + var value = row[index..row.IndexOf("= 0) + { + index = row.IndexOf('>', index) + 1; + value = row[index..row.IndexOf("= 0) + { + var url = str[(index + 9)..str.IndexOf('"', index + 9)]; + var close = str.IndexOf("", index) + 4; + if (url.StartsWith("/constructor/")) + if (url == "/constructor/decryptedMessageActionSetMessageTTL") + str = $"{str[0..index]}{str[close..]}"; + else if (nullableCtor.Contains(url[13..])) + str = $"{str[0..index]}{str[close..]}"; + else + str = $"{str[0..index]}{str[close..]}"; + else if (url.StartsWith("/type/")) + if (url == "/type/DecryptedMessage") + str = $"{str[0..index]}{str[close..]}"; + else + str = $"{str[0..index]}{str[close..]}"; + else if (url.StartsWith("/")) + str = str.Insert(index + 9, "https://corefork.telegram.org"); + } + index = -1; + while ((index = str.IndexOf("= 0) + { + var close = str.IndexOf("/>", index) + 2; + var tag = str[index..close]; + var alt = tag.IndexOf(" alt=\""); + if (alt > 0) str = $"{str[0..index]}{tag[(alt + 6)..tag.IndexOf('"', alt + 6)]}{str[close..]}"; + } + return str.Replace("\r", "").Replace("\n", "").Replace("
", "
").Replace("code>", "c>"); + } + } + static readonly Param ParamFlags = new() { name = "flags", type = "#" }; static readonly Param ParamPeer = new() { name = "peer", type = "Peer" }; static readonly Param ParamUsers = new() { name = "users", type = "Vector" }; @@ -470,26 +613,18 @@ namespace WTelegram return left + right > basename.Length; } - private void WriteTypeAsEnum(StreamWriter sw, TypeInfo typeInfo) + private void WriteTypeAsEnum(StreamWriter sw, TypeInfo typeInfo, Dictionary table)> webDoc) { - enumTypes.Add(typeInfo.ReturnName); - bool lowercase = typeInfo.ReturnName == "Storage_FileType"; + var valuesDoc = webDoc?["Constructors"].table; sw.WriteLine($"{tabIndent}public enum {typeInfo.ReturnName} : uint"); sw.WriteLine($"{tabIndent}{{"); - string prefix = ""; - while ((prefix += typeInfo.Structs[1].predicate[prefix.Length]) != null) - if (!typeInfo.Structs.All(ctor => ctor.id == null || ctor.predicate.StartsWith(prefix))) - break; - int prefixLen = CSharpName(prefix).Length - 1; foreach (var ctor in typeInfo.Structs) { if (ctor.id == null) continue; - string className = CSharpName(ctor.predicate); - if (!allTypes.Add(className)) continue; - if (lowercase) className = className.ToLowerInvariant(); - ctorToTypes.Remove(ctor.ID); - sw.WriteLine($"{tabIndent}\t///See "); - sw.WriteLine($"{tabIndent}\t{className[prefixLen..]} = 0x{ctor.ID:X8},"); + string enumValue = enumValues[ctor.predicate]; + var summary = valuesDoc?[$""] ?? $"See "; + sw.WriteLine($"{tabIndent}\t///{summary}"); + sw.WriteLine($"{tabIndent}\t{enumValue[(enumValue.IndexOf('.') + 1)..]} = 0x{ctor.ID:X8},"); } sw.WriteLine($"{tabIndent}}}"); } @@ -545,6 +680,8 @@ namespace WTelegram return type; else if (typeInfos.TryGetValue(type, out var typeInfo)) return typeInfo.ReturnName; + else if (enumValues.TryGetValue(type, out var enumValue)) + return enumValue; else { // try to find type in a lower layer /*foreach (var layer in typeInfosByLayer.OrderByDescending(kvp => kvp.Key)) @@ -587,12 +724,11 @@ namespace WTelegram // styles: 0 = static string, 1 = static ITLFunction<>, 2 = Task<>, -1 = skip method if (style == -1) return; sw.WriteLine(); + WriteXmlDoc(sw, method); var callAsync = "CallAsync"; if (method.type.Length == 1 && style != 1) funcName += $"<{returnType}>"; - if (currentJson != "TL.MTProto") - sw.WriteLine($"{tabIndent}///See "); - else + if (currentJson == "TL.MTProto") { if (method.type is not "FutureSalts" and not "Pong") callAsync = "CallBareAsync"; sw.Write($"{tabIndent}//{method.method}#{ctorNb:x8} "); diff --git a/src/TL.MTProto.cs b/src/TL.MTProto.cs index a801acf..4f4e07b 100644 --- a/src/TL.MTProto.cs +++ b/src/TL.MTProto.cs @@ -28,9 +28,15 @@ namespace TL public Int256 new_nonce; } [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 int dc; } + 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; } + 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 { @@ -54,9 +60,15 @@ namespace TL public Int128 server_nonce; } [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; } + 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; } + 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 @@ -84,11 +96,20 @@ namespace TL public Int128 server_nonce; } [TLDef(0x3BCBF734)] //dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer - public partial class DhGenOk : SetClientDHParamsAnswer { public Int128 new_nonce_hash1; } + public partial class DhGenOk : SetClientDHParamsAnswer + { + public Int128 new_nonce_hash1; + } [TLDef(0x46DC1FB9)] //dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer - public partial class DhGenRetry : SetClientDHParamsAnswer { public Int128 new_nonce_hash2; } + public partial class DhGenRetry : SetClientDHParamsAnswer + { + public Int128 new_nonce_hash2; + } [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; } + public partial class DhGenFail : SetClientDHParamsAnswer + { + public Int128 new_nonce_hash3; + } public enum DestroyAuthKeyRes : uint { @@ -101,7 +122,10 @@ namespace TL } [TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector = MsgsAck - public partial class MsgsAck : ITLObject { public long[] msg_ids; } + 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 @@ -111,10 +135,16 @@ namespace TL 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; } + 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; } + 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 @@ -161,7 +191,10 @@ namespace TL } [TLDef(0x7D861A08)] //msg_resend_req#7d861a08 msg_ids:Vector = MsgResendReq - public partial class MsgResendReq : ITLObject { public long[] msg_ids; } + 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 @@ -206,7 +239,10 @@ namespace TL public long ping_id; } - public abstract partial class DestroySessionRes : ITLObject { public long session_id; } + public abstract partial class DestroySessionRes : ITLObject + { + public long session_id; + } [TLDef(0xE22045FC)] //destroy_session_ok#e22045fc session_id:long = DestroySessionRes public partial class DestroySessionOk : DestroySessionRes { } [TLDef(0x62D350C9)] //destroy_session_none#62d350c9 session_id:long = DestroySessionRes @@ -236,7 +272,10 @@ namespace TL public int port; } [TLDef(0x37982646)] //ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort - public partial class IpPortSecret : IpPort { public byte[] secret; } + public partial class IpPortSecret : IpPort + { + public byte[] secret; + } [TLDef(0x4679B65F)] //accessPointRule#4679b65f phone_prefix_rules:bytes dc_id:int ips:vector = AccessPointRule public partial class AccessPointRule : ITLObject @@ -255,7 +294,10 @@ namespace TL } [TLDef(0x7ABE77EC)] //ping#7abe77ec ping_id:long = Pong - public partial class Ping : ITLObject { public long ping_id; } + public partial class Ping : ITLObject + { + public long ping_id; + } // ---functions--- diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 5f46265..cf80de1 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -8,2255 +8,3964 @@ namespace TL using BinaryWriter = System.IO.BinaryWriter; using Client = WTelegram.Client; - ///See + /// Boolean type.
See
public enum Bool : uint { - ///See + ///Constructor may be interpreted as a booleanfalse value. False = 0xBC799737, - ///See + ///The constructor can be interpreted as a booleantrue value. True = 0x997275B5, } - ///See + /// See predefined identifiers.
See
[TLDef(0x3FEDD339)] public partial class True : ITLObject { } - ///See + /// Error.
See
[TLDef(0xC4B9F9BB)] public partial class Error : ITLObject { + /// Error code public int code; + /// Message public string text; } - ///See - ///a null value means null + /// Corresponds to an arbitrary empty object.
See
+ /// a null value means null [TLDef(0x56730BCC)] public partial class Null : ITLObject { } - ///See - ///a null value means inputPeerEmpty + /// Peer
Derived classes: , , , , ,
See
+ /// a null value means inputPeerEmpty public abstract partial class InputPeer : ITLObject { } - ///See + /// Defines the current user.
See
[TLDef(0x7DA07EC9)] public partial class InputPeerSelf : InputPeer { } - ///See + /// Defines a chat for further interaction.
See
[TLDef(0x35A95CB9)] - public partial class InputPeerChat : InputPeer { public long chat_id; } - ///See + public partial class InputPeerChat : InputPeer + { + /// Chat idientifier + public long chat_id; + } + /// Defines a user for further interaction.
See
[TLDef(0xDDE8A54C)] public partial class InputPeerUser : InputPeer { + /// User identifier public long user_id; + /// access_hash value from the constructor public long access_hash; } - ///See + /// Defines a channel for further interaction.
See
[TLDef(0x27BCBBFC)] public partial class InputPeerChannel : InputPeer { + /// Channel identifier public long channel_id; + /// access_hash value from the constructor public long access_hash; } - ///See + /// Defines a min user that was seen in a certain message of a certain chat.
See
[TLDef(0xA87B0A1C)] public partial class InputPeerUserFromMessage : InputPeer { + /// The chat where the user was seen public InputPeer peer; + /// The message ID public int msg_id; + /// The identifier of the user that was seen public long user_id; } - ///See + /// Defines a min channel that was seen in a certain message of a certain chat.
See
[TLDef(0xBD2A0840)] public partial class InputPeerChannelFromMessage : InputPeer { + /// The chat where the channel's message was seen public InputPeer peer; + /// The message ID public int msg_id; + /// The identifier of the channel that was seen public long channel_id; } - ///See - ///a null value means inputUserEmpty + ///
Derived classes: , ,
See
+ /// a null value means inputUserEmpty public abstract partial class InputUserBase : ITLObject { } - ///See + /// Defines the current user.
See
[TLDef(0xF7C1B13F)] public partial class InputUserSelf : InputUserBase { } - ///See + /// Defines a user for further interaction.
See
[TLDef(0xF21158C6)] public partial class InputUser : InputUserBase { + /// User identifier public long user_id; + /// access_hash value from the constructor public long access_hash; } - ///See + /// Defines a min user that was seen in a certain message of a certain chat.
See
[TLDef(0x1DA448E2)] public partial class InputUserFromMessage : InputUserBase { + /// The chat where the user was seen public InputPeer peer; + /// The message ID public int msg_id; + /// The identifier of the user that was seen public long user_id; } - ///See + /// Object defines a contact from the user's phonebook.
Derived classes:
See
public abstract partial class InputContact : ITLObject { } - ///See + /// Phone contact. The client_id is just an arbitrary contact ID: it should be set, for example, to an incremental number when using contacts.importContacts, in order to retry importing only the contacts that weren't imported successfully.
See
[TLDef(0xF392B7F4)] public partial class InputPhoneContact : InputContact { + /// User identifier on the client public long client_id; + /// Phone number public string phone; + /// Contact's first name public string first_name; + /// Contact's last name public string last_name; } - ///See + ///
Derived classes: ,
See
public abstract partial class InputFileBase : ITLObject { + /// Random file identifier created by the client public abstract long ID { get; } + /// Number of parts saved public abstract int Parts { get; } + /// Full name of the file public abstract string Name { get; } } - ///See + /// Defines a file saved in parts using the method upload.saveFilePart.
See
[TLDef(0xF52FF27F)] public partial class InputFile : InputFileBase { + /// Random file identifier created by the client public long id; + /// Number of parts saved public int parts; + /// Full name of the file public string name; + /// In case the file's md5-hash was passed, contents of the file will be checked prior to use public byte[] md5_checksum; + /// Random file identifier created by the client public override long ID => id; + /// Number of parts saved public override int Parts => parts; + /// Full name of the file public override string Name => name; } - ///See + /// Assigns a big file (over 10Mb in size), saved in part using the method upload.saveBigFilePart.
See
[TLDef(0xFA4F0BB5)] public partial class InputFileBig : InputFileBase { + /// Random file id, created by the client public long id; + /// Number of parts saved public int parts; + /// Full file name public string name; + /// Random file id, created by the client public override long ID => id; + /// Number of parts saved public override int Parts => parts; + /// Full file name public override string Name => name; } - ///See - ///a null value means inputMediaEmpty + /// Defines media content of a message.
Derived classes: , , , , , , , , , , , , ,
See
+ /// a null value means inputMediaEmpty public abstract partial class InputMedia : ITLObject { } - ///See + /// Photo
See
[TLDef(0x1E287D04)] public partial class InputMediaUploadedPhoto : InputMedia { - [Flags] public enum Flags { has_stickers = 0x1, has_ttl_seconds = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// The uploaded file public InputFileBase file; + /// Attached mask stickers [IfFlag(0)] public InputDocument[] stickers; + /// Time to live in seconds of self-destructing photo [IfFlag(1)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_stickers = 0x1, + /// Field has a value + has_ttl_seconds = 0x2, + } } - ///See + /// Forwarded photo
See
[TLDef(0xB3BA0635)] public partial class InputMediaPhoto : InputMedia { - [Flags] public enum Flags { has_ttl_seconds = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Photo to be forwarded public InputPhoto id; + /// Time to live in seconds of self-destructing photo [IfFlag(0)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_ttl_seconds = 0x1, + } } - ///See + /// Map.
See
[TLDef(0xF9C44144)] - public partial class InputMediaGeoPoint : InputMedia { public InputGeoPoint geo_point; } - ///See + public partial class InputMediaGeoPoint : InputMedia + { + /// GeoPoint + public InputGeoPoint geo_point; + } + /// Phonebook contact
See
[TLDef(0xF8AB7DFB)] public partial class InputMediaContact : InputMedia { + /// Phone number public string phone_number; + /// Contact's first name public string first_name; + /// Contact's last name public string last_name; + /// Contact vcard public string vcard; } - ///See + /// New document
See
[TLDef(0x5B38C6C1)] public partial class InputMediaUploadedDocument : InputMedia { - [Flags] public enum Flags { has_stickers = 0x1, has_ttl_seconds = 0x2, has_thumb = 0x4, nosound_video = 0x8, force_file = 0x10 } + /// Flags, see TL conditional fields public Flags flags; + /// The uploaded file public InputFileBase file; + /// Thumbnail of the document, uploaded as for the file [IfFlag(2)] public InputFileBase thumb; + /// MIME type of document public string mime_type; + /// Attributes that specify the type of the document (video, audio, voice, sticker, etc.) public DocumentAttribute[] attributes; + /// Attached stickers [IfFlag(0)] public InputDocument[] stickers; + /// Time to live in seconds of self-destructing document [IfFlag(1)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_stickers = 0x1, + /// Field has a value + has_ttl_seconds = 0x2, + /// Field has a value + has_thumb = 0x4, + /// Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) + nosound_video = 0x8, + /// Force the media file to be uploaded as document + force_file = 0x10, + } } - ///See + /// Forwarded document
See
[TLDef(0x33473058)] public partial class InputMediaDocument : InputMedia { - [Flags] public enum Flags { has_ttl_seconds = 0x1, has_query = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// The document to be forwarded. public InputDocument id; + /// Time to live of self-destructing document [IfFlag(0)] public int ttl_seconds; + /// Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance. [IfFlag(1)] public string query; + + [Flags] public enum Flags + { + /// Field has a value + has_ttl_seconds = 0x1, + /// Field has a value + has_query = 0x2, + } } - ///See + /// Can be used to send a venue geolocation.
See
[TLDef(0xC13D1C11)] public partial class InputMediaVenue : InputMedia { + /// Geolocation public InputGeoPoint geo_point; + /// Venue name public string title; + /// Physical address of the venue public string address; + /// Venue provider: currently only "foursquare" needs to be supported public string provider; + /// Venue ID in the provider's database public string venue_id; + /// Venue type in the provider's database public string venue_type; } - ///See + /// New photo that will be uploaded by the server using the specified URL
See
[TLDef(0xE5BBFE1A)] public partial class InputMediaPhotoExternal : InputMedia { - [Flags] public enum Flags { has_ttl_seconds = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// URL of the photo public string url; + /// Self-destruct time to live of photo [IfFlag(0)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_ttl_seconds = 0x1, + } } - ///See + /// Document that will be downloaded by the telegram servers
See
[TLDef(0xFB52DC99)] public partial class InputMediaDocumentExternal : InputMedia { - [Flags] public enum Flags { has_ttl_seconds = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// URL of the document public string url; + /// Self-destruct time to live of document [IfFlag(0)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_ttl_seconds = 0x1, + } } - ///See + /// A game
See
[TLDef(0xD33F43F3)] - public partial class InputMediaGame : InputMedia { public InputGame id; } - ///See + public partial class InputMediaGame : InputMedia + { + /// The game to forward + public InputGame id; + } + /// Generated invoice of a bot payment
See
[TLDef(0xD9799874)] public partial class InputMediaInvoice : InputMedia { - [Flags] public enum Flags { has_photo = 0x1, has_start_param = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Product name, 1-32 characters public string title; + /// Product description, 1-255 characters public string description; + /// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. [IfFlag(0)] public InputWebDocument photo; + /// The actual invoice public Invoice invoice; + /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. public byte[] payload; + /// Payments provider token, obtained via Botfather public string provider; + /// JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. public DataJSON provider_data; + /// Start parameter [IfFlag(1)] public string start_param; + + [Flags] public enum Flags + { + /// Field has a value + has_photo = 0x1, + /// Field has a value + has_start_param = 0x2, + } } - ///See + /// Live geolocation
See
[TLDef(0x971FA843)] public partial class InputMediaGeoLive : InputMedia { - [Flags] public enum Flags { stopped = 0x1, has_period = 0x2, has_heading = 0x4, has_proximity_notification_radius = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Current geolocation public InputGeoPoint geo_point; + /// For live locations, a direction in which the location moves, in degrees; 1-360. [IfFlag(2)] public int heading; + /// Validity period of the current location [IfFlag(1)] public int period; + /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000) [IfFlag(3)] public int proximity_notification_radius; + + [Flags] public enum Flags + { + /// Whether sending of the geolocation was stopped + stopped = 0x1, + /// Field has a value + has_period = 0x2, + /// Field has a value + has_heading = 0x4, + /// Field has a value + has_proximity_notification_radius = 0x8, + } } - ///See + /// A poll
See
[TLDef(0x0F94E5F1)] public partial class InputMediaPoll : InputMedia { - [Flags] public enum Flags { has_correct_answers = 0x1, has_solution = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// The poll to send public Poll poll; + /// Correct answer IDs (for quiz polls) [IfFlag(0)] public byte[][] correct_answers; + /// Explanation of quiz solution [IfFlag(1)] public string solution; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] solution_entities; - } - ///See - [TLDef(0xE66FBF7B)] - public partial class InputMediaDice : InputMedia { public string emoticon; } - ///See - ///a null value means inputChatPhotoEmpty + [Flags] public enum Flags + { + /// Field has a value + has_correct_answers = 0x1, + /// Field has a value + has_solution = 0x2, + } + } + /// Send a dice-based animated sticker
See
+ [TLDef(0xE66FBF7B)] + public partial class InputMediaDice : InputMedia + { + /// The emoji, for now 🏀, 🎲 and 🎯 are supported + public string emoticon; + } + + ///
Derived classes: ,
See
+ /// a null value means inputChatPhotoEmpty public abstract partial class InputChatPhotoBase : ITLObject { } - ///See + /// New photo to be set as group profile photo.
See
[TLDef(0xC642724E)] public partial class InputChatUploadedPhoto : InputChatPhotoBase { - [Flags] public enum Flags { has_file = 0x1, has_video = 0x2, has_video_start_ts = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// File saved in parts using the method upload.saveFilePart [IfFlag(0)] public InputFileBase file; + /// Square video for animated profile picture [IfFlag(1)] public InputFileBase video; + /// Timestamp that should be shown as static preview to the user (seconds) [IfFlag(2)] public double video_start_ts; - } - ///See - [TLDef(0x8953AD37)] - public partial class InputChatPhoto : InputChatPhotoBase { public InputPhoto id; } - ///See - ///a null value means inputGeoPointEmpty + [Flags] public enum Flags + { + /// Field has a value + has_file = 0x1, + /// Field has a value + has_video = 0x2, + /// Field has a value + has_video_start_ts = 0x4, + } + } + /// Existing photo to be set as a chat profile photo.
See
+ [TLDef(0x8953AD37)] + public partial class InputChatPhoto : InputChatPhotoBase + { + /// Existing photo + public InputPhoto id; + } + + /// Defines a GeoPoint by its coordinates.
See
+ /// a null value means inputGeoPointEmpty [TLDef(0x48222FAF)] public partial class InputGeoPoint : ITLObject { - [Flags] public enum Flags { has_accuracy_radius = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Latitide public double lat; + /// Longtitude public double long_; + /// The estimated horizontal accuracy of the location, in meters; as defined by the sender. [IfFlag(0)] public int accuracy_radius; + + [Flags] public enum Flags + { + /// Field has a value + has_accuracy_radius = 0x1, + } } - ///See - ///a null value means inputPhotoEmpty + /// Defines a photo for further interaction.
See
+ /// a null value means inputPhotoEmpty [TLDef(0x3BB3B94A)] public partial class InputPhoto : ITLObject { + /// Photo identifier public long id; + /// access_hash value from the constructor public long access_hash; + /// File reference public byte[] file_reference; } - ///See + ///
Derived classes: , , , , , , , , ,
See
public abstract partial class InputFileLocationBase : ITLObject { } - ///See + /// DEPRECATED location of a photo
See
[TLDef(0xDFDAABE1)] public partial class InputFileLocation : InputFileLocationBase { + /// Server volume public long volume_id; + /// File identifier public int local_id; + /// Check sum to access the file public long secret; + /// File reference public byte[] file_reference; } - ///See + /// Location of encrypted secret chat file.
See
[TLDef(0xF5235D55)] public partial class InputEncryptedFileLocation : InputFileLocationBase { + /// File ID, id parameter value from public long id; + /// Checksum, access_hash parameter value from public long access_hash; } - ///See + /// Document location (video, voice, audio, basically every type except photo)
See
[TLDef(0xBAD07584)] public partial class InputDocumentFileLocation : InputFileLocationBase { + /// Document ID public long id; + /// access_hash parameter from the constructor public long access_hash; + /// File reference public byte[] file_reference; + /// Thumbnail size to download the thumbnail public string thumb_size; } - ///See + /// Location of encrypted telegram passport file.
See
[TLDef(0xCBC7EE28)] public partial class InputSecureFileLocation : InputFileLocationBase { + /// File ID, id parameter value from public long id; + /// Checksum, access_hash parameter value from public long access_hash; } - ///See + /// Empty constructor for takeout
See
[TLDef(0x29BE5899)] public partial class InputTakeoutFileLocation : InputFileLocationBase { } - ///See + /// Use this object to download a photo with upload.getFile method
See
[TLDef(0x40181FFE)] public partial class InputPhotoFileLocation : InputFileLocationBase { + /// Photo ID, obtained from the object public long id; + /// Photo's access hash, obtained from the object public long access_hash; + /// File reference public byte[] file_reference; + /// The to download: must be set to the type field of the desired PhotoSize object of the public string thumb_size; } - ///See + /// DEPRECATED legacy photo file location
See
[TLDef(0xD83466F3)] public partial class InputPhotoLegacyFileLocation : InputFileLocationBase { + /// Photo ID public long id; + /// Access hash public long access_hash; + /// File reference public byte[] file_reference; + /// Volume ID public long volume_id; + /// Local ID public int local_id; + /// Secret public long secret; } - ///See + /// Location of profile photo of channel/group/supergroup/user
See
[TLDef(0x37257E99)] public partial class InputPeerPhotoFileLocation : InputFileLocationBase { - [Flags] public enum Flags { big = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The peer whose profile picture should be downloaded public InputPeer peer; + /// Photo ID public long photo_id; + + [Flags] public enum Flags + { + /// Whether to download the high-quality version of the picture + big = 0x1, + } } - ///See + /// Location of stickerset thumbnail (see files)
See
[TLDef(0x9D84F3DB)] public partial class InputStickerSetThumb : InputFileLocationBase { + /// Sticker set public InputStickerSet stickerset; + /// Thumbnail version public int thumb_version; } - ///See + /// Chunk of a livestream
See
[TLDef(0x0598A92A)] public partial class InputGroupCallStream : InputFileLocationBase { - [Flags] public enum Flags { has_video_channel = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Livestream info public InputGroupCall call; + /// Timestamp in milliseconds public long time_ms; + /// Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale public int scale; + /// Selected video channel [IfFlag(0)] public int video_channel; + /// Selected video quality (0 = lowest, 1 = medium, 2 = best) [IfFlag(0)] public int video_quality; + + [Flags] public enum Flags + { + /// Field has a value + has_video_channel = 0x1, + } } - ///See + /// Chat partner or group.
Derived classes: , ,
See
public abstract partial class Peer : ITLObject { } - ///See + /// Chat partner
See
[TLDef(0x59511722)] - public partial class PeerUser : Peer { public long user_id; } - ///See + public partial class PeerUser : Peer + { + /// User identifier + public long user_id; + } + /// Group.
See
[TLDef(0x36C6019A)] - public partial class PeerChat : Peer { public long chat_id; } - ///See + public partial class PeerChat : Peer + { + /// Group identifier + public long chat_id; + } + /// Channel/supergroup
See
[TLDef(0xA2A5371E)] - public partial class PeerChannel : Peer { public long channel_id; } + public partial class PeerChannel : Peer + { + /// Channel ID + public long channel_id; + } - ///See + ///
See
public enum Storage_FileType : uint { - ///See + ///Unknown type. unknown = 0xAA963B05, - ///See + ///Part of a bigger file. partial = 0x40BC6F52, - ///See + ///JPEG image. MIME type: image/jpeg. jpeg = 0x007EFE0E, - ///See + ///GIF image. MIME type: image/gif. gif = 0xCAE1AADF, - ///See + ///PNG image. MIME type: image/png. png = 0x0A4F63C0, - ///See + ///PDF document image. MIME type: application/pdf. pdf = 0xAE1E508D, - ///See + ///Mp3 audio. MIME type: audio/mpeg. mp3 = 0x528A0677, - ///See + ///Quicktime video. MIME type: video/quicktime. mov = 0x4B09EBBC, - ///See + ///MPEG-4 video. MIME type: video/mp4. mp4 = 0xB3CEA0E4, - ///See + ///WEBP image. MIME type: image/webp. webp = 0x1081464C, } - ///See + ///
Derived classes: ,
See
public abstract partial class UserBase : ITLObject { } - ///See + /// Empty constructor, non-existent user.
See
[TLDef(0xD3BC4B7A)] - public partial class UserEmpty : UserBase { public long id; } - ///See + public partial class UserEmpty : UserBase + { + /// User identifier or 0 + public long id; + } + /// Indicates info about a certain user
See
[TLDef(0x3FF6ECB0)] public partial class User : UserBase { - [Flags] public enum Flags { has_access_hash = 0x1, has_first_name = 0x2, has_last_name = 0x4, has_username = 0x8, - 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, fake = 0x4000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the user public long id; + /// Access hash of the user [IfFlag(0)] public long access_hash; + /// First name [IfFlag(1)] public string first_name; + /// Last name [IfFlag(2)] public string last_name; + /// Username [IfFlag(3)] public string username; + /// Phone number [IfFlag(4)] public string phone; + /// Profile picture of user [IfFlag(5)] public UserProfilePhoto photo; + /// Online status of user [IfFlag(6)] public UserStatus status; + /// Version of the , incremented every time it changes [IfFlag(14)] public int bot_info_version; + /// Contains the reason why access to this user must be restricted. [IfFlag(18)] public RestrictionReason[] restriction_reason; + /// Inline placeholder for this inline bot [IfFlag(19)] public string bot_inline_placeholder; + /// Language code of the user [IfFlag(22)] public string lang_code; + + [Flags] public enum Flags + { + /// Field has a value + has_access_hash = 0x1, + /// Field has a value + has_first_name = 0x2, + /// Field has a value + has_last_name = 0x4, + /// Field has a value + has_username = 0x8, + /// Field has a value + has_phone = 0x10, + /// Field has a value + has_photo = 0x20, + /// Field has a value + has_status = 0x40, + /// Whether this user indicates the currently logged in user + self = 0x400, + /// Whether this user is a contact + contact = 0x800, + /// Whether this user is a mutual contact + mutual_contact = 0x1000, + /// Whether the account of this user was deleted + deleted = 0x2000, + /// Is this user a bot? + bot = 0x4000, + /// Can the bot see all messages in groups? + bot_chat_history = 0x8000, + /// Can the bot be added to groups? + bot_nochats = 0x10000, + /// Whether this user is verified + verified = 0x20000, + /// Access to this user must be restricted for the reason specified in restriction_reason + restricted = 0x40000, + /// Field has a value + has_bot_inline_placeholder = 0x80000, + /// See min + min = 0x100000, + /// Whether the bot can request our geolocation in inline mode + bot_inline_geo = 0x200000, + /// Field has a value + has_lang_code = 0x400000, + /// Whether this is an official support user + support = 0x800000, + /// This may be a scam user + scam = 0x1000000, + /// If set, the profile picture for this user should be refetched + apply_min_photo = 0x2000000, + /// If set, this user was reported by many users as a fake or scam user: be careful when interacting with them. + fake = 0x4000000, + } } - ///See - ///a null value means userProfilePhotoEmpty + /// User profile photo.
See
+ /// a null value means userProfilePhotoEmpty [TLDef(0x82D1F706)] public partial class UserProfilePhoto : ITLObject { - [Flags] public enum Flags { has_video = 0x1, has_stripped_thumb = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Identifier of the respective photo
Parameter added in Layer 2
public long photo_id; + /// Stripped thumbnail [IfFlag(1)] public byte[] stripped_thumb; + /// DC ID where the photo is stored public int dc_id; + + [Flags] public enum Flags + { + /// Whether an animated profile picture is available for this user + has_video = 0x1, + /// Field has a value + has_stripped_thumb = 0x2, + } } - ///See - ///a null value means userStatusEmpty + /// User online status
Derived classes: , , , ,
See
+ /// a null value means userStatusEmpty public abstract partial class UserStatus : ITLObject { } - ///See + /// Online status of the user.
See
[TLDef(0xEDB93949)] - public partial class UserStatusOnline : UserStatus { public DateTime expires; } - ///See + public partial class UserStatusOnline : UserStatus + { + /// Time to expiration of the current online status + public DateTime expires; + } + /// The user's offline status.
See
[TLDef(0x008C703F)] - public partial class UserStatusOffline : UserStatus { public int was_online; } - ///See + public partial class UserStatusOffline : UserStatus + { + /// Time the user was last seen online + public int was_online; + } + /// Online status: last seen recently
See
[TLDef(0xE26F42F1)] public partial class UserStatusRecently : UserStatus { } - ///See + /// Online status: last seen last week
See
[TLDef(0x07BF09FC)] public partial class UserStatusLastWeek : UserStatus { } - ///See + /// Online status: last seen last month
See
[TLDef(0x77EBC742)] public partial class UserStatusLastMonth : UserStatus { } - ///See + ///
Derived classes: , , , ,
See
public abstract partial class ChatBase : ITLObject { + /// ID of the group public abstract long ID { get; } + /// Title public abstract string Title { get; } } - ///See + /// Empty constructor, group doesn't exist
See
[TLDef(0x29562865)] public partial class ChatEmpty : ChatBase { + /// Group identifier public long id; + /// Group identifier public override long ID => id; public override string Title => default; } - ///See + /// Info about a group
See
[TLDef(0x41CBF256)] public partial class Chat : ChatBase { - [Flags] public enum Flags { creator = 0x1, kicked = 0x2, left = 0x4, deactivated = 0x20, has_migrated_to = 0x40, - has_admin_rights = 0x4000, has_default_banned_rights = 0x40000, call_active = 0x800000, call_not_empty = 0x1000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the group public long id; + /// Title public string title; + /// Chat photo public ChatPhoto photo; + /// Participant count public int participants_count; + /// Date of creation of the group public DateTime date; + /// Used in basic groups to reorder updates and make sure that all of them were received. public int version; + /// Means this chat was upgraded to a supergroup [IfFlag(6)] public InputChannelBase migrated_to; + /// Admin rights of the user in the group [IfFlag(14)] public ChatAdminRights admin_rights; + /// Default banned rights of all users in the group [IfFlag(18)] public ChatBannedRights default_banned_rights; + [Flags] public enum Flags + { + /// Whether the current user is the creator of the group + creator = 0x1, + /// Whether the current user was kicked from the group + kicked = 0x2, + /// Whether the current user has left the group + left = 0x4, + /// Whether the group was migrated + deactivated = 0x20, + /// Field has a value + has_migrated_to = 0x40, + /// Field has a value + has_admin_rights = 0x4000, + /// Field has a value + has_default_banned_rights = 0x40000, + /// Whether a group call is currently active + call_active = 0x800000, + /// Whether there's anyone in the group call + call_not_empty = 0x1000000, + } + + /// ID of the group public override long ID => id; + /// Title public override string Title => title; } - ///See + /// A group to which the user has no access. E.g., because the user was kicked from the group.
See
[TLDef(0x6592A1A7)] public partial class ChatForbidden : ChatBase { + /// User identifier public long id; + /// Group name public string title; + /// User identifier public override long ID => id; + /// Group name public override string Title => title; } - ///See + /// Channel/supergroup info
See
[TLDef(0x8261AC61)] public partial class Channel : ChatBase { - [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, - fake = 0x2000000, gigagroup = 0x4000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the channel public long id; + /// Access hash [IfFlag(13)] public long access_hash; + /// Title public string title; + /// Username [IfFlag(6)] public string username; + /// Profile photo public ChatPhoto photo; + /// Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date public DateTime date; + /// Contains the reason why access to this channel must be restricted. [IfFlag(9)] public RestrictionReason[] restriction_reason; + /// Admin rights of the user in this channel (see rights) [IfFlag(14)] public ChatAdminRights admin_rights; + /// Banned rights of the user in this channel (see rights) [IfFlag(15)] public ChatBannedRights banned_rights; + /// Default chat rights (see rights) [IfFlag(18)] public ChatBannedRights default_banned_rights; + /// Participant count [IfFlag(17)] public int participants_count; + [Flags] public enum Flags + { + /// Whether the current user is the creator of this channel + creator = 0x1, + /// Whether the current user has left this channel + left = 0x4, + /// Is this a channel? + broadcast = 0x20, + /// Field has a value + has_username = 0x40, + /// Is this channel verified by telegram? + verified = 0x80, + /// Is this a supergroup? + megagroup = 0x100, + /// Whether viewing/writing in this channel for a reason (see restriction_reason + restricted = 0x200, + /// Whether signatures are enabled (channels) + signatures = 0x800, + /// See min + min = 0x1000, + /// Field has a value + has_access_hash = 0x2000, + /// Field has a value + has_admin_rights = 0x4000, + /// Field has a value + has_banned_rights = 0x8000, + /// Field has a value + has_participants_count = 0x20000, + /// Field has a value + has_default_banned_rights = 0x40000, + /// This channel/supergroup is probably a scam + scam = 0x80000, + /// Whether this channel has a private join link + has_link = 0x100000, + /// Whether this chanel has a geoposition + has_geo = 0x200000, + /// Whether slow mode is enabled for groups to prevent flood in chat + slowmode_enabled = 0x400000, + /// Whether a group call or livestream is currently active + call_active = 0x800000, + /// Whether there's anyone in the group call or livestream + call_not_empty = 0x1000000, + /// If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it. + fake = 0x2000000, + /// Whether this supergroup is a gigagroup + gigagroup = 0x4000000, + } + + /// ID of the channel public override long ID => id; + /// Title public override string Title => title; } - ///See + /// Indicates a channel/supergroup we can't access because we were banned, or for some other reason.
See
[TLDef(0x17D493D5)] public partial class ChannelForbidden : ChatBase { - [Flags] public enum Flags { broadcast = 0x20, megagroup = 0x100, has_until_date = 0x10000 } + /// Flags, see TL conditional fields public Flags flags; + /// Channel ID public long id; + /// Access hash public long access_hash; + /// Title public string title; + /// The ban is valid until the specified date [IfFlag(16)] public DateTime until_date; + [Flags] public enum Flags + { + /// Is this a channel + broadcast = 0x20, + /// Is this a supergroup + megagroup = 0x100, + /// Field has a value + has_until_date = 0x10000, + } + + /// Channel ID public override long ID => id; + /// Title public override string Title => title; } - ///See + ///
Derived classes: ,
See
public abstract partial class ChatFullBase : ITLObject { + /// ID of the chat public abstract long ID { get; } + /// About string for this chat public abstract string About { get; } + /// Notification settings public abstract PeerNotifySettings NotifySettings { get; } + /// Peer folder ID, for more info click here public abstract int Folder { get; } } - ///See + /// Detailed chat info
See
[TLDef(0x46A6FFB4)] 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_call = 0x1000, has_exported_invite = 0x2000, has_ttl_period = 0x4000, - has_groupcall_default_join_as = 0x8000, has_theme_emoticon = 0x10000, has_requests_pending = 0x20000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the chat public long id; + /// About string for this chat public string about; + /// Participant list public ChatParticipantsBase participants; + /// Chat photo [IfFlag(2)] public PhotoBase chat_photo; + /// Notification settings public PeerNotifySettings notify_settings; + /// Chat invite [IfFlag(13)] public ExportedChatInvite exported_invite; + /// Info about bots that are in this chat [IfFlag(3)] public BotInfo[] bot_info; + /// Message ID of the last pinned message [IfFlag(6)] public int pinned_msg_id; + /// Peer folder ID, for more info click here [IfFlag(11)] public int folder_id; + /// Group call information [IfFlag(12)] public InputGroupCall call; + /// Time-To-Live of messages sent by the current user to this chat [IfFlag(14)] public int ttl_period; + /// When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. [IfFlag(15)] public Peer groupcall_default_join_as; + /// Emoji representing a specific chat theme [IfFlag(16)] public string theme_emoticon; [IfFlag(17)] public int requests_pending; [IfFlag(17)] public long[] recent_requesters; + [Flags] public enum Flags + { + /// Field has a value + has_chat_photo = 0x4, + /// Field has a value + has_bot_info = 0x8, + /// Field has a value + has_pinned_msg_id = 0x40, + /// Can we change the username of this chat + can_set_username = 0x80, + /// Whether scheduled messages are available + has_scheduled = 0x100, + /// Field has a value + has_folder_id = 0x800, + /// Field has a value + has_call = 0x1000, + /// Field has a value + has_exported_invite = 0x2000, + /// Field has a value + has_ttl_period = 0x4000, + /// Field has a value + has_groupcall_default_join_as = 0x8000, + /// Field has a value + has_theme_emoticon = 0x10000, + /// Field has a value + has_requests_pending = 0x20000, + } + + /// ID of the chat public override long ID => id; + /// About string for this chat public override string About => about; + /// Notification settings public override PeerNotifySettings NotifySettings => notify_settings; + /// Peer folder ID, for more info click here public override int Folder => folder_id; } - ///See + /// Full info about a channel/supergroup
See
[TLDef(0x59CFF963)] public partial class ChannelFull : ChatFullBase { - [Flags] public enum Flags { has_participants_count = 0x1, has_admins_count = 0x2, has_kicked_count = 0x4, - can_view_participants = 0x8, has_migrated_from_chat_id = 0x10, has_pinned_msg_id = 0x20, can_set_username = 0x40, - 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, has_call = 0x200000, blocked = 0x400000, has_exported_invite = 0x800000, - has_ttl_period = 0x1000000, has_pending_suggestions = 0x2000000, has_groupcall_default_join_as = 0x4000000, - has_theme_emoticon = 0x8000000, has_requests_pending = 0x10000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the channel public long id; + /// Info about the channel public string about; + /// Number of participants of the channel [IfFlag(0)] public int participants_count; + /// Number of channel admins [IfFlag(1)] public int admins_count; + /// Number of users kicked from the channel [IfFlag(2)] public int kicked_count; + /// Number of users banned from the channel [IfFlag(2)] public int banned_count; + /// Number of users currently online [IfFlag(13)] public int online_count; + /// Position up to which all incoming messages are read. public int read_inbox_max_id; + /// Position up to which all outgoing messages are read. public int read_outbox_max_id; + /// Count of unread messages public int unread_count; + /// Channel picture public PhotoBase chat_photo; + /// Notification settings public PeerNotifySettings notify_settings; + /// Invite link [IfFlag(23)] public ExportedChatInvite exported_invite; + /// Info about bots in the channel/supergrup public BotInfo[] bot_info; + /// The chat ID from which this group was migrated [IfFlag(4)] public long migrated_from_chat_id; + /// The message ID in the original chat at which this group was migrated [IfFlag(4)] public int migrated_from_max_id; + /// Message ID of the last pinned message [IfFlag(5)] public int pinned_msg_id; + /// Associated stickerset [IfFlag(8)] public StickerSet stickerset; + /// Identifier of a maximum unavailable message in a channel due to hidden history. [IfFlag(9)] public int available_min_id; + /// Peer folder ID, for more info click here [IfFlag(11)] public int folder_id; + /// ID of the linked discussion chat for channels [IfFlag(14)] public long linked_chat_id; + /// Location of the geogroup [IfFlag(15)] public ChannelLocation location; + /// If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds [IfFlag(17)] public int slowmode_seconds; + /// Indicates when the user will be allowed to send another message in the supergroup (unixdate) [IfFlag(18)] public DateTime slowmode_next_send_date; + /// If set, specifies the DC to use for fetching channel statistics [IfFlag(12)] public int stats_dc; + /// Latest PTS for this channel public int pts; + /// Livestream or group call information [IfFlag(21)] public InputGroupCall call; + /// Time-To-Live of messages in this channel or supergroup [IfFlag(24)] public int ttl_period; + /// A list of suggested actions for the supergroup admin, see here for more info ». [IfFlag(25)] public string[] pending_suggestions; + /// When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. [IfFlag(26)] public Peer groupcall_default_join_as; + /// Emoji representing a specific chat theme [IfFlag(27)] public string theme_emoticon; [IfFlag(28)] public int requests_pending; [IfFlag(28)] public long[] recent_requesters; + [Flags] public enum Flags + { + /// Field has a value + has_participants_count = 0x1, + /// Field has a value + has_admins_count = 0x2, + /// Field has a value + has_kicked_count = 0x4, + /// Can we vew the participant list? + can_view_participants = 0x8, + /// Field has a value + has_migrated_from_chat_id = 0x10, + /// Field has a value + has_pinned_msg_id = 0x20, + /// Can we set the channel's username? + can_set_username = 0x40, + /// Can we associate a stickerpack to the supergroup? + can_set_stickers = 0x80, + /// Field has a value + has_stickerset = 0x100, + /// Field has a value + has_available_min_id = 0x200, + /// Is the history before we joined hidden to us? + hidden_prehistory = 0x400, + /// Field has a value + has_folder_id = 0x800, + /// Field has a value + has_stats_dc = 0x1000, + /// Field has a value + has_online_count = 0x2000, + /// Field has a value + has_linked_chat_id = 0x4000, + /// Field has a value + has_location = 0x8000, + /// Can we set the geolocation of this group (for geogroups) + can_set_location = 0x10000, + /// Field has a value + has_slowmode_seconds = 0x20000, + /// Field has a value + has_slowmode_next_send_date = 0x40000, + /// Whether scheduled messages are available + has_scheduled = 0x80000, + /// Can the user view channel/supergroup statistics + can_view_stats = 0x100000, + /// Field has a value + has_call = 0x200000, + /// Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies + blocked = 0x400000, + /// Field has a value + has_exported_invite = 0x800000, + /// Field has a value + has_ttl_period = 0x1000000, + /// Field has a value + has_pending_suggestions = 0x2000000, + /// Field has a value + has_groupcall_default_join_as = 0x4000000, + /// Field has a value + has_theme_emoticon = 0x8000000, + /// Field has a value + has_requests_pending = 0x10000000, + } + + /// ID of the channel public override long ID => id; + /// Info about the channel public override string About => about; + /// Notification settings public override PeerNotifySettings NotifySettings => notify_settings; + /// Peer folder ID, for more info click here public override int Folder => folder_id; } - ///See + ///
Derived classes: , ,
See
public abstract partial class ChatParticipantBase : ITLObject { + /// Member user ID public abstract long UserId { get; } } - ///See + /// Group member.
See
[TLDef(0xC02D4007)] public partial class ChatParticipant : ChatParticipantBase { + /// Member user ID public long user_id; + /// ID of the user that added the member to the group public long inviter_id; + /// Date added to the group public DateTime date; + /// Member user ID public override long UserId => user_id; } - ///See + /// Represents the creator of the group
See
[TLDef(0xE46BCEE4)] public partial class ChatParticipantCreator : ChatParticipantBase { + /// ID of the user that created the group public long user_id; + /// ID of the user that created the group public override long UserId => user_id; } - ///See + /// Chat admin
See
[TLDef(0xA0933F5B)] public partial class ChatParticipantAdmin : ChatParticipant { } - ///See + ///
Derived classes: ,
See
public abstract partial class ChatParticipantsBase : ITLObject { + /// Group ID public abstract long ChatId { get; } } - ///See + /// Info on members is unavailable
See
[TLDef(0x8763D3E1)] public partial class ChatParticipantsForbidden : ChatParticipantsBase { - [Flags] public enum Flags { has_self_participant = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Group ID public long chat_id; + /// Info about the group membership of the current user [IfFlag(0)] public ChatParticipantBase self_participant; + [Flags] public enum Flags + { + /// Field has a value + has_self_participant = 0x1, + } + + /// Group ID public override long ChatId => chat_id; } - ///See + /// Group members.
See
[TLDef(0x3CBC93F8)] public partial class ChatParticipants : ChatParticipantsBase { + /// Group identifier public long chat_id; + /// List of group members public ChatParticipantBase[] participants; + /// Group version number public int version; + /// Group identifier public override long ChatId => chat_id; } - ///See - ///a null value means chatPhotoEmpty + /// Group profile photo.
See
+ /// a null value means chatPhotoEmpty [TLDef(0x1C6E1C11)] public partial class ChatPhoto : ITLObject { - [Flags] public enum Flags { has_video = 0x1, has_stripped_thumb = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Photo ID public long photo_id; + /// Stripped thumbnail [IfFlag(1)] public byte[] stripped_thumb; + /// DC where this photo is stored public int dc_id; + + [Flags] public enum Flags + { + /// Whether the user has an animated profile picture + has_video = 0x1, + /// Field has a value + has_stripped_thumb = 0x2, + } } - ///See + ///
Derived classes: , ,
See
public abstract partial class MessageBase : ITLObject { + /// ID of the message public abstract int ID { get; } + /// ID of the sender of the message public abstract Peer From { get; } + /// Peer ID, the chat where this message was sent public abstract Peer Peer { get; } + /// Reply information public abstract MessageReplyHeader ReplyTo { get; } + /// Date of the message public abstract DateTime Date { get; } + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. public abstract int TtlPeriod { get; } } - ///See + /// Empty constructor, non-existent message.
See
[TLDef(0x90A6CA84)] public partial class MessageEmpty : MessageBase { - [Flags] public enum Flags { has_peer_id = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Message identifier public int id; + /// Peer ID, the chat where this message was sent [IfFlag(0)] public Peer peer_id; + [Flags] public enum Flags + { + /// Field has a value + has_peer_id = 0x1, + } + + /// Message identifier public override int ID => id; public override Peer From => default; + /// Peer ID, the chat where this message was sent public override Peer Peer => peer_id; public override MessageReplyHeader ReplyTo => default; public override DateTime Date => default; public override int TtlPeriod => default; } - ///See + /// A message
See
[TLDef(0x85D6CBE2)] 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_ttl_period = 0x2000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the message public int id; + /// ID of the sender of the message [IfFlag(8)] public Peer from_id; + /// Peer ID, the chat where this message was sent public Peer peer_id; + /// Info about forwarded messages [IfFlag(2)] public MessageFwdHeader fwd_from; + /// ID of the inline bot that generated the message [IfFlag(11)] public long via_bot_id; + /// Reply information [IfFlag(3)] public MessageReplyHeader reply_to; + /// Date of the message public DateTime date; + /// The message public string message; + /// Media attachment [IfFlag(9)] public MessageMedia media; + /// Reply markup (bot/inline keyboards) [IfFlag(6)] public ReplyMarkup reply_markup; + /// Message entities for styled text [IfFlag(7)] public MessageEntity[] entities; + /// View count for channel posts [IfFlag(10)] public int views; + /// Forward counter [IfFlag(10)] public int forwards; + /// Info about post comments (for channels) or message replies (for groups) [IfFlag(23)] public MessageReplies replies; + /// Last edit date of this message [IfFlag(15)] public DateTime edit_date; + /// Name of the author of this message for channel posts (with signatures enabled) [IfFlag(16)] public string post_author; + /// Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group [IfFlag(17)] public long grouped_id; + /// Contains the reason why access to this message must be restricted. [IfFlag(22)] public RestrictionReason[] restriction_reason; + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; + [Flags] public enum Flags + { + /// Is this an outgoing message + out_ = 0x2, + /// Field has a value + has_fwd_from = 0x4, + /// Field has a value + has_reply_to = 0x8, + /// Whether we were mentioned in this message + mentioned = 0x10, + /// Whether there are unread media attachments in this message + media_unread = 0x20, + /// Field has a value + has_reply_markup = 0x40, + /// Field has a value + has_entities = 0x80, + /// Field has a value + has_from_id = 0x100, + /// Field has a value + has_media = 0x200, + /// Field has a value + has_views = 0x400, + /// Field has a value + has_via_bot_id = 0x800, + /// Whether this is a silent message (no notification triggered) + silent = 0x2000, + /// Whether this is a channel post + post = 0x4000, + /// Field has a value + has_edit_date = 0x8000, + /// Field has a value + has_post_author = 0x10000, + /// Field has a value + has_grouped_id = 0x20000, + /// Whether this is a scheduled message + from_scheduled = 0x40000, + /// This is a legacy message: it has to be refetched with the new layer + legacy = 0x80000, + /// Whether the message should be shown as not modified to the user, even if an edit date is present + edit_hide = 0x200000, + /// Field has a value + has_restriction_reason = 0x400000, + /// Field has a value + has_replies = 0x800000, + /// Whether this message is pinned + pinned = 0x1000000, + /// Field has a value + has_ttl_period = 0x2000000, + } + + /// ID of the message public override int ID => id; + /// ID of the sender of the message public override Peer From => from_id; + /// Peer ID, the chat where this message was sent public override Peer Peer => peer_id; + /// Reply information public override MessageReplyHeader ReplyTo => reply_to; + /// Date of the message public override DateTime Date => date; + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. public override int TtlPeriod => ttl_period; } - ///See + /// Indicates a service message
See
[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, has_ttl_period = 0x2000000 } + /// Flags, see TL conditional fields public Flags flags; + /// Message ID public int id; + /// ID of the sender of this message [IfFlag(8)] public Peer from_id; + /// Sender of service message public Peer peer_id; + /// Reply (thread) information [IfFlag(3)] public MessageReplyHeader reply_to; + /// Message date public DateTime date; + /// Event connected with the service message public MessageAction action; + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; + [Flags] public enum Flags + { + /// Whether the message is outgoing + out_ = 0x2, + /// Field has a value + has_reply_to = 0x8, + /// Whether we were mentioned in the message + mentioned = 0x10, + /// Whether the message contains unread media + media_unread = 0x20, + /// Field has a value + has_from_id = 0x100, + /// Whether the message is silent + silent = 0x2000, + /// Whether it's a channel post + post = 0x4000, + /// This is a legacy message: it has to be refetched with the new layer + legacy = 0x80000, + /// Field has a value + has_ttl_period = 0x2000000, + } + + /// Message ID public override int ID => id; + /// ID of the sender of this message public override Peer From => from_id; + /// Sender of service message public override Peer Peer => peer_id; + /// Reply (thread) information public override MessageReplyHeader ReplyTo => reply_to; + /// Message date public override DateTime Date => date; + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. public override int TtlPeriod => ttl_period; } - ///See - ///a null value means messageMediaEmpty + /// Media
Derived classes: , , , , , , , , , , ,
See
+ /// a null value means messageMediaEmpty public abstract partial class MessageMedia : ITLObject { } - ///See + /// Attached photo.
See
[TLDef(0x695150D7)] public partial class MessageMediaPhoto : MessageMedia { - [Flags] public enum Flags { has_photo = 0x1, has_ttl_seconds = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Photo [IfFlag(0)] public PhotoBase photo; + /// Time to live in seconds of self-destructing photo [IfFlag(2)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_photo = 0x1, + /// Field has a value + has_ttl_seconds = 0x4, + } } - ///See + /// Attached map.
See
[TLDef(0x56E0D474)] - public partial class MessageMediaGeo : MessageMedia { public GeoPoint geo; } - ///See + public partial class MessageMediaGeo : MessageMedia + { + /// GeoPoint + public GeoPoint geo; + } + /// Attached contact.
See
[TLDef(0x70322949)] public partial class MessageMediaContact : MessageMedia { + /// Phone number public string phone_number; + /// Contact's first name public string first_name; + /// Contact's last name public string last_name; + /// VCARD of contact public string vcard; + /// User identifier or 0, if the user with the given phone number is not registered public long user_id; } - ///See + /// Current version of the client does not support this media type.
See
[TLDef(0x9F84F49E)] public partial class MessageMediaUnsupported : MessageMedia { } - ///See + /// Document (video, audio, voice, sticker, any media type except photo)
See
[TLDef(0x9CB070D7)] public partial class MessageMediaDocument : MessageMedia { - [Flags] public enum Flags { has_document = 0x1, has_ttl_seconds = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Attached document [IfFlag(0)] public DocumentBase document; + /// Time to live of self-destructing document [IfFlag(2)] public int ttl_seconds; + + [Flags] public enum Flags + { + /// Field has a value + has_document = 0x1, + /// Field has a value + has_ttl_seconds = 0x4, + } } - ///See + /// Preview of webpage
See
[TLDef(0xA32DD600)] - public partial class MessageMediaWebPage : MessageMedia { public WebPageBase webpage; } - ///See + public partial class MessageMediaWebPage : MessageMedia + { + /// Webpage preview + public WebPageBase webpage; + } + /// Venue
See
[TLDef(0x2EC0533F)] public partial class MessageMediaVenue : MessageMedia { + /// Geolocation of venue public GeoPoint geo; + /// Venue name public string title; + /// Address public string address; + /// Venue provider: currently only "foursquare" needs to be supported public string provider; + /// Venue ID in the provider's database public string venue_id; + /// Venue type in the provider's database public string venue_type; } - ///See + /// Telegram game
See
[TLDef(0xFDB19008)] - public partial class MessageMediaGame : MessageMedia { public Game game; } - ///See + public partial class MessageMediaGame : MessageMedia + { + /// Game + public Game game; + } + /// Invoice
See
[TLDef(0x84551347)] public partial class MessageMediaInvoice : MessageMedia { - [Flags] public enum Flags { has_photo = 0x1, shipping_address_requested = 0x2, has_receipt_msg_id = 0x4, test = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Product name, 1-32 characters public string title; + /// Product description, 1-255 characters public string description; + /// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. [IfFlag(0)] public WebDocumentBase photo; + /// Message ID of receipt: if set, clients should change the text of the first button always attached to the to a localized version of the word Receipt [IfFlag(2)] public int receipt_msg_id; + /// Three-letter ISO 4217 currency code public string currency; + /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long total_amount; + /// Unique bot deep-linking parameter that can be used to generate this invoice public string start_param; + + [Flags] public enum Flags + { + /// Field has a value + has_photo = 0x1, + /// Whether the shipping address was requested + shipping_address_requested = 0x2, + /// Field has a value + has_receipt_msg_id = 0x4, + /// Whether this is an example invoice + test = 0x8, + } } - ///See + /// Indicates a live geolocation
See
[TLDef(0xB940C666)] public partial class MessageMediaGeoLive : MessageMedia { - [Flags] public enum Flags { has_heading = 0x1, has_proximity_notification_radius = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Geolocation public GeoPoint geo; + /// For live locations, a direction in which the location moves, in degrees; 1-360 [IfFlag(0)] public int heading; + /// Validity period of provided geolocation public int period; + /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). [IfFlag(1)] public int proximity_notification_radius; + + [Flags] public enum Flags + { + /// Field has a value + has_heading = 0x1, + /// Field has a value + has_proximity_notification_radius = 0x2, + } } - ///See + /// Poll
See
[TLDef(0x4BD6E798)] public partial class MessageMediaPoll : MessageMedia { + /// The poll public Poll poll; + /// The results of the poll public PollResults results; } - ///See + /// Dice-based animated sticker
See
[TLDef(0x3F7EE58B)] public partial class MessageMediaDice : MessageMedia { + /// Dice value public int value; + /// The emoji, for now 🏀, 🎲 and 🎯 are supported public string emoticon; } - ///See - ///a null value means messageActionEmpty + /// Object describing actions connected to a service message.
Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , ,
See
+ /// a null value means messageActionEmpty public abstract partial class MessageAction : ITLObject { } - ///See + /// Group created
See
[TLDef(0xBD47CBAD)] public partial class MessageActionChatCreate : MessageAction { + /// Group name public string title; + /// List of group members public long[] users; } - ///See + /// Group name changed.
See
[TLDef(0xB5A1CE5A)] - public partial class MessageActionChatEditTitle : MessageAction { public string title; } - ///See + public partial class MessageActionChatEditTitle : MessageAction + { + /// New group name + public string title; + } + /// Group profile changed
See
[TLDef(0x7FCB13A8)] - public partial class MessageActionChatEditPhoto : MessageAction { public PhotoBase photo; } - ///See + public partial class MessageActionChatEditPhoto : MessageAction + { + /// New group pofile photo + public PhotoBase photo; + } + /// Group profile photo removed.
See
[TLDef(0x95E3FBEF)] public partial class MessageActionChatDeletePhoto : MessageAction { } - ///See + /// New member in the group
See
[TLDef(0x15CEFD00)] - public partial class MessageActionChatAddUser : MessageAction { public long[] users; } - ///See + public partial class MessageActionChatAddUser : MessageAction + { + /// Users that were invited to the chat + public long[] users; + } + /// User left the group.
See
[TLDef(0xA43F30CC)] - public partial class MessageActionChatDeleteUser : MessageAction { public long user_id; } - ///See + public partial class MessageActionChatDeleteUser : MessageAction + { + /// Leaving user ID + public long user_id; + } + /// A user joined the chat via an invite link
See
[TLDef(0x031224C3)] - public partial class MessageActionChatJoinedByLink : MessageAction { public long inviter_id; } - ///See + public partial class MessageActionChatJoinedByLink : MessageAction + { + /// ID of the user that created the invite link + public long inviter_id; + } + /// The channel was created
See
[TLDef(0x95D2AC92)] - public partial class MessageActionChannelCreate : MessageAction { public string title; } - ///See + public partial class MessageActionChannelCreate : MessageAction + { + /// Original channel/supergroup title + public string title; + } + /// Indicates the chat was migrated to the specified supergroup
See
[TLDef(0xE1037F92)] - public partial class MessageActionChatMigrateTo : MessageAction { public long channel_id; } - ///See + public partial class MessageActionChatMigrateTo : MessageAction + { + /// The supergroup it was migrated to + public long channel_id; + } + /// Indicates the channel was migrated from the specified chat
See
[TLDef(0xEA3948E9)] public partial class MessageActionChannelMigrateFrom : MessageAction { + /// The old chat tite public string title; + /// The old chat ID public long chat_id; } - ///See + /// A message was pinned
See
[TLDef(0x94BD38ED)] public partial class MessageActionPinMessage : MessageAction { } - ///See + /// Chat history was cleared
See
[TLDef(0x9FBAB604)] public partial class MessageActionHistoryClear : MessageAction { } - ///See + /// Someone scored in a game
See
[TLDef(0x92A72876)] public partial class MessageActionGameScore : MessageAction { + /// Game ID public long game_id; + /// Score public int score; } - ///See + /// A user just sent a payment to me (a bot)
See
[TLDef(0x8F31B327)] public partial class MessageActionPaymentSentMe : MessageAction { - [Flags] public enum Flags { has_info = 0x1, has_shipping_option_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Three-letter ISO 4217 currency code public string currency; + /// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long total_amount; + /// Bot specified invoice payload public byte[] payload; + /// Order info provided by the user [IfFlag(0)] public PaymentRequestedInfo info; + /// Identifier of the shipping option chosen by the user [IfFlag(1)] public string shipping_option_id; + /// Provider payment identifier public PaymentCharge charge; + + [Flags] public enum Flags + { + /// Field has a value + has_info = 0x1, + /// Field has a value + has_shipping_option_id = 0x2, + } } - ///See + /// A payment was sent
See
[TLDef(0x40699CD0)] public partial class MessageActionPaymentSent : MessageAction { + /// Three-letter ISO 4217 currency code public string currency; + /// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long total_amount; } - ///See + /// A phone call
See
[TLDef(0x80E11A7F)] public partial class MessageActionPhoneCall : MessageAction { - [Flags] public enum Flags { has_reason = 0x1, has_duration = 0x2, video = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Call ID public long call_id; + /// If the call has ended, the reason why it ended [IfFlag(0)] public PhoneCallDiscardReason reason; + /// Duration of the call in seconds [IfFlag(1)] public int duration; + + [Flags] public enum Flags + { + /// Field has a value + has_reason = 0x1, + /// Field has a value + has_duration = 0x2, + /// Is this a video call? + video = 0x4, + } } - ///See + /// A screenshot of the chat was taken
See
[TLDef(0x4792929B)] public partial class MessageActionScreenshotTaken : MessageAction { } - ///See + /// Custom action (most likely not supported by the current layer, an upgrade might be needed)
See
[TLDef(0xFAE69F56)] - public partial class MessageActionCustomAction : MessageAction { public string message; } - ///See + public partial class MessageActionCustomAction : MessageAction + { + /// Action message + public string message; + } + /// The domain name of the website on which the user has logged in. More about Telegram Login »
See
[TLDef(0xABE9AFFE)] - public partial class MessageActionBotAllowed : MessageAction { public string domain; } - ///See + public partial class MessageActionBotAllowed : MessageAction + { + /// The domain name of the website on which the user has logged in. + public string domain; + } + /// Secure telegram passport values were received
See
[TLDef(0x1B287353)] public partial class MessageActionSecureValuesSentMe : MessageAction { + /// Vector with information about documents and other Telegram Passport elements that were shared with the bot public SecureValue[] values; + /// Encrypted credentials required to decrypt the data public SecureCredentialsEncrypted credentials; } - ///See + /// Request for secure telegram passport values was sent
See
[TLDef(0xD95C6154)] - public partial class MessageActionSecureValuesSent : MessageAction { public SecureValueType[] types; } - ///See + public partial class MessageActionSecureValuesSent : MessageAction + { + /// Secure value types + public SecureValueType[] types; + } + /// A contact just signed up to telegram
See
[TLDef(0xF3F25F76)] public partial class MessageActionContactSignUp : MessageAction { } - ///See + /// A user of the chat is now in proximity of another user
See
[TLDef(0x98E0D697)] public partial class MessageActionGeoProximityReached : MessageAction { + /// The user or chat that is now in proximity of to_id public Peer from_id; + /// The user or chat that subscribed to live geolocation proximity alerts public Peer to_id; + /// Distance, in meters (0-100000) public int distance; } - ///See + /// The group call has ended
See
[TLDef(0x7A0D7F42)] public partial class MessageActionGroupCall : MessageAction { - [Flags] public enum Flags { has_duration = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Group call public InputGroupCall call; + /// Group call duration [IfFlag(0)] public int duration; + + [Flags] public enum Flags + { + /// Field has a value + has_duration = 0x1, + } } - ///See + /// A set of users was invited to the group call
See
[TLDef(0x502F92F7)] public partial class MessageActionInviteToGroupCall : MessageAction { + /// The group call public InputGroupCall call; + /// The invited users public long[] users; } - ///See + /// The Time-To-Live of messages in this chat was changed.
See
[TLDef(0xAA1AFBFD)] - public partial class MessageActionSetMessagesTTL : MessageAction { public int period; } - ///See + public partial class MessageActionSetMessagesTTL : MessageAction + { + /// New Time-To-Live + public int period; + } + /// A group call was scheduled
See
[TLDef(0xB3A07661)] public partial class MessageActionGroupCallScheduled : MessageAction { + /// The group call public InputGroupCall call; + /// When is this group call scheduled to start public DateTime schedule_date; } - ///See + /// The chat theme was changed
See
[TLDef(0xAA786345)] - public partial class MessageActionSetChatTheme : MessageAction { public string emoticon; } - ///See + public partial class MessageActionSetChatTheme : MessageAction + { + /// The emoji that identifies a chat theme + public string emoticon; + } + ///
See
[TLDef(0xEBBCA3CB)] public partial class MessageActionChatJoinedByRequest : MessageAction { } - ///See + ///
Derived classes: ,
See
public abstract partial class DialogBase : ITLObject { + /// The chat public abstract Peer Peer { get; } + /// The latest message ID public abstract int TopMessage { get; } } - ///See + /// Chat
See
[TLDef(0x2C171F72)] public partial class Dialog : DialogBase { - [Flags] public enum Flags { has_pts = 0x1, has_draft = 0x2, pinned = 0x4, unread_mark = 0x8, has_folder_id = 0x10 } + /// Flags, see TL conditional fields public Flags flags; + /// The chat public Peer peer; + /// The latest message ID public int top_message; + /// Position up to which all incoming messages are read. public int read_inbox_max_id; + /// Position up to which all outgoing messages are read. public int read_outbox_max_id; + /// Number of unread messages public int unread_count; + /// Number of unread mentions public int unread_mentions_count; + /// Notification settings public PeerNotifySettings notify_settings; + /// PTS [IfFlag(0)] public int pts; + /// Message draft [IfFlag(1)] public DraftMessageBase draft; + /// Peer folder ID, for more info click here [IfFlag(4)] public int folder_id; + [Flags] public enum Flags + { + /// Field has a value + has_pts = 0x1, + /// Field has a value + has_draft = 0x2, + /// Is the dialog pinned + pinned = 0x4, + /// Whether the chat was manually marked as unread + unread_mark = 0x8, + /// Field has a value + has_folder_id = 0x10, + } + + /// The chat public override Peer Peer => peer; + /// The latest message ID public override int TopMessage => top_message; } - ///See + /// Dialog in folder
See
[TLDef(0x71BD134C)] public partial class DialogFolder : DialogBase { - [Flags] public enum Flags { pinned = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// The folder public Folder folder; + /// Peer in folder public Peer peer; + /// Latest message ID of dialog public int top_message; + /// Number of unread muted peers in folder public int unread_muted_peers_count; + /// Number of unread unmuted peers in folder public int unread_unmuted_peers_count; + /// Number of unread messages from muted peers in folder public int unread_muted_messages_count; + /// Number of unread messages from unmuted peers in folder public int unread_unmuted_messages_count; + [Flags] public enum Flags + { + /// Is this folder pinned + pinned = 0x4, + } + + /// Peer in folder public override Peer Peer => peer; + /// Latest message ID of dialog public override int TopMessage => top_message; } - ///See + ///
Derived classes: ,
See
public abstract partial class PhotoBase : ITLObject { } - ///See + /// Empty constructor, non-existent photo
See
[TLDef(0x2331B22D)] - public partial class PhotoEmpty : PhotoBase { public long id; } - ///See + public partial class PhotoEmpty : PhotoBase + { + /// Photo identifier + public long id; + } + /// Photo
See
[TLDef(0xFB197A65)] public partial class Photo : PhotoBase { - [Flags] public enum Flags { has_stickers = 0x1, has_video_sizes = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// ID public long id; + /// Access hash public long access_hash; + /// file reference public byte[] file_reference; + /// Date of upload public DateTime date; + /// Available sizes for download public PhotoSizeBase[] sizes; + /// For animated profiles, the MPEG4 videos [IfFlag(1)] public VideoSize[] video_sizes; + /// DC ID to use for download public int dc_id; + + [Flags] public enum Flags + { + /// Whether the photo has mask stickers attached to it + has_stickers = 0x1, + /// Field has a value + has_video_sizes = 0x2, + } } - ///See + ///
Derived classes: , , , , ,
See
public abstract partial class PhotoSizeBase : ITLObject { + /// Thumbnail type (see. ) public abstract string Type { get; } } - ///See + /// Empty constructor. Image with this thumbnail is unavailable.
See
[TLDef(0x0E17E23C)] public partial class PhotoSizeEmpty : PhotoSizeBase { + /// Thumbnail type (see. ) public string type; + /// Thumbnail type (see. ) public override string Type => type; } - ///See + /// Image description.
See
[TLDef(0x75C78E60)] public partial class PhotoSize : PhotoSizeBase { + /// Thumbnail type public string type; + /// Image width public int w; + /// Image height public int h; + /// File size public int size; + /// Thumbnail type public override string Type => type; } - ///See + /// Description of an image and its content.
See
[TLDef(0x021E1AD6)] public partial class PhotoCachedSize : PhotoSizeBase { + /// Thumbnail type public string type; + /// Image width public int w; + /// Image height public int h; + /// Binary data, file content public byte[] bytes; + /// Thumbnail type public override string Type => type; } - ///See + /// A low-resolution compressed JPG payload
See
[TLDef(0xE0B0BC2E)] public partial class PhotoStrippedSize : PhotoSizeBase { + /// Thumbnail type public string type; + /// Thumbnail data, see here for more info on decompression » public byte[] bytes; + /// Thumbnail type public override string Type => type; } - ///See + /// Progressively encoded photosize
See
[TLDef(0xFA3EFB95)] public partial class PhotoSizeProgressive : PhotoSizeBase { + /// Photosize type public string type; + /// Photo width public int w; + /// Photo height public int h; + /// Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image. public int[] sizes; + /// Photosize type public override string Type => type; } - ///See + /// Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.
See
[TLDef(0xD8214D41)] public partial class PhotoPathSize : PhotoSizeBase { + /// Always j public string type; + /// Compressed SVG path payload, see here for decompression instructions public byte[] bytes; + /// Always j public override string Type => type; } - ///See - ///a null value means geoPointEmpty + /// GeoPoint.
See
+ /// a null value means geoPointEmpty [TLDef(0xB2A2F663)] public partial class GeoPoint : ITLObject { - [Flags] public enum Flags { has_accuracy_radius = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Longtitude public double long_; + /// Latitude public double lat; + /// Access hash public long access_hash; + /// The estimated horizontal accuracy of the location, in meters; as defined by the sender. [IfFlag(0)] public int accuracy_radius; + + [Flags] public enum Flags + { + /// Field has a value + has_accuracy_radius = 0x1, + } } - ///See + /// Contains info about a sent verification code.
See
[TLDef(0x5E002502)] public partial class Auth_SentCode : ITLObject { - [Flags] public enum Flags { has_next_type = 0x2, has_timeout = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Phone code type public Auth_SentCodeType type; + /// Phone code hash, to be stored and later re-used with auth.signIn public string phone_code_hash; + /// Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use auth.resendCode [IfFlag(1)] public Auth_CodeType next_type; + /// Timeout for reception of the phone code [IfFlag(2)] public int timeout; + + [Flags] public enum Flags + { + /// Field has a value + has_next_type = 0x2, + /// Field has a value + has_timeout = 0x4, + } } - ///See + ///
Derived classes: ,
See
public abstract partial class Auth_AuthorizationBase : ITLObject { } - ///See + /// Contains user authorization info.
See
[TLDef(0xCD050916)] public partial class Auth_Authorization : Auth_AuthorizationBase { - [Flags] public enum Flags { has_tmp_sessions = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Temporary passport sessions [IfFlag(0)] public int tmp_sessions; + /// Info on authorized user public UserBase user; + + [Flags] public enum Flags + { + /// Field has a value + has_tmp_sessions = 0x1, + } } - ///See + /// An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up
See
[TLDef(0x44747E9A)] public partial class Auth_AuthorizationSignUpRequired : Auth_AuthorizationBase { - [Flags] public enum Flags { has_terms_of_service = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram [IfFlag(0)] public Help_TermsOfService terms_of_service; + + [Flags] public enum Flags + { + /// Field has a value + has_terms_of_service = 0x1, + } } - ///See + /// Data for copying of authorization between data centres.
See
[TLDef(0xB434E2B8)] public partial class Auth_ExportedAuthorization : ITLObject { + /// current user identifier public long id; + /// authorizes key public byte[] bytes; } - ///See + ///
Derived classes: , , ,
See
public abstract partial class InputNotifyPeerBase : ITLObject { } - ///See + /// Notifications generated by a certain user or group.
See
[TLDef(0xB8BC5B0C)] - public partial class InputNotifyPeer : InputNotifyPeerBase { public InputPeer peer; } - ///See + public partial class InputNotifyPeer : InputNotifyPeerBase + { + /// User or group + public InputPeer peer; + } + /// Notifications generated by all users.
See
[TLDef(0x193B4417)] public partial class InputNotifyUsers : InputNotifyPeerBase { } - ///See + /// Notifications generated by all groups.
See
[TLDef(0x4A95E84E)] public partial class InputNotifyChats : InputNotifyPeerBase { } - ///See + /// All channels
See
[TLDef(0xB1DB7C7E)] public partial class InputNotifyBroadcasts : InputNotifyPeerBase { } - ///See + /// Notification settings.
See
[TLDef(0x9C3D198E)] public partial class InputPeerNotifySettings : ITLObject { - [Flags] public enum Flags { has_show_previews = 0x1, has_silent = 0x2, has_mute_until = 0x4, has_sound = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// If the text of the message shall be displayed in notification [IfFlag(0)] public bool show_previews; + /// Peer was muted? [IfFlag(1)] public bool silent; + /// Date until which all notifications shall be switched off [IfFlag(2)] public int mute_until; + /// Name of an audio file for notification [IfFlag(3)] public string sound; + + [Flags] public enum Flags + { + /// Field has a value + has_show_previews = 0x1, + /// Field has a value + has_silent = 0x2, + /// Field has a value + has_mute_until = 0x4, + /// Field has a value + has_sound = 0x8, + } } - ///See + /// Notification settings.
See
[TLDef(0xAF509D20)] public partial class PeerNotifySettings : ITLObject { - [Flags] public enum Flags { has_show_previews = 0x1, has_silent = 0x2, has_mute_until = 0x4, has_sound = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Display text in notifications [IfFlag(0)] public bool show_previews; + /// Mute peer? [IfFlag(1)] public bool silent; + /// Mute all notifications until this date [IfFlag(2)] public int mute_until; + /// Audio file name for notifications [IfFlag(3)] public string sound; + + [Flags] public enum Flags + { + /// Field has a value + has_show_previews = 0x1, + /// Field has a value + has_silent = 0x2, + /// Field has a value + has_mute_until = 0x4, + /// Field has a value + has_sound = 0x8, + } } - ///See + /// Peer settings
See
[TLDef(0x733F2961)] public partial class PeerSettings : ITLObject { - [Flags] public enum Flags { report_spam = 0x1, add_contact = 0x2, block_contact = 0x4, share_contact = 0x8, - need_contacts_exception = 0x10, report_geo = 0x20, has_geo_distance = 0x40, autoarchived = 0x80, invite_members = 0x100 } + /// Flags, see TL conditional fields public Flags flags; + /// Distance in meters between us and this peer [IfFlag(6)] public int geo_distance; + + [Flags] public enum Flags + { + /// Whether we can still report the user for spam + report_spam = 0x1, + /// Whether we can add the user as contact + add_contact = 0x2, + /// Whether we can block the user + block_contact = 0x4, + /// Whether we can share the user's contact + share_contact = 0x8, + /// Whether a special exception for contacts is needed + need_contacts_exception = 0x10, + /// Whether we can report a geogroup is irrelevant for this location + report_geo = 0x20, + /// Field has a value + has_geo_distance = 0x40, + /// Whether this peer was automatically archived according to + autoarchived = 0x80, + /// Whether we can invite members to a group or channel + invite_members = 0x100, + } } - ///See + ///
Derived classes: ,
See
public abstract partial class WallPaperBase : ITLObject { + /// Identifier public abstract long ID { get; } + /// Wallpaper settings public abstract WallPaperSettings Settings { get; } } - ///See + /// Wallpaper settings.
See
[TLDef(0xA437C3ED)] public partial class WallPaper : WallPaperBase { - [Flags] public enum Flags { creator = 0x1, default_ = 0x2, has_settings = 0x4, pattern = 0x8, dark = 0x10 } + /// Identifier public long id; + /// Flags, see TL conditional fields public Flags flags; + /// Access hash public long access_hash; + /// Unique wallpaper ID public string slug; + /// The actual wallpaper public DocumentBase document; + /// Wallpaper settings [IfFlag(2)] public WallPaperSettings settings; + [Flags] public enum Flags + { + /// Creator of the wallpaper + creator = 0x1, + /// Whether this is the default wallpaper + default_ = 0x2, + /// Field has a value + has_settings = 0x4, + /// Pattern + pattern = 0x8, + /// Dark mode + dark = 0x10, + } + + /// Identifier public override long ID => id; + /// Wallpaper settings public override WallPaperSettings Settings => settings; } - ///See + /// Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using account.saveWallPaper, specifying just the wallpaper ID.
Also used for some default wallpapers which contain only colours.
See
[TLDef(0xE0804116)] public partial class WallPaperNoFile : WallPaperBase { - [Flags] public enum Flags { default_ = 0x2, has_settings = 0x4, dark = 0x10 } + /// Wallpaper ID public long id; + /// Flags, see TL conditional fields public Flags flags; + /// Wallpaper settings [IfFlag(2)] public WallPaperSettings settings; + [Flags] public enum Flags + { + /// Whether this is the default wallpaper + default_ = 0x2, + /// Field has a value + has_settings = 0x4, + /// Dark mode + dark = 0x10, + } + + /// Wallpaper ID public override long ID => id; + /// Wallpaper settings public override WallPaperSettings Settings => settings; } - ///See + /// Report reason
See
public enum ReportReason : uint { - ///See + ///Report for spam Spam = 0x58DBCAB8, - ///See + ///Report for violence Violence = 0x1E22C78D, - ///See + ///Report for pornography Pornography = 0x2E59D922, - ///See + ///Report for child abuse ChildAbuse = 0xADF44EE3, - ///See + ///Other Other = 0xC1E4A2B1, - ///See + ///Report for copyrighted content Copyright = 0x9B89F93A, - ///See + ///Report an irrelevant geogroup GeoIrrelevant = 0xDBD4FEED, - ///See + ///Report for impersonation Fake = 0xF5DDD6E7, } - ///See + /// Extended user info
See
[TLDef(0xD697FF05)] 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_ttl_period = 0x4000, - has_theme_emoticon = 0x8000 } + /// Flags, see TL conditional fields public Flags flags; + /// Remaining user info public UserBase user; + /// Bio of the user [IfFlag(1)] public string about; + /// Peer settings public PeerSettings settings; + /// Profile photo [IfFlag(2)] public PhotoBase profile_photo; + /// Notification settings public PeerNotifySettings notify_settings; + /// For bots, info about the bot (bot commands, etc) [IfFlag(3)] public BotInfo bot_info; + /// Message ID of the last pinned message [IfFlag(6)] public int pinned_msg_id; + /// Chats in common with this user public int common_chats_count; + /// Peer folder ID, for more info click here [IfFlag(11)] public int folder_id; + /// Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted. [IfFlag(14)] public int ttl_period; + /// Emoji associated with chat theme [IfFlag(15)] public string theme_emoticon; + + [Flags] public enum Flags + { + /// Whether you have blocked this user + blocked = 0x1, + /// Field has a value + has_about = 0x2, + /// Field has a value + has_profile_photo = 0x4, + /// Field has a value + has_bot_info = 0x8, + /// Whether this user can make VoIP calls + phone_calls_available = 0x10, + /// Whether this user's privacy settings allow you to call him + phone_calls_private = 0x20, + /// Field has a value + has_pinned_msg_id = 0x40, + /// Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself + can_pin_message = 0x80, + /// Field has a value + has_folder_id = 0x800, + /// Whether scheduled messages are available + has_scheduled = 0x1000, + /// Whether the user can receive video calls + video_calls_available = 0x2000, + /// Field has a value + has_ttl_period = 0x4000, + /// Field has a value + has_theme_emoticon = 0x8000, + } } - ///See + /// A contact of the current user that is registered in the system.
See
[TLDef(0x145ADE0B)] public partial class Contact : ITLObject { + /// User identifier public long user_id; + /// Current user is in the user's contact list public bool mutual; } - ///See + /// Successfully imported contact.
See
[TLDef(0xC13E3C50)] public partial class ImportedContact : ITLObject { + /// User identifier public long user_id; + /// The contact's client identifier (passed to one of the constructors) public long client_id; } - ///See + /// Contact status: online / offline.
See
[TLDef(0x16D9703B)] public partial class ContactStatus : ITLObject { + /// User identifier public long user_id; + /// Online status public UserStatus status; } - ///See - ///a null value means contacts.contactsNotModified + /// The current user's contact list and info on users.
See
+ /// a null value means contacts.contactsNotModified [TLDef(0xEAE87E42)] public partial class Contacts_Contacts : ITLObject { + /// Contact list public Contact[] contacts; + /// Number of contacts that were saved successfully public int saved_count; + /// User list public Dictionary users; } - ///See + /// Info on succesfully imported contacts.
See
[TLDef(0x77D01C3B)] public partial class Contacts_ImportedContacts : ITLObject { + /// List of succesfully imported contacts public ImportedContact[] imported; + /// Popular contacts public PopularContact[] popular_invites; + /// List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.
Parameter added in
Layer 13
public long[] retry_contacts; + /// List of users public Dictionary users; } - ///See + /// Full list of blocked users.
See
[TLDef(0x0ADE1591)] public partial class Contacts_Blocked : ITLObject { + /// List of blocked users public PeerBlocked[] blocked; + /// Blocked chats public Dictionary chats; + /// List of users public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Incomplete list of blocked users.
See
[TLDef(0xE1664194, inheritAfter = true)] - public partial class Contacts_BlockedSlice : Contacts_Blocked { public int count; } + public partial class Contacts_BlockedSlice : Contacts_Blocked + { + /// Total number of elements in the list + public int count; + } - ///See + ///
Derived classes: , ,
See
public abstract partial class Messages_DialogsBase : ITLObject { + /// List of chats public abstract DialogBase[] Dialogs { get; } + /// List of last messages from each chat public abstract MessageBase[] Messages { get; } + /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } - ///See + /// Full list of chats with messages and auxiliary data.
See
[TLDef(0x15BA6C40)] public partial class Messages_Dialogs : Messages_DialogsBase { + /// List of chats public DialogBase[] dialogs; + /// List of last messages from each chat public MessageBase[] messages; + /// List of groups mentioned in the chats public Dictionary chats; + /// List of users mentioned in messages and groups public Dictionary users; + /// List of chats public override DialogBase[] Dialogs => dialogs; + /// List of last messages from each chat public override MessageBase[] Messages => messages; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Incomplete list of dialogs with messages and auxiliary data.
See
[TLDef(0x71E094F3, inheritAfter = true)] public partial class Messages_DialogsSlice : Messages_Dialogs { + /// Total number of dialogs public int count; } - ///See + /// Dialogs haven't changed
See
[TLDef(0xF0E3E596)] public partial class Messages_DialogsNotModified : Messages_DialogsBase { + /// Number of dialogs found server-side by the query public int count; public override DialogBase[] Dialogs => default; public override MessageBase[] Messages => default; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } - ///See + ///
Derived classes: , , ,
See
public abstract partial class Messages_MessagesBase : ITLObject { + /// List of messages public abstract MessageBase[] Messages { get; } + /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } - ///See + /// Full list of messages with auxilary data.
See
[TLDef(0x8C718E87)] public partial class Messages_Messages : Messages_MessagesBase { + /// List of messages public MessageBase[] messages; + /// List of chats mentioned in dialogs public Dictionary chats; + /// List of users mentioned in messages and chats public Dictionary users; + /// List of messages public override MessageBase[] Messages => messages; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Incomplete list of messages and auxiliary data.
See
[TLDef(0x3A54685E, inheritAfter = true)] public partial class Messages_MessagesSlice : Messages_Messages { - [Flags] public enum Flags { has_next_rate = 0x1, inexact = 0x2, has_offset_id_offset = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Total number of messages in the list public int count; + /// Rate to use in the offset_rate parameter in the next call to messages.searchGlobal [IfFlag(0)] public int next_rate; + /// Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.
[IfFlag(2)] public int offset_id_offset; + + [Flags] public enum Flags + { + /// Field has a value + has_next_rate = 0x1, + /// If set, indicates that the results may be inexact + inexact = 0x2, + /// Field has a value + has_offset_id_offset = 0x4, + } } - ///See + /// Channel messages
See
[TLDef(0x64479808)] public partial class Messages_ChannelMessages : Messages_MessagesBase { - [Flags] public enum Flags { inexact = 0x2, has_offset_id_offset = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Event count after generation public int pts; + /// Total number of results were found server-side (may not be all included here) public int count; + /// Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.
[IfFlag(2)] public int offset_id_offset; + /// Found messages public MessageBase[] messages; + /// Chats public Dictionary chats; + /// Users public Dictionary users; + [Flags] public enum Flags + { + /// If set, returned results may be inexact + inexact = 0x2, + /// Field has a value + has_offset_id_offset = 0x4, + } + + /// Found messages public override MessageBase[] Messages => messages; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// No new messages matching the query were found
See
[TLDef(0x74535F21)] public partial class Messages_MessagesNotModified : Messages_MessagesBase { + /// Number of results found server-side by the given query public int count; public override MessageBase[] Messages => default; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } - ///See + /// List of chats with auxiliary data.
See
[TLDef(0x64FF9FD5)] - public partial class Messages_Chats : ITLObject { public Dictionary chats; } - ///See + public partial class Messages_Chats : ITLObject + { + /// List of chats + public Dictionary chats; + } + /// Partial list of chats, more would have to be fetched with pagination
See
[TLDef(0x9CD81144, inheritAfter = true)] - public partial class Messages_ChatsSlice : Messages_Chats { public int count; } + public partial class Messages_ChatsSlice : Messages_Chats + { + /// Total number of results that were found server-side (not all are included in chats) + public int count; + } - ///See + /// Extended info on chat and auxiliary data.
See
[TLDef(0xE5D7D19C)] public partial class Messages_ChatFull : ITLObject { + /// Extended info on a chat public ChatFullBase full_chat; + /// List containing basic info on chat public Dictionary chats; + /// List of users mentioned above public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Affected part of communication history with the user or in a chat.
See
[TLDef(0xB45C69D1)] public partial class Messages_AffectedHistory : ITLObject { + /// Number of events occured in a text box public int pts; + /// Number of affected events public int pts_count; + /// If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease public int offset; } - ///See - ///a null value means inputMessagesFilterEmpty + /// Object describes message filter.
Derived classes: , , , , , , , , , , , , , , ,
See
+ /// a null value means inputMessagesFilterEmpty public abstract partial class MessagesFilter : ITLObject { } - ///See + /// Filter for messages containing photos.
See
[TLDef(0x9609A51C)] public partial class InputMessagesFilterPhotos : MessagesFilter { } - ///See + /// Filter for messages containing videos.
See
[TLDef(0x9FC00E65)] public partial class InputMessagesFilterVideo : MessagesFilter { } - ///See + /// Filter for messages containing photos or videos.
See
[TLDef(0x56E9F0E4)] public partial class InputMessagesFilterPhotoVideo : MessagesFilter { } - ///See + /// Filter for messages containing documents.
See
[TLDef(0x9EDDF188)] public partial class InputMessagesFilterDocument : MessagesFilter { } - ///See + /// Return only messages containing URLs
See
[TLDef(0x7EF0DD87)] public partial class InputMessagesFilterUrl : MessagesFilter { } - ///See + /// Return only messages containing gifs
See
[TLDef(0xFFC86587)] public partial class InputMessagesFilterGif : MessagesFilter { } - ///See + /// Return only messages containing voice notes
See
[TLDef(0x50F5C392)] public partial class InputMessagesFilterVoice : MessagesFilter { } - ///See + /// Return only messages containing audio files
See
[TLDef(0x3751B49E)] public partial class InputMessagesFilterMusic : MessagesFilter { } - ///See + /// Return only chat photo changes
See
[TLDef(0x3A20ECB8)] public partial class InputMessagesFilterChatPhotos : MessagesFilter { } - ///See + /// Return only phone calls
See
[TLDef(0x80C99768)] public partial class InputMessagesFilterPhoneCalls : MessagesFilter { - [Flags] public enum Flags { missed = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + + [Flags] public enum Flags + { + /// Return only missed phone calls + missed = 0x1, + } } - ///See + /// Return only round videos and voice notes
See
[TLDef(0x7A7C17A4)] public partial class InputMessagesFilterRoundVoice : MessagesFilter { } - ///See + /// Return only round videos
See
[TLDef(0xB549DA53)] public partial class InputMessagesFilterRoundVideo : MessagesFilter { } - ///See + /// Return only messages where the current user was mentioned.
See
[TLDef(0xC1F8E69A)] public partial class InputMessagesFilterMyMentions : MessagesFilter { } - ///See + /// Return only messages containing geolocations
See
[TLDef(0xE7026D0D)] public partial class InputMessagesFilterGeo : MessagesFilter { } - ///See + /// Return only messages containing contacts
See
[TLDef(0xE062DB83)] public partial class InputMessagesFilterContacts : MessagesFilter { } - ///See + /// Fetch only pinned messages
See
[TLDef(0x1BB00451)] public partial class InputMessagesFilterPinned : MessagesFilter { } - ///See + /// Object contains info on events occured.
Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
See
public abstract partial class Update : ITLObject { } - ///See + /// New message in a private chat or in a legacy group.
See
[TLDef(0x1F2B0AFD)] public partial class UpdateNewMessage : Update { + /// Message public MessageBase message; + /// New quantity of actions in a message box public int pts; + /// Number of generated events public int pts_count; } - ///See + /// Sent message with random_id client identifier was assigned an identifier.
See
[TLDef(0x4E90BFD6)] public partial class UpdateMessageID : Update { + /// id identifier of a respective public int id; + /// Previuosly transferred client random_id identifier public long random_id; } - ///See + /// Messages were deleted.
See
[TLDef(0xA20DB0E5)] public partial class UpdateDeleteMessages : Update { + /// List of identifiers of deleted messages public int[] messages; + /// New quality of actions in a message box public int pts; + /// Number of generated events public int pts_count; } - ///See + /// The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no repeated update received after 6 seconds, it should be considered that the user stopped doing whatever he's been doing.
See
[TLDef(0xC01E857F)] public partial class UpdateUserTyping : Update { + /// User id public long user_id; + /// Action type
Param added in
Layer 17.
public SendMessageAction action; } - ///See + /// The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no repeated update received after 6 seconds, it should be considered that the user stopped doing whatever he's been doing.
See
[TLDef(0x83487AF0)] public partial class UpdateChatUserTyping : UpdateChat { + /// Peer that started typing (can be the chat itself, in case of anonymous admins). public Peer from_id; + /// Type of action
Parameter added in
Layer 17.
public SendMessageAction action; } - ///See + /// Composition of chat participants changed.
See
[TLDef(0x07761198)] - public partial class UpdateChatParticipants : Update { public ChatParticipantsBase participants; } - ///See + public partial class UpdateChatParticipants : Update + { + /// Updated chat participants + public ChatParticipantsBase participants; + } + /// Contact status update.
See
[TLDef(0xE5BDF8DE)] public partial class UpdateUserStatus : Update { + /// User identifier public long user_id; + /// New status public UserStatus status; } - ///See + /// Changes the user's first name, last name and username.
See
[TLDef(0xC3F202E0)] public partial class UpdateUserName : Update { + /// User identifier public long user_id; + /// New first name. Corresponds to the new value of real_first_name field of the constructor. public string first_name; + /// New last name. Corresponds to the new value of real_last_name field of the constructor. public string last_name; + /// New username.
Parameter added in
Layer 18.
public string username; } - ///See + /// Change of contact's profile photo.
See
[TLDef(0xF227868C)] public partial class UpdateUserPhoto : Update { + /// User identifier public long user_id; + /// Date of photo update. public DateTime date; + /// New profile photo public UserProfilePhoto photo; + /// (), if one of the previously used photos is set a profile photo. public bool previous; } - ///See + /// New encrypted message.
See
[TLDef(0x12BCBD9A)] public partial class UpdateNewEncryptedMessage : Update { + /// Message public EncryptedMessageBase message; + /// New qts value, see updates » for more info. public int qts; } - ///See + /// Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.
See
[TLDef(0x1710F156)] - public partial class UpdateEncryptedChatTyping : Update { public int chat_id; } - ///See + public partial class UpdateEncryptedChatTyping : Update + { + /// Chat ID + public int chat_id; + } + /// Change of state in an encrypted chat.
See
[TLDef(0xB4A2E88D)] public partial class UpdateEncryption : Update { + /// Encrypted chat public EncryptedChatBase chat; + /// Date of change public DateTime date; } - ///See + /// Communication history in an encrypted chat was marked as read.
See
[TLDef(0x38FE25B7)] public partial class UpdateEncryptedMessagesRead : Update { + /// Chat ID public int chat_id; + /// Maximum value of data for read messages public DateTime max_date; + /// Time when messages were read public DateTime date; } - ///See + /// New group member.
See
[TLDef(0x3DDA5451)] public partial class UpdateChatParticipantAdd : UpdateChat { + /// ID of the new member public long user_id; + /// ID of the user, who added member to the group public long inviter_id; + /// When was the participant added public DateTime date; + /// Chat version number public int version; } - ///See + /// A member has left the group.
See
[TLDef(0xE32F3D77)] public partial class UpdateChatParticipantDelete : UpdateChat { + /// ID of the user public long user_id; + /// Used in basic groups to reorder updates and make sure that all of them was received. public int version; } - ///See + /// Changes in the data center configuration options.
See
[TLDef(0x8E5E9873)] - public partial class UpdateDcOptions : Update { public DcOption[] dc_options; } - ///See + public partial class UpdateDcOptions : Update + { + /// New connection options + public DcOption[] dc_options; + } + /// Changes in notification settings.
See
[TLDef(0xBEC268EF)] public partial class UpdateNotifySettings : Update { + /// Nofication source public NotifyPeerBase peer; + /// New notification settings public PeerNotifySettings notify_settings; } - ///See + /// A service message for the user.
See
[TLDef(0xEBE46819)] public partial class UpdateServiceNotification : Update { - [Flags] public enum Flags { popup = 0x1, has_inbox_date = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// When was the notification received
The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).
[IfFlag(1)] public DateTime inbox_date; + /// String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes). public string type; + /// Message text public string message; + /// Media content (optional) public MessageMedia media; + /// Message entities for styled text public MessageEntity[] entities; + + [Flags] public enum Flags + { + /// (boolTrue) if the message must be displayed in a popup. + popup = 0x1, + /// Field has a value + has_inbox_date = 0x2, + } } - ///See + /// Privacy rules were changed
See
[TLDef(0xEE3B272A)] public partial class UpdatePrivacy : Update { + /// Peers to which the privacy rules apply public PrivacyKey key; + /// New privacy rules public PrivacyRule[] rules; } - ///See + /// A user's phone number was changed
See
[TLDef(0x05492A13)] public partial class UpdateUserPhone : Update { + /// User ID public long user_id; + /// New phone number public string phone; } - ///See + /// Incoming messages were read
See
[TLDef(0x9C974FDF)] public partial class UpdateReadHistoryInbox : Update { - [Flags] public enum Flags { has_folder_id = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer folder ID, for more info click here [IfFlag(0)] public int folder_id; + /// Peer public Peer peer; + /// Maximum ID of messages read public int max_id; + /// Number of messages that are still unread public int still_unread_count; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; + + [Flags] public enum Flags + { + /// Field has a value + has_folder_id = 0x1, + } } - ///See + /// Outgoing messages were read
See
[TLDef(0x2F2F21BF)] public partial class UpdateReadHistoryOutbox : Update { + /// Peer public Peer peer; + /// Maximum ID of read outgoing messages public int max_id; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; } - ///See + /// An instant view webpage preview was generated
See
[TLDef(0x7F891213)] public partial class UpdateWebPage : Update { + /// Webpage preview public WebPageBase webpage; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; } - ///See + /// Contents of messages in the common message box were read
See
[TLDef(0x68C13933)] public partial class UpdateReadMessagesContents : Update { + /// IDs of read messages public int[] messages; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; } - ///See + /// There are new updates in the specified channel, the client must fetch them.
If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.
See
[TLDef(0x108D941F)] public partial class UpdateChannelTooLong : Update { - [Flags] public enum Flags { has_pts = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The channel public long channel_id; + /// The PTS. [IfFlag(0)] public int pts; + + [Flags] public enum Flags + { + /// Field has a value + has_pts = 0x1, + } } - ///See + /// A new channel is available
See
[TLDef(0x635B4C09)] - public partial class UpdateChannel : Update { public long channel_id; } - ///See + public partial class UpdateChannel : Update + { + /// Channel ID + public long channel_id; + } + /// A new message was sent in a channel/supergroup
See
[TLDef(0x62BA04D9)] public partial class UpdateNewChannelMessage : UpdateNewMessage { } - ///See + /// Incoming messages in a channel/supergroup were read
See
[TLDef(0x922E6E10)] public partial class UpdateReadChannelInbox : Update { - [Flags] public enum Flags { has_folder_id = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer folder ID, for more info click here [IfFlag(0)] public int folder_id; + /// Channel/supergroup ID public long channel_id; + /// Position up to which all incoming messages are read. public int max_id; + /// Count of messages weren't read yet public int still_unread_count; + /// Event count after generation public int pts; + + [Flags] public enum Flags + { + /// Field has a value + has_folder_id = 0x1, + } } - ///See + /// Some messages in a supergroup/channel were deleted
See
[TLDef(0xC32D5B12, inheritAfter = true)] - public partial class UpdateDeleteChannelMessages : UpdateDeleteMessages { public long channel_id; } - ///See + public partial class UpdateDeleteChannelMessages : UpdateDeleteMessages + { + /// Channel ID + public long channel_id; + } + /// The view counter of a message in a channel has changed
See
[TLDef(0xF226AC08)] public partial class UpdateChannelMessageViews : UpdateChannel { + /// ID of the message public int id; + /// New view counter public int views; } - ///See + /// Admin permissions of a user in a legacy group were changed
See
[TLDef(0xD7CA61A2)] public partial class UpdateChatParticipantAdmin : UpdateChat { + /// ID of the (de)admined user public long user_id; + /// Whether the user was rendered admin public bool is_admin; + /// Used in basic groups to reorder updates and make sure that all of them was received. public int version; } - ///See + /// A new stickerset was installed
See
[TLDef(0x688A30AA)] - public partial class UpdateNewStickerSet : Update { public Messages_StickerSet stickerset; } - ///See + public partial class UpdateNewStickerSet : Update + { + /// The installed stickerset + public Messages_StickerSet stickerset; + } + /// The order of stickersets was changed
See
[TLDef(0x0BB2D201)] public partial class UpdateStickerSetsOrder : Update { - [Flags] public enum Flags { masks = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// New sticker order by sticker ID public long[] order; + + [Flags] public enum Flags + { + /// Whether the updated stickers are mask stickers + masks = 0x1, + } } - ///See + /// Installed stickersets have changed, the client should refetch them using messages.getAllStickers
See
[TLDef(0x43AE3DEC)] public partial class UpdateStickerSets : Update { } - ///See + /// The saved gif list has changed, the client should refetch it using messages.getSavedGifs
See
[TLDef(0x9375341E)] public partial class UpdateSavedGifs : Update { } - ///See + /// An incoming inline query
See
[TLDef(0x496F379C)] public partial class UpdateBotInlineQuery : Update { - [Flags] public enum Flags { has_geo = 0x1, has_peer_type = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Query ID public long query_id; + /// User that sent the query public long user_id; + /// Text of query public string query; + /// Attached geolocation [IfFlag(0)] public GeoPoint geo; + /// Type of the chat from which the inline query was sent. [IfFlag(1)] public InlineQueryPeerType peer_type; + /// Offset to navigate through results public string offset; + + [Flags] public enum Flags + { + /// Field has a value + has_geo = 0x1, + /// Field has a value + has_peer_type = 0x2, + } } - ///See + /// The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
See
[TLDef(0x12F12A07)] public partial class UpdateBotInlineSend : Update { - [Flags] public enum Flags { has_geo = 0x1, has_msg_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// The user that chose the result public long user_id; + /// The query that was used to obtain the result public string query; + /// Optional. Sender location, only for bots that require user location [IfFlag(0)] public GeoPoint geo; + /// The unique identifier for the result that was chosen public string id; + /// Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. [IfFlag(1)] public InputBotInlineMessageIDBase msg_id; + + [Flags] public enum Flags + { + /// Field has a value + has_geo = 0x1, + /// Field has a value + has_msg_id = 0x2, + } } - ///See + /// A message was edited in a channel/supergroup
See
[TLDef(0x1B3F4DF7)] public partial class UpdateEditChannelMessage : UpdateEditMessage { } - ///See + /// A callback button was pressed, and the button data was sent to the bot that created the button
See
[TLDef(0xB9CFC48D)] public partial class UpdateBotCallbackQuery : Update { - [Flags] public enum Flags { has_data = 0x1, has_game_short_name = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Query ID public long query_id; + /// ID of the user that pressed the button public long user_id; + /// Chat where the inline keyboard was sent public Peer peer; + /// Message ID public int msg_id; + /// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. public long chat_instance; + /// Callback data [IfFlag(0)] public byte[] data; + /// Short name of a Game to be returned, serves as the unique identifier for the game [IfFlag(1)] public string game_short_name; + + [Flags] public enum Flags + { + /// Field has a value + has_data = 0x1, + /// Field has a value + has_game_short_name = 0x2, + } } - ///See + /// A message was edited
See
[TLDef(0xE40370A3)] public partial class UpdateEditMessage : Update { + /// The new edited message public MessageBase message; + /// PTS public int pts; + /// PTS count public int pts_count; } - ///See + /// This notification is received by bots when a button is pressed
See
[TLDef(0x691E9052)] public partial class UpdateInlineBotCallbackQuery : Update { - [Flags] public enum Flags { has_data = 0x1, has_game_short_name = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Query ID public long query_id; + /// ID of the user that pressed the button public long user_id; + /// ID of the inline message with the button public InputBotInlineMessageIDBase msg_id; + /// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. public long chat_instance; + /// Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. [IfFlag(0)] public byte[] data; + /// Short name of a Game to be returned, serves as the unique identifier for the game [IfFlag(1)] public string game_short_name; + + [Flags] public enum Flags + { + /// Field has a value + has_data = 0x1, + /// Field has a value + has_game_short_name = 0x2, + } } - ///See + /// Outgoing messages in a channel/supergroup were read
See
[TLDef(0xB75F99A9)] public partial class UpdateReadChannelOutbox : Update { + /// Channel/supergroup ID public long channel_id; + /// Position up to which all outgoing messages are read. public int max_id; } - ///See + /// Notifies a change of a message draft.
See
[TLDef(0xEE2BB969)] public partial class UpdateDraftMessage : Update { + /// The peer to which the draft is associated public Peer peer; + /// The draft public DraftMessageBase draft; } - ///See + /// Some featured stickers were marked as read
See
[TLDef(0x571D2742)] public partial class UpdateReadFeaturedStickers : Update { } - ///See + /// The recent sticker list was updated
See
[TLDef(0x9A422C20)] public partial class UpdateRecentStickers : Update { } - ///See + /// The server-side configuration has changed; the client should re-fetch the config using help.getConfig
See
[TLDef(0xA229DD06)] public partial class UpdateConfig : Update { } - ///See + /// Common message box sequence PTS has changed, state has to be refetched using updates.getState
See
[TLDef(0x3354678F)] public partial class UpdatePtsChanged : Update { } - ///See + /// A webpage preview of a link in a channel/supergroup message was generated
See
[TLDef(0x2F2BA99F, inheritAfter = true)] - public partial class UpdateChannelWebPage : UpdateWebPage { public long channel_id; } - ///See + public partial class UpdateChannelWebPage : UpdateWebPage + { + /// Channel/supergroup ID + public long channel_id; + } + /// A dialog was pinned/unpinned
See
[TLDef(0x6E6FE51C)] public partial class UpdateDialogPinned : Update { - [Flags] public enum Flags { pinned = 0x1, has_folder_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer folder ID, for more info click here [IfFlag(1)] public int folder_id; + /// The dialog public DialogPeerBase peer; + + [Flags] public enum Flags + { + /// Whether the dialog was pinned + pinned = 0x1, + /// Field has a value + has_folder_id = 0x2, + } } - ///See + /// Pinned dialogs were updated
See
[TLDef(0xFA0F3CA2)] public partial class UpdatePinnedDialogs : Update { - [Flags] public enum Flags { has_order = 0x1, has_folder_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer folder ID, for more info click here [IfFlag(1)] public int folder_id; + /// New order of pinned dialogs [IfFlag(0)] public DialogPeerBase[] order; + + [Flags] public enum Flags + { + /// Field has a value + has_order = 0x1, + /// Field has a value + has_folder_id = 0x2, + } } - ///See + /// A new incoming event; for bots only
See
[TLDef(0x8317C0C3)] - public partial class UpdateBotWebhookJSON : Update { public DataJSON data; } - ///See + public partial class UpdateBotWebhookJSON : Update + { + /// The event + public DataJSON data; + } + /// A new incoming query; for bots only
See
[TLDef(0x9B9240A6)] public partial class UpdateBotWebhookJSONQuery : Update { + /// Query identifier public long query_id; + /// Query data public DataJSON data; + /// Query timeout public int timeout; } - ///See + /// This object contains information about an incoming shipping query.
See
[TLDef(0xB5AEFD7D)] public partial class UpdateBotShippingQuery : Update { + /// Unique query identifier public long query_id; + /// User who sent the query public long user_id; + /// Bot specified invoice payload public byte[] payload; + /// User specified shipping address public PostAddress shipping_address; } - ///See + /// This object contains information about an incoming pre-checkout query.
See
[TLDef(0x8CAA9A96)] public partial class UpdateBotPrecheckoutQuery : Update { - [Flags] public enum Flags { has_info = 0x1, has_shipping_option_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Unique query identifier public long query_id; + /// User who sent the query public long user_id; + /// Bot specified invoice payload public byte[] payload; + /// Order info provided by the user [IfFlag(0)] public PaymentRequestedInfo info; + /// Identifier of the shipping option chosen by the user [IfFlag(1)] public string shipping_option_id; + /// Three-letter ISO 4217 currency code public string currency; + /// Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long total_amount; + + [Flags] public enum Flags + { + /// Field has a value + has_info = 0x1, + /// Field has a value + has_shipping_option_id = 0x2, + } } - ///See + /// An incoming phone call
See
[TLDef(0xAB0F6B1E)] - public partial class UpdatePhoneCall : Update { public PhoneCallBase phone_call; } - ///See + public partial class UpdatePhoneCall : Update + { + /// Phone call + public PhoneCallBase phone_call; + } + /// A language pack has changed, the client should manually fetch the changed strings using langpack.getDifference
See
[TLDef(0x46560264)] - public partial class UpdateLangPackTooLong : Update { public string lang_code; } - ///See + public partial class UpdateLangPackTooLong : Update + { + /// Language code + public string lang_code; + } + /// Language pack updated
See
[TLDef(0x56022F4D)] - public partial class UpdateLangPack : Update { public LangPackDifference difference; } - ///See + public partial class UpdateLangPack : Update + { + /// Changed strings + public LangPackDifference difference; + } + /// The list of favorited stickers was changed, the client should call messages.getFavedStickers to refetch the new list
See
[TLDef(0xE511996D)] public partial class UpdateFavedStickers : Update { } - ///See + /// The specified channel/supergroup messages were read
See
[TLDef(0x44BDD535)] - public partial class UpdateChannelReadMessagesContents : UpdateChannel { public int[] messages; } - ///See + public partial class UpdateChannelReadMessagesContents : UpdateChannel + { + /// IDs of messages that were read + public int[] messages; + } + /// All contacts were deleted
See
[TLDef(0x7084A7BE)] public partial class UpdateContactsReset : Update { } - ///See + /// The history of a channel/supergroup was hidden.
See
[TLDef(0xB23FC698)] - public partial class UpdateChannelAvailableMessages : UpdateChannel { public int available_min_id; } - ///See + public partial class UpdateChannelAvailableMessages : UpdateChannel + { + /// Identifier of a maximum unavailable message in a channel due to hidden history. + public int available_min_id; + } + /// The manual unread mark of a chat was changed
See
[TLDef(0xE16459C3)] public partial class UpdateDialogUnreadMark : Update { - [Flags] public enum Flags { unread = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The dialog public DialogPeerBase peer; + + [Flags] public enum Flags + { + /// Was the chat marked or unmarked as read + unread = 0x1, + } } - ///See + /// The results of a poll have changed
See
[TLDef(0xACA1657B)] public partial class UpdateMessagePoll : Update { - [Flags] public enum Flags { has_poll = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Poll ID public long poll_id; + /// If the server knows the client hasn't cached this poll yet, the poll itself [IfFlag(0)] public Poll poll; + /// New poll results public PollResults results; + + [Flags] public enum Flags + { + /// Field has a value + has_poll = 0x1, + } } - ///See + /// Default banned rights in a normal chat were updated
See
[TLDef(0x54C01850)] public partial class UpdateChatDefaultBannedRights : Update { + /// The chat public Peer peer; + /// New default banned rights public ChatBannedRights default_banned_rights; + /// Version public int version; } - ///See + /// The peer list of a peer folder was updated
See
[TLDef(0x19360DC0)] public partial class UpdateFolderPeers : Update { + /// New peer list public FolderPeer[] folder_peers; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; } - ///See + /// Settings of a certain peer have changed
See
[TLDef(0x6A7E7366)] public partial class UpdatePeerSettings : Update { + /// The peer public Peer peer; + /// Associated peer settings public PeerSettings settings; } - ///See + /// List of peers near you was updated
See
[TLDef(0xB4AFCFB0)] - public partial class UpdatePeerLocated : Update { public PeerLocatedBase[] peers; } - ///See + public partial class UpdatePeerLocated : Update + { + /// Geolocated peer list update + public PeerLocatedBase[] peers; + } + /// A message was added to the schedule queue of a chat
See
[TLDef(0x39A51DFB)] - public partial class UpdateNewScheduledMessage : Update { public MessageBase message; } - ///See + public partial class UpdateNewScheduledMessage : Update + { + /// Message + public MessageBase message; + } + /// Some scheduled messages were deleted from the schedule queue of a chat
See
[TLDef(0x90866CEE)] public partial class UpdateDeleteScheduledMessages : Update { + /// Peer public Peer peer; + /// Deleted scheduled messages public int[] messages; } - ///See + /// A cloud theme was updated
See
[TLDef(0x8216FBA3)] - public partial class UpdateTheme : Update { public Theme theme; } - ///See + public partial class UpdateTheme : Update + { + /// Theme + public Theme theme; + } + /// Live geoposition message was viewed
See
[TLDef(0x871FB939)] public partial class UpdateGeoLiveViewed : Update { + /// The user that viewed the live geoposition public Peer peer; + /// Message ID of geoposition message public int msg_id; } - ///See + /// A login token (for login via QR code) was accepted.
See
[TLDef(0x564FE691)] public partial class UpdateLoginToken : Update { } - ///See + /// A specific user has voted in a poll
See
[TLDef(0x106395C9)] public partial class UpdateMessagePollVote : Update { + /// Poll ID public long poll_id; + /// User ID public long user_id; + /// Chosen option(s) public byte[][] options; + /// New qts value, see updates » for more info. public int qts; } - ///See + /// A new folder was added
See
[TLDef(0x26FFDE7D)] public partial class UpdateDialogFilter : Update { - [Flags] public enum Flags { has_filter = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Folder ID public int id; + /// Folder info [IfFlag(0)] public DialogFilter filter; + + [Flags] public enum Flags + { + /// Field has a value + has_filter = 0x1, + } } - ///See + /// New folder order
See
[TLDef(0xA5D72105)] - public partial class UpdateDialogFilterOrder : Update { public int[] order; } - ///See + public partial class UpdateDialogFilterOrder : Update + { + /// Ordered folder IDs + public int[] order; + } + /// Clients should update folder info
See
[TLDef(0x3504914F)] public partial class UpdateDialogFilters : Update { } - ///See + /// Incoming phone call signaling payload
See
[TLDef(0x2661BF09)] public partial class UpdatePhoneCallSignalingData : Update { + /// Phone call ID public long phone_call_id; + /// Signaling payload public byte[] data; } - ///See + /// The forward counter of a message in a channel has changed
See
[TLDef(0xD29A27F4)] public partial class UpdateChannelMessageForwards : UpdateChannel { + /// ID of the message public int id; + /// New forward counter public int forwards; } - ///See + /// Incoming comments in a discussion thread were marked as read
See
[TLDef(0xD6B19546)] public partial class UpdateReadChannelDiscussionInbox : Update { - [Flags] public enum Flags { has_broadcast_id = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Discussion group ID public long channel_id; + /// ID of the group message that started the thread (message in linked discussion group) public int top_msg_id; + /// Message ID of latest read incoming message for this thread public int read_max_id; + /// If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id) [IfFlag(0)] public long broadcast_id; + /// If set, contains the ID of the channel post that started the the comment thread [IfFlag(0)] public int broadcast_post; + + [Flags] public enum Flags + { + /// Field has a value + has_broadcast_id = 0x1, + } } - ///See + /// Outgoing comments in a discussion thread were marked as read
See
[TLDef(0x695C9E7C)] public partial class UpdateReadChannelDiscussionOutbox : Update { + /// Supergroup ID public long channel_id; + /// ID of the group message that started the thread public int top_msg_id; + /// Message ID of latest read outgoing message for this thread public int read_max_id; } - ///See + /// A peer was blocked
See
[TLDef(0x246A4B22)] public partial class UpdatePeerBlocked : Update { + /// The blocked peer public Peer peer_id; + /// Whether the peer was blocked or unblocked public bool blocked; } - ///See + /// A user is typing in a supergroup, channel or message thread
See
[TLDef(0x8C88C923)] public partial class UpdateChannelUserTyping : Update { - [Flags] public enum Flags { has_top_msg_id = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Channel ID public long channel_id; + /// Thread ID [IfFlag(0)] public int top_msg_id; + /// The peer that is typing public Peer from_id; + /// Whether the user is typing, sending a media or doing something else public SendMessageAction action; + + [Flags] public enum Flags + { + /// Field has a value + has_top_msg_id = 0x1, + } } - ///See + /// Some messages were pinned in a chat
See
[TLDef(0xED85EAB5)] public partial class UpdatePinnedMessages : Update { - [Flags] public enum Flags { pinned = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer public Peer peer; + /// Message IDs public int[] messages; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; + + [Flags] public enum Flags + { + /// Whether the messages were pinned or unpinned + pinned = 0x1, + } } - ///See + /// Messages were pinned/unpinned in a channel/supergroup
See
[TLDef(0x5BB98608)] public partial class UpdatePinnedChannelMessages : Update { - [Flags] public enum Flags { pinned = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Channel ID public long channel_id; + /// Messages public int[] messages; + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; + + [Flags] public enum Flags + { + /// Whether the messages were pinned or unpinned + pinned = 0x1, + } } - ///See + /// A new chat is available
See
[TLDef(0xF89A6A4E)] - public partial class UpdateChat : Update { public long chat_id; } - ///See + public partial class UpdateChat : Update + { + /// Chat ID + public long chat_id; + } + /// The participant list of a certain group call has changed
See
[TLDef(0xF2EBDB4E)] public partial class UpdateGroupCallParticipants : Update { + /// Group call public InputGroupCall call; + /// New participant list public GroupCallParticipant[] participants; + /// Version public int version; } - ///See + /// A new groupcall was started
See
[TLDef(0x14B24500)] public partial class UpdateGroupCall : Update { + /// The channel/supergroup where this group call or livestream takes place public long chat_id; + /// Info about the group call or livestream public GroupCallBase call; } - ///See + /// The Time-To-Live for messages sent by the current user in a specific chat has changed
See
[TLDef(0xBB9BB9A5)] public partial class UpdatePeerHistoryTTL : Update { - [Flags] public enum Flags { has_ttl_period = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The chat public Peer peer; + /// The new Time-To-Live [IfFlag(0)] public int ttl_period; + + [Flags] public enum Flags + { + /// Field has a value + has_ttl_period = 0x1, + } } - ///See + /// A user has joined or left a specific chat
See
[TLDef(0xD087663A)] public partial class UpdateChatParticipant : Update { - [Flags] public enum Flags { has_prev_participant = 0x1, has_new_participant = 0x2, has_invite = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Chat ID public long chat_id; + /// When did this event occur public DateTime date; + /// User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself) public long actor_id; + /// User that was affected by the change public long user_id; + /// Previous participant info (empty if this participant just joined) [IfFlag(0)] public ChatParticipantBase prev_participant; + /// New participant info (empty if this participant just left) [IfFlag(1)] public ChatParticipantBase new_participant; + /// The invite that was used to join the group [IfFlag(2)] public ExportedChatInvite invite; + /// New qts value, see updates » for more info. public int qts; + + [Flags] public enum Flags + { + /// Field has a value + has_prev_participant = 0x1, + /// Field has a value + has_new_participant = 0x2, + /// Field has a value + has_invite = 0x4, + } } - ///See + /// A participant has left, joined, was banned or admined in a channel or supergroup.
See
[TLDef(0x985D3ABB)] public partial class UpdateChannelParticipant : Update { - [Flags] public enum Flags { has_prev_participant = 0x1, has_new_participant = 0x2, has_invite = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Channel ID public long channel_id; + /// Date of the event public DateTime date; + /// User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself) public long actor_id; + /// User that was affected by the change public long user_id; + /// Previous participant status [IfFlag(0)] public ChannelParticipantBase prev_participant; + /// New participant status [IfFlag(1)] public ChannelParticipantBase new_participant; + /// Chat invite used to join the channel/supergroup [IfFlag(2)] public ExportedChatInvite invite; + /// New qts value, see updates » for more info. public int qts; + + [Flags] public enum Flags + { + /// Field has a value + has_prev_participant = 0x1, + /// Field has a value + has_new_participant = 0x2, + /// Field has a value + has_invite = 0x4, + } } - ///See + /// A bot was stopped or re-started.
See
[TLDef(0xC4870A49)] public partial class UpdateBotStopped : Update { + /// The bot ID public long user_id; + /// When did this action occur public DateTime date; + /// Whether the bot was stopped or started public bool stopped; + /// New qts value, see updates » for more info. public int qts; } - ///See + /// New WebRTC parameters
See
[TLDef(0x0B783982)] public partial class UpdateGroupCallConnection : Update { - [Flags] public enum Flags { presentation = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// WebRTC parameters public DataJSON params_; + + [Flags] public enum Flags + { + /// Are these parameters related to the screen capture session currently in progress? + presentation = 0x1, + } } - ///See + /// The command set of a certain bot in a certain chat has changed.
See
[TLDef(0x4D712F2E)] public partial class UpdateBotCommands : Update { + /// The affected chat public Peer peer; + /// ID of the bot that changed its command set public long bot_id; + /// New bot commands public BotCommand[] commands; } - ///See + ///
See
[TLDef(0x7063C3DB)] public partial class UpdatePendingJoinRequests : Update { @@ -2264,7 +3973,7 @@ namespace TL public int requests_pending; public long[] recent_requesters; } - ///See + ///
See
[TLDef(0x11DFA986)] public partial class UpdateBotChatInviteRequester : Update { @@ -2276,3047 +3985,5218 @@ namespace TL public int qts; } - ///See + /// Updates state.
See
[TLDef(0xA56C2A3E)] public partial class Updates_State : ITLObject { + /// Number of events occured in a text box public int pts; + /// Position in a sequence of updates in secret chats. For further detailes refer to article secret chats
Parameter was added in eigth layer.
public int qts; + /// Date of condition public DateTime date; + /// Number of sent updates public int seq; + /// Number of unread messages public int unread_count; } - ///See + ///
Derived classes: , , ,
See
public abstract partial class Updates_DifferenceBase : ITLObject { + /// List of new messages public abstract MessageBase[] NewMessages { get; } + /// List of new encrypted secret chat messages public abstract EncryptedMessageBase[] NewEncryptedMessages { get; } + /// List of updates public abstract Update[] OtherUpdates { get; } + /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } - ///See + /// No events.
See
[TLDef(0x5D75A138)] public partial class Updates_DifferenceEmpty : Updates_DifferenceBase { + /// Current date public DateTime date; + /// Number of sent updates public int seq; public override MessageBase[] NewMessages => Array.Empty(); public override EncryptedMessageBase[] NewEncryptedMessages => Array.Empty(); public override Update[] OtherUpdates => Array.Empty(); + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } - ///See + /// Full list of occurred events.
See
[TLDef(0x00F49CA0)] public partial class Updates_Difference : Updates_DifferenceBase { + /// List of new messages public MessageBase[] new_messages; + /// List of new encrypted secret chat messages public EncryptedMessageBase[] new_encrypted_messages; + /// List of updates public Update[] other_updates; + /// List of chats mentioned in events public Dictionary chats; + /// List of users mentioned in events public Dictionary users; + /// Current state public Updates_State state; + /// List of new messages public override MessageBase[] NewMessages => new_messages; + /// List of new encrypted secret chat messages public override EncryptedMessageBase[] NewEncryptedMessages => new_encrypted_messages; + /// List of updates public override Update[] OtherUpdates => other_updates; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Incomplete list of occurred events.
See
[TLDef(0xA8FB1981)] public partial class Updates_DifferenceSlice : Updates_DifferenceBase { + /// List of new messgaes public MessageBase[] new_messages; + /// New messages from the encrypted event sequence public EncryptedMessageBase[] new_encrypted_messages; + /// List of updates public Update[] other_updates; + /// List of chats mentioned in events public Dictionary chats; + /// List of users mentioned in events public Dictionary users; + /// Intermediary state public Updates_State intermediate_state; + /// List of new messgaes public override MessageBase[] NewMessages => new_messages; + /// New messages from the encrypted event sequence public override EncryptedMessageBase[] NewEncryptedMessages => new_encrypted_messages; + /// List of updates public override Update[] OtherUpdates => other_updates; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// The difference is too long, and the specified state must be used to refetch updates.
See
[TLDef(0x4AFE8F6D)] public partial class Updates_DifferenceTooLong : Updates_DifferenceBase { + /// The new state to use. public int pts; public override MessageBase[] NewMessages => default; public override EncryptedMessageBase[] NewEncryptedMessages => default; public override Update[] OtherUpdates => default; + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } - ///See + ///
Derived classes: , , , , , ,
See
public abstract partial class UpdatesBase : ITLObject { + /// date public abstract DateTime Date { get; } } - ///See + /// Too many updates, it is necessary to execute updates.getDifference.
See
[TLDef(0xE317AF7E)] public partial class UpdatesTooLong : UpdatesBase { public override DateTime Date => default; } - ///See + /// Info about a message sent to (received from) another user
See
[TLDef(0x313BC7F8)] 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_ttl_period = 0x2000000 } + /// Flags, see TL conditional fields public Flags flags; + /// The message ID public int id; + /// The ID of the sender (if outgoing will be the ID of the destination) of the message public long user_id; + /// The message public string message; + /// PTS public int pts; + /// PTS count public int pts_count; + /// date public DateTime date; + /// Info about a forwarded message [IfFlag(2)] public MessageFwdHeader fwd_from; + /// Info about the inline bot used to generate this message [IfFlag(11)] public long via_bot_id; + /// Reply and thread information [IfFlag(3)] public MessageReplyHeader reply_to; + /// Entities for styled text [IfFlag(7)] public MessageEntity[] entities; + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; + [Flags] public enum Flags + { + /// Whether the message is outgoing + out_ = 0x2, + /// Field has a value + has_fwd_from = 0x4, + /// Field has a value + has_reply_to = 0x8, + /// Whether we were mentioned in the message + mentioned = 0x10, + /// Whether there are some unread mentions in this message + media_unread = 0x20, + /// Field has a value + has_entities = 0x80, + /// Field has a value + has_via_bot_id = 0x800, + /// If true, the message is a silent message, no notifications should be triggered + silent = 0x2000, + /// Field has a value + has_ttl_period = 0x2000000, + } + + /// date public override DateTime Date => date; } - ///See + /// Shortened constructor containing info on one new incoming text message from a chat
See
[TLDef(0x4D6DEEA5)] 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_ttl_period = 0x2000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the message public int id; + /// ID of the sender of the message public long from_id; + /// ID of the chat where the message was sent public long chat_id; + /// Message public string message; + /// PTS public int pts; + /// PTS count public int pts_count; + /// date public DateTime date; + /// Info about a forwarded message [IfFlag(2)] public MessageFwdHeader fwd_from; + /// Info about the inline bot used to generate this message [IfFlag(11)] public long via_bot_id; + /// Reply (thread) information [IfFlag(3)] public MessageReplyHeader reply_to; + /// Entities for styled text [IfFlag(7)] public MessageEntity[] entities; + /// Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; + [Flags] public enum Flags + { + /// Whether the message is outgoing + out_ = 0x2, + /// Field has a value + has_fwd_from = 0x4, + /// Field has a value + has_reply_to = 0x8, + /// Whether we were mentioned in this message + mentioned = 0x10, + /// Whether the message contains some unread mentions + media_unread = 0x20, + /// Field has a value + has_entities = 0x80, + /// Field has a value + has_via_bot_id = 0x800, + /// If true, the message is a silent message, no notifications should be triggered + silent = 0x2000, + /// Field has a value + has_ttl_period = 0x2000000, + } + + /// date public override DateTime Date => date; } - ///See + /// Shortened constructor containing info on one update not requiring auxiliary data
See
[TLDef(0x78D4DEC1)] public partial class UpdateShort : UpdatesBase { + /// Update public Update update; + /// Date of event public DateTime date; + /// Date of event public override DateTime Date => date; } - ///See + /// Constructor for a group of updates.
See
[TLDef(0x725B04C3)] public partial class UpdatesCombined : UpdatesBase { + /// List of updates public Update[] updates; + /// List of users mentioned in updates public Dictionary users; + /// List of chats mentioned in updates public Dictionary chats; + /// Current date public DateTime date; + /// Value seq for the earliest update in a group public int seq_start; + /// Value seq for the latest update in a group public int seq; + /// Current date public override DateTime Date => date; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + ///
See
[TLDef(0x74AE4240)] public partial class Updates : UpdatesBase { + /// List of updates public Update[] updates; + /// List of users mentioned in updates public Dictionary users; + /// List of chats mentioned in updates public Dictionary chats; + /// Current date public DateTime date; + /// Total number of sent updates public int seq; + /// Current date public override DateTime Date => date; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).
See
[TLDef(0x9015E101)] public partial class UpdateShortSentMessage : UpdatesBase { - [Flags] public enum Flags { out_ = 0x2, has_entities = 0x80, has_media = 0x200, has_ttl_period = 0x2000000 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the sent message public int id; + /// PTS public int pts; + /// PTS count public int pts_count; + /// date public DateTime date; + /// Attached media [IfFlag(9)] public MessageMedia media; + /// Entities for styled text [IfFlag(7)] public MessageEntity[] entities; + /// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. [IfFlag(25)] public int ttl_period; + [Flags] public enum Flags + { + /// Whether the message is outgoing + out_ = 0x2, + /// Field has a value + has_entities = 0x80, + /// Field has a value + has_media = 0x200, + /// Field has a value + has_ttl_period = 0x2000000, + } + + /// date public override DateTime Date => date; } - ///See + /// Full list of photos with auxiliary data.
See
[TLDef(0x8DCA6AA5)] public partial class Photos_Photos : ITLObject { + /// List of photos public PhotoBase[] photos; + /// List of mentioned users public Dictionary users; } - ///See + /// Incomplete list of photos with auxiliary data.
See
[TLDef(0x15051F54, inheritAfter = true)] - public partial class Photos_PhotosSlice : Photos_Photos { public int count; } + public partial class Photos_PhotosSlice : Photos_Photos + { + /// Total number of photos + public int count; + } - ///See + /// Photo with auxiliary data.
See
[TLDef(0x20212CA8)] public partial class Photos_Photo : ITLObject { + /// Photo public PhotoBase photo; + /// Users public Dictionary users; } - ///See + ///
Derived classes: ,
See
public abstract partial class Upload_FileBase : ITLObject { } - ///See + /// File content.
See
[TLDef(0x096A18D5)] public partial class Upload_File : Upload_FileBase { + /// File type public Storage_FileType type; + /// Modification type public int mtime; + /// Binary data, file content public byte[] bytes; } - ///See + /// The file must be downloaded from a CDN DC.
See
[TLDef(0xF18CDA44)] public partial class Upload_FileCdnRedirect : Upload_FileBase { + /// CDN DC ID public int dc_id; + /// File token (see CDN files) public byte[] file_token; + /// Encryption key (see CDN files) public byte[] encryption_key; + /// Encryption IV (see CDN files) public byte[] encryption_iv; + /// File hashes (see CDN files) public FileHash[] file_hashes; } - ///See + /// Data centre
See
[TLDef(0x18B7A10D)] public partial class DcOption : ITLObject { - [Flags] public enum Flags { ipv6 = 0x1, media_only = 0x2, tcpo_only = 0x4, cdn = 0x8, static_ = 0x10, has_secret = 0x400 } + /// Flags, see TL conditional fields public Flags flags; + /// DC ID public int id; + /// IP address of DC public string ip_address; + /// Port public int port; + /// If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation [IfFlag(10)] public byte[] secret; + + [Flags] public enum Flags + { + /// Whether the specified IP is an IPv6 address + ipv6 = 0x1, + /// Whether this DC should only be used to download or upload files + media_only = 0x2, + /// Whether this DC only supports connection with transport obfuscation + tcpo_only = 0x4, + /// Whether this is a CDN DC. + cdn = 0x8, + /// If set, this IP should be used when connecting through a proxy + static_ = 0x10, + /// Field has a value + has_secret = 0x400, + } } - ///See + /// Current configuration
See
[TLDef(0x330B4067)] public partial class Config : ITLObject { - [Flags] public enum Flags { has_tmp_sessions = 0x1, phonecalls_enabled = 0x2, has_suggested_lang_code = 0x4, - default_p2p_contacts = 0x8, preload_featured_stickers = 0x10, ignore_phone_entities = 0x20, revoke_pm_inbox = 0x40, - has_autoupdate_url_prefix = 0x80, blocked_mode = 0x100, has_gif_search_username = 0x200, has_venue_search_username = 0x400, - has_img_search_username = 0x800, has_static_maps_provider = 0x1000, pfs_enabled = 0x2000 } + /// Flags, see TL conditional fields public Flags flags; + /// Current date at the server public DateTime date; + /// Expiration date of this config: when it expires it'll have to be refetched using help.getConfig public DateTime expires; + /// Whether we're connected to the test DCs public bool test_mode; + /// ID of the DC that returned the reply public int this_dc; + /// DC IP list public DcOption[] dc_options; + /// Domain name for fetching encrypted DC list from DNS TXT record public string dc_txt_domain_name; + /// Maximum member count for normal groups public int chat_size_max; + /// Maximum member count for supergroups public int megagroup_size_max; + /// Maximum number of messages that can be forwarded at once using messages.forwardMessages. public int forwarded_count_max; + /// The client should update its online status every N milliseconds public int online_update_period_ms; + /// Delay before offline status needs to be sent to the server public int offline_blur_timeout_ms; + /// Time without any user activity after which it should be treated offline public int offline_idle_timeout_ms; + /// If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds. public int online_cloud_timeout_ms; + /// If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds. public int notify_cloud_delay_ms; + /// If some other client is online, then delay notification for notification_default_delay_ms milliseconds public int notify_default_delay_ms; + /// Not for client use public int push_chat_period_ms; + /// Not for client use public int push_chat_limit; + /// Maximum count of saved gifs public int saved_gifs_limit; + /// Only messages with age smaller than the one specified can be edited public int edit_time_limit; + /// Only channel/supergroup messages with age smaller than the specified can be deleted public int revoke_time_limit; + /// Only private messages with age smaller than the specified can be deleted public int revoke_pm_time_limit; + /// Exponential decay rate for computing top peer rating public int rating_e_decay; + /// Maximum number of recent stickers public int stickers_recent_limit; + /// Maximum number of faved stickers public int stickers_faved_limit; + /// Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read public int channels_read_media_period; + /// Temporary passport sessions [IfFlag(0)] public int tmp_sessions; + /// Maximum count of pinned dialogs public int pinned_dialogs_count_max; + /// Maximum count of dialogs per folder public int pinned_infolder_count_max; + /// Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call public int call_receive_timeout_ms; + /// Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused public int call_ring_timeout_ms; + /// VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted public int call_connect_timeout_ms; + /// If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted public int call_packet_timeout_ms; + /// The domain to use to parse in-app links.
For example t.me indicates that t.me/username links should parsed to @username, t.me/addsticker/name should be parsed to the appropriate stickerset and so on...
public string me_url_prefix; + /// URL to use to auto-update the current app [IfFlag(7)] public string autoupdate_url_prefix; + /// Username of the bot to use to search for GIFs [IfFlag(9)] public string gif_search_username; + /// Username of the bot to use to search for venues [IfFlag(10)] public string venue_search_username; + /// Username of the bot to use for image search [IfFlag(11)] public string img_search_username; + /// ID of the map provider to use for venues [IfFlag(12)] public string static_maps_provider; + /// Maximum length of caption (length in utf8 codepoints) public int caption_length_max; + /// Maximum length of messages (length in utf8 codepoints) public int message_length_max; + /// DC ID to use to download webfiles public int webfile_dc_id; + /// Suggested language code [IfFlag(2)] public string suggested_lang_code; + /// Language pack version [IfFlag(2)] public int lang_pack_version; + /// Basic language pack version [IfFlag(2)] public int base_lang_pack_version; + + [Flags] public enum Flags + { + /// Field has a value + has_tmp_sessions = 0x1, + /// Whether phone calls can be used + phonecalls_enabled = 0x2, + /// Field has a value + has_suggested_lang_code = 0x4, + /// Whether the client should use P2P by default for phone calls with contacts + default_p2p_contacts = 0x8, + /// Whether the client should preload featured stickers + preload_featured_stickers = 0x10, + /// Whether the client should ignore phone entities + ignore_phone_entities = 0x20, + /// Whether incoming private messages can be deleted for both participants + revoke_pm_inbox = 0x40, + /// Field has a value + has_autoupdate_url_prefix = 0x80, + /// Indicates that telegram is probably censored by governments/ISPs in the current region + blocked_mode = 0x100, + /// Field has a value + has_gif_search_username = 0x200, + /// Field has a value + has_venue_search_username = 0x400, + /// Field has a value + has_img_search_username = 0x800, + /// Field has a value + has_static_maps_provider = 0x1000, + /// Whether pfs was used + pfs_enabled = 0x2000, + } } - ///See + /// Nearest data centre, according to geo-ip.
See
[TLDef(0x8E1A1775)] public partial class NearestDc : ITLObject { + /// Country code determined by geo-ip public string country; + /// Number of current data centre public int this_dc; + /// Number of nearest data centre public int nearest_dc; } - ///See - ///a null value means help.noAppUpdate + /// An update is available for the application.
See
+ /// a null value means help.noAppUpdate [TLDef(0xCCBBCE30)] public partial class Help_AppUpdate : ITLObject { - [Flags] public enum Flags { can_not_skip = 0x1, has_document = 0x2, has_url = 0x4, has_sticker = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Update ID public int id; + /// New version name public string version; + /// Text description of the update public string text; + /// Message entities for styled text public MessageEntity[] entities; + /// Application binary [IfFlag(1)] public DocumentBase document; + /// Application download URL [IfFlag(2)] public string url; + /// Associated sticker [IfFlag(3)] public DocumentBase sticker; + + [Flags] public enum Flags + { + /// Unskippable, the new info must be shown to the user (with a popup or something else) + can_not_skip = 0x1, + /// Field has a value + has_document = 0x2, + /// Field has a value + has_url = 0x4, + /// Field has a value + has_sticker = 0x8, + } } - ///See + /// Text of a text message with an invitation to install Telegram.
See
[TLDef(0x18CB9F78)] - public partial class Help_InviteText : ITLObject { public string message; } + public partial class Help_InviteText : ITLObject + { + /// Text of the message + public string message; + } - ///See + ///
Derived classes: , , , ,
See
public abstract partial class EncryptedChatBase : ITLObject { + /// Chat ID public abstract int ID { get; } } - ///See + /// Empty constructor.
See
[TLDef(0xAB7EC0A0)] public partial class EncryptedChatEmpty : EncryptedChatBase { + /// Chat ID public int id; + /// Chat ID public override int ID => id; } - ///See + /// Chat waiting for approval of second participant.
See
[TLDef(0x66B25953)] public partial class EncryptedChatWaiting : EncryptedChatBase { + /// Chat ID public int id; + /// Checking sum depending on user ID public long access_hash; + /// Date of chat creation public DateTime date; + /// Chat creator ID public long admin_id; + /// ID of second chat participant public long participant_id; + /// Chat ID public override int ID => id; } - ///See + /// Request to create an encrypted chat.
See
[TLDef(0x48F1D94C)] public partial class EncryptedChatRequested : EncryptedChatBase { - [Flags] public enum Flags { has_folder_id = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer folder ID, for more info click here [IfFlag(0)] public int folder_id; + /// Chat ID public int id; + /// Check sum depending on user ID public long access_hash; + /// Chat creation date public DateTime date; + /// Chat creator ID public long admin_id; + /// ID of second chat participant public long participant_id; + /// A = g ^ a mod p, see Wikipedia public byte[] g_a; + [Flags] public enum Flags + { + /// Field has a value + has_folder_id = 0x1, + } + + /// Chat ID public override int ID => id; } - ///See + /// Encrypted chat
See
[TLDef(0x61F0D4C7)] public partial class EncryptedChat : EncryptedChatBase { + /// Chat ID public int id; + /// Check sum dependant on the user ID public long access_hash; + /// Date chat was created public DateTime date; + /// Chat creator ID public long admin_id; + /// ID of the second chat participant public long participant_id; + /// B = g ^ b mod p, if the currently authorized user is the chat's creator,
or A = g ^ a mod p otherwise
See
Wikipedia for more info
public byte[] g_a_or_b; + /// 64-bit fingerprint of received key public long key_fingerprint; + /// Chat ID public override int ID => id; } - ///See + /// Discarded or deleted chat.
See
[TLDef(0x1E1C7C45)] public partial class EncryptedChatDiscarded : EncryptedChatBase { - [Flags] public enum Flags { history_deleted = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Chat ID public int id; + [Flags] public enum Flags + { + /// Whether both users of this secret chat should also remove all of its messages + history_deleted = 0x1, + } + + /// Chat ID public override int ID => id; } - ///See + /// Creates an encrypted chat.
See
[TLDef(0xF141B5E1)] public partial class InputEncryptedChat : ITLObject { + /// Chat ID public int chat_id; + /// Checking sum from constructor , or public long access_hash; } - ///See - ///a null value means encryptedFileEmpty + /// Encrypted file.
See
+ /// a null value means encryptedFileEmpty [TLDef(0x4A70994C)] public partial class EncryptedFile : ITLObject { + /// File ID public long id; + /// Checking sum depending on user ID public long access_hash; + /// File size in bytes public int size; + /// Number of data centre public int dc_id; + /// 32-bit fingerprint of key used for file encryption public int key_fingerprint; } - ///See - ///a null value means inputEncryptedFileEmpty + ///
Derived classes: , ,
See
+ /// a null value means inputEncryptedFileEmpty public abstract partial class InputEncryptedFileBase : ITLObject { + /// Random file ID created by clien public abstract long ID { get; } } - ///See + /// Sets new encrypted file saved by parts using upload.saveFilePart method.
See
[TLDef(0x64BD0306)] public partial class InputEncryptedFileUploaded : InputEncryptedFileBase { + /// Random file ID created by clien public long id; + /// Number of saved parts public int parts; + /// In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use public byte[] md5_checksum; + /// 32-bit fingerprint of the key used to encrypt a file public int key_fingerprint; + /// Random file ID created by clien public override long ID => id; } - ///See + /// Sets forwarded encrypted file for attachment.
See
[TLDef(0x5A17B5E5)] public partial class InputEncryptedFile : InputEncryptedFileBase { + /// File ID, value of id parameter from public long id; + /// Checking sum, value of access_hash parameter from public long access_hash; + /// File ID, value of id parameter from public override long ID => id; } - ///See + /// Assigns a new big encrypted file (over 10Mb in size), saved in parts using the method upload.saveBigFilePart.
See
[TLDef(0x2DC173C8)] public partial class InputEncryptedFileBigUploaded : InputEncryptedFileBase { + /// Random file id, created by the client public long id; + /// Number of saved parts public int parts; + /// 32-bit imprint of the key used to encrypt the file public int key_fingerprint; + /// Random file id, created by the client public override long ID => id; } - ///See + ///
Derived classes: ,
See
public abstract partial class EncryptedMessageBase : ITLObject { + /// Random message ID, assigned by the author of message public abstract long RandomId { get; } + /// ID of encrypted chat public abstract int ChatId { get; } + /// Date of sending public abstract DateTime Date { get; } + /// TL-serialising of type, encrypted with the key creatied at stage of chat initialization public abstract byte[] Bytes { get; } } - ///See + /// Encrypted message.
See
[TLDef(0xED18C118)] public partial class EncryptedMessage : EncryptedMessageBase { + /// Random message ID, assigned by the author of message public long random_id; + /// ID of encrypted chat public int chat_id; + /// Date of sending public DateTime date; + /// TL-serialising of type, encrypted with the key creatied at stage of chat initialization public byte[] bytes; + /// Attached encrypted file public EncryptedFile file; + /// Random message ID, assigned by the author of message public override long RandomId => random_id; + /// ID of encrypted chat public override int ChatId => chat_id; + /// Date of sending public override DateTime Date => date; + /// TL-serialising of type, encrypted with the key creatied at stage of chat initialization public override byte[] Bytes => bytes; } - ///See + /// Encrypted service message
See
[TLDef(0x23734B06)] public partial class EncryptedMessageService : EncryptedMessageBase { + /// Random message ID, assigned by the author of message public long random_id; + /// ID of encrypted chat public int chat_id; + /// Date of sending public DateTime date; + /// TL-serialising of type, encrypted with the key creatied at stage of chat initialization public byte[] bytes; + /// Random message ID, assigned by the author of message public override long RandomId => random_id; + /// ID of encrypted chat public override int ChatId => chat_id; + /// Date of sending public override DateTime Date => date; + /// TL-serialising of type, encrypted with the key creatied at stage of chat initialization public override byte[] Bytes => bytes; } - ///See + ///
Derived classes: ,
See
public abstract partial class Messages_DhConfigBase : ITLObject { } - ///See + /// Configuring parameters did not change.
See
[TLDef(0xC0E24635)] - public partial class Messages_DhConfigNotModified : Messages_DhConfigBase { public byte[] random; } - ///See + public partial class Messages_DhConfigNotModified : Messages_DhConfigBase + { + /// Random sequence of bytes of assigned length + public byte[] random; + } + /// New set of configuring parameters.
See
[TLDef(0x2C221EDD)] public partial class Messages_DhConfig : Messages_DhConfigBase { + /// New value prime, see Wikipedia public int g; + /// New value primitive root, see Wikipedia public byte[] p; + /// Vestion of set of parameters public int version; + /// Random sequence of bytes of assigned length public byte[] random; } - ///See + /// Message without file attachemts sent to an encrypted file.
See
[TLDef(0x560F8935)] - public partial class Messages_SentEncryptedMessage : ITLObject { public DateTime date; } - ///See + public partial class Messages_SentEncryptedMessage : ITLObject + { + /// Date of sending + public DateTime date; + } + /// Message with a file enclosure sent to a protected chat
See
[TLDef(0x9493FF32)] - public partial class Messages_SentEncryptedFile : Messages_SentEncryptedMessage { public EncryptedFile file; } + public partial class Messages_SentEncryptedFile : Messages_SentEncryptedMessage + { + /// Attached file + public EncryptedFile file; + } - ///See - ///a null value means inputDocumentEmpty + /// Defines a video for subsequent interaction.
See
+ /// a null value means inputDocumentEmpty [TLDef(0x1ABFB575)] public partial class InputDocument : ITLObject { + /// Document ID public long id; + /// access_hash parameter from the constructor public long access_hash; + /// File reference public byte[] file_reference; } - ///See + ///
Derived classes: ,
See
public abstract partial class DocumentBase : ITLObject { } - ///See + /// Empty constructor, document doesn't exist.
See
[TLDef(0x36F8C871)] - public partial class DocumentEmpty : DocumentBase { public long id; } - ///See + public partial class DocumentEmpty : DocumentBase + { + /// Document ID or 0 + public long id; + } + /// Document
See
[TLDef(0x1E87342B)] public partial class Document : DocumentBase { - [Flags] public enum Flags { has_thumbs = 0x1, has_video_thumbs = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Document ID public long id; + /// Check sum, dependant on document ID public long access_hash; + /// File reference public byte[] file_reference; + /// Creation date public DateTime date; + /// MIME type public string mime_type; + /// Size public int size; + /// Thumbnails [IfFlag(0)] public PhotoSizeBase[] thumbs; + /// Video thumbnails [IfFlag(1)] public VideoSize[] video_thumbs; + /// DC ID public int dc_id; + /// Attributes public DocumentAttribute[] attributes; + + [Flags] public enum Flags + { + /// Field has a value + has_thumbs = 0x1, + /// Field has a value + has_video_thumbs = 0x2, + } } - ///See + /// Info on support user.
See
[TLDef(0x17C6B5F6)] public partial class Help_Support : ITLObject { + /// Phone number public string phone_number; + /// User public UserBase user; } - ///See + ///
Derived classes: , , ,
See
public abstract partial class NotifyPeerBase : ITLObject { } - ///See + /// Notifications generated by a certain user or group.
See
[TLDef(0x9FD40BD8)] - public partial class NotifyPeer : NotifyPeerBase { public Peer peer; } - ///See + public partial class NotifyPeer : NotifyPeerBase + { + /// user or group + public Peer peer; + } + /// Notifications generated by all users.
See
[TLDef(0xB4C83B4C)] public partial class NotifyUsers : NotifyPeerBase { } - ///See + /// Notifications generated by all groups.
See
[TLDef(0xC007CEC3)] public partial class NotifyChats : NotifyPeerBase { } - ///See + /// Channel notification settings
See
[TLDef(0xD612E8EF)] public partial class NotifyBroadcasts : NotifyPeerBase { } - ///See + /// User actions. Use this to provide users with detailed info about their chat partners' actions: typing or sending attachments of all kinds.
Derived classes: , , , , , , , , , , , , , , , , ,
See
public abstract partial class SendMessageAction : ITLObject { } - ///See + /// User is typing.
See
[TLDef(0x16BF744E)] public partial class SendMessageTypingAction : SendMessageAction { } - ///See + /// Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.
See
[TLDef(0xFD5EC8F5)] public partial class SendMessageCancelAction : SendMessageAction { } - ///See + /// User is recording a video.
See
[TLDef(0xA187D66F)] public partial class SendMessageRecordVideoAction : SendMessageAction { } - ///See + /// User is uploading a video.
See
[TLDef(0xE9763AEC)] - public partial class SendMessageUploadVideoAction : SendMessageAction { public int progress; } - ///See + public partial class SendMessageUploadVideoAction : SendMessageAction + { + /// Progress percentage + public int progress; + } + /// User is recording a voice message.
See
[TLDef(0xD52F73F7)] public partial class SendMessageRecordAudioAction : SendMessageAction { } - ///See + /// User is uploading a voice message.
See
[TLDef(0xF351D7AB)] - public partial class SendMessageUploadAudioAction : SendMessageAction { public int progress; } - ///See + public partial class SendMessageUploadAudioAction : SendMessageAction + { + /// Progress percentage + public int progress; + } + /// User is uploading a photo.
See
[TLDef(0xD1D34A26)] - public partial class SendMessageUploadPhotoAction : SendMessageAction { public int progress; } - ///See + public partial class SendMessageUploadPhotoAction : SendMessageAction + { + /// Progress percentage + public int progress; + } + /// User is uploading a file.
See
[TLDef(0xAA0CD9E4)] - public partial class SendMessageUploadDocumentAction : SendMessageAction { public int progress; } - ///See + public partial class SendMessageUploadDocumentAction : SendMessageAction + { + /// Progress percentage + public int progress; + } + /// User is selecting a location to share.
See
[TLDef(0x176F8BA1)] public partial class SendMessageGeoLocationAction : SendMessageAction { } - ///See + /// User is selecting a contact to share.
See
[TLDef(0x628CBC6F)] public partial class SendMessageChooseContactAction : SendMessageAction { } - ///See + /// User is playing a game
See
[TLDef(0xDD6A8F48)] public partial class SendMessageGamePlayAction : SendMessageAction { } - ///See + /// User is recording a round video to share
See
[TLDef(0x88F27FBC)] public partial class SendMessageRecordRoundAction : SendMessageAction { } - ///See + /// User is uploading a round video
See
[TLDef(0x243E1C66)] - public partial class SendMessageUploadRoundAction : SendMessageAction { public int progress; } - ///See + public partial class SendMessageUploadRoundAction : SendMessageAction + { + /// Progress percentage + public int progress; + } + /// User is currently speaking in the group call
See
[TLDef(0xD92C2285)] public partial class SpeakingInGroupCallAction : SendMessageAction { } - ///See + /// Chat history is being imported
See
[TLDef(0xDBDA9246)] - public partial class SendMessageHistoryImportAction : SendMessageAction { public int progress; } - ///See + public partial class SendMessageHistoryImportAction : SendMessageAction + { + /// Progress percentage + public int progress; + } + /// User is choosing a sticker
See
[TLDef(0xB05AC6B1)] public partial class SendMessageChooseStickerAction : SendMessageAction { } - ///See + /// User has clicked on an animated emoji triggering a reaction, click here for more info ».
See
[TLDef(0x25972BCB)] public partial class SendMessageEmojiInteraction : SendMessageAction { + /// Emoji public string emoticon; + /// Message ID of the animated emoji that was clicked public int msg_id; + /// A JSON object with interaction info, click here for more info » public DataJSON interaction; } - ///See + /// User is watching an animated emoji reaction triggered by another user, click here for more info ».
See
[TLDef(0xB665902E)] - public partial class SendMessageEmojiInteractionSeen : SendMessageAction { public string emoticon; } + public partial class SendMessageEmojiInteractionSeen : SendMessageAction + { + /// Emoji + public string emoticon; + } - ///See + /// Users found by name substring and auxiliary data.
See
[TLDef(0xB3134D9D)] public partial class Contacts_Found : ITLObject { + /// Personalized results public Peer[] my_results; + /// List of found user identifiers public Peer[] results; + /// Found chats public Dictionary chats; + /// List of users public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Privacy key
See
public enum InputPrivacyKey : uint { - ///See + ///Whether we can see the exact last online timestamp of the user StatusTimestamp = 0x4F96CB18, - ///See + ///Whether the user can be invited to chats ChatInvite = 0xBDFB0426, - ///See + ///Whether the user will accept phone calls PhoneCall = 0xFABADC5F, - ///See + ///Whether the user allows P2P communication during VoIP calls PhoneP2P = 0xDB9E70D2, - ///See + ///Whether messages forwarded from this user will be anonymous Forwards = 0xA4DD4C08, - ///See + ///Whether people will be able to see the user's profile picture ProfilePhoto = 0x5719BACC, - ///See + ///Whether people will be able to see the user's phone number PhoneNumber = 0x0352DAFA, - ///See + ///Whether people can add you to their contact list by your phone number AddedByPhone = 0xD1219BDD, } - ///See + /// Privacy key
See
public enum PrivacyKey : uint { - ///See + ///Whether we can see the last online timestamp StatusTimestamp = 0xBC2EAB30, - ///See + ///Whether the user can be invited to chats ChatInvite = 0x500E6DFA, - ///See + ///Whether the user accepts phone calls PhoneCall = 0x3D662B7B, - ///See + ///Whether P2P connections in phone calls are allowed PhoneP2P = 0x39491CC8, - ///See + ///Whether messages forwarded from the user will be anonymously forwarded Forwards = 0x69EC56A3, - ///See + ///Whether the profile picture of the user is visible ProfilePhoto = 0x96151FED, - ///See + ///Whether the user allows us to see his phone number PhoneNumber = 0xD19AE46D, - ///See + ///Whether people can add you to their contact list by your phone number AddedByPhone = 0x42FFD42B, } - ///See + /// Privacy rule
Derived classes: , , , , , , ,
See
public abstract partial class InputPrivacyRule : ITLObject { } - ///See + /// Allow only contacts
See
[TLDef(0x0D09E07B)] public partial class InputPrivacyValueAllowContacts : InputPrivacyRule { } - ///See + /// Allow all users
See
[TLDef(0x184B35CE)] public partial class InputPrivacyValueAllowAll : InputPrivacyRule { } - ///See + /// Allow only certain users
See
[TLDef(0x131CC67F)] - public partial class InputPrivacyValueAllowUsers : InputPrivacyRule { public InputUserBase[] users; } - ///See + public partial class InputPrivacyValueAllowUsers : InputPrivacyRule + { + /// Allowed users + public InputUserBase[] users; + } + /// Disallow only contacts
See
[TLDef(0x0BA52007)] public partial class InputPrivacyValueDisallowContacts : InputPrivacyRule { } - ///See + /// Disallow all
See
[TLDef(0xD66B66C9)] public partial class InputPrivacyValueDisallowAll : InputPrivacyRule { } - ///See + /// Disallow only certain users
See
[TLDef(0x90110467)] - public partial class InputPrivacyValueDisallowUsers : InputPrivacyRule { public InputUserBase[] users; } - ///See + public partial class InputPrivacyValueDisallowUsers : InputPrivacyRule + { + /// Users to disallow + public InputUserBase[] users; + } + /// Allow only participants of certain chats
See
[TLDef(0x840649CF)] - public partial class InputPrivacyValueAllowChatParticipants : InputPrivacyRule { public long[] chats; } - ///See + public partial class InputPrivacyValueAllowChatParticipants : InputPrivacyRule + { + /// Allowed chat IDs + public long[] chats; + } + /// Disallow only participants of certain chats
See
[TLDef(0xE94F0F86)] - public partial class InputPrivacyValueDisallowChatParticipants : InputPrivacyRule { public long[] chats; } + public partial class InputPrivacyValueDisallowChatParticipants : InputPrivacyRule + { + /// Disallowed chat IDs + public long[] chats; + } - ///See + /// Privacy rule
Derived classes: , , , , , , ,
See
public abstract partial class PrivacyRule : ITLObject { } - ///See + /// Allow all contacts
See
[TLDef(0xFFFE1BAC)] public partial class PrivacyValueAllowContacts : PrivacyRule { } - ///See + /// Allow all users
See
[TLDef(0x65427B82)] public partial class PrivacyValueAllowAll : PrivacyRule { } - ///See + /// Allow only certain users
See
[TLDef(0xB8905FB2)] - public partial class PrivacyValueAllowUsers : PrivacyRule { public long[] users; } - ///See + public partial class PrivacyValueAllowUsers : PrivacyRule + { + /// Allowed users + public long[] users; + } + /// Disallow only contacts
See
[TLDef(0xF888FA1A)] public partial class PrivacyValueDisallowContacts : PrivacyRule { } - ///See + /// Disallow all users
See
[TLDef(0x8B73E763)] public partial class PrivacyValueDisallowAll : PrivacyRule { } - ///See + /// Disallow only certain users
See
[TLDef(0xE4621141)] - public partial class PrivacyValueDisallowUsers : PrivacyRule { public long[] users; } - ///See + public partial class PrivacyValueDisallowUsers : PrivacyRule + { + /// Disallowed users + public long[] users; + } + /// Allow all participants of certain chats
See
[TLDef(0x6B134E8E)] - public partial class PrivacyValueAllowChatParticipants : PrivacyRule { public long[] chats; } - ///See + public partial class PrivacyValueAllowChatParticipants : PrivacyRule + { + /// Allowed chats + public long[] chats; + } + /// Disallow only participants of certain chats
See
[TLDef(0x41C87565)] - public partial class PrivacyValueDisallowChatParticipants : PrivacyRule { public long[] chats; } + public partial class PrivacyValueDisallowChatParticipants : PrivacyRule + { + /// Disallowed chats + public long[] chats; + } - ///See + /// Privacy rules
See
[TLDef(0x50A04E45)] public partial class Account_PrivacyRules : ITLObject { + /// Privacy rules public PrivacyRule[] rules; + /// Chats to which the rules apply public Dictionary chats; + /// Users to which the rules apply public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Time to live in days of the current account
See
[TLDef(0xB8D0AFDF)] - public partial class AccountDaysTTL : ITLObject { public int days; } + public partial class AccountDaysTTL : ITLObject + { + /// This account will self-destruct in the specified number of days + public int days; + } - ///See + /// Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on)
Derived classes: , , , , , ,
See
public abstract partial class DocumentAttribute : ITLObject { } - ///See + /// Defines the width and height of an image uploaded as document
See
[TLDef(0x6C37C15C)] public partial class DocumentAttributeImageSize : DocumentAttribute { + /// Width of image public int w; + /// Height of image public int h; } - ///See + /// Defines an animated GIF
See
[TLDef(0x11B58939)] public partial class DocumentAttributeAnimated : DocumentAttribute { } - ///See + /// Defines a sticker
See
[TLDef(0x6319D612)] public partial class DocumentAttributeSticker : DocumentAttribute { - [Flags] public enum Flags { has_mask_coords = 0x1, mask = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Alternative emoji representation of sticker public string alt; + /// Associated stickerset public InputStickerSet stickerset; + /// Mask coordinates (if this is a mask sticker, attached to a photo) [IfFlag(0)] public MaskCoords mask_coords; + + [Flags] public enum Flags + { + /// Field has a value + has_mask_coords = 0x1, + /// Whether this is a mask sticker + mask = 0x2, + } } - ///See + /// Defines a video
See
[TLDef(0x0EF02CE6)] public partial class DocumentAttributeVideo : DocumentAttribute { - [Flags] public enum Flags { round_message = 0x1, supports_streaming = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Duration in seconds public int duration; + /// Video width public int w; + /// Video height public int h; + + [Flags] public enum Flags + { + /// Whether this is a round video + round_message = 0x1, + /// Whether the video supports streaming + supports_streaming = 0x2, + } } - ///See + /// Represents an audio file
See
[TLDef(0x9852F9C6)] public partial class DocumentAttributeAudio : DocumentAttribute { - [Flags] public enum Flags { has_title = 0x1, has_performer = 0x2, has_waveform = 0x4, voice = 0x400 } + /// Flags, see TL conditional fields public Flags flags; + /// Duration in seconds public int duration; + /// Name of song [IfFlag(0)] public string title; + /// Performer [IfFlag(1)] public string performer; + /// Waveform [IfFlag(2)] public byte[] waveform; + + [Flags] public enum Flags + { + /// Field has a value + has_title = 0x1, + /// Field has a value + has_performer = 0x2, + /// Field has a value + has_waveform = 0x4, + /// Whether this is a voice message + voice = 0x400, + } } - ///See + /// A simple document with a file name
See
[TLDef(0x15590068)] - public partial class DocumentAttributeFilename : DocumentAttribute { public string file_name; } - ///See + public partial class DocumentAttributeFilename : DocumentAttribute + { + /// The file name + public string file_name; + } + /// Whether the current document has stickers attached
See
[TLDef(0x9801D2F7)] public partial class DocumentAttributeHasStickers : DocumentAttribute { } - ///See - ///a null value means messages.stickersNotModified + /// Found stickers
See
+ /// a null value means messages.stickersNotModified [TLDef(0x30A6EC7E)] public partial class Messages_Stickers : ITLObject { + /// Hash for pagination, for more info click here public long hash; + /// Stickers public DocumentBase[] stickers; } - ///See + /// A stickerpack is a group of stickers associated to the same emoji.
It is not a sticker pack the way it is usually intended, you may be looking for a .
See
[TLDef(0x12B299D4)] public partial class StickerPack : ITLObject { + /// Emoji public string emoticon; + /// Stickers public long[] documents; } - ///See - ///a null value means messages.allStickersNotModified + /// Info about all installed stickers
See
+ /// a null value means messages.allStickersNotModified [TLDef(0xCDBBCEBB)] public partial class Messages_AllStickers : ITLObject { + /// Hash for pagination, for more info click here public long hash; + /// All stickersets public StickerSet[] sets; } - ///See + /// Events affected by operation
See
[TLDef(0x84D19185)] public partial class Messages_AffectedMessages : ITLObject { + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; } - ///See + ///
Derived classes: , , ,
See
public abstract partial class WebPageBase : ITLObject { + /// Preview ID public abstract long ID { get; } } - ///See + /// No preview is available for the webpage
See
[TLDef(0xEB1477E8)] public partial class WebPageEmpty : WebPageBase { + /// Preview ID public long id; + /// Preview ID public override long ID => id; } - ///See + /// A preview of the webpage is currently being generated
See
[TLDef(0xC586DA1C)] public partial class WebPagePending : WebPageBase { + /// ID of preview public long id; + /// When was the processing started public DateTime date; + /// ID of preview public override long ID => id; } - ///See + /// Webpage preview
See
[TLDef(0xE89C45B2)] public partial class WebPage : WebPageBase { - [Flags] public enum Flags { has_type = 0x1, has_site_name = 0x2, has_title = 0x4, has_description = 0x8, has_photo = 0x10, - has_embed_url = 0x20, has_embed_width = 0x40, has_duration = 0x80, has_author = 0x100, has_document = 0x200, - has_cached_page = 0x400, has_attributes = 0x1000 } + /// Flags, see TL conditional fields public Flags flags; + /// Preview ID public long id; + /// URL of previewed webpage public string url; + /// Webpage URL to be displayed to the user public string display_url; + /// Hash for pagination, for more info click here public int hash; + /// Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else [IfFlag(0)] public string type; + /// Short name of the site (e.g., Google Docs, App Store) [IfFlag(1)] public string site_name; + /// Title of the content [IfFlag(2)] public string title; + /// Content description [IfFlag(3)] public string description; + /// Image representing the content [IfFlag(4)] public PhotoBase photo; + /// URL to show in the embedded preview [IfFlag(5)] public string embed_url; + /// MIME type of the embedded preview, (e.g., text/html or video/mp4) [IfFlag(5)] public string embed_type; + /// Width of the embedded preview [IfFlag(6)] public int embed_width; + /// Height of the embedded preview [IfFlag(6)] public int embed_height; + /// Duration of the content, in seconds [IfFlag(7)] public int duration; + /// Author of the content [IfFlag(8)] public string author; + /// Preview of the content as a media file [IfFlag(9)] public DocumentBase document; + /// Page contents in instant view format [IfFlag(10)] public Page cached_page; + /// Webpage attributes [IfFlag(12)] public WebPageAttribute[] attributes; + [Flags] public enum Flags + { + /// Field has a value + has_type = 0x1, + /// Field has a value + has_site_name = 0x2, + /// Field has a value + has_title = 0x4, + /// Field has a value + has_description = 0x8, + /// Field has a value + has_photo = 0x10, + /// Field has a value + has_embed_url = 0x20, + /// Field has a value + has_embed_width = 0x40, + /// Field has a value + has_duration = 0x80, + /// Field has a value + has_author = 0x100, + /// Field has a value + has_document = 0x200, + /// Field has a value + has_cached_page = 0x400, + /// Field has a value + has_attributes = 0x1000, + } + + /// Preview ID public override long ID => id; } - ///See + /// The preview of the webpage hasn't changed
See
[TLDef(0x7311CA11)] public partial class WebPageNotModified : WebPageBase { - [Flags] public enum Flags { has_cached_page_views = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Page view count [IfFlag(0)] public int cached_page_views; + [Flags] public enum Flags + { + /// Field has a value + has_cached_page_views = 0x1, + } + public override long ID => default; } - ///See + /// Logged-in session
See
[TLDef(0xAD01D61D)] public partial class Authorization : ITLObject { - [Flags] public enum Flags { current = 0x1, official_app = 0x2, password_pending = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Identifier public long hash; + /// Device model public string device_model; + /// Platform public string platform; + /// System version public string system_version; + /// API ID public int api_id; + /// App name public string app_name; + /// App version public string app_version; + /// When was the session created public int date_created; + /// When was the session last active public int date_active; + /// Last known IP public string ip; + /// Country determined from IP public string country; + /// Region determined from IP public string region; + + [Flags] public enum Flags + { + /// Whether this is the current session + current = 0x1, + /// Whether the session is from an official app + official_app = 0x2, + /// Whether the session is still waiting for a 2FA password + password_pending = 0x4, + } } - ///See + /// Logged-in sessions
See
[TLDef(0x1250ABDE)] - public partial class Account_Authorizations : ITLObject { public Authorization[] authorizations; } + public partial class Account_Authorizations : ITLObject + { + /// Logged-in sessions + public Authorization[] authorizations; + } - ///See + /// Configuration for two-factor authorization
See
[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_pending_reset_date = 0x20 } + /// Flags, see TL conditional fields public Flags flags; + /// The KDF algorithm for SRP two-factor authentication of the current password [IfFlag(2)] public PasswordKdfAlgo current_algo; + /// Srp B param for SRP authorization [IfFlag(2)] public byte[] srp_B; + /// Srp ID param for SRP authorization [IfFlag(2)] public long srp_id; + /// Text hint for the password [IfFlag(3)] public string hint; + /// A password recovery email with the specified pattern is still awaiting verification [IfFlag(4)] public string email_unconfirmed_pattern; + /// The KDF algorithm for SRP two-factor authentication to use when creating new passwords public PasswordKdfAlgo new_algo; + /// The KDF algorithm for telegram passport public SecurePasswordKdfAlgo new_secure_algo; + /// Secure random string public byte[] secure_random; + /// The 2FA password will be automatically removed at this date, unless the user cancels the operation [IfFlag(5)] public DateTime pending_reset_date; + + [Flags] public enum Flags + { + /// Whether the user has a recovery method configured + has_recovery = 0x1, + /// Whether telegram passport is enabled + has_secure_values = 0x2, + /// Whether the user has a password + has_password = 0x4, + /// Field has a value + has_hint = 0x8, + /// Field has a value + has_email_unconfirmed_pattern = 0x10, + /// Field has a value + has_pending_reset_date = 0x20, + } } - ///See + /// Private info associated to the password info (recovery email, telegram passport info & so on)
See
[TLDef(0x9A5C33E5)] public partial class Account_PasswordSettings : ITLObject { - [Flags] public enum Flags { has_email = 0x1, has_secure_settings = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// 2FA Recovery email [IfFlag(0)] public string email; + /// Telegram passport settings [IfFlag(1)] public SecureSecretSettings secure_settings; + + [Flags] public enum Flags + { + /// Field has a value + has_email = 0x1, + /// Field has a value + has_secure_settings = 0x2, + } } - ///See + /// Settings for setting up a new password
See
[TLDef(0xC23727C9)] public partial class Account_PasswordInputSettings : ITLObject { - [Flags] public enum Flags { has_new_algo = 0x1, has_email = 0x2, has_new_secure_settings = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// The SRP algorithm to use [IfFlag(0)] public PasswordKdfAlgo new_algo; + /// The computed password hash [IfFlag(0)] public byte[] new_password_hash; + /// Text hint for the password [IfFlag(0)] public string hint; + /// Password recovery email [IfFlag(1)] public string email; + /// Telegram passport settings [IfFlag(2)] public SecureSecretSettings new_secure_settings; + + [Flags] public enum Flags + { + /// Field has a value + has_new_algo = 0x1, + /// Field has a value + has_email = 0x2, + /// Field has a value + has_new_secure_settings = 0x4, + } } - ///See + /// Recovery info of a 2FA password, only for accounts with a recovery email configured.
See
[TLDef(0x137948A5)] - public partial class Auth_PasswordRecovery : ITLObject { public string email_pattern; } + public partial class Auth_PasswordRecovery : ITLObject + { + /// The email to which the recovery code was sent must match this pattern. + public string email_pattern; + } - ///See + /// Message ID, for which PUSH-notifications were cancelled.
See
[TLDef(0xA384B779)] public partial class ReceivedNotifyMessage : ITLObject { + /// Message ID, for which PUSH-notifications were canceled public int id; + /// Reserved for future use public int flags; } - ///See + /// Exported chat invite
Derived classes:
See
public abstract partial class ExportedChatInvite : ITLObject { } - ///See + /// Exported chat invite
See
[TLDef(0x0AB4A819)] 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, request_needed = 0x40, has_requested = 0x80, has_title = 0x100 } + /// Flags, see TL conditional fields public Flags flags; + /// Chat invitation link public string link; + /// ID of the admin that created this chat invite public long admin_id; + /// When was this chat invite created public DateTime date; + /// When was this chat invite last modified [IfFlag(4)] public DateTime start_date; + /// When does this chat invite expire [IfFlag(1)] public DateTime expire_date; + /// Maximum number of users that can join using this link [IfFlag(2)] public int usage_limit; + /// How many users joined using this link [IfFlag(3)] public int usage; [IfFlag(7)] public int requested; [IfFlag(8)] public string title; + + [Flags] public enum Flags + { + /// Whether this chat invite was revoked + revoked = 0x1, + /// Field has a value + has_expire_date = 0x2, + /// Field has a value + has_usage_limit = 0x4, + /// Field has a value + has_usage = 0x8, + /// Field has a value + has_start_date = 0x10, + /// Whether this chat invite has no expiration + permanent = 0x20, + request_needed = 0x40, + /// Field has a value + has_requested = 0x80, + /// Field has a value + has_title = 0x100, + } } - ///See + ///
Derived classes: , ,
See
public abstract partial class ChatInviteBase : ITLObject { } - ///See + /// The user has already joined this chat
See
[TLDef(0x5A686D7C)] - public partial class ChatInviteAlready : ChatInviteBase { public ChatBase chat; } - ///See + public partial class ChatInviteAlready : ChatInviteBase + { + /// The chat connected to the invite + public ChatBase chat; + } + /// Chat invite info
See
[TLDef(0x300C44C1)] public partial class ChatInvite : ChatInviteBase { - [Flags] public enum Flags { channel = 0x1, broadcast = 0x2, public_ = 0x4, megagroup = 0x8, has_participants = 0x10, - has_about = 0x20, request_needed = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Chat/supergroup/channel title public string title; [IfFlag(5)] public string about; + /// Chat/supergroup/channel photo public PhotoBase photo; + /// Participant count public int participants_count; + /// A few of the participants that are in the group [IfFlag(4)] public UserBase[] participants; + + [Flags] public enum Flags + { + /// Whether this is a channel/supergroup or a normal group + channel = 0x1, + /// Whether this is a channel + broadcast = 0x2, + /// Whether this is a public channel/supergroup + public_ = 0x4, + /// Whether this is a supergroup + megagroup = 0x8, + /// Field has a value + has_participants = 0x10, + /// Field has a value + has_about = 0x20, + request_needed = 0x40, + } } - ///See + /// A chat invitation that also allows peeking into the group to read messages without joining it.
See
[TLDef(0x61695CB0)] public partial class ChatInvitePeek : ChatInviteBase { + /// Chat information public ChatBase chat; + /// Read-only anonymous access to this group will be revoked at this date public DateTime expires; } - ///See - ///a null value means inputStickerSetEmpty + /// Represents a stickerset
Derived classes: , , , ,
See
+ /// a null value means inputStickerSetEmpty public abstract partial class InputStickerSet : ITLObject { } - ///See + /// Stickerset by ID
See
[TLDef(0x9DE7A269)] public partial class InputStickerSetID : InputStickerSet { + /// ID public long id; + /// Access hash public long access_hash; } - ///See + /// Stickerset by short name, from tg://addstickers?set=short_name
See
[TLDef(0x861CC8A0)] - public partial class InputStickerSetShortName : InputStickerSet { public string short_name; } - ///See + public partial class InputStickerSetShortName : InputStickerSet + { + /// From tg://addstickers?set=short_name + public string short_name; + } + /// Animated emojis stickerset
See
[TLDef(0x028703C8)] public partial class InputStickerSetAnimatedEmoji : InputStickerSet { } - ///See + /// Used for fetching animated dice stickers
See
[TLDef(0xE67F520E)] - public partial class InputStickerSetDice : InputStickerSet { public string emoticon; } - ///See + public partial class InputStickerSetDice : InputStickerSet + { + /// The emoji, for now 🏀, 🎲 and 🎯 are supported + public string emoticon; + } + /// Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji)
See
[TLDef(0x0CDE3739)] public partial class InputStickerSetAnimatedEmojiAnimations : InputStickerSet { } - ///See + /// Represents a stickerset (stickerpack)
See
[TLDef(0xD7DF217A)] public partial class StickerSet : ITLObject { - [Flags] public enum Flags { has_installed_date = 0x1, archived = 0x2, official = 0x4, masks = 0x8, has_thumbs = 0x10, - animated = 0x20 } + /// Flags, see TL conditional fields public Flags flags; + /// When was this stickerset installed [IfFlag(0)] public DateTime installed_date; + /// ID of the stickerset public long id; + /// Access hash of stickerset public long access_hash; + /// Title of stickerset public string title; + /// Short name of stickerset to use in tg://addstickers?set=short_name public string short_name; + /// Stickerset thumbnail [IfFlag(4)] public PhotoSizeBase[] thumbs; + /// DC ID of thumbnail [IfFlag(4)] public int thumb_dc_id; + /// Thumbnail version [IfFlag(4)] public int thumb_version; + /// Number of stickers in pack public int count; + /// Hash public int hash; + + [Flags] public enum Flags + { + /// Field has a value + has_installed_date = 0x1, + /// Whether this stickerset was archived (due to too many saved stickers in the current account) + archived = 0x2, + /// Is this stickerset official + official = 0x4, + /// Is this a mask stickerset + masks = 0x8, + /// Field has a value + has_thumbs = 0x10, + /// Is this an animated stickerpack + animated = 0x20, + } } - ///See + /// Stickerset and stickers inside it
See
[TLDef(0xB60A24A6)] public partial class Messages_StickerSet : ITLObject { + /// The stickerset public StickerSet set; + /// Emoji info for stickers public StickerPack[] packs; + /// Stickers in stickerset public DocumentBase[] documents; } - ///See + /// Describes a bot command that can be used in a chat
See
[TLDef(0xC27AC8C7)] public partial class BotCommand : ITLObject { + /// /command name public string command; + /// Description of the command public string description; } - ///See + /// Info about bots (available bot commands, etc)
See
[TLDef(0x1B74B335)] public partial class BotInfo : ITLObject { + /// ID of the bot public long user_id; + /// Description of the bot public string description; + /// Bot commands that can be used in the chat public BotCommand[] commands; } - ///See + ///
Derived classes: , , , , , , , , , ,
See
public abstract partial class KeyboardButtonBase : ITLObject { + /// Button text public abstract string Text { get; } } - ///See + /// Bot keyboard button
See
[TLDef(0xA2FA4880)] public partial class KeyboardButton : KeyboardButtonBase { + /// Button text public string text; + /// Button text public override string Text => text; } - ///See + /// URL button
See
[TLDef(0x258AFF05)] public partial class KeyboardButtonUrl : KeyboardButton { + /// URL public string url; } - ///See + /// Callback button
See
[TLDef(0x35BBDB6B)] public partial class KeyboardButtonCallback : KeyboardButtonBase { - [Flags] public enum Flags { requires_password = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Button text public string text; + /// Callback data public byte[] data; + [Flags] public enum Flags + { + /// Whether the user should verify his identity by entering his 2FA SRP parameters to the messages.getBotCallbackAnswer method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user. + requires_password = 0x1, + } + + /// Button text public override string Text => text; } - ///See + /// Button to request a user's phone number
See
[TLDef(0xB16A6C29)] public partial class KeyboardButtonRequestPhone : KeyboardButton { } - ///See + /// Button to request a user's geolocation
See
[TLDef(0xFC796B3F)] public partial class KeyboardButtonRequestGeoLocation : KeyboardButton { } - ///See + /// Button to force a user to switch to inline mode Pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field.
See
[TLDef(0x0568A748)] public partial class KeyboardButtonSwitchInline : KeyboardButtonBase { - [Flags] public enum Flags { same_peer = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Button label public string text; + /// The inline query to use public string query; + [Flags] public enum Flags + { + /// If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. + same_peer = 0x1, + } + + /// Button label public override string Text => text; } - ///See + /// Button to start a game
See
[TLDef(0x50F41CCF)] public partial class KeyboardButtonGame : KeyboardButton { } - ///See + /// Button to buy a product
See
[TLDef(0xAFD93FBB)] public partial class KeyboardButtonBuy : KeyboardButton { } - ///See + /// Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, messages.requestUrlAuth should be called, providing the button_id and the ID of the container message. The returned object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call messages.acceptUrlAuth to get a with the URL to open instead of the url of this constructor, or a , in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used.
See
[TLDef(0x10B78D29)] public partial class KeyboardButtonUrlAuth : KeyboardButtonBase { - [Flags] public enum Flags { has_fwd_text = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Button label public string text; + /// New text of the button in forwarded messages. [IfFlag(0)] public string fwd_text; + /// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.

NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
public string url; + /// ID of the button to pass to messages.requestUrlAuth public int button_id; + [Flags] public enum Flags + { + /// Field has a value + has_fwd_text = 0x1, + } + + /// Button label public override string Text => text; } - ///See + /// Button to request a user to authorize via URL using Seamless Telegram Login.
See
[TLDef(0xD02E7FD4)] public partial class InputKeyboardButtonUrlAuth : KeyboardButtonBase { - [Flags] public enum Flags { request_write_access = 0x1, has_fwd_text = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Button text public string text; + /// New text of the button in forwarded messages. [IfFlag(1)] public string fwd_text; + /// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
public string url; + /// Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. public InputUserBase bot; + [Flags] public enum Flags + { + /// Set this flag to request the permission for your bot to send messages to the user. + request_write_access = 0x1, + /// Field has a value + has_fwd_text = 0x2, + } + + /// Button text public override string Text => text; } - ///See + /// A button that allows the user to create and send a poll when pressed; available only in private
See
[TLDef(0xBBC7515D, inheritAfter = true)] public partial class KeyboardButtonRequestPoll : KeyboardButton { - [Flags] public enum Flags { has_quiz = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// If set, only quiz polls can be sent [IfFlag(0)] public bool quiz; + + [Flags] public enum Flags + { + /// Field has a value + has_quiz = 0x1, + } } - ///See + /// Inline keyboard row
See
[TLDef(0x77608B83)] - public partial class KeyboardButtonRow : ITLObject { public KeyboardButtonBase[] buttons; } + public partial class KeyboardButtonRow : ITLObject + { + /// Bot or inline keyboard buttons + public KeyboardButtonBase[] buttons; + } - ///See + /// Reply markup for bot and inline keyboards
Derived classes: , , ,
See
public abstract partial class ReplyMarkup : ITLObject { } - ///See + /// Hide sent bot keyboard
See
[TLDef(0xA03E5B85)] public partial class ReplyKeyboardHide : ReplyMarkup { - [Flags] public enum Flags { selective = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + + [Flags] public enum Flags + { + /// Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet
+ selective = 0x4, + } } - ///See + /// Force the user to send a reply
See
[TLDef(0x86B40B08)] public partial class ReplyKeyboardForceReply : ReplyMarkup { - [Flags] public enum Flags { single_use = 0x2, selective = 0x4, has_placeholder = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. [IfFlag(3)] public string placeholder; + + [Flags] public enum Flags + { + /// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. + single_use = 0x2, + /// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
Example: A user requests to change the bot‘s language, bot replies to the request with a keyboard to select the new language. Other users in the group don’t see the keyboard.
+ selective = 0x4, + /// Field has a value + has_placeholder = 0x8, + } } - ///See + /// Bot keyboard
See
[TLDef(0x85DD99D1)] public partial class ReplyKeyboardMarkup : ReplyMarkup { - [Flags] public enum Flags { resize = 0x1, single_use = 0x2, selective = 0x4, has_placeholder = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Button row public KeyboardButtonRow[] rows; + /// The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. [IfFlag(3)] public string placeholder; - } - ///See - [TLDef(0x48A30254)] - public partial class ReplyInlineMarkup : ReplyMarkup { public KeyboardButtonRow[] rows; } - ///See + [Flags] public enum Flags + { + /// Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard. + resize = 0x1, + /// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. + single_use = 0x2, + /// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user requests to change the bot‘s language, bot replies to the request with a keyboard to select the new language. Other users in the group don’t see the keyboard.
+ selective = 0x4, + /// Field has a value + has_placeholder = 0x8, + } + } + ///
Bot or inline keyboard
See
+ [TLDef(0x48A30254)] + public partial class ReplyInlineMarkup : ReplyMarkup + { + /// Bot or inline keyboard rows + public KeyboardButtonRow[] rows; + } + + /// Message entities, representing styled text in a message
Derived classes: , , , , , , , , , , , , , , , , , ,
See
public abstract partial class MessageEntity : ITLObject { + /// Offset of message entity within message (in UTF-8 codepoints) public int offset; + /// Length of message entity within message (in UTF-8 codepoints) public int length; } - ///See + /// Unknown message entity
See
[TLDef(0xBB92BA95)] public partial class MessageEntityUnknown : MessageEntity { } - ///See + /// Message entity mentioning the current user
See
[TLDef(0xFA04579D)] public partial class MessageEntityMention : MessageEntity { } - ///See + /// #hashtag message entity
See
[TLDef(0x6F635B0D)] public partial class MessageEntityHashtag : MessageEntity { } - ///See + /// Message entity representing a bot /command
See
[TLDef(0x6CEF8AC7)] public partial class MessageEntityBotCommand : MessageEntity { } - ///See + /// Message entity representing an in-text url: https://google.com; for text urls, use .
See
[TLDef(0x6ED02538)] public partial class MessageEntityUrl : MessageEntity { } - ///See + /// Message entity representing an email@example.com.
See
[TLDef(0x64E475C2)] public partial class MessageEntityEmail : MessageEntity { } - ///See + /// Message entity representing bold text.
See
[TLDef(0xBD610BC9)] public partial class MessageEntityBold : MessageEntity { } - ///See + /// Message entity representing italic text.
See
[TLDef(0x826F8B60)] public partial class MessageEntityItalic : MessageEntity { } - ///See + /// Message entity representing a codeblock.
See
[TLDef(0x28A20571)] public partial class MessageEntityCode : MessageEntity { } - ///See + /// Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.
See
[TLDef(0x73924BE0)] - public partial class MessageEntityPre : MessageEntity { public string language; } - ///See + public partial class MessageEntityPre : MessageEntity + { + /// Programming language of the code + public string language; + } + /// Message entity representing a text url: for in-text urls like https://google.com use .
See
[TLDef(0x76A6D327)] - public partial class MessageEntityTextUrl : MessageEntity { public string url; } - ///See + public partial class MessageEntityTextUrl : MessageEntity + { + /// The actual URL + public string url; + } + /// Message entity representing a user mention: for creating a mention use .
See
[TLDef(0xDC7B1140)] - public partial class MessageEntityMentionName : MessageEntity { public long user_id; } - ///See + public partial class MessageEntityMentionName : MessageEntity + { + /// Identifier of the user that was mentioned + public long user_id; + } + /// Message entity that can be used to create a user user mention: received mentions use the constructor, instead.
See
[TLDef(0x208E68C9)] - public partial class InputMessageEntityMentionName : MessageEntity { public InputUserBase user_id; } - ///See + public partial class InputMessageEntityMentionName : MessageEntity + { + /// Identifier of the user that was mentioned + public InputUserBase user_id; + } + /// Message entity representing a phone number.
See
[TLDef(0x9B69E34B)] public partial class MessageEntityPhone : MessageEntity { } - ///See + /// Message entity representing a $cashtag.
See
[TLDef(0x4C4E743F)] public partial class MessageEntityCashtag : MessageEntity { } - ///See + /// Message entity representing underlined text.
See
[TLDef(0x9C4E7E8B)] public partial class MessageEntityUnderline : MessageEntity { } - ///See + /// Message entity representing strikethrough text.
See
[TLDef(0xBF0693D4)] public partial class MessageEntityStrike : MessageEntity { } - ///See + /// Message entity representing a block quote.
See
[TLDef(0x020DF5D0)] public partial class MessageEntityBlockquote : MessageEntity { } - ///See + /// Indicates a credit card number
See
[TLDef(0x761E6AF4)] public partial class MessageEntityBankCard : MessageEntity { } - ///See - ///a null value means inputChannelEmpty + ///
Derived classes: ,
See
+ /// a null value means inputChannelEmpty public abstract partial class InputChannelBase : ITLObject { + /// Channel ID public abstract long ChannelId { get; } } - ///See + /// Represents a channel
See
[TLDef(0xF35AEC28)] public partial class InputChannel : InputChannelBase { + /// Channel ID public long channel_id; + /// Access hash taken from the constructor public long access_hash; + /// Channel ID public override long ChannelId => channel_id; } - ///See + /// Defines a min channel that was seen in a certain message of a certain chat.
See
[TLDef(0x5B934F9D)] public partial class InputChannelFromMessage : InputChannelBase { + /// The chat where the channel was seen public InputPeer peer; + /// The message ID in the chat where the channel was seen public int msg_id; + /// The channel ID public long channel_id; + /// The channel ID public override long ChannelId => channel_id; } - ///See + /// Resolved peer
See
[TLDef(0x7F077AD9)] public partial class Contacts_ResolvedPeer : ITLObject { + /// The peer public Peer peer; + /// Chats public Dictionary chats; + /// Users public Dictionary users; + /// returns a or for the result public IPeerInfo UserOrChat => peer.UserOrChat(users, chats); } - ///See + /// Indicates a range of chat messages
See
[TLDef(0x0AE30253)] public partial class MessageRange : ITLObject { + /// Start of range (message ID) public int min_id; + /// End of range (message ID) public int max_id; } - ///See + ///
Derived classes: , ,
See
public abstract partial class Updates_ChannelDifferenceBase : ITLObject { + /// returns a or for the given Peer public abstract IPeerInfo UserOrChat(Peer peer); } - ///See + /// There are no new updates
See
[TLDef(0x3E11AFFB)] public partial class Updates_ChannelDifferenceEmpty : Updates_ChannelDifferenceBase { - [Flags] public enum Flags { final = 0x1, has_timeout = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// The latest PTS public int pts; + /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed [IfFlag(1)] public int timeout; + + [Flags] public enum Flags + { + /// Whether there are more updates that must be fetched (always false) + final = 0x1, + /// Field has a value + has_timeout = 0x2, + } + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => null; } - ///See + /// The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways:
See
[TLDef(0xA4BCC6FE)] public partial class Updates_ChannelDifferenceTooLong : Updates_ChannelDifferenceBase { - [Flags] public enum Flags { final = 0x1, has_timeout = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed [IfFlag(1)] public int timeout; + /// Dialog containing the latest PTS that can be used to reset the channel state public DialogBase dialog; + /// The latest messages public MessageBase[] messages; + /// Chats from messages public Dictionary chats; + /// Users from messages public Dictionary users; + + [Flags] public enum Flags + { + /// Whether there are more updates that must be fetched (always false) + final = 0x1, + /// Field has a value + has_timeout = 0x2, + } + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// The new updates
See
[TLDef(0x2064674E)] public partial class Updates_ChannelDifference : Updates_ChannelDifferenceBase { - [Flags] public enum Flags { final = 0x1, has_timeout = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// The PTS from which to start getting updates the next time public int pts; + /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed [IfFlag(1)] public int timeout; + /// New messages public MessageBase[] new_messages; + /// Other updates public Update[] other_updates; + /// Chats public Dictionary chats; + /// Users public Dictionary users; + + [Flags] public enum Flags + { + /// Whether there are more updates to be fetched using getDifference, starting from the provided pts + final = 0x1, + /// Field has a value + has_timeout = 0x2, + } + /// returns a or for the given Peer public override IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See - ///a null value means channelMessagesFilterEmpty + /// Filter for getting only certain types of channel messages
See
+ /// a null value means channelMessagesFilterEmpty [TLDef(0xCD77D957)] public partial class ChannelMessagesFilter : ITLObject { - [Flags] public enum Flags { exclude_new_messages = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// A range of messages to fetch public MessageRange[] ranges; + + [Flags] public enum Flags + { + /// Whether to exclude new messages from the search + exclude_new_messages = 0x2, + } } - ///See + ///
Derived classes: , , , , ,
See
public abstract partial class ChannelParticipantBase : ITLObject { } - ///See + /// Channel/supergroup participant
See
[TLDef(0xC00C07C0)] public partial class ChannelParticipant : ChannelParticipantBase { + /// Pariticipant user ID public long user_id; + /// Date joined public DateTime date; } - ///See + /// Myself
See
[TLDef(0x35A8BFA7)] public partial class ChannelParticipantSelf : ChannelParticipantBase { - [Flags] public enum Flags { via_invite = 0x1 } public Flags flags; + /// User ID public long user_id; + /// User that invited me to the channel/supergroup public long inviter_id; + /// When did I join the channel/supergroup public DateTime date; + + [Flags] public enum Flags + { + via_invite = 0x1, + } } - ///See + /// Channel/supergroup creator
See
[TLDef(0x2FE601D3)] public partial class ChannelParticipantCreator : ChannelParticipantBase { - [Flags] public enum Flags { has_rank = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// User ID public long user_id; + /// Creator admin rights public ChatAdminRights admin_rights; + /// The role (rank) of the group creator in the group: just an arbitrary string, admin by default [IfFlag(0)] public string rank; + + [Flags] public enum Flags + { + /// Field has a value + has_rank = 0x1, + } } - ///See + /// Admin
See
[TLDef(0x34C3BB53)] public partial class ChannelParticipantAdmin : ChannelParticipantBase { - [Flags] public enum Flags { can_edit = 0x1, self = 0x2, has_rank = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Admin user ID public long user_id; + /// User that invited the admin to the channel/group [IfFlag(1)] public long inviter_id; + /// User that promoted the user to admin public long promoted_by; + /// When did the user join public DateTime date; + /// Admin rights public ChatAdminRights admin_rights; + /// The role (rank) of the admin in the group: just an arbitrary string, admin by default [IfFlag(2)] public string rank; + + [Flags] public enum Flags + { + /// Can this admin promote other admins with the same permissions? + can_edit = 0x1, + /// Is this the current user + self = 0x2, + /// Field has a value + has_rank = 0x4, + } } - ///See + /// Banned/kicked user
See
[TLDef(0x6DF8014E)] public partial class ChannelParticipantBanned : ChannelParticipantBase { - [Flags] public enum Flags { left = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The banned peer public Peer peer; + /// User was kicked by the specified admin public long kicked_by; + /// When did the user join the group public DateTime date; + /// Banned rights public ChatBannedRights banned_rights; - } - ///See - [TLDef(0x1B03F006)] - public partial class ChannelParticipantLeft : ChannelParticipantBase { public Peer peer; } - ///See + [Flags] public enum Flags + { + /// Whether the user has left the group + left = 0x1, + } + } + /// A participant that left the channel/supergroup
See
+ [TLDef(0x1B03F006)] + public partial class ChannelParticipantLeft : ChannelParticipantBase + { + /// The peer that left + public Peer peer; + } + + /// Filter for fetching channel participants
Derived classes: , , , , , , ,
See
public abstract partial class ChannelParticipantsFilter : ITLObject { } - ///See + /// Fetch only recent participants
See
[TLDef(0xDE3F3C79)] public partial class ChannelParticipantsRecent : ChannelParticipantsFilter { } - ///See + /// Fetch only admin participants
See
[TLDef(0xB4608969)] public partial class ChannelParticipantsAdmins : ChannelParticipantsFilter { } - ///See + /// Fetch only kicked participants
See
[TLDef(0xA3B54985)] - public partial class ChannelParticipantsKicked : ChannelParticipantsFilter { public string q; } - ///See + public partial class ChannelParticipantsKicked : ChannelParticipantsFilter + { + /// Optional filter for searching kicked participants by name (otherwise empty) + public string q; + } + /// Fetch only bot participants
See
[TLDef(0xB0D1865B)] public partial class ChannelParticipantsBots : ChannelParticipantsFilter { } - ///See + /// Fetch only banned participants
See
[TLDef(0x1427A5E1)] - public partial class ChannelParticipantsBanned : ChannelParticipantsFilter { public string q; } - ///See + public partial class ChannelParticipantsBanned : ChannelParticipantsFilter + { + /// Optional filter for searching banned participants by name (otherwise empty) + public string q; + } + /// Query participants by name
See
[TLDef(0x0656AC4B)] - public partial class ChannelParticipantsSearch : ChannelParticipantsFilter { public string q; } - ///See + public partial class ChannelParticipantsSearch : ChannelParticipantsFilter + { + /// Search query + public string q; + } + /// Fetch only participants that are also contacts
See
[TLDef(0xBB6AE88D)] - public partial class ChannelParticipantsContacts : ChannelParticipantsFilter { public string q; } - ///See + public partial class ChannelParticipantsContacts : ChannelParticipantsFilter + { + /// Optional search query for searching contact participants by name + public string q; + } + /// This filter is used when looking for supergroup members to mention.
This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific
thread through the comment section of a channel.
See
[TLDef(0xE04B5CEB)] public partial class ChannelParticipantsMentions : ChannelParticipantsFilter { - [Flags] public enum Flags { has_q = 0x1, has_top_msg_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Filter by user name or username [IfFlag(0)] public string q; + /// Look only for users that posted in this thread [IfFlag(1)] public int top_msg_id; + + [Flags] public enum Flags + { + /// Field has a value + has_q = 0x1, + /// Field has a value + has_top_msg_id = 0x2, + } } - ///See - ///a null value means channels.channelParticipantsNotModified + /// Represents multiple channel participants
See
+ /// a null value means channels.channelParticipantsNotModified [TLDef(0x9AB0FEAF)] public partial class Channels_ChannelParticipants : ITLObject { + /// Total number of participants that correspond to the given query public int count; + /// Participants public ChannelParticipantBase[] participants; + /// Mentioned chats public Dictionary chats; + /// Users mentioned in participant info public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Represents a channel participant
See
[TLDef(0xDFB80317)] public partial class Channels_ChannelParticipant : ITLObject { + /// The channel participant public ChannelParticipantBase participant; + /// Mentioned chats public Dictionary chats; + /// Users public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Info about the latest telegram Terms Of Service
See
[TLDef(0x780A0310)] public partial class Help_TermsOfService : ITLObject { - [Flags] public enum Flags { popup = 0x1, has_min_age_confirm = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the new terms public DataJSON id; + /// Text of the new terms public string text; + /// Message entities for styled text public MessageEntity[] entities; + /// Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age. [IfFlag(1)] public int min_age_confirm; + + [Flags] public enum Flags + { + /// Whether a prompt must be showed to the user, in order to accept the new terms. + popup = 0x1, + /// Field has a value + has_min_age_confirm = 0x2, + } } - ///See - ///a null value means messages.savedGifsNotModified + /// Saved gifs
See
+ /// a null value means messages.savedGifsNotModified [TLDef(0x84A02A0D)] public partial class Messages_SavedGifs : ITLObject { + /// Hash for pagination, for more info click here public long hash; + /// List of saved gifs public DocumentBase[] gifs; } - ///See - public abstract partial class InputBotInlineMessage : ITLObject { public int flags; } - ///See + /// Represents a sent inline message from the perspective of a bot
Derived classes: , , , , , ,
See
+ public abstract partial class InputBotInlineMessage : ITLObject + { + /// Flags, see TL conditional fields + public int flags; + } + /// A media
See
[TLDef(0x3380C786)] public partial class InputBotInlineMessageMediaAuto : InputBotInlineMessage { - [Flags] public enum Flags { has_entities = 0x2, has_reply_markup = 0x4 } + /// Caption public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_entities = 0x2, + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// Simple text message
See
[TLDef(0x3DCD7A87)] public partial class InputBotInlineMessageText : InputBotInlineMessage { - [Flags] public enum Flags { no_webpage = 0x1, has_entities = 0x2, has_reply_markup = 0x4 } + /// Message public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Disable webpage preview + no_webpage = 0x1, + /// Field has a value + has_entities = 0x2, + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// Geolocation
See
[TLDef(0x96929A85)] public partial class InputBotInlineMessageMediaGeo : InputBotInlineMessage { - [Flags] public enum Flags { has_heading = 0x1, has_period = 0x2, has_reply_markup = 0x4, - has_proximity_notification_radius = 0x8 } + /// Geolocation public InputGeoPoint geo_point; + /// For live locations, a direction in which the location moves, in degrees; 1-360 [IfFlag(0)] public int heading; + /// Validity period [IfFlag(1)] public int period; + /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000) [IfFlag(3)] public int proximity_notification_radius; + /// Reply markup for bot/inline keyboards [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_heading = 0x1, + /// Field has a value + has_period = 0x2, + /// Field has a value + has_reply_markup = 0x4, + /// Field has a value + has_proximity_notification_radius = 0x8, + } } - ///See + /// Venue
See
[TLDef(0x417BBF11)] public partial class InputBotInlineMessageMediaVenue : InputBotInlineMessage { - [Flags] public enum Flags { has_reply_markup = 0x4 } + /// Geolocation public InputGeoPoint geo_point; + /// Venue name public string title; + /// Address public string address; + /// Venue provider: currently only "foursquare" needs to be supported public string provider; + /// Venue ID in the provider's database public string venue_id; + /// Venue type in the provider's database public string venue_type; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// A contact
See
[TLDef(0xA6EDBFFD)] public partial class InputBotInlineMessageMediaContact : InputBotInlineMessage { - [Flags] public enum Flags { has_reply_markup = 0x4 } + /// Phone number public string phone_number; + /// First name public string first_name; + /// Last name public string last_name; + /// VCard info public string vcard; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// A game
See
[TLDef(0x4B425864)] public partial class InputBotInlineMessageGame : InputBotInlineMessage { - [Flags] public enum Flags { has_reply_markup = 0x4 } + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// An invoice
See
[TLDef(0xD7E78225)] public partial class InputBotInlineMessageMediaInvoice : InputBotInlineMessage { - [Flags] public enum Flags { has_photo = 0x1, has_reply_markup = 0x4 } + /// Product name, 1-32 characters public string title; + /// Product description, 1-255 characters public string description; + /// Invoice photo [IfFlag(0)] public InputWebDocument photo; + /// The invoice public Invoice invoice; + /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. public byte[] payload; + /// Payments provider token, obtained via Botfather public string provider; + /// A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. public DataJSON provider_data; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_photo = 0x1, + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + ///
Derived classes: , , ,
See
public abstract partial class InputBotInlineResultBase : ITLObject { + /// ID of result public abstract string ID { get; } + /// Message to send when the result is selected public abstract InputBotInlineMessage SendMessage { get; } } - ///See + /// An inline bot result
See
[TLDef(0x88BF9319)] public partial class InputBotInlineResult : InputBotInlineResultBase { - [Flags] public enum Flags { has_title = 0x2, has_description = 0x4, has_url = 0x8, has_thumb = 0x10, has_content = 0x20 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of result public string id; + /// Result type (see bot API docs) public string type; + /// Result title [IfFlag(1)] public string title; + /// Result description [IfFlag(2)] public string description; + /// URL of result [IfFlag(3)] public string url; + /// Thumbnail for result [IfFlag(4)] public InputWebDocument thumb; + /// Result contents [IfFlag(5)] public InputWebDocument content; + /// Message to send when the result is selected public InputBotInlineMessage send_message; + [Flags] public enum Flags + { + /// Field has a value + has_title = 0x2, + /// Field has a value + has_description = 0x4, + /// Field has a value + has_url = 0x8, + /// Field has a value + has_thumb = 0x10, + /// Field has a value + has_content = 0x20, + } + + /// ID of result public override string ID => id; + /// Message to send when the result is selected public override InputBotInlineMessage SendMessage => send_message; } - ///See + /// Photo
See
[TLDef(0xA8D864A7)] public partial class InputBotInlineResultPhoto : InputBotInlineResultBase { + /// Result ID public string id; + /// Result type (see bot API docs) public string type; + /// Photo to send public InputPhoto photo; + /// Message to send when the result is selected public InputBotInlineMessage send_message; + /// Result ID public override string ID => id; + /// Message to send when the result is selected public override InputBotInlineMessage SendMessage => send_message; } - ///See + /// Document (media of any type except for photos)
See
[TLDef(0xFFF8FDC4)] public partial class InputBotInlineResultDocument : InputBotInlineResultBase { - [Flags] public enum Flags { has_title = 0x2, has_description = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Result ID public string id; + /// Result type (see bot API docs) public string type; + /// Result title [IfFlag(1)] public string title; + /// Result description [IfFlag(2)] public string description; + /// Document to send public InputDocument document; + /// Message to send when the result is selected public InputBotInlineMessage send_message; + [Flags] public enum Flags + { + /// Field has a value + has_title = 0x2, + /// Field has a value + has_description = 0x4, + } + + /// Result ID public override string ID => id; + /// Message to send when the result is selected public override InputBotInlineMessage SendMessage => send_message; } - ///See + /// Game
See
[TLDef(0x4FA417F2)] public partial class InputBotInlineResultGame : InputBotInlineResultBase { + /// Result ID public string id; + /// Game short name public string short_name; + /// Message to send when the result is selected public InputBotInlineMessage send_message; + /// Result ID public override string ID => id; + /// Message to send when the result is selected public override InputBotInlineMessage SendMessage => send_message; } - ///See - public abstract partial class BotInlineMessage : ITLObject { public int flags; } - ///See + /// Inline message
Derived classes: , , , , ,
See
+ public abstract partial class BotInlineMessage : ITLObject + { + /// Flags, see TL conditional fields + public int flags; + } + /// Send whatever media is attached to the
See
[TLDef(0x764CF810)] public partial class BotInlineMessageMediaAuto : BotInlineMessage { - [Flags] public enum Flags { has_entities = 0x2, has_reply_markup = 0x4 } + /// Caption public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_entities = 0x2, + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// Send a simple text message
See
[TLDef(0x8C7F65E2)] public partial class BotInlineMessageText : BotInlineMessage { - [Flags] public enum Flags { no_webpage = 0x1, has_entities = 0x2, has_reply_markup = 0x4 } + /// The message public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Disable webpage preview + no_webpage = 0x1, + /// Field has a value + has_entities = 0x2, + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// Send a geolocation
See
[TLDef(0x051846FD)] public partial class BotInlineMessageMediaGeo : BotInlineMessage { - [Flags] public enum Flags { has_heading = 0x1, has_period = 0x2, has_reply_markup = 0x4, - has_proximity_notification_radius = 0x8 } + /// Geolocation public GeoPoint geo; + /// For live locations, a direction in which the location moves, in degrees; 1-360. [IfFlag(0)] public int heading; + /// Validity period [IfFlag(1)] public int period; + /// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). [IfFlag(3)] public int proximity_notification_radius; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_heading = 0x1, + /// Field has a value + has_period = 0x2, + /// Field has a value + has_reply_markup = 0x4, + /// Field has a value + has_proximity_notification_radius = 0x8, + } } - ///See + /// Send a venue
See
[TLDef(0x8A86659C)] public partial class BotInlineMessageMediaVenue : BotInlineMessage { - [Flags] public enum Flags { has_reply_markup = 0x4 } + /// Geolocation of venue public GeoPoint geo; + /// Venue name public string title; + /// Address public string address; + /// Venue provider: currently only "foursquare" needs to be supported public string provider; + /// Venue ID in the provider's database public string venue_id; + /// Venue type in the provider's database public string venue_type; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// Send a contact
See
[TLDef(0x18D1CDC2)] public partial class BotInlineMessageMediaContact : BotInlineMessage { - [Flags] public enum Flags { has_reply_markup = 0x4 } + /// Phone number public string phone_number; + /// First name public string first_name; + /// Last name public string last_name; + /// VCard info public string vcard; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_markup = 0x4, + } } - ///See + /// Send an invoice
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 } + /// Product name, 1-32 characters public string title; + /// Product description, 1-255 characters public string description; + /// Product photo [IfFlag(0)] public WebDocumentBase photo; + /// Three-letter ISO 4217 currency code public string currency; + /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long total_amount; + /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; + + [Flags] public enum Flags + { + /// Field has a value + has_photo = 0x1, + /// Set this flag if you require the user's shipping address to complete the order + shipping_address_requested = 0x2, + /// Field has a value + has_reply_markup = 0x4, + /// Test invoice + test = 0x8, + } } - ///See + ///
Derived classes: ,
See
public abstract partial class BotInlineResultBase : ITLObject { + /// Result ID public abstract string ID { get; } + /// Result type (see bot API docs) public abstract string Type { get; } + /// Message to send public abstract BotInlineMessage SendMessage { get; } } - ///See + /// Generic result
See
[TLDef(0x11965F3A)] public partial class BotInlineResult : BotInlineResultBase { - [Flags] public enum Flags { has_title = 0x2, has_description = 0x4, has_url = 0x8, has_thumb = 0x10, has_content = 0x20 } + /// Flags, see TL conditional fields public Flags flags; + /// Result ID public string id; + /// Result type (see bot API docs) public string type; + /// Result title [IfFlag(1)] public string title; + /// Result description [IfFlag(2)] public string description; + /// URL of article or webpage [IfFlag(3)] public string url; + /// Thumbnail for the result [IfFlag(4)] public WebDocumentBase thumb; + /// Content of the result [IfFlag(5)] public WebDocumentBase content; + /// Message to send public BotInlineMessage send_message; + [Flags] public enum Flags + { + /// Field has a value + has_title = 0x2, + /// Field has a value + has_description = 0x4, + /// Field has a value + has_url = 0x8, + /// Field has a value + has_thumb = 0x10, + /// Field has a value + has_content = 0x20, + } + + /// Result ID public override string ID => id; + /// Result type (see bot API docs) public override string Type => type; + /// Message to send public override BotInlineMessage SendMessage => send_message; } - ///See + /// Media result
See
[TLDef(0x17DB940B)] public partial class BotInlineMediaResult : BotInlineResultBase { - [Flags] public enum Flags { has_photo = 0x1, has_document = 0x2, has_title = 0x4, has_description = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Result ID public string id; + /// Result type (see bot API docs) public string type; + /// If type is photo, the photo to send [IfFlag(0)] public PhotoBase photo; + /// If type is document, the document to send [IfFlag(1)] public DocumentBase document; + /// Result title [IfFlag(2)] public string title; + /// Description [IfFlag(3)] public string description; + /// Depending on the type and on the , contains the caption of the media or the content of the message to be sent instead of the media public BotInlineMessage send_message; + [Flags] public enum Flags + { + /// Field has a value + has_photo = 0x1, + /// Field has a value + has_document = 0x2, + /// Field has a value + has_title = 0x4, + /// Field has a value + has_description = 0x8, + } + + /// Result ID public override string ID => id; + /// Result type (see bot API docs) public override string Type => type; + /// Depending on the type and on the , contains the caption of the media or the content of the message to be sent instead of the media public override BotInlineMessage SendMessage => send_message; } - ///See + /// Result of a query to an inline bot
See
[TLDef(0x947CA848)] public partial class Messages_BotResults : ITLObject { - [Flags] public enum Flags { gallery = 0x1, has_next_offset = 0x2, has_switch_pm = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Query ID public long query_id; + /// The next offset to use when navigating through results [IfFlag(1)] public string next_offset; + /// Whether the bot requested the user to message him in private [IfFlag(2)] public InlineBotSwitchPM switch_pm; + /// The results public BotInlineResultBase[] results; + /// Caching validity of the results public DateTime cache_time; + /// Users mentioned in the results public Dictionary users; + + [Flags] public enum Flags + { + /// Whether the result is a picture gallery + gallery = 0x1, + /// Field has a value + has_next_offset = 0x2, + /// Field has a value + has_switch_pm = 0x4, + } } - ///See + /// Link to a message in a supergroup/channel
See
[TLDef(0x5DAB1AF4)] public partial class ExportedMessageLink : ITLObject { + /// URL public string link; + /// Embed code public string html; } - ///See + /// Info about a forwarded message
See
[TLDef(0x5F777DCE)] public partial class MessageFwdHeader : ITLObject { - [Flags] public enum Flags { has_from_id = 0x1, has_channel_post = 0x4, has_post_author = 0x8, has_saved_from_peer = 0x10, - has_from_name = 0x20, has_psa_type = 0x40, imported = 0x80 } + /// Flags, see TL conditional fields public Flags flags; + /// The ID of the user that originally sent the message [IfFlag(0)] public Peer from_id; + /// The name of the user that originally sent the message [IfFlag(5)] public string from_name; + /// When was the message originally sent public DateTime date; + /// ID of the channel message that was forwarded [IfFlag(2)] public int channel_post; + /// For channels and if signatures are enabled, author of the channel message [IfFlag(3)] public string post_author; + /// Only for messages forwarded to the current user (inputPeerSelf), full info about the user/channel that originally sent the message [IfFlag(4)] public Peer saved_from_peer; + /// Only for messages forwarded to the current user (inputPeerSelf), ID of the message that was forwarded from the original user/channel [IfFlag(4)] public int saved_from_msg_id; + /// PSA type [IfFlag(6)] public string psa_type; + + [Flags] public enum Flags + { + /// Field has a value + has_from_id = 0x1, + /// Field has a value + has_channel_post = 0x4, + /// Field has a value + has_post_author = 0x8, + /// Field has a value + has_saved_from_peer = 0x10, + /// Field has a value + has_from_name = 0x20, + /// Field has a value + has_psa_type = 0x40, + /// Whether this message was imported from a foreign chat service, click here for more info » + imported = 0x80, + } } - ///See + ///
See
public enum Auth_CodeType : uint { - ///See + ///Type of verification code that will be sent next if you call the resendCode method: SMS code Sms = 0x72A3158C, - ///See + ///Type of verification code that will be sent next if you call the resendCode method: SMS code Call = 0x741CD3E3, - ///See + ///Type of verification code that will be sent next if you call the resendCode method: SMS code FlashCall = 0x226CCEFB, } - ///See + ///
Derived classes: , , ,
See
public abstract partial class Auth_SentCodeType : ITLObject { } - ///See + /// The code was sent through the telegram app
See
[TLDef(0x3DBB5986)] - public partial class Auth_SentCodeTypeApp : Auth_SentCodeType { public int length; } - ///See + public partial class Auth_SentCodeTypeApp : Auth_SentCodeType + { + /// Length of the code in bytes + public int length; + } + /// The code was sent via SMS
See
[TLDef(0xC000BBA2)] - public partial class Auth_SentCodeTypeSms : Auth_SentCodeType { public int length; } - ///See + public partial class Auth_SentCodeTypeSms : Auth_SentCodeType + { + /// Length of the code in bytes + public int length; + } + /// The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input.
See
[TLDef(0x5353E5A7)] - public partial class Auth_SentCodeTypeCall : Auth_SentCodeType { public int length; } - ///See + public partial class Auth_SentCodeTypeCall : Auth_SentCodeType + { + /// Length of the verification code + public int length; + } + /// The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.
See
[TLDef(0xAB03C6D9)] - public partial class Auth_SentCodeTypeFlashCall : Auth_SentCodeType { public string pattern; } + public partial class Auth_SentCodeTypeFlashCall : Auth_SentCodeType + { + /// pattern to match + public string pattern; + } - ///See + /// Callback answer sent by the bot in response to a button press
See
[TLDef(0x36585EA4)] public partial class Messages_BotCallbackAnswer : ITLObject { - [Flags] public enum Flags { has_message = 0x1, alert = 0x2, has_url_field = 0x4, has_url = 0x8, native_ui = 0x10 } + /// Flags, see TL conditional fields public Flags flags; + /// Alert to show [IfFlag(0)] public string message; + /// URL to open [IfFlag(2)] public string url; + /// For how long should this answer be cached public DateTime cache_time; + + [Flags] public enum Flags + { + /// Field has a value + has_message = 0x1, + /// Whether an alert should be shown to the user instead of a toast notification + alert = 0x2, + /// Field has a value + has_url_field = 0x4, + /// Whether an URL is present + has_url = 0x8, + /// Whether to show games in WebView or in native UI. + native_ui = 0x10, + } } - ///See + /// Message edit data for media
See
[TLDef(0x26B5DDE6)] public partial class Messages_MessageEditData : ITLObject { - [Flags] public enum Flags { caption = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + + [Flags] public enum Flags + { + /// Media caption, if the specified media's caption can be edited + caption = 0x1, + } } - ///See + ///
Derived classes: ,
See
public abstract partial class InputBotInlineMessageIDBase : ITLObject { + /// DC ID to use when working with this inline message public abstract int DcId { get; } + /// Access hash of message public abstract long AccessHash { get; } } - ///See + /// Represents a sent inline message from the perspective of a bot (legacy constructor)
See
[TLDef(0x890C3D89)] public partial class InputBotInlineMessageID : InputBotInlineMessageIDBase { + /// DC ID to use when working with this inline message public int dc_id; + /// ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID. public long id; + /// Access hash of message public long access_hash; + /// DC ID to use when working with this inline message public override int DcId => dc_id; + /// Access hash of message public override long AccessHash => access_hash; } - ///See + /// Represents a sent inline message from the perspective of a bot
See
[TLDef(0xB6D915D7)] public partial class InputBotInlineMessageID64 : InputBotInlineMessageIDBase { + /// DC ID to use when working with this inline message public int dc_id; + /// ID of the owner of this message public long owner_id; + /// ID of message public int id; + /// Access hash of message public long access_hash; + /// DC ID to use when working with this inline message public override int DcId => dc_id; + /// Access hash of message public override long AccessHash => access_hash; } - ///See + /// The bot requested the user to message him in private
See
[TLDef(0x3C20629F)] public partial class InlineBotSwitchPM : ITLObject { + /// Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty) public string text; + /// The parameter for the /start parameter public string start_param; } - ///See + /// Dialog info of multiple peers
See
[TLDef(0x3371C354)] public partial class Messages_PeerDialogs : ITLObject { + /// Dialog info public DialogBase[] dialogs; + /// Messages mentioned in dialog info public MessageBase[] messages; + /// Chats public Dictionary chats; + /// Users public Dictionary users; + /// Current update state of dialog public Updates_State state; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Top peer
See
[TLDef(0xEDCDC05B)] public partial class TopPeer : ITLObject { + /// Peer public Peer peer; + /// Rating as computed in top peer rating » public double rating; } - ///See + /// Top peer category
See
public enum TopPeerCategory : uint { - ///See + ///Most used bots BotsPM = 0xAB661B5B, - ///See + ///Most used inline bots BotsInline = 0x148677E2, - ///See + ///Users we've chatted most frequently with Correspondents = 0x0637B7ED, - ///See + ///Often-opened groups and supergroups Groups = 0xBD17A14A, - ///See + ///Most frequently visited channels Channels = 0x161D9628, - ///See + ///Most frequently called users PhoneCalls = 0x1E76A78C, - ///See + ///Users to which the users often forwards messages to ForwardUsers = 0xA8406CA9, - ///See + ///Chats to which the users often forwards messages to ForwardChats = 0xFBEEC0F0, } - ///See + /// Top peer category
See
[TLDef(0xFB834291)] public partial class TopPeerCategoryPeers : ITLObject { + /// Top peer category of peers public TopPeerCategory category; + /// Count of peers public int count; + /// Peers public TopPeer[] peers; } - ///See - ///a null value means contacts.topPeersNotModified + ///
Derived classes: ,
See
+ /// a null value means contacts.topPeersNotModified public abstract partial class Contacts_TopPeersBase : ITLObject { } - ///See + /// Top peers
See
[TLDef(0x70B772A8)] public partial class Contacts_TopPeers : Contacts_TopPeersBase { + /// Top peers by top peer category public TopPeerCategoryPeers[] categories; + /// Chats public Dictionary chats; + /// Users public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Top peers disabled
See
[TLDef(0xB52C939D)] public partial class Contacts_TopPeersDisabled : Contacts_TopPeersBase { } - ///See + ///
Derived classes: ,
See
public abstract partial class DraftMessageBase : ITLObject { } - ///See + /// Empty draft
See
[TLDef(0x1B0C841A)] public partial class DraftMessageEmpty : DraftMessageBase { - [Flags] public enum Flags { has_date = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// When was the draft last updated [IfFlag(0)] public DateTime date; + + [Flags] public enum Flags + { + /// Field has a value + has_date = 0x1, + } } - ///See + /// Represents a message draft.
See
[TLDef(0xFD8E711F)] public partial class DraftMessage : DraftMessageBase { - [Flags] public enum Flags { has_reply_to_msg_id = 0x1, no_webpage = 0x2, has_entities = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// The message this message will reply to [IfFlag(0)] public int reply_to_msg_id; + /// The draft public string message; + /// Message entities for styled text. [IfFlag(3)] public MessageEntity[] entities; + /// Date of last update of the draft. public DateTime date; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_to_msg_id = 0x1, + /// Whether no webpage preview will be generated + no_webpage = 0x2, + /// Field has a value + has_entities = 0x8, + } } - ///See + ///
Derived classes: ,
See
public abstract partial class Messages_FeaturedStickersBase : ITLObject { } - ///See + /// Featured stickers haven't changed
See
[TLDef(0xC6DC0C66)] - public partial class Messages_FeaturedStickersNotModified : Messages_FeaturedStickersBase { public int count; } - ///See + public partial class Messages_FeaturedStickersNotModified : Messages_FeaturedStickersBase + { + /// Total number of featured stickers + public int count; + } + /// Featured stickersets
See
[TLDef(0x84C02310)] public partial class Messages_FeaturedStickers : Messages_FeaturedStickersBase { + /// Hash for pagination, for more info click here public long hash; + /// Total number of featured stickers public int count; + /// Featured stickersets public StickerSetCoveredBase[] sets; + /// IDs of new featured stickersets public long[] unread; } - ///See - ///a null value means messages.recentStickersNotModified + /// Recently used stickers
See
+ /// a null value means messages.recentStickersNotModified [TLDef(0x88D37C56)] public partial class Messages_RecentStickers : ITLObject { + /// Hash for pagination, for more info click here public long hash; + /// Emojis associated to stickers public StickerPack[] packs; + /// Recent stickers public DocumentBase[] stickers; + /// When was each sticker last used public int[] dates; } - ///See + /// Archived stickersets
See
[TLDef(0x4FCBA9C8)] public partial class Messages_ArchivedStickers : ITLObject { + /// Number of archived stickers public int count; + /// Archived stickersets public StickerSetCoveredBase[] sets; } - ///See + ///
Derived classes: ,
See
public abstract partial class Messages_StickerSetInstallResult : ITLObject { } - ///See + /// The stickerset was installed successfully
See
[TLDef(0x38641628)] public partial class Messages_StickerSetInstallResultSuccess : Messages_StickerSetInstallResult { } - ///See + /// The stickerset was installed, but since there are too many stickersets some were archived
See
[TLDef(0x35E410A8)] - public partial class Messages_StickerSetInstallResultArchive : Messages_StickerSetInstallResult { public StickerSetCoveredBase[] sets; } + public partial class Messages_StickerSetInstallResultArchive : Messages_StickerSetInstallResult + { + /// Archived stickersets + public StickerSetCoveredBase[] sets; + } - ///See + ///
Derived classes: ,
See
public abstract partial class StickerSetCoveredBase : ITLObject { + /// Stickerset public abstract StickerSet Set { get; } } - ///See + /// Stickerset, with a specific sticker as preview
See
[TLDef(0x6410A5D2)] public partial class StickerSetCovered : StickerSetCoveredBase { + /// Stickerset public StickerSet set; + /// Preview public DocumentBase cover; + /// Stickerset public override StickerSet Set => set; } - ///See + /// Stickerset, with a specific stickers as preview
See
[TLDef(0x3407E51B)] public partial class StickerSetMultiCovered : StickerSetCoveredBase { + /// Stickerset public StickerSet set; + /// Preview stickers public DocumentBase[] covers; + /// Stickerset public override StickerSet Set => set; } - ///See + /// Position on a photo where a mask should be placed
See
[TLDef(0xAED6DBB2)] public partial class MaskCoords : ITLObject { + /// Part of the face, relative to which the mask should be placed public int n; + /// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) public double x; + /// Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) public double y; + /// Mask scaling coefficient. (For example, 2.0 means a doubled size) public double zoom; } - ///See + /// Represents a media with attached stickers
Derived classes: ,
See
public abstract partial class InputStickeredMedia : ITLObject { } - ///See + /// A photo with stickers attached
See
[TLDef(0x4A992157)] - public partial class InputStickeredMediaPhoto : InputStickeredMedia { public InputPhoto id; } - ///See + public partial class InputStickeredMediaPhoto : InputStickeredMedia + { + /// The photo + public InputPhoto id; + } + /// A document with stickers attached
See
[TLDef(0x0438865B)] - public partial class InputStickeredMediaDocument : InputStickeredMedia { public InputDocument id; } + public partial class InputStickeredMediaDocument : InputStickeredMedia + { + /// The document + public InputDocument id; + } - ///See + /// Indicates an already sent game
See
[TLDef(0xBDF9653B)] public partial class Game : ITLObject { - [Flags] public enum Flags { has_document = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of the game public long id; + /// Access hash of the game public long access_hash; + /// Short name for the game public string short_name; + /// Title of the game public string title; + /// Game description public string description; + /// Game preview public PhotoBase photo; + /// Optional attached document [IfFlag(0)] public DocumentBase document; + + [Flags] public enum Flags + { + /// Field has a value + has_document = 0x1, + } } - ///See + /// A game to send
Derived classes: ,
See
public abstract partial class InputGame : ITLObject { } - ///See + /// Indicates an already sent game
See
[TLDef(0x032C3E77)] public partial class InputGameID : InputGame { + /// game ID from constructor public long id; + /// access hash from constructor public long access_hash; } - ///See + /// Game by short name
See
[TLDef(0xC331E80A)] public partial class InputGameShortName : InputGame { + /// The bot that provides the game public InputUserBase bot_id; + /// The game's short name public string short_name; } - ///See + /// Game highscore
See
[TLDef(0x73A379EB)] public partial class HighScore : ITLObject { + /// Position in highscore list public int pos; + /// User ID public long user_id; + /// Score public int score; } - ///See + /// Highscores in a game
See
[TLDef(0x9A3BFD99)] public partial class Messages_HighScores : ITLObject { + /// Highscores public HighScore[] scores; + /// Users, associated to the highscores public Dictionary users; } - ///See - ///a null value means textEmpty + /// Rich text
Derived classes: , , , , , , , , , , , , , ,
See
+ /// a null value means textEmpty public abstract partial class RichText : ITLObject { } - ///See + /// Plain text
See
[TLDef(0x744694E0)] - public partial class TextPlain : RichText { public string text; } - ///See + public partial class TextPlain : RichText + { + /// Text + public string text; + } + /// Bold text
See
[TLDef(0x6724ABC4)] - public partial class TextBold : RichText { public RichText text; } - ///See + public partial class TextBold : RichText + { + /// Text + public RichText text; + } + /// Italic text
See
[TLDef(0xD912A59C)] - public partial class TextItalic : RichText { public RichText text; } - ///See + public partial class TextItalic : RichText + { + /// Text + public RichText text; + } + /// Underlined text
See
[TLDef(0xC12622C4)] - public partial class TextUnderline : RichText { public RichText text; } - ///See + public partial class TextUnderline : RichText + { + /// Text + public RichText text; + } + /// Strikethrough text
See
[TLDef(0x9BF8BB95)] - public partial class TextStrike : RichText { public RichText text; } - ///See + public partial class TextStrike : RichText + { + /// Text + public RichText text; + } + /// fixed-width rich text
See
[TLDef(0x6C3F19B9)] - public partial class TextFixed : RichText { public RichText text; } - ///See + public partial class TextFixed : RichText + { + /// Text + public RichText text; + } + /// Link
See
[TLDef(0x3C2884C1)] public partial class TextUrl : RichText { + /// Text of link public RichText text; + /// Webpage HTTP URL public string url; + /// If a preview was already generated for the page, the page ID public long webpage_id; } - ///See + /// Rich text email link
See
[TLDef(0xDE5A0DD6)] public partial class TextEmail : RichText { + /// Link text public RichText text; + /// Email address public string email; } - ///See + /// Concatenation of rich texts
See
[TLDef(0x7E6260D7)] - public partial class TextConcat : RichText { public RichText[] texts; } - ///See + public partial class TextConcat : RichText + { + /// Concatenated rich texts + public RichText[] texts; + } + /// Subscript text
See
[TLDef(0xED6A8504)] - public partial class TextSubscript : RichText { public RichText text; } - ///See + public partial class TextSubscript : RichText + { + /// Text + public RichText text; + } + /// Superscript text
See
[TLDef(0xC7FB5E01)] - public partial class TextSuperscript : RichText { public RichText text; } - ///See + public partial class TextSuperscript : RichText + { + /// Text + public RichText text; + } + /// Highlighted text
See
[TLDef(0x034B8621)] - public partial class TextMarked : RichText { public RichText text; } - ///See + public partial class TextMarked : RichText + { + /// Text + public RichText text; + } + /// Rich text linked to a phone number
See
[TLDef(0x1CCB966A)] public partial class TextPhone : RichText { + /// Text public RichText text; + /// Phone number public string phone; } - ///See + /// Inline image
See
[TLDef(0x081CCF4F)] public partial class TextImage : RichText { + /// Document ID public long document_id; + /// Width public int w; + /// Height public int h; } - ///See + /// Text linking to another section of the page
See
[TLDef(0x35553762)] public partial class TextAnchor : RichText { + /// Text public RichText text; + /// Section name public string name; } - ///See + /// Represents an instant view page element
Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
See
public abstract partial class PageBlock : ITLObject { } - ///See + /// Unsupported IV element
See
[TLDef(0x13567E8A)] public partial class PageBlockUnsupported : PageBlock { } - ///See + /// Title
See
[TLDef(0x70ABC3FD)] - public partial class PageBlockTitle : PageBlock { public RichText text; } - ///See + public partial class PageBlockTitle : PageBlock + { + /// Title + public RichText text; + } + /// Subtitle
See
[TLDef(0x8FFA9A1F)] - public partial class PageBlockSubtitle : PageBlock { public RichText text; } - ///See + public partial class PageBlockSubtitle : PageBlock + { + /// Text + public RichText text; + } + /// Author and date of creation of article
See
[TLDef(0xBAAFE5E0)] public partial class PageBlockAuthorDate : PageBlock { + /// Author name public RichText author; + /// Date of pubblication public DateTime published_date; } - ///See + /// Page header
See
[TLDef(0xBFD064EC)] - public partial class PageBlockHeader : PageBlock { public RichText text; } - ///See + public partial class PageBlockHeader : PageBlock + { + /// Contents + public RichText text; + } + /// Subheader
See
[TLDef(0xF12BB6E1)] - public partial class PageBlockSubheader : PageBlock { public RichText text; } - ///See + public partial class PageBlockSubheader : PageBlock + { + /// Subheader + public RichText text; + } + /// A paragraph
See
[TLDef(0x467A0766)] - public partial class PageBlockParagraph : PageBlock { public RichText text; } - ///See + public partial class PageBlockParagraph : PageBlock + { + /// Text + public RichText text; + } + /// Preformatted (<pre> text)
See
[TLDef(0xC070D93E)] public partial class PageBlockPreformatted : PageBlock { + /// Text public RichText text; + /// Programming language of preformatted text public string language; } - ///See + /// Page footer
See
[TLDef(0x48870999)] - public partial class PageBlockFooter : PageBlock { public RichText text; } - ///See + public partial class PageBlockFooter : PageBlock + { + /// Contents + public RichText text; + } + /// An empty block separating a page
See
[TLDef(0xDB20B188)] public partial class PageBlockDivider : PageBlock { } - ///See + /// Link to section within the page itself (like <a href="#target">anchor</a>)
See
[TLDef(0xCE0D37B0)] - public partial class PageBlockAnchor : PageBlock { public string name; } - ///See + public partial class PageBlockAnchor : PageBlock + { + /// Name of target section + public string name; + } + /// Unordered list of IV blocks
See
[TLDef(0xE4E88011)] - public partial class PageBlockList : PageBlock { public PageListItem[] items; } - ///See + public partial class PageBlockList : PageBlock + { + /// List of blocks in an IV page + public PageListItem[] items; + } + /// Quote (equivalent to the HTML <blockquote>)
See
[TLDef(0x263D7C26)] public partial class PageBlockBlockquote : PageBlock { + /// Quote contents public RichText text; + /// Caption public RichText caption; } - ///See + /// Pullquote
See
[TLDef(0x4F4456D3)] public partial class PageBlockPullquote : PageBlock { + /// Text public RichText text; + /// Caption public RichText caption; } - ///See + /// A photo
See
[TLDef(0x1759C560)] public partial class PageBlockPhoto : PageBlock { - [Flags] public enum Flags { has_url = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Photo ID public long photo_id; + /// Caption public PageCaption caption; + /// HTTP URL of page the photo leads to when clicked [IfFlag(0)] public string url; + /// ID of preview of the page the photo leads to when clicked [IfFlag(0)] public long webpage_id; + + [Flags] public enum Flags + { + /// Field has a value + has_url = 0x1, + } } - ///See + /// Video
See
[TLDef(0x7C8FE7B6)] public partial class PageBlockVideo : PageBlock { - [Flags] public enum Flags { autoplay = 0x1, loop = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Video ID public long video_id; + /// Caption public PageCaption caption; + + [Flags] public enum Flags + { + /// Whether the video is set to autoplay + autoplay = 0x1, + /// Whether the video is set to loop + loop = 0x2, + } } - ///See + /// A page cover
See
[TLDef(0x39F23300)] - public partial class PageBlockCover : PageBlock { public PageBlock cover; } - ///See + public partial class PageBlockCover : PageBlock + { + /// Cover + public PageBlock cover; + } + /// An embedded webpage
See
[TLDef(0xA8718DC5)] public partial class PageBlockEmbed : PageBlock { - [Flags] public enum Flags { full_width = 0x1, has_url = 0x2, has_html = 0x4, allow_scrolling = 0x8, has_poster_photo_id = 0x10, - has_w = 0x20 } + /// Flags, see TL conditional fields public Flags flags; + /// Web page URL, if available [IfFlag(1)] public string url; + /// HTML-markup of the embedded page [IfFlag(2)] public string html; + /// Poster photo, if available [IfFlag(4)] public long poster_photo_id; + /// Block width, if known [IfFlag(5)] public int w; + /// Block height, if known [IfFlag(5)] public int h; + /// Caption public PageCaption caption; + + [Flags] public enum Flags + { + /// Whether the block should be full width + full_width = 0x1, + /// Field has a value + has_url = 0x2, + /// Field has a value + has_html = 0x4, + /// Whether scrolling should be allowed + allow_scrolling = 0x8, + /// Field has a value + has_poster_photo_id = 0x10, + /// Field has a value + has_w = 0x20, + } } - ///See + /// An embedded post
See
[TLDef(0xF259A80B)] public partial class PageBlockEmbedPost : PageBlock { + /// Web page URL public string url; + /// ID of generated webpage preview public long webpage_id; + /// ID of the author's photo public long author_photo_id; + /// Author name public string author; + /// Creation date public DateTime date; + /// Post contents public PageBlock[] blocks; + /// Caption public PageCaption caption; } - ///See + /// Collage of media
See
[TLDef(0x65A0FA4D)] public partial class PageBlockCollage : PageBlock { + /// Media elements public PageBlock[] items; + /// Caption public PageCaption caption; } - ///See + /// Slideshow
See
[TLDef(0x031F9590)] public partial class PageBlockSlideshow : PageBlock { + /// Slideshow items public PageBlock[] items; + /// Caption public PageCaption caption; } - ///See + /// Reference to a telegram channel
See
[TLDef(0xEF1751B5)] - public partial class PageBlockChannel : PageBlock { public ChatBase channel; } - ///See + public partial class PageBlockChannel : PageBlock + { + /// The channel/supergroup/chat + public ChatBase channel; + } + /// Audio
See
[TLDef(0x804361EA)] public partial class PageBlockAudio : PageBlock { + /// Audio ID (to be fetched from the container constructor public long audio_id; + /// Audio caption public PageCaption caption; } - ///See + /// Kicker
See
[TLDef(0x1E148390)] - public partial class PageBlockKicker : PageBlock { public RichText text; } - ///See + public partial class PageBlockKicker : PageBlock + { + /// Contents + public RichText text; + } + /// Table
See
[TLDef(0xBF4DEA82)] public partial class PageBlockTable : PageBlock { - [Flags] public enum Flags { bordered = 0x1, striped = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Title public RichText title; + /// Table rows public PageTableRow[] rows; + + [Flags] public enum Flags + { + /// Does the table have a visible border? + bordered = 0x1, + /// Is the table striped? + striped = 0x2, + } } - ///See + /// Ordered list of IV blocks
See
[TLDef(0x9A8AE1E1)] - public partial class PageBlockOrderedList : PageBlock { public PageListOrderedItem[] items; } - ///See + public partial class PageBlockOrderedList : PageBlock + { + /// List items + public PageListOrderedItem[] items; + } + /// A collapsible details block
See
[TLDef(0x76768BED)] public partial class PageBlockDetails : PageBlock { - [Flags] public enum Flags { open = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Block contents public PageBlock[] blocks; + /// Always visible heading for the block public RichText title; + + [Flags] public enum Flags + { + /// Whether the block is open by default + open = 0x1, + } } - ///See + /// Related articles
See
[TLDef(0x16115A96)] public partial class PageBlockRelatedArticles : PageBlock { + /// Title public RichText title; + /// Related articles public PageRelatedArticle[] articles; } - ///See + /// A map
See
[TLDef(0xA44F3EF6)] public partial class PageBlockMap : PageBlock { + /// Location of the map center public GeoPoint geo; + /// Map zoom level; 13-20 public int zoom; + /// Map width in pixels before applying scale; 16-102 public int w; + /// Map height in pixels before applying scale; 16-1024 public int h; + /// Caption public PageCaption caption; } - ///See + /// Why was the phone call discarded?
See
public enum PhoneCallDiscardReason : uint { - ///See + ///The phone call was missed Missed = 0x85E42301, - ///See + ///The phone call was disconnected Disconnect = 0xE095C1A0, - ///See + ///The phone call was ended normally Hangup = 0x57ADC690, - ///See + ///The phone call was discared because the user is busy in another call Busy = 0xFAF7E8C9, } - ///See + /// Represents a json-encoded object
See
[TLDef(0x7D748D04)] - public partial class DataJSON : ITLObject { public string data; } + public partial class DataJSON : ITLObject + { + /// JSON-encoded object + public string data; + } - ///See + /// This object represents a portion of the price for goods or services.
See
[TLDef(0xCB296BF8)] public partial class LabeledPrice : ITLObject { + /// Portion label public string label; + /// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long amount; } - ///See + /// Invoice
See
[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, - has_max_tip_amount = 0x100 } + /// Flags, see TL conditional fields public Flags flags; + /// Three-letter ISO 4217 currency code public string currency; + /// Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) public LabeledPrice[] prices; + /// The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). [IfFlag(8)] public long max_tip_amount; + /// A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. [IfFlag(8)] public long[] suggested_tip_amounts; + + [Flags] public enum Flags + { + /// Test invoice + test = 0x1, + /// Set this flag if you require the user's full name to complete the order + name_requested = 0x2, + /// Set this flag if you require the user's phone number to complete the order + phone_requested = 0x4, + /// Set this flag if you require the user's email address to complete the order + email_requested = 0x8, + /// Set this flag if you require the user's shipping address to complete the order + shipping_address_requested = 0x10, + /// Set this flag if the final price depends on the shipping method + flexible = 0x20, + /// Set this flag if user's phone number should be sent to provider + phone_to_provider = 0x40, + /// Set this flag if user's email address should be sent to provider + email_to_provider = 0x80, + /// Field has a value + has_max_tip_amount = 0x100, + } } - ///See + /// Payment identifier
See
[TLDef(0xEA02C27E)] public partial class PaymentCharge : ITLObject { + /// Telegram payment identifier public string id; + /// Provider payment identifier public string provider_charge_id; } - ///See + /// Shipping address
See
[TLDef(0x1E8CAAEB)] public partial class PostAddress : ITLObject { + /// First line for the address public string street_line1; + /// Second line for the address public string street_line2; + /// City public string city; + /// State, if applicable (empty otherwise) public string state; + /// ISO 3166-1 alpha-2 country code public string country_iso2; + /// Address post code public string post_code; } - ///See + /// Order info provided by the user
See
[TLDef(0x909C3F94)] public partial class PaymentRequestedInfo : ITLObject { - [Flags] public enum Flags { has_name = 0x1, has_phone = 0x2, has_email = 0x4, has_shipping_address = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// User's full name [IfFlag(0)] public string name; + /// User's phone number [IfFlag(1)] public string phone; + /// User's email address [IfFlag(2)] public string email; + /// User's shipping address [IfFlag(3)] public PostAddress shipping_address; + + [Flags] public enum Flags + { + /// Field has a value + has_name = 0x1, + /// Field has a value + has_phone = 0x2, + /// Field has a value + has_email = 0x4, + /// Field has a value + has_shipping_address = 0x8, + } } - ///See + /// Saved payment credentials
Derived classes:
See
public abstract partial class PaymentSavedCredentials : ITLObject { } - ///See + /// Saved credit card
See
[TLDef(0xCDC27A1F)] public partial class PaymentSavedCredentialsCard : PaymentSavedCredentials { + /// Card ID public string id; + /// Title public string title; } - ///See + ///
Derived classes: ,
See
public abstract partial class WebDocumentBase : ITLObject { + /// Document URL public abstract string Url { get; } + /// File size public abstract int Size { get; } + /// MIME type public abstract string MimeType { get; } + /// Attributes for media types public abstract DocumentAttribute[] Attributes { get; } } - ///See + /// Remote document
See
[TLDef(0x1C570ED1)] public partial class WebDocument : WebDocumentBase { + /// Document URL public string url; + /// Access hash public long access_hash; + /// File size public int size; + /// MIME type public string mime_type; + /// Attributes for media types public DocumentAttribute[] attributes; + /// Document URL public override string Url => url; + /// File size public override int Size => size; + /// MIME type public override string MimeType => mime_type; + /// Attributes for media types public override DocumentAttribute[] Attributes => attributes; } - ///See + /// Remote document that can be downloaded without proxying through telegram
See
[TLDef(0xF9C8BCC6)] public partial class WebDocumentNoProxy : WebDocumentBase { + /// Document URL public string url; + /// File size public int size; + /// MIME type public string mime_type; + /// Attributes for media types public DocumentAttribute[] attributes; + /// Document URL public override string Url => url; + /// File size public override int Size => size; + /// MIME type public override string MimeType => mime_type; + /// Attributes for media types public override DocumentAttribute[] Attributes => attributes; } - ///See + /// The document
See
[TLDef(0x9BED434D)] public partial class InputWebDocument : ITLObject { + /// Remote document URL to be downloaded using the appropriate method public string url; + /// Remote file size public int size; + /// Mime type public string mime_type; + /// Attributes for media types public DocumentAttribute[] attributes; } - ///See + ///
Derived classes: ,
See
public abstract partial class InputWebFileLocationBase : ITLObject { + /// Access hash public abstract long AccessHash { get; } } - ///See + /// Location of a remote HTTP(s) file
See
[TLDef(0xC239D686)] public partial class InputWebFileLocation : InputWebFileLocationBase { + /// HTTP URL of file public string url; + /// Access hash public long access_hash; + /// Access hash public override long AccessHash => access_hash; } - ///See + /// Geolocation
See
[TLDef(0x9F2221C9)] public partial class InputWebFileGeoPointLocation : InputWebFileLocationBase { + /// Geolocation public InputGeoPoint geo_point; + /// Access hash public long access_hash; + /// Map width in pixels before applying scale; 16-1024 public int w; + /// Map height in pixels before applying scale; 16-1024 public int h; + /// Map zoom level; 13-20 public int zoom; + /// Map scale; 1-3 public int scale; + /// Access hash public override long AccessHash => access_hash; } - ///See + /// Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers
See
[TLDef(0x21E753BC)] public partial class Upload_WebFile : ITLObject { + /// File size public int size; + /// Mime type public string mime_type; + /// File type public Storage_FileType file_type; + /// Modified time public int mtime; + /// Data public byte[] bytes; } - ///See + /// Payment form
See
[TLDef(0x1694761B)] 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 } + /// Flags, see TL conditional fields public Flags flags; + /// Form ID public long form_id; + /// Bot ID public long bot_id; + /// Invoice public Invoice invoice; + /// Payment provider ID. public long provider_id; + /// Payment form URL public string url; + /// Payment provider name.
One of the following:
- stripe
[IfFlag(4)] public string native_provider; + /// Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
A JSON object that can contain the following fields:

- apple_pay_merchant_id: Apple Pay merchant ID
- google_pay_public_key: Google Pay public key
- need_country: True, if the user country must be provided,
- need_zip: True, if the user ZIP/postal code must be provided,
- need_cardholder_name: True, if the cardholder name must be provided
[IfFlag(4)] public DataJSON native_params; + /// Saved server-side order information [IfFlag(0)] public PaymentRequestedInfo saved_info; + /// Contains information about saved card credentials [IfFlag(1)] public PaymentSavedCredentials saved_credentials; + /// Users public Dictionary users; + + [Flags] public enum Flags + { + /// Field has a value + has_saved_info = 0x1, + /// Field has a value + has_saved_credentials = 0x2, + /// Whether the user can choose to save credentials. + can_save_credentials = 0x4, + /// Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password) + password_missing = 0x8, + /// Field has a value + has_native_provider = 0x10, + } } - ///See + ///
See
[TLDef(0xD1451883)] public partial class Payments_ValidatedRequestedInfo : ITLObject { - [Flags] public enum Flags { has_id = 0x1, has_shipping_options = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// ID [IfFlag(0)] public string id; + /// Shipping options [IfFlag(1)] public ShippingOption[] shipping_options; + + [Flags] public enum Flags + { + /// Field has a value + has_id = 0x1, + /// Field has a value + has_shipping_options = 0x2, + } } - ///See + ///
Derived classes: ,
See
public abstract partial class Payments_PaymentResultBase : ITLObject { } - ///See + /// Payment result
See
[TLDef(0x4E5F810D)] - public partial class Payments_PaymentResult : Payments_PaymentResultBase { public UpdatesBase updates; } - ///See + public partial class Payments_PaymentResult : Payments_PaymentResultBase + { + /// Info about the payment + public UpdatesBase updates; + } + /// Payment was not successful, additional verification is needed
See
[TLDef(0xD8411139)] - public partial class Payments_PaymentVerificationNeeded : Payments_PaymentResultBase { public string url; } + public partial class Payments_PaymentVerificationNeeded : Payments_PaymentResultBase + { + /// URL for additional payment credentials verification + public string url; + } - ///See + /// Receipt
See
[TLDef(0x70C4FE03)] public partial class Payments_PaymentReceipt : ITLObject { - [Flags] public enum Flags { has_info = 0x1, has_shipping = 0x2, has_photo = 0x4, has_tip_amount = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Date of generation public DateTime date; + /// Bot ID public long bot_id; + /// Provider ID public long provider_id; + /// Title public string title; + /// Description public string description; + /// Photo [IfFlag(2)] public WebDocumentBase photo; + /// Invoice public Invoice invoice; + /// Info [IfFlag(0)] public PaymentRequestedInfo info; + /// Selected shipping option [IfFlag(1)] public ShippingOption shipping; + /// Tipped amount [IfFlag(3)] public long tip_amount; + /// Three-letter ISO 4217 currency code public string currency; + /// Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public long total_amount; + /// Payment credential name public string credentials_title; + /// Users public Dictionary users; + + [Flags] public enum Flags + { + /// Field has a value + has_info = 0x1, + /// Field has a value + has_shipping = 0x2, + /// Field has a value + has_photo = 0x4, + /// Field has a value + has_tip_amount = 0x8, + } } - ///See + /// Saved server-side order information
See
[TLDef(0xFB8FE43C)] public partial class Payments_SavedInfo : ITLObject { - [Flags] public enum Flags { has_saved_info = 0x1, has_saved_credentials = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Saved server-side order information [IfFlag(0)] public PaymentRequestedInfo saved_info; + + [Flags] public enum Flags + { + /// Field has a value + has_saved_info = 0x1, + /// Whether the user has some saved payment credentials + has_saved_credentials = 0x2, + } } - ///See + ///
Derived classes: , , ,
See
public abstract partial class InputPaymentCredentialsBase : ITLObject { } - ///See + /// Saved payment credentials
See
[TLDef(0xC10EB2CF)] public partial class InputPaymentCredentialsSaved : InputPaymentCredentialsBase { + /// Credential ID public string id; + /// Temporary password public byte[] tmp_password; } - ///See + /// Payment credentials
See
[TLDef(0x3417D728)] public partial class InputPaymentCredentials : InputPaymentCredentialsBase { - [Flags] public enum Flags { save = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Payment credentials public DataJSON data; - } - ///See - [TLDef(0x0AA1C39F)] - public partial class InputPaymentCredentialsApplePay : InputPaymentCredentialsBase { public DataJSON payment_data; } - ///See - [TLDef(0x8AC32801)] - public partial class InputPaymentCredentialsGooglePay : InputPaymentCredentialsBase { public DataJSON payment_token; } - ///See + [Flags] public enum Flags + { + /// Save payment credential for future use + save = 0x1, + } + } + /// Apple pay payment credentials
See
+ [TLDef(0x0AA1C39F)] + public partial class InputPaymentCredentialsApplePay : InputPaymentCredentialsBase + { + /// Payment data + public DataJSON payment_data; + } + /// Google Pay payment credentials
See
+ [TLDef(0x8AC32801)] + public partial class InputPaymentCredentialsGooglePay : InputPaymentCredentialsBase + { + /// Payment token + public DataJSON payment_token; + } + + /// Temporary payment password
See
[TLDef(0xDB64FD34)] public partial class Account_TmpPassword : ITLObject { + /// Temporary password public byte[] tmp_password; + /// Validity period public DateTime valid_until; } - ///See + /// Shipping option
See
[TLDef(0xB6213CDF)] public partial class ShippingOption : ITLObject { + /// Option ID public string id; + /// Title public string title; + /// List of price portions public LabeledPrice[] prices; } - ///See + /// Sticker in a stickerset
See
[TLDef(0xFFA0A496)] public partial class InputStickerSetItem : ITLObject { - [Flags] public enum Flags { has_mask_coords = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The sticker public InputDocument document; + /// Associated emoji public string emoji; + /// Coordinates for mask sticker [IfFlag(0)] public MaskCoords mask_coords; + + [Flags] public enum Flags + { + /// Field has a value + has_mask_coords = 0x1, + } } - ///See + /// Phone call
See
[TLDef(0x1E36FDED)] public partial class InputPhoneCall : ITLObject { + /// Call ID public long id; + /// Access hash public long access_hash; } - ///See + ///
Derived classes: , , , , ,
See
public abstract partial class PhoneCallBase : ITLObject { + /// Call ID public abstract long ID { get; } } - ///See + /// Empty constructor
See
[TLDef(0x5366C915)] public partial class PhoneCallEmpty : PhoneCallBase { + /// Call ID public long id; + /// Call ID public override long ID => id; } - ///See + /// Incoming phone call
See
[TLDef(0xC5226F17)] public partial class PhoneCallWaiting : PhoneCallBase { - [Flags] public enum Flags { has_receive_date = 0x1, video = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Call ID public long id; + /// Access hash public long access_hash; + /// Date public DateTime date; + /// Admin ID public long admin_id; + /// Participant ID public long participant_id; + /// Phone call protocol info public PhoneCallProtocol protocol; + /// When was the phone call received [IfFlag(0)] public DateTime receive_date; + [Flags] public enum Flags + { + /// Field has a value + has_receive_date = 0x1, + /// Is this a video call + video = 0x40, + } + + /// Call ID public override long ID => id; } - ///See + /// Requested phone call
See
[TLDef(0x14B0ED0C)] public partial class PhoneCallRequested : PhoneCallBase { - [Flags] public enum Flags { video = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Phone call ID public long id; + /// Access hash public long access_hash; + /// When was the phone call created public DateTime date; + /// ID of the creator of the phone call public long admin_id; + /// ID of the other participant of the phone call public long participant_id; + /// Parameter for key exchange public byte[] g_a_hash; + /// Call protocol info to be passed to libtgvoip public PhoneCallProtocol protocol; + [Flags] public enum Flags + { + /// Whether this is a video call + video = 0x40, + } + + /// Phone call ID public override long ID => id; } - ///See + /// An accepted phone call
See
[TLDef(0x3660C311)] public partial class PhoneCallAccepted : PhoneCallBase { - [Flags] public enum Flags { video = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of accepted phone call public long id; + /// Access hash of phone call public long access_hash; + /// When was the call accepted public DateTime date; + /// ID of the call creator public long admin_id; + /// ID of the other user in the call public long participant_id; + /// B parameter for secure E2E phone call key exchange public byte[] g_b; + /// Protocol to use for phone call public PhoneCallProtocol protocol; + [Flags] public enum Flags + { + /// Whether this is a video call + video = 0x40, + } + + /// ID of accepted phone call public override long ID => id; } - ///See + /// Phone call
See
[TLDef(0x967F7C67)] public partial class PhoneCall : PhoneCallBase { - [Flags] public enum Flags { p2p_allowed = 0x20, video = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Call ID public long id; + /// Access hash public long access_hash; + /// Date of creation of the call public DateTime date; + /// User ID of the creator of the call public long admin_id; + /// User ID of the other participant in the call public long participant_id; + /// Parameter for key exchange public byte[] g_a_or_b; + /// Key fingerprint public long key_fingerprint; + /// Call protocol info to be passed to libtgvoip public PhoneCallProtocol protocol; + /// List of endpoints the user can connect to to exchange call data public PhoneConnectionBase[] connections; + /// When was the call actually started public DateTime start_date; + [Flags] public enum Flags + { + /// Whether P2P connection to the other peer is allowed + p2p_allowed = 0x20, + /// Whether this is a video call + video = 0x40, + } + + /// Call ID public override long ID => id; } - ///See + /// Indicates a discarded phone call
See
[TLDef(0x50CA4DE1)] public partial class PhoneCallDiscarded : PhoneCallBase { - [Flags] public enum Flags { has_reason = 0x1, has_duration = 0x2, need_rating = 0x4, need_debug = 0x8, video = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Call ID public long id; + /// Why was the phone call discarded [IfFlag(0)] public PhoneCallDiscardReason reason; + /// Duration of the phone call in seconds [IfFlag(1)] public int duration; + [Flags] public enum Flags + { + /// Field has a value + has_reason = 0x1, + /// Field has a value + has_duration = 0x2, + /// Whether the server required the user to rate the call + need_rating = 0x4, + /// Whether the server required the client to send the libtgvoip call debug data + need_debug = 0x8, + /// Whether the call was a video call + video = 0x40, + } + + /// Call ID public override long ID => id; } - ///See + ///
Derived classes: ,
See
public abstract partial class PhoneConnectionBase : ITLObject { + /// Endpoint ID public abstract long ID { get; } + /// IP address of endpoint public abstract string Ip { get; } + /// IPv6 address of endpoint public abstract string Ipv6 { get; } + /// Port ID public abstract int Port { get; } } - ///See + /// Identifies an endpoint that can be used to connect to the other user in a phone call
See
[TLDef(0x9D4C17C0)] public partial class PhoneConnection : PhoneConnectionBase { + /// Endpoint ID public long id; + /// IP address of endpoint public string ip; + /// IPv6 address of endpoint public string ipv6; + /// Port ID public int port; + /// Our peer tag public byte[] peer_tag; + /// Endpoint ID public override long ID => id; + /// IP address of endpoint public override string Ip => ip; + /// IPv6 address of endpoint public override string Ipv6 => ipv6; + /// Port ID public override int Port => port; } - ///See + /// WebRTC connection parameters
See
[TLDef(0x635FE375)] public partial class PhoneConnectionWebrtc : PhoneConnectionBase { - [Flags] public enum Flags { turn = 0x1, stun = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Endpoint ID public long id; + /// IP address public string ip; + /// IPv6 address public string ipv6; + /// Port public int port; + /// Username public string username; + /// Password public string password; + [Flags] public enum Flags + { + /// Whether this is a TURN endpoint + turn = 0x1, + /// Whether this is a STUN endpoint + stun = 0x2, + } + + /// Endpoint ID public override long ID => id; + /// IP address public override string Ip => ip; + /// IPv6 address public override string Ipv6 => ipv6; + /// Port public override int Port => port; } - ///See + /// Protocol info for libtgvoip
See
[TLDef(0xFC878FC8)] public partial class PhoneCallProtocol : ITLObject { - [Flags] public enum Flags { udp_p2p = 0x1, udp_reflector = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Minimum layer for remote libtgvoip public int min_layer; + /// Maximum layer for remote libtgvoip public int max_layer; + /// When using phone.requestCall and phone.acceptCall, specify all library versions supported by the client.
The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's phone.acceptCall and in the update received by the caller.
public string[] library_versions; + + [Flags] public enum Flags + { + /// Whether to allow P2P connection to the other participant + udp_p2p = 0x1, + /// Whether to allow connection to the other participants through the reflector servers + udp_reflector = 0x2, + } } - ///See + /// A VoIP phone call
See
[TLDef(0xEC82E140)] public partial class Phone_PhoneCall : ITLObject { + /// The VoIP phone call public PhoneCallBase phone_call; + /// VoIP phone call participants public Dictionary users; } - ///See + ///
Derived classes: ,
See
public abstract partial class Upload_CdnFileBase : ITLObject { } - ///See + /// The file was cleared from the temporary RAM cache of the CDN and has to be reuploaded.
See
[TLDef(0xEEA8E46E)] - public partial class Upload_CdnFileReuploadNeeded : Upload_CdnFileBase { public byte[] request_token; } - ///See + public partial class Upload_CdnFileReuploadNeeded : Upload_CdnFileBase + { + /// Request token (see CDN) + public byte[] request_token; + } + /// Represent a chunk of a CDN file.
See
[TLDef(0xA99FCA4F)] - public partial class Upload_CdnFile : Upload_CdnFileBase { public byte[] bytes; } + public partial class Upload_CdnFile : Upload_CdnFileBase + { + /// The data + public byte[] bytes; + } - ///See + /// Public key to use only during handshakes to CDN DCs.
See
[TLDef(0xC982EABA)] public partial class CdnPublicKey : ITLObject { + /// CDN DC ID public int dc_id; + /// RSA public key public string public_key; } - ///See + /// Configuration for CDN file downloads.
See
[TLDef(0x5725E40A)] - public partial class CdnConfig : ITLObject { public CdnPublicKey[] public_keys; } + public partial class CdnConfig : ITLObject + { + /// Vector of public keys to use only during handshakes to CDN DCs. + public CdnPublicKey[] public_keys; + } - ///See + ///
Derived classes: , ,
See
public abstract partial class LangPackStringBase : ITLObject { + /// Language key public abstract string Key { get; } } - ///See + /// Translated localization string
See
[TLDef(0xCAD181F6)] public partial class LangPackString : LangPackStringBase { + /// Language key public string key; + /// Value public string value; + /// Language key public override string Key => key; } - ///See + /// A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info
See
[TLDef(0x6C47AC9F)] public partial class LangPackStringPluralized : LangPackStringBase { - [Flags] public enum Flags { has_zero_value = 0x1, has_one_value = 0x2, has_two_value = 0x4, has_few_value = 0x8, - has_many_value = 0x10 } + /// Flags, see TL conditional fields public Flags flags; + /// Localization key public string key; + /// Value for zero objects [IfFlag(0)] public string zero_value; + /// Value for one object [IfFlag(1)] public string one_value; + /// Value for two objects [IfFlag(2)] public string two_value; + /// Value for a few objects [IfFlag(3)] public string few_value; + /// Value for many objects [IfFlag(4)] public string many_value; + /// Default value public string other_value; + [Flags] public enum Flags + { + /// Field has a value + has_zero_value = 0x1, + /// Field has a value + has_one_value = 0x2, + /// Field has a value + has_two_value = 0x4, + /// Field has a value + has_few_value = 0x8, + /// Field has a value + has_many_value = 0x10, + } + + /// Localization key public override string Key => key; } - ///See + /// Deleted localization string
See
[TLDef(0x2979EEB2)] public partial class LangPackStringDeleted : LangPackStringBase { + /// Localization key public string key; + /// Localization key public override string Key => key; } - ///See + /// Changes to the app's localization pack
See
[TLDef(0xF385C1F6)] public partial class LangPackDifference : ITLObject { + /// Language code public string lang_code; + /// Previous version number public int from_version; + /// New version number public int version; + /// Localized strings public LangPackStringBase[] strings; } - ///See + /// Identifies a localization pack
See
[TLDef(0xEECA5CE3)] public partial class LangPackLanguage : ITLObject { - [Flags] public enum Flags { official = 0x1, has_base_lang_code = 0x2, rtl = 0x4, beta = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Language name public string name; + /// Language name in the language itself public string native_name; + /// Language code (pack identifier) public string lang_code; + /// Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs [IfFlag(1)] public string base_lang_code; + /// A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info public string plural_code; + /// Total number of non-deleted strings from the language pack public int strings_count; + /// Total number of translated strings from the language pack public int translated_count; + /// Link to language translation interface; empty for custom local language packs public string translations_url; + + [Flags] public enum Flags + { + /// Whether the language pack is official + official = 0x1, + /// Field has a value + has_base_lang_code = 0x2, + /// Is this a localization pack for an RTL language + rtl = 0x4, + /// Is this a beta localization pack? + beta = 0x8, + } } - ///See + /// Channel admin log event
Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
See
public abstract partial class ChannelAdminLogEventAction : ITLObject { } - ///See + /// Channel/supergroup title was changed
See
[TLDef(0xE6DFB825)] public partial class ChannelAdminLogEventActionChangeTitle : ChannelAdminLogEventAction { + /// Previous title public string prev_value; + /// New title public string new_value; } - ///See + /// The description was changed
See
[TLDef(0x55188A2E)] public partial class ChannelAdminLogEventActionChangeAbout : ChannelAdminLogEventAction { + /// Previous description public string prev_value; + /// New description public string new_value; } - ///See + /// Channel/supergroup username was changed
See
[TLDef(0x6A4AFC38)] public partial class ChannelAdminLogEventActionChangeUsername : ChannelAdminLogEventAction { + /// Old username public string prev_value; + /// New username public string new_value; } - ///See + /// The channel/supergroup's picture was changed
See
[TLDef(0x434BD2AF)] public partial class ChannelAdminLogEventActionChangePhoto : ChannelAdminLogEventAction { + /// Previous picture public PhotoBase prev_photo; + /// New picture public PhotoBase new_photo; } - ///See + /// Invites were enabled/disabled
See
[TLDef(0x1B7907AE)] - public partial class ChannelAdminLogEventActionToggleInvites : ChannelAdminLogEventAction { public bool new_value; } - ///See + public partial class ChannelAdminLogEventActionToggleInvites : ChannelAdminLogEventAction + { + /// New value + public bool new_value; + } + /// Channel signatures were enabled/disabled
See
[TLDef(0x26AE0971)] - public partial class ChannelAdminLogEventActionToggleSignatures : ChannelAdminLogEventAction { public bool new_value; } - ///See + public partial class ChannelAdminLogEventActionToggleSignatures : ChannelAdminLogEventAction + { + /// New value + public bool new_value; + } + /// A message was pinned
See
[TLDef(0xE9E82C18)] - public partial class ChannelAdminLogEventActionUpdatePinned : ChannelAdminLogEventAction { public MessageBase message; } - ///See + public partial class ChannelAdminLogEventActionUpdatePinned : ChannelAdminLogEventAction + { + /// The message that was pinned + public MessageBase message; + } + /// A message was edited
See
[TLDef(0x709B2405)] public partial class ChannelAdminLogEventActionEditMessage : ChannelAdminLogEventAction { + /// Old message public MessageBase prev_message; + /// New message public MessageBase new_message; } - ///See + /// A message was deleted
See
[TLDef(0x42E047BB)] - public partial class ChannelAdminLogEventActionDeleteMessage : ChannelAdminLogEventAction { public MessageBase message; } - ///See + public partial class ChannelAdminLogEventActionDeleteMessage : ChannelAdminLogEventAction + { + /// The message that was deleted + public MessageBase message; + } + /// A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)
See
[TLDef(0x183040D3)] public partial class ChannelAdminLogEventActionParticipantJoin : ChannelAdminLogEventAction { } - ///See + /// A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)
See
[TLDef(0xF89777F2)] public partial class ChannelAdminLogEventActionParticipantLeave : ChannelAdminLogEventAction { } - ///See + /// A user was invited to the group
See
[TLDef(0xE31C34D8)] - public partial class ChannelAdminLogEventActionParticipantInvite : ChannelAdminLogEventAction { public ChannelParticipantBase participant; } - ///See + public partial class ChannelAdminLogEventActionParticipantInvite : ChannelAdminLogEventAction + { + /// The user that was invited + public ChannelParticipantBase participant; + } + /// The banned rights of a user were changed
See
[TLDef(0xE6D83D7E)] public partial class ChannelAdminLogEventActionParticipantToggleBan : ChannelAdminLogEventAction { + /// Old banned rights of user public ChannelParticipantBase prev_participant; + /// New banned rights of user public ChannelParticipantBase new_participant; } - ///See + /// The admin rights of a user were changed
See
[TLDef(0xD5676710)] public partial class ChannelAdminLogEventActionParticipantToggleAdmin : ChannelAdminLogEventAction { + /// Previous admin rights public ChannelParticipantBase prev_participant; + /// New admin rights public ChannelParticipantBase new_participant; } - ///See + /// The supergroup's stickerset was changed
See
[TLDef(0xB1C3CAA7)] public partial class ChannelAdminLogEventActionChangeStickerSet : ChannelAdminLogEventAction { + /// Previous stickerset public InputStickerSet prev_stickerset; + /// New stickerset public InputStickerSet new_stickerset; } - ///See + /// The hidden prehistory setting was changed
See
[TLDef(0x5F5C95F1)] - public partial class ChannelAdminLogEventActionTogglePreHistoryHidden : ChannelAdminLogEventAction { public bool new_value; } - ///See + public partial class ChannelAdminLogEventActionTogglePreHistoryHidden : ChannelAdminLogEventAction + { + /// New value + public bool new_value; + } + /// The default banned rights were modified
See
[TLDef(0x2DF5FC0A)] public partial class ChannelAdminLogEventActionDefaultBannedRights : ChannelAdminLogEventAction { + /// Previous global banned rights public ChatBannedRights prev_banned_rights; + /// New glboal banned rights. public ChatBannedRights new_banned_rights; } - ///See + /// A poll was stopped
See
[TLDef(0x8F079643)] - public partial class ChannelAdminLogEventActionStopPoll : ChannelAdminLogEventAction { public MessageBase message; } - ///See + public partial class ChannelAdminLogEventActionStopPoll : ChannelAdminLogEventAction + { + /// The poll that was stopped + public MessageBase message; + } + /// The linked chat was changed
See
[TLDef(0x050C7AC8)] public partial class ChannelAdminLogEventActionChangeLinkedChat : ChannelAdminLogEventAction { + /// Previous linked chat public long prev_value; + /// New linked chat public long new_value; } - ///See + /// The geogroup location was changed
See
[TLDef(0x0E6B76AE)] public partial class ChannelAdminLogEventActionChangeLocation : ChannelAdminLogEventAction { + /// Previous location public ChannelLocation prev_value; + /// New location public ChannelLocation new_value; } - ///See + /// Slow mode setting for supergroups was changed
See
[TLDef(0x53909779)] public partial class ChannelAdminLogEventActionToggleSlowMode : ChannelAdminLogEventAction { + /// Previous slow mode value public int prev_value; + /// New slow mode value public int new_value; } - ///See + /// A group call was started
See
[TLDef(0x23209745)] - public partial class ChannelAdminLogEventActionStartGroupCall : ChannelAdminLogEventAction { public InputGroupCall call; } - ///See + public partial class ChannelAdminLogEventActionStartGroupCall : ChannelAdminLogEventAction + { + /// Group call + public InputGroupCall call; + } + /// A group call was terminated
See
[TLDef(0xDB9F9140)] - public partial class ChannelAdminLogEventActionDiscardGroupCall : ChannelAdminLogEventAction { public InputGroupCall call; } - ///See + public partial class ChannelAdminLogEventActionDiscardGroupCall : ChannelAdminLogEventAction + { + /// The group call that was terminated + public InputGroupCall call; + } + /// A group call participant was muted
See
[TLDef(0xF92424D2)] - public partial class ChannelAdminLogEventActionParticipantMute : ChannelAdminLogEventAction { public GroupCallParticipant participant; } - ///See + public partial class ChannelAdminLogEventActionParticipantMute : ChannelAdminLogEventAction + { + /// The participant that was muted + public GroupCallParticipant participant; + } + /// A group call participant was unmuted
See
[TLDef(0xE64429C0)] - public partial class ChannelAdminLogEventActionParticipantUnmute : ChannelAdminLogEventAction { public GroupCallParticipant participant; } - ///See + public partial class ChannelAdminLogEventActionParticipantUnmute : ChannelAdminLogEventAction + { + /// The participant that was unmuted + public GroupCallParticipant participant; + } + /// Group call settings were changed
See
[TLDef(0x56D6A247)] - public partial class ChannelAdminLogEventActionToggleGroupCallSetting : ChannelAdminLogEventAction { public bool join_muted; } - ///See + public partial class ChannelAdminLogEventActionToggleGroupCallSetting : ChannelAdminLogEventAction + { + /// Whether all users are muted by default upon joining + public bool join_muted; + } + /// A user joined the supergroup/channel using a specific invite link
See
[TLDef(0x5CDADA77)] - public partial class ChannelAdminLogEventActionParticipantJoinByInvite : ChannelAdminLogEventAction { public ExportedChatInvite invite; } - ///See + public partial class ChannelAdminLogEventActionParticipantJoinByInvite : ChannelAdminLogEventAction + { + /// The invite link used to join the supergroup/channel + public ExportedChatInvite invite; + } + /// A chat invite was deleted
See
[TLDef(0x5A50FCA4)] - public partial class ChannelAdminLogEventActionExportedInviteDelete : ChannelAdminLogEventAction { public ExportedChatInvite invite; } - ///See + public partial class ChannelAdminLogEventActionExportedInviteDelete : ChannelAdminLogEventAction + { + /// The deleted chat invite + public ExportedChatInvite invite; + } + /// A specific invite link was revoked
See
[TLDef(0x410A134E)] - public partial class ChannelAdminLogEventActionExportedInviteRevoke : ChannelAdminLogEventAction { public ExportedChatInvite invite; } - ///See + public partial class ChannelAdminLogEventActionExportedInviteRevoke : ChannelAdminLogEventAction + { + /// The invite link that was revoked + public ExportedChatInvite invite; + } + /// A chat invite was edited
See
[TLDef(0xE90EBB59)] public partial class ChannelAdminLogEventActionExportedInviteEdit : ChannelAdminLogEventAction { + /// Previous chat invite information public ExportedChatInvite prev_invite; + /// New chat invite information public ExportedChatInvite new_invite; } - ///See + /// channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume
See
[TLDef(0x3E7F6847)] - public partial class ChannelAdminLogEventActionParticipantVolume : ChannelAdminLogEventAction { public GroupCallParticipant participant; } - ///See + public partial class ChannelAdminLogEventActionParticipantVolume : ChannelAdminLogEventAction + { + /// The participant whose volume was changed + public GroupCallParticipant participant; + } + /// The Time-To-Live of messages in this chat was changed
See
[TLDef(0x6E941A38)] public partial class ChannelAdminLogEventActionChangeHistoryTTL : ChannelAdminLogEventAction { + /// Previous value public int prev_value; + /// New value public int new_value; } - ///See + ///
See
[TLDef(0xAFB6144A)] public partial class ChannelAdminLogEventActionParticipantJoinByRequest : ChannelAdminLogEventAction { @@ -5324,1740 +9204,2982 @@ namespace TL public long approved_by; } - ///See + /// Admin log event
See
[TLDef(0x1FAD68CD)] public partial class ChannelAdminLogEvent : ITLObject { + /// Event ID public long id; + /// Date public DateTime date; + /// User ID public long user_id; + /// Action public ChannelAdminLogEventAction action; } - ///See + /// Admin log events
See
[TLDef(0xED8AF74D)] public partial class Channels_AdminLogResults : ITLObject { + /// Admin log events public ChannelAdminLogEvent[] events; + /// Chats mentioned in events public Dictionary chats; + /// Users mentioned in events public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Filter only certain admin log events
See
[TLDef(0xEA107AE4)] public partial class ChannelAdminLogEventsFilter : ITLObject { - [Flags] public enum Flags { join = 0x1, leave = 0x2, invite = 0x4, ban = 0x8, unban = 0x10, kick = 0x20, unkick = 0x40, - promote = 0x80, demote = 0x100, info = 0x200, settings = 0x400, pinned = 0x800, edit = 0x1000, delete = 0x2000, - group_call = 0x4000, invites = 0x8000 } + /// Flags, see TL conditional fields public Flags flags; + + [Flags] public enum Flags + { + /// + join = 0x1, + /// + leave = 0x2, + /// + invite = 0x4, + /// + ban = 0x8, + /// + unban = 0x10, + /// + kick = 0x20, + /// + unkick = 0x40, + /// + promote = 0x80, + /// + demote = 0x100, + /// Info change events (when , , , , , or data of a channel gets modified) + info = 0x200, + /// Settings change events (, , , ) + settings = 0x400, + /// + pinned = 0x800, + /// + edit = 0x1000, + /// + delete = 0x2000, + /// Group call events + group_call = 0x4000, + /// Invite events + invites = 0x8000, + } } - ///See + /// Popular contact
See
[TLDef(0x5CE14175)] public partial class PopularContact : ITLObject { + /// Contact identifier public long client_id; + /// How many people imported this contact public int importers; } - ///See - ///a null value means messages.favedStickersNotModified + /// Favorited stickers
See
+ /// a null value means messages.favedStickersNotModified [TLDef(0x2CB51097)] public partial class Messages_FavedStickers : ITLObject { + /// Hash for pagination, for more info click here public long hash; + /// Emojis associated to stickers public StickerPack[] packs; + /// Favorited stickers public DocumentBase[] stickers; } - ///See - public abstract partial class RecentMeUrl : ITLObject { public string url; } - ///See + /// Recent t.me urls
Derived classes: , , , ,
See
+ public abstract partial class RecentMeUrl : ITLObject + { + /// URL + public string url; + } + /// Unknown t.me url
See
[TLDef(0x46E1D13D)] public partial class RecentMeUrlUnknown : RecentMeUrl { } - ///See + /// Recent t.me link to a user
See
[TLDef(0xB92C09E2)] - public partial class RecentMeUrlUser : RecentMeUrl { public long user_id; } - ///See + public partial class RecentMeUrlUser : RecentMeUrl + { + /// User ID + public long user_id; + } + /// Recent t.me link to a chat
See
[TLDef(0xB2DA71D2)] - public partial class RecentMeUrlChat : RecentMeUrl { public long chat_id; } - ///See + public partial class RecentMeUrlChat : RecentMeUrl + { + /// Chat ID + public long chat_id; + } + /// Recent t.me invite link to a chat
See
[TLDef(0xEB49081D)] - public partial class RecentMeUrlChatInvite : RecentMeUrl { public ChatInviteBase chat_invite; } - ///See + public partial class RecentMeUrlChatInvite : RecentMeUrl + { + /// Chat invitation + public ChatInviteBase chat_invite; + } + /// Recent t.me stickerset installation URL
See
[TLDef(0xBC0A57DC)] - public partial class RecentMeUrlStickerSet : RecentMeUrl { public StickerSetCoveredBase set; } + public partial class RecentMeUrlStickerSet : RecentMeUrl + { + /// Stickerset + public StickerSetCoveredBase set; + } - ///See + /// Recent t.me URLs
See
[TLDef(0x0E0310D7)] public partial class Help_RecentMeUrls : ITLObject { + /// URLs public RecentMeUrl[] urls; + /// Chats public Dictionary chats; + /// Users public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// A single media in an album or grouped media sent with messages.sendMultiMedia.
See
[TLDef(0x1CC6E91F)] public partial class InputSingleMedia : ITLObject { - [Flags] public enum Flags { has_entities = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// The media public InputMedia media; + /// Unique client media ID required to prevent message resending public long random_id; + /// A caption for the media public string message; + /// Message entities for styled text [IfFlag(0)] public MessageEntity[] entities; + + [Flags] public enum Flags + { + /// Field has a value + has_entities = 0x1, + } } - ///See + /// Represents a bot logged in using the Telegram login widget
See
[TLDef(0xA6F8F452)] public partial class WebAuthorization : ITLObject { + /// Authorization hash public long hash; + /// Bot ID public long bot_id; + /// The domain name of the website on which the user has logged in. public string domain; + /// Browser user-agent public string browser; + /// Platform public string platform; + /// When was the web session created public int date_created; + /// When was the web session last active public int date_active; + /// IP address public string ip; + /// Region, determined from IP address public string region; } - ///See + /// Web authorizations
See
[TLDef(0xED56C9FC)] public partial class Account_WebAuthorizations : ITLObject { + /// Web authorization list public WebAuthorization[] authorizations; + /// Users public Dictionary users; } - ///See + /// A message
Derived classes: , , ,
See
public abstract partial class InputMessage : ITLObject { } - ///See + /// Message by ID
See
[TLDef(0xA676A322)] - public partial class InputMessageID : InputMessage { public int id; } - ///See + public partial class InputMessageID : InputMessage + { + /// Message ID + public int id; + } + /// Message to which the specified message replies to
See
[TLDef(0xBAD88395)] - public partial class InputMessageReplyTo : InputMessage { public int id; } - ///See + public partial class InputMessageReplyTo : InputMessage + { + /// ID of the message that replies to the message we need + public int id; + } + /// Pinned message
See
[TLDef(0x86872538)] public partial class InputMessagePinned : InputMessage { } - ///See + /// Used by bots for fetching information about the message that originated a callback query
See
[TLDef(0xACFA1A7E)] public partial class InputMessageCallbackQuery : InputMessage { + /// Message ID public int id; + /// Callback query ID public long query_id; } - ///See + ///
Derived classes: ,
See
public abstract partial class InputDialogPeerBase : ITLObject { } - ///See + /// A peer
See
[TLDef(0xFCAAFEB7)] - public partial class InputDialogPeer : InputDialogPeerBase { public InputPeer peer; } - ///See + public partial class InputDialogPeer : InputDialogPeerBase + { + /// Peer + public InputPeer peer; + } + /// All peers in a peer folder
See
[TLDef(0x64600527)] - public partial class InputDialogPeerFolder : InputDialogPeerBase { public int folder_id; } + public partial class InputDialogPeerFolder : InputDialogPeerBase + { + /// Peer folder ID, for more info click here + public int folder_id; + } - ///See + ///
Derived classes: ,
See
public abstract partial class DialogPeerBase : ITLObject { } - ///See + /// Peer
See
[TLDef(0xE56DBF05)] - public partial class DialogPeer : DialogPeerBase { public Peer peer; } - ///See + public partial class DialogPeer : DialogPeerBase + { + /// Peer + public Peer peer; + } + /// Peer folder
See
[TLDef(0x514519E2)] - public partial class DialogPeerFolder : DialogPeerBase { public int folder_id; } + public partial class DialogPeerFolder : DialogPeerBase + { + /// Peer folder ID, for more info click here + public int folder_id; + } - ///See - ///a null value means messages.foundStickerSetsNotModified + /// Found stickersets
See
+ /// a null value means messages.foundStickerSetsNotModified [TLDef(0x8AF09DD2)] public partial class Messages_FoundStickerSets : ITLObject { + /// Hash for pagination, for more info click here public long hash; + /// Found stickersets public StickerSetCoveredBase[] sets; } - ///See + ///
See
[TLDef(0x6242C773)] public partial class FileHash : ITLObject { + /// Offset from where to start computing SHA-256 hash public int offset; + /// Length public int limit; + /// SHA-256 Hash of file chunk, to be checked for validity after download public byte[] hash; } - ///See + /// Info about an MTProxy used to connect.
See
[TLDef(0x75588B3F)] public partial class InputClientProxy : ITLObject { + /// Proxy address public string address; + /// Proxy port public int port; } - ///See + ///
Derived classes: ,
See
public abstract partial class Help_TermsOfServiceUpdateBase : ITLObject { } - ///See + /// No changes were made to telegram's terms of service
See
[TLDef(0xE3309F7F)] - public partial class Help_TermsOfServiceUpdateEmpty : Help_TermsOfServiceUpdateBase { public DateTime expires; } - ///See + public partial class Help_TermsOfServiceUpdateEmpty : Help_TermsOfServiceUpdateBase + { + /// New TOS updates will have to be queried using help.getTermsOfServiceUpdate in expires seconds + public DateTime expires; + } + /// Info about an update of telegram's terms of service. If the terms of service are declined, then the account.deleteAccount method should be called with the reason "Decline ToS update"
See
[TLDef(0x28ECF961)] public partial class Help_TermsOfServiceUpdate : Help_TermsOfServiceUpdateBase { + /// New TOS updates will have to be queried using help.getTermsOfServiceUpdate in expires seconds public DateTime expires; + /// New terms of service public Help_TermsOfService terms_of_service; } - ///See + ///
Derived classes: ,
See
public abstract partial class InputSecureFileBase : ITLObject { + /// Secure file ID public abstract long ID { get; } } - ///See + /// Uploaded secure file, for more info see the passport docs »
See
[TLDef(0x3334B0F0)] public partial class InputSecureFileUploaded : InputSecureFileBase { + /// Secure file ID public long id; + /// Secure file part count public int parts; + /// MD5 hash of encrypted uploaded file, to be checked server-side public byte[] md5_checksum; + /// File hash public byte[] file_hash; + /// Secret public byte[] secret; + /// Secure file ID public override long ID => id; } - ///See + /// Preuploaded passport file, for more info see the passport docs »
See
[TLDef(0x5367E5BE)] public partial class InputSecureFile : InputSecureFileBase { + /// Secure file ID public long id; + /// Secure file access hash public long access_hash; + /// Secure file ID public override long ID => id; } - ///See - ///a null value means secureFileEmpty + /// Secure passport file, for more info see the passport docs »
See
+ /// a null value means secureFileEmpty [TLDef(0xE0277A62)] public partial class SecureFile : ITLObject { + /// ID public long id; + /// Access hash public long access_hash; + /// File size public int size; + /// DC ID public int dc_id; + /// Date of upload public DateTime date; + /// File hash public byte[] file_hash; + /// Secret public byte[] secret; } - ///See + /// Secure passport data, for more info see the passport docs »
See
[TLDef(0x8AEABEC3)] public partial class SecureData : ITLObject { + /// Data public byte[] data; + /// Data hash public byte[] data_hash; + /// Secret public byte[] secret; } - ///See + /// Plaintext verified passport data.
Derived classes: ,
See
public abstract partial class SecurePlainData : ITLObject { } - ///See + /// Phone number to use in telegram passport: it must be verified, first ».
See
[TLDef(0x7D6099DD)] - public partial class SecurePlainPhone : SecurePlainData { public string phone; } - ///See + public partial class SecurePlainPhone : SecurePlainData + { + /// Phone number + public string phone; + } + /// Email address to use in telegram passport: it must be verified, first ».
See
[TLDef(0x21EC5A5F)] - public partial class SecurePlainEmail : SecurePlainData { public string email; } + public partial class SecurePlainEmail : SecurePlainData + { + /// Email address + public string email; + } - ///See + /// Secure value type
See
public enum SecureValueType : uint { - ///See + ///Personal details PersonalDetails = 0x9D2A81E3, - ///See + ///Passport Passport = 0x3DAC6A00, - ///See + ///Driver's license DriverLicense = 0x06E425C4, - ///See + ///Identity card IdentityCard = 0xA0D0744B, - ///See + ///Internal passport InternalPassport = 0x99A48F23, - ///See + ///Address Address = 0xCBE31E26, - ///See + ///Utility bill UtilityBill = 0xFC36954E, - ///See + ///Bank statement BankStatement = 0x89137C0D, - ///See + ///Rental agreement RentalAgreement = 0x8B883488, - ///See + ///Internal registration passport PassportRegistration = 0x99E3806A, - ///See + ///Temporary registration TemporaryRegistration = 0xEA02EC33, - ///See + ///Phone Phone = 0xB320AADB, - ///See + ///Email Email = 0x8E3CA7EE, } - ///See + /// Secure value
See
[TLDef(0x187FA0CA)] public partial class SecureValue : ITLObject { - [Flags] public enum Flags { has_data = 0x1, has_front_side = 0x2, has_reverse_side = 0x4, has_selfie = 0x8, has_files = 0x10, - has_plain_data = 0x20, has_translation = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Secure passport value type public SecureValueType type; + /// Encrypted Telegram Passport element data [IfFlag(0)] public SecureData data; + /// Encrypted passport file with the front side of the document [IfFlag(1)] public SecureFile front_side; + /// Encrypted passport file with the reverse side of the document [IfFlag(2)] public SecureFile reverse_side; + /// Encrypted passport file with a selfie of the user holding the document [IfFlag(3)] public SecureFile selfie; + /// Array of encrypted passport files with translated versions of the provided documents [IfFlag(6)] public SecureFile[] translation; + /// Array of encrypted passport files with photos the of the documents [IfFlag(4)] public SecureFile[] files; + /// Plaintext verified passport data [IfFlag(5)] public SecurePlainData plain_data; + /// Data hash public byte[] hash; + + [Flags] public enum Flags + { + /// Field has a value + has_data = 0x1, + /// Field has a value + has_front_side = 0x2, + /// Field has a value + has_reverse_side = 0x4, + /// Field has a value + has_selfie = 0x8, + /// Field has a value + has_files = 0x10, + /// Field has a value + has_plain_data = 0x20, + /// Field has a value + has_translation = 0x40, + } } - ///See + /// Secure value, for more info see the passport docs »
See
[TLDef(0xDB21D0A7)] public partial class InputSecureValue : ITLObject { - [Flags] public enum Flags { has_data = 0x1, has_front_side = 0x2, has_reverse_side = 0x4, has_selfie = 0x8, has_files = 0x10, - has_plain_data = 0x20, has_translation = 0x40 } + /// Flags, see TL conditional fields public Flags flags; + /// Secure passport value type public SecureValueType type; + /// Encrypted Telegram Passport element data [IfFlag(0)] public SecureData data; + /// Encrypted passport file with the front side of the document [IfFlag(1)] public InputSecureFileBase front_side; + /// Encrypted passport file with the reverse side of the document [IfFlag(2)] public InputSecureFileBase reverse_side; + /// Encrypted passport file with a selfie of the user holding the document [IfFlag(3)] public InputSecureFileBase selfie; + /// Array of encrypted passport files with translated versions of the provided documents [IfFlag(6)] public InputSecureFileBase[] translation; + /// Array of encrypted passport files with photos the of the documents [IfFlag(4)] public InputSecureFileBase[] files; + /// Plaintext verified passport data [IfFlag(5)] public SecurePlainData plain_data; + + [Flags] public enum Flags + { + /// Field has a value + has_data = 0x1, + /// Field has a value + has_front_side = 0x2, + /// Field has a value + has_reverse_side = 0x4, + /// Field has a value + has_selfie = 0x8, + /// Field has a value + has_files = 0x10, + /// Field has a value + has_plain_data = 0x20, + /// Field has a value + has_translation = 0x40, + } } - ///See + /// Secure value hash
See
[TLDef(0xED1ECDB0)] public partial class SecureValueHash : ITLObject { + /// Secure value type public SecureValueType type; + /// Hash public byte[] hash; } - ///See + ///
Derived classes: , , , , , , , ,
See
public abstract partial class SecureValueErrorBase : ITLObject { + /// The section of the user's Telegram Passport which has the error, one of , , , , , public abstract SecureValueType Type { get; } + /// Error message public abstract string Text { get; } } - ///See + /// Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
See
[TLDef(0xE8A40BD9)] public partial class SecureValueErrorData : SecureValueErrorBase { + /// The section of the user's Telegram Passport which has the error, one of , , , , , public SecureValueType type; + /// Data hash public byte[] data_hash; + /// Name of the data field which has the error public string field; + /// Error message public string text; + /// The section of the user's Telegram Passport which has the error, one of , , , , , public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
See
[TLDef(0x00BE3DFA)] public partial class SecureValueErrorFrontSide : SecureValueErrorBase { + /// One of , , , public SecureValueType type; + /// File hash public byte[] file_hash; + /// Error message public string text; + /// One of , , , public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
See
[TLDef(0x868A2AA5)] public partial class SecureValueErrorReverseSide : SecureValueErrorBase { + /// One of , public SecureValueType type; + /// File hash public byte[] file_hash; + /// Error message public string text; + /// One of , public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
See
[TLDef(0xE537CED6)] public partial class SecureValueErrorSelfie : SecureValueErrorBase { + /// One of , , , public SecureValueType type; + /// File hash public byte[] file_hash; + /// Error message public string text; + /// One of , , , public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
See
[TLDef(0x7A700873)] public partial class SecureValueErrorFile : SecureValueErrorBase { + /// One of , , , , public SecureValueType type; + /// File hash public byte[] file_hash; + /// Error message public string text; + /// One of , , , , public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
See
[TLDef(0x666220E9)] public partial class SecureValueErrorFiles : SecureValueErrorBase { + /// One of , , , , public SecureValueType type; + /// File hash public byte[][] file_hash; + /// Error message public string text; + /// One of , , , , public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Secure value error
See
[TLDef(0x869D758F)] public partial class SecureValueError : SecureValueErrorBase { + /// Type of element which has the issue public SecureValueType type; + /// Hash public byte[] hash; + /// Error message public string text; + /// Type of element which has the issue public override SecureValueType Type => type; + /// Error message public override string Text => text; } - ///See + /// Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
See
[TLDef(0xA1144770)] public partial class SecureValueErrorTranslationFile : SecureValueErrorFile { } - ///See + /// Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.
See
[TLDef(0x34636DD8)] public partial class SecureValueErrorTranslationFiles : SecureValueErrorFiles { } - ///See + /// Encrypted credentials required to decrypt telegram passport data.
See
[TLDef(0x33F0EA47)] public partial class SecureCredentialsEncrypted : ITLObject { + /// Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data » public byte[] data; + /// Data hash for data authentication as described in decrypting data » public byte[] hash; + /// Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data » public byte[] secret; } - ///See + /// Telegram Passport authorization form
See
[TLDef(0xAD2E1CD8)] public partial class Account_AuthorizationForm : ITLObject { - [Flags] public enum Flags { has_privacy_policy_url = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Required Telegram Passport documents public SecureRequiredTypeBase[] required_types; + /// Already submitted Telegram Passport documents public SecureValue[] values; + /// Telegram Passport errors public SecureValueErrorBase[] errors; + /// Info about the bot to which the form will be submitted public Dictionary users; + /// URL of the service's privacy policy [IfFlag(0)] public string privacy_policy_url; + + [Flags] public enum Flags + { + /// Field has a value + has_privacy_policy_url = 0x1, + } } - ///See + /// The sent email code
See
[TLDef(0x811F854F)] public partial class Account_SentEmailCode : ITLObject { + /// The email (to which the code was sent) must match this pattern public string email_pattern; + /// The length of the verification code public int length; } - ///See - ///a null value means help.deepLinkInfoEmpty + /// Deep linking info
See
+ /// a null value means help.deepLinkInfoEmpty [TLDef(0x6A4EE832)] public partial class Help_DeepLinkInfo : ITLObject { - [Flags] public enum Flags { update_app = 0x1, has_entities = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Message to show to the user public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; + + [Flags] public enum Flags + { + /// An update of the app is required to parse this link + update_app = 0x1, + /// Field has a value + has_entities = 0x2, + } } - ///See + /// Saved contact
Derived classes:
See
public abstract partial class SavedContact : ITLObject { } - ///See + /// Saved contact
See
[TLDef(0x1142BD56)] public partial class SavedPhoneContact : SavedContact { + /// Phone number public string phone; + /// First name public string first_name; + /// Last name public string last_name; + /// Date added public DateTime date; } - ///See + /// Takout info
See
[TLDef(0x4DBA4501)] - public partial class Account_Takeout : ITLObject { public long id; } + public partial class Account_Takeout : ITLObject + { + /// Takeout ID + public long id; + } - ///See - ///a null value means passwordKdfAlgoUnknown + /// Key derivation function to use when generating the password hash for SRP two-factor authorization
Derived classes:
See
+ /// a null value means passwordKdfAlgoUnknown public abstract partial class PasswordKdfAlgo : ITLObject { } - ///See + /// This key derivation algorithm defines that SRP 2FA login must be used
See
[TLDef(0x3A912D4A)] public partial class PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow : PasswordKdfAlgo { + /// One of two salts used by the derivation function (see SRP 2FA login) public byte[] salt1; + /// One of two salts used by the derivation function (see SRP 2FA login) public byte[] salt2; + /// Base (see SRP 2FA login) public int g; + /// 2048-bit modulus (see SRP 2FA login) public byte[] p; } - ///See - ///a null value means securePasswordKdfAlgoUnknown - public abstract partial class SecurePasswordKdfAlgo : ITLObject { public byte[] salt; } - ///See + /// KDF algorithm to use for computing telegram passport hash
Derived classes: ,
See
+ /// a null value means securePasswordKdfAlgoUnknown + public abstract partial class SecurePasswordKdfAlgo : ITLObject + { + /// Salt + public byte[] salt; + } + /// PBKDF2 with SHA512 and 100000 iterations KDF algo
See
[TLDef(0xBBF2DDA0)] public partial class SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 : SecurePasswordKdfAlgo { } - ///See + /// SHA512 KDF algo
See
[TLDef(0x86471D92)] public partial class SecurePasswordKdfAlgoSHA512 : SecurePasswordKdfAlgo { } - ///See + /// Secure settings
See
[TLDef(0x1527BCAC)] public partial class SecureSecretSettings : ITLObject { + /// Secure KDF algo public SecurePasswordKdfAlgo secure_algo; + /// Secure secret public byte[] secure_secret; + /// Secret ID public long secure_secret_id; } - ///See - ///a null value means inputCheckPasswordEmpty + /// Constructor for checking the validity of a 2FA SRP password (see SRP)
See
+ /// a null value means inputCheckPasswordEmpty [TLDef(0xD27FF082)] public partial class InputCheckPasswordSRP : ITLObject { + /// SRP ID public long srp_id; + /// A parameter (see SRP) public byte[] A; + /// M1 parameter (see SRP) public byte[] M1; } - ///See + ///
Derived classes: ,
See
public abstract partial class SecureRequiredTypeBase : ITLObject { } - ///See + /// Required type
See
[TLDef(0x829D99DA)] public partial class SecureRequiredType : SecureRequiredTypeBase { - [Flags] public enum Flags { native_names = 0x1, selfie_required = 0x2, translation_required = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Secure value type public SecureValueType type; - } - ///See - [TLDef(0x027477B4)] - public partial class SecureRequiredTypeOneOf : SecureRequiredTypeBase { public SecureRequiredTypeBase[] types; } - ///See - ///a null value means help.passportConfigNotModified + [Flags] public enum Flags + { + /// Native names + native_names = 0x1, + /// Is a selfie required + selfie_required = 0x2, + /// Is a translation required + translation_required = 0x4, + } + } + /// One of
See
+ [TLDef(0x027477B4)] + public partial class SecureRequiredTypeOneOf : SecureRequiredTypeBase + { + /// Secure required value types + public SecureRequiredTypeBase[] types; + } + + /// Telegram passport configuration
See
+ /// a null value means help.passportConfigNotModified [TLDef(0xA098D6AF)] public partial class Help_PassportConfig : ITLObject { + /// Hash for pagination, for more info click here public int hash; + /// Localization public DataJSON countries_langs; } - ///See + /// Event that occured in the application.
See
[TLDef(0x1D1B1245)] public partial class InputAppEvent : ITLObject { + /// Client's exact timestamp for the event public double time; + /// Type of event public string type; + /// Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object public long peer; + /// Details of the event public JSONValue data; } - ///See + /// JSON key: value pair
Derived classes:
See
public abstract partial class JSONObjectValue : ITLObject { } - ///See + /// JSON key: value pair
See
[TLDef(0xC0DE1BD9)] public partial class JsonObjectValue : JSONObjectValue { + /// Key public string key; + /// Value public JSONValue value; } - ///See + /// JSON value
Derived classes: , , , , ,
See
public abstract partial class JSONValue : ITLObject { } - ///See + /// null JSON value
See
[TLDef(0x3F6D7B68)] public partial class JsonNull : JSONValue { } - ///See + /// JSON boolean value
See
[TLDef(0xC7345E6A)] - public partial class JsonBool : JSONValue { public bool value; } - ///See + public partial class JsonBool : JSONValue + { + /// Value + public bool value; + } + /// JSON numeric value
See
[TLDef(0x2BE0DFA4)] - public partial class JsonNumber : JSONValue { public double value; } - ///See + public partial class JsonNumber : JSONValue + { + /// Value + public double value; + } + /// JSON string
See
[TLDef(0xB71E767A)] - public partial class JsonString : JSONValue { public string value; } - ///See + public partial class JsonString : JSONValue + { + /// Value + public string value; + } + /// JSON array
See
[TLDef(0xF7444763)] - public partial class JsonArray : JSONValue { public JSONValue[] value; } - ///See + public partial class JsonArray : JSONValue + { + /// JSON values + public JSONValue[] value; + } + /// JSON object value
See
[TLDef(0x99C1D49D)] - public partial class JsonObject : JSONValue { public JSONObjectValue[] value; } + public partial class JsonObject : JSONValue + { + /// Values + public JSONObjectValue[] value; + } - ///See + /// Table cell
See
[TLDef(0x34566B6A)] public partial class PageTableCell : ITLObject { - [Flags] public enum Flags { header = 0x1, has_colspan = 0x2, has_rowspan = 0x4, align_center = 0x8, align_right = 0x10, - valign_middle = 0x20, valign_bottom = 0x40, has_text = 0x80 } + /// Flags, see TL conditional fields public Flags flags; + /// Content [IfFlag(7)] public RichText text; + /// For how many columns should this cell extend [IfFlag(1)] public int colspan; + /// For how many rows should this cell extend [IfFlag(2)] public int rowspan; + + [Flags] public enum Flags + { + /// Is this element part of the column header + header = 0x1, + /// Field has a value + has_colspan = 0x2, + /// Field has a value + has_rowspan = 0x4, + /// Horizontally centered block + align_center = 0x8, + /// Right-aligned block + align_right = 0x10, + /// Vertically centered block + valign_middle = 0x20, + /// Block vertically-alligned to the bottom + valign_bottom = 0x40, + /// Field has a value + has_text = 0x80, + } } - ///See + /// Table row
See
[TLDef(0xE0C0C5E5)] - public partial class PageTableRow : ITLObject { public PageTableCell[] cells; } + public partial class PageTableRow : ITLObject + { + /// Table cells + public PageTableCell[] cells; + } - ///See + /// Page caption
See
[TLDef(0x6F747657)] public partial class PageCaption : ITLObject { + /// Caption public RichText text; + /// Credits public RichText credit; } - ///See + /// Item in block list
Derived classes: ,
See
public abstract partial class PageListItem : ITLObject { } - ///See + /// List item
See
[TLDef(0xB92FB6CD)] - public partial class PageListItemText : PageListItem { public RichText text; } - ///See + public partial class PageListItemText : PageListItem + { + /// Text + public RichText text; + } + /// List item
See
[TLDef(0x25E073FC)] - public partial class PageListItemBlocks : PageListItem { public PageBlock[] blocks; } + public partial class PageListItemBlocks : PageListItem + { + /// Blocks + public PageBlock[] blocks; + } - ///See - public abstract partial class PageListOrderedItem : ITLObject { public string num; } - ///See + /// Represents an instant view ordered list
Derived classes: ,
See
+ public abstract partial class PageListOrderedItem : ITLObject + { + /// Number of element within ordered list + public string num; + } + /// Ordered list of text items
See
[TLDef(0x5E068047)] - public partial class PageListOrderedItemText : PageListOrderedItem { public RichText text; } - ///See + public partial class PageListOrderedItemText : PageListOrderedItem + { + /// Text + public RichText text; + } + /// Ordered list of IV blocks
See
[TLDef(0x98DD8936)] - public partial class PageListOrderedItemBlocks : PageListOrderedItem { public PageBlock[] blocks; } + public partial class PageListOrderedItemBlocks : PageListOrderedItem + { + /// Item contents + public PageBlock[] blocks; + } - ///See + /// Related article
See
[TLDef(0xB390DC08)] public partial class PageRelatedArticle : ITLObject { - [Flags] public enum Flags { has_title = 0x1, has_description = 0x2, has_photo_id = 0x4, has_author = 0x8, - has_published_date = 0x10 } + /// Flags, see TL conditional fields public Flags flags; + /// URL of article public string url; + /// Webpage ID of generated IV preview public long webpage_id; + /// Title [IfFlag(0)] public string title; + /// Description [IfFlag(1)] public string description; + /// ID of preview photo [IfFlag(2)] public long photo_id; + /// Author name [IfFlag(3)] public string author; + /// Date of pubblication [IfFlag(4)] public DateTime published_date; + + [Flags] public enum Flags + { + /// Field has a value + has_title = 0x1, + /// Field has a value + has_description = 0x2, + /// Field has a value + has_photo_id = 0x4, + /// Field has a value + has_author = 0x8, + /// Field has a value + has_published_date = 0x10, + } } - ///See + /// Instant view page
See
[TLDef(0x98657F0D)] public partial class Page : ITLObject { - [Flags] public enum Flags { part = 0x1, rtl = 0x2, v2 = 0x4, has_views = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Original page HTTP URL public string url; + /// Page elements (like with HTML elements, only as TL constructors) public PageBlock[] blocks; + /// Photos in page public PhotoBase[] photos; + /// Media in page public DocumentBase[] documents; + /// Viewcount [IfFlag(3)] public int views; + + [Flags] public enum Flags + { + /// Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using messages.getWebPagePreview. + part = 0x1, + /// Whether the page contains RTL text + rtl = 0x2, + /// Whether this is an IV v2 page + v2 = 0x4, + /// Field has a value + has_views = 0x8, + } } - ///See + /// Localized name for telegram support
See
[TLDef(0x8C05F1C9)] - public partial class Help_SupportName : ITLObject { public string name; } - - ///See - ///a null value means help.userInfoEmpty - [TLDef(0x01EB3758)] - public partial class Help_UserInfo : ITLObject + public partial class Help_SupportName : ITLObject { - public string message; - public MessageEntity[] entities; - public string author; - public DateTime date; - } - - ///See - [TLDef(0x6CA9C2E9)] - public partial class PollAnswer : ITLObject - { - public string text; - public byte[] option; - } - - ///See - [TLDef(0x86E18161)] - public partial class Poll : ITLObject - { - [Flags] public enum Flags { closed = 0x1, public_voters = 0x2, multiple_choice = 0x4, quiz = 0x8, has_close_period = 0x10, - has_close_date = 0x20 } - public long id; - public Flags flags; - public string question; - public PollAnswer[] answers; - [IfFlag(4)] public int close_period; - [IfFlag(5)] public DateTime close_date; - } - - ///See - [TLDef(0x3B6DDAD2)] - public partial class PollAnswerVoters : ITLObject - { - [Flags] public enum Flags { chosen = 0x1, correct = 0x2 } - public Flags flags; - public byte[] option; - public int voters; - } - - ///See - [TLDef(0xDCB82EA3)] - public partial class PollResults : ITLObject - { - [Flags] public enum Flags { min = 0x1, has_results = 0x2, has_total_voters = 0x4, has_recent_voters = 0x8, has_solution = 0x10 } - public Flags flags; - [IfFlag(1)] public PollAnswerVoters[] results; - [IfFlag(2)] public int total_voters; - [IfFlag(3)] public long[] recent_voters; - [IfFlag(4)] public string solution; - [IfFlag(4)] public MessageEntity[] solution_entities; - } - - ///See - [TLDef(0xF041E250)] - public partial class ChatOnlines : ITLObject { public int onlines; } - - ///See - [TLDef(0x47A971E0)] - public partial class StatsURL : ITLObject { public string url; } - - ///See - [TLDef(0x5FB224D5)] - public partial class ChatAdminRights : ITLObject - { - [Flags] public enum Flags { change_info = 0x1, post_messages = 0x2, edit_messages = 0x4, delete_messages = 0x8, - ban_users = 0x10, invite_users = 0x20, pin_messages = 0x80, add_admins = 0x200, anonymous = 0x400, manage_call = 0x800, - other = 0x1000 } - public Flags flags; - } - - ///See - [TLDef(0x9F120418)] - public partial class ChatBannedRights : ITLObject - { - [Flags] public enum Flags { view_messages = 0x1, send_messages = 0x2, send_media = 0x4, send_stickers = 0x8, send_gifs = 0x10, - send_games = 0x20, send_inline = 0x40, embed_links = 0x80, send_polls = 0x100, change_info = 0x400, invite_users = 0x8000, - pin_messages = 0x20000 } - public Flags flags; - public DateTime until_date; - } - - ///See - public abstract partial class InputWallPaperBase : ITLObject { } - ///See - [TLDef(0xE630B979)] - public partial class InputWallPaper : InputWallPaperBase - { - public long id; - public long access_hash; - } - ///See - [TLDef(0x72091C80)] - public partial class InputWallPaperSlug : InputWallPaperBase { public string slug; } - ///See - [TLDef(0x967A462E)] - public partial class InputWallPaperNoFile : InputWallPaperBase { public long id; } - - ///See - ///a null value means account.wallPapersNotModified - [TLDef(0xCDC3858C)] - public partial class Account_WallPapers : ITLObject - { - public long hash; - public WallPaperBase[] wallpapers; - } - - ///See - [TLDef(0xDEBEBE83)] - public partial class CodeSettings : ITLObject - { - [Flags] public enum Flags { allow_flashcall = 0x1, current_number = 0x2, allow_app_hash = 0x10 } - public Flags flags; - } - - ///See - [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_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; - } - - ///See - [TLDef(0xE04232F3)] - public partial class AutoDownloadSettings : ITLObject - { - [Flags] public enum Flags { disabled = 0x1, video_preload_large = 0x2, audio_preload_next = 0x4, phonecalls_less_data = 0x8 } - public Flags flags; - public int photo_size_max; - public int video_size_max; - public int file_size_max; - public int video_upload_maxbitrate; - } - - ///See - [TLDef(0x63CACF26)] - public partial class Account_AutoDownloadSettings : ITLObject - { - public AutoDownloadSettings low; - public AutoDownloadSettings medium; - public AutoDownloadSettings high; - } - - ///See - [TLDef(0xD5B3B9F9)] - public partial class EmojiKeyword : ITLObject - { - public string keyword; - public string[] emoticons; - } - ///See - [TLDef(0x236DF622)] - public partial class EmojiKeywordDeleted : EmojiKeyword { } - - ///See - [TLDef(0x5CC761BD)] - public partial class EmojiKeywordsDifference : ITLObject - { - public string lang_code; - public int from_version; - public int version; - public EmojiKeyword[] keywords; - } - - ///See - [TLDef(0xA575739D)] - public partial class EmojiURL : ITLObject { public string url; } - - ///See - [TLDef(0xB3FB5361)] - public partial class EmojiLanguage : ITLObject { public string lang_code; } - - ///See - [TLDef(0xFF544E65)] - public partial class Folder : ITLObject - { - [Flags] public enum Flags { autofill_new_broadcasts = 0x1, autofill_public_groups = 0x2, autofill_new_correspondents = 0x4, - has_photo = 0x8 } - public Flags flags; - public int id; - public string title; - [IfFlag(3)] public ChatPhoto photo; - } - - ///See - [TLDef(0xFBD2C296)] - public partial class InputFolderPeer : ITLObject - { - public InputPeer peer; - public int folder_id; - } - - ///See - [TLDef(0xE9BAA668)] - public partial class FolderPeer : ITLObject - { - public Peer peer; - public int folder_id; - } - - ///See - [TLDef(0xE844EBFF)] - public partial class Messages_SearchCounter : ITLObject - { - [Flags] public enum Flags { inexact = 0x2 } - public Flags flags; - public MessagesFilter filter; - public int count; - } - - ///See - public abstract partial class UrlAuthResult : ITLObject { } - ///See - [TLDef(0x92D33A0E)] - public partial class UrlAuthResultRequest : UrlAuthResult - { - [Flags] public enum Flags { request_write_access = 0x1 } - public Flags flags; - public UserBase bot; - public string domain; - } - ///See - [TLDef(0x8F8C0E4E)] - public partial class UrlAuthResultAccepted : UrlAuthResult { public string url; } - ///See - [TLDef(0xA9D6DB1F)] - public partial class UrlAuthResultDefault : UrlAuthResult { } - - ///See - ///a null value means channelLocationEmpty - [TLDef(0x209B82DB)] - public partial class ChannelLocation : ITLObject - { - public GeoPoint geo_point; - public string address; - } - - ///See - public abstract partial class PeerLocatedBase : ITLObject - { - public abstract DateTime Expires { get; } - } - ///See - [TLDef(0xCA461B5D)] - public partial class PeerLocated : PeerLocatedBase - { - public Peer peer; - public DateTime expires; - public int distance; - - public override DateTime Expires => expires; - } - ///See - [TLDef(0xF8EC284B)] - public partial class PeerSelfLocated : PeerLocatedBase - { - public DateTime expires; - - public override DateTime Expires => expires; - } - - ///See - [TLDef(0xD072ACB4)] - public partial class RestrictionReason : ITLObject - { - public string platform; - public string reason; - public string text; - } - - ///See - public abstract partial class InputThemeBase : ITLObject { } - ///See - [TLDef(0x3C5693E9)] - public partial class InputTheme : InputThemeBase - { - public long id; - public long access_hash; - } - ///See - [TLDef(0xF5890DF1)] - public partial class InputThemeSlug : InputThemeBase { public string slug; } - - ///See - [TLDef(0xA00E67D6)] - public partial class Theme : ITLObject - { - [Flags] public enum Flags { creator = 0x1, default_ = 0x2, has_document = 0x4, has_settings = 0x8, has_installs_count = 0x10, - for_chat = 0x20, has_emoticon = 0x40 } - public Flags flags; - public long id; - public long access_hash; - public string slug; - public string title; - [IfFlag(2)] public DocumentBase document; - [IfFlag(3)] public ThemeSettings[] settings; - [IfFlag(6)] public string emoticon; - [IfFlag(4)] public int installs_count; - } - - ///See - ///a null value means account.themesNotModified - [TLDef(0x9A3D8C6D)] - public partial class Account_Themes : ITLObject - { - public long hash; - public Theme[] themes; - } - - ///See - public abstract partial class Auth_LoginTokenBase : ITLObject { } - ///See - [TLDef(0x629F1980)] - public partial class Auth_LoginToken : Auth_LoginTokenBase - { - public DateTime expires; - public byte[] token; - } - ///See - [TLDef(0x068E9916)] - public partial class Auth_LoginTokenMigrateTo : Auth_LoginTokenBase - { - public int dc_id; - public byte[] token; - } - ///See - [TLDef(0x390D5C5E)] - public partial class Auth_LoginTokenSuccess : Auth_LoginTokenBase { public Auth_AuthorizationBase authorization; } - - ///See - [TLDef(0x57E28221)] - public partial class Account_ContentSettings : ITLObject - { - [Flags] public enum Flags { sensitive_enabled = 0x1, sensitive_can_change = 0x2 } - public Flags flags; - } - - ///See - [TLDef(0xA927FEC5)] - public partial class Messages_InactiveChats : ITLObject - { - public int[] dates; - public Dictionary chats; - public Dictionary users; - public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); - } - - ///See - public enum BaseTheme : uint - { - ///See - Classic = 0xC3A12462, - ///See - Day = 0xFBD81688, - ///See - Night = 0xB7B31EA8, - ///See - Tinted = 0x6D5F77EE, - ///See - Arctic = 0x5B11125A, - } - - ///See - [TLDef(0x8FDE504F)] - public partial class InputThemeSettings : ITLObject - { - [Flags] public enum Flags { has_message_colors = 0x1, has_wallpaper = 0x2, message_colors_animated = 0x4, - has_outbox_accent_color = 0x8 } - public Flags flags; - public BaseTheme base_theme; - public int accent_color; - [IfFlag(3)] public int outbox_accent_color; - [IfFlag(0)] public int[] message_colors; - [IfFlag(1)] public InputWallPaperBase wallpaper; - [IfFlag(1)] public WallPaperSettings wallpaper_settings; - } - - ///See - [TLDef(0xFA58B6D4)] - public partial class ThemeSettings : ITLObject - { - [Flags] public enum Flags { has_message_colors = 0x1, has_wallpaper = 0x2, message_colors_animated = 0x4, - has_outbox_accent_color = 0x8 } - public Flags flags; - public BaseTheme base_theme; - public int accent_color; - [IfFlag(3)] public int outbox_accent_color; - [IfFlag(0)] public int[] message_colors; - [IfFlag(1)] public WallPaperBase wallpaper; - } - - ///See - public abstract partial class WebPageAttribute : ITLObject { } - ///See - [TLDef(0x54B56617)] - public partial class WebPageAttributeTheme : WebPageAttribute - { - [Flags] public enum Flags { has_documents = 0x1, has_settings = 0x2 } - public Flags flags; - [IfFlag(0)] public DocumentBase[] documents; - [IfFlag(1)] public ThemeSettings settings; - } - - ///See - public abstract partial class MessageUserVoteBase : ITLObject - { - public abstract long UserId { get; } - public abstract DateTime Date { get; } - } - ///See - [TLDef(0x34D247B4)] - public partial class MessageUserVote : MessageUserVoteBase - { - public long user_id; - public byte[] option; - public DateTime date; - - public override long UserId => user_id; - public override DateTime Date => date; - } - ///See - [TLDef(0x3CA5B0EC)] - public partial class MessageUserVoteInputOption : MessageUserVoteBase - { - public long user_id; - public DateTime date; - - public override long UserId => user_id; - public override DateTime Date => date; - } - ///See - [TLDef(0x8A65E557)] - public partial class MessageUserVoteMultiple : MessageUserVoteBase - { - public long user_id; - public byte[][] options; - public DateTime date; - - public override long UserId => user_id; - public override DateTime Date => date; - } - - ///See - [TLDef(0x0823F649)] - public partial class Messages_VotesList : ITLObject - { - [Flags] public enum Flags { has_next_offset = 0x1 } - public Flags flags; - public int count; - public MessageUserVoteBase[] votes; - public Dictionary users; - [IfFlag(0)] public string next_offset; - } - - ///See - [TLDef(0xF568028A)] - public partial class BankCardOpenUrl : ITLObject - { - public string url; + /// Localized name public string name; } - ///See + /// Internal use
See
+ /// a null value means help.userInfoEmpty + [TLDef(0x01EB3758)] + public partial class Help_UserInfo : ITLObject + { + /// Info + public string message; + /// Message entities for styled text + public MessageEntity[] entities; + /// Author + public string author; + /// Date + public DateTime date; + } + + /// A possible answer of a poll
See
+ [TLDef(0x6CA9C2E9)] + public partial class PollAnswer : ITLObject + { + /// Textual representation of the answer + public string text; + /// The param that has to be passed to messages.sendVote. + public byte[] option; + } + + /// Poll
See
+ [TLDef(0x86E18161)] + public partial class Poll : ITLObject + { + /// ID of the poll + public long id; + /// Flags, see TL conditional fields + public Flags flags; + /// The question of the poll + public string question; + /// The possible answers, vote using messages.sendVote. + public PollAnswer[] answers; + /// Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. + [IfFlag(4)] public int close_period; + /// Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period. + [IfFlag(5)] public DateTime close_date; + + [Flags] public enum Flags + { + /// Whether the poll is closed and doesn't accept any more answers + closed = 0x1, + /// Whether cast votes are publicly visible to all users (non-anonymous poll) + public_voters = 0x2, + /// Whether multiple options can be chosen as answer + multiple_choice = 0x4, + /// Whether this is a quiz (with wrong and correct answers, results shown in the return type) + quiz = 0x8, + /// Field has a value + has_close_period = 0x10, + /// Field has a value + has_close_date = 0x20, + } + } + + /// A poll answer, and how users voted on it
See
+ [TLDef(0x3B6DDAD2)] + public partial class PollAnswerVoters : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// The param that has to be passed to messages.sendVote. + public byte[] option; + /// How many users voted for this option + public int voters; + + [Flags] public enum Flags + { + /// Whether we have chosen this answer + chosen = 0x1, + /// For quizes, whether the option we have chosen is correct + correct = 0x2, + } + } + + /// Results of poll
See
+ [TLDef(0xDCB82EA3)] + public partial class PollResults : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Poll results + [IfFlag(1)] public PollAnswerVoters[] results; + /// Total number of people that voted in the poll + [IfFlag(2)] public int total_voters; + /// IDs of the last users that recently voted in the poll + [IfFlag(3)] public long[] recent_voters; + /// Explanation of quiz solution + [IfFlag(4)] public string solution; + /// Message entities for styled text in quiz solution + [IfFlag(4)] public MessageEntity[] solution_entities; + + [Flags] public enum Flags + { + /// Similar to min objects, used for poll constructors that are the same for all users so they don't have option chosen by the current user (you can use messages.getPollResults to get the full poll results). + min = 0x1, + /// Field has a value + has_results = 0x2, + /// Field has a value + has_total_voters = 0x4, + /// Field has a value + has_recent_voters = 0x8, + /// Field has a value + has_solution = 0x10, + } + } + + /// Number of online users in a chat
See
+ [TLDef(0xF041E250)] + public partial class ChatOnlines : ITLObject + { + /// Number of online users + public int onlines; + } + + /// URL with chat statistics
See
+ [TLDef(0x47A971E0)] + public partial class StatsURL : ITLObject + { + /// Chat statistics + public string url; + } + + /// Represents the rights of an admin in a channel/supergroup.
See
+ [TLDef(0x5FB224D5)] + public partial class ChatAdminRights : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + + [Flags] public enum Flags + { + /// If set, allows the admin to modify the description of the channel/supergroup + change_info = 0x1, + /// If set, allows the admin to post messages in the channel + post_messages = 0x2, + /// If set, allows the admin to also edit messages from other admins in the channel + edit_messages = 0x4, + /// If set, allows the admin to also delete messages from other admins in the channel + delete_messages = 0x8, + /// If set, allows the admin to ban users from the channel/supergroup + ban_users = 0x10, + /// If set, allows the admin to invite users in the channel/supergroup + invite_users = 0x20, + /// If set, allows the admin to pin messages in the channel/supergroup + pin_messages = 0x80, + /// If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup + add_admins = 0x200, + /// Whether this admin is anonymous + anonymous = 0x400, + /// If set, allows the admin to change group call/livestream settings + manage_call = 0x800, + /// Set this flag if none of the other flags are set, but you stil want the user to be an admin. + other = 0x1000, + } + } + + /// Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X.
See
+ [TLDef(0x9F120418)] + public partial class ChatBannedRights : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days). + public DateTime until_date; + + [Flags] public enum Flags + { + /// If set, does not allow a user to view messages in a supergroup/channel/chat + view_messages = 0x1, + /// If set, does not allow a user to send messages in a supergroup/chat + send_messages = 0x2, + /// If set, does not allow a user to send any media in a supergroup/chat + send_media = 0x4, + /// If set, does not allow a user to send stickers in a supergroup/chat + send_stickers = 0x8, + /// If set, does not allow a user to send gifs in a supergroup/chat + send_gifs = 0x10, + /// If set, does not allow a user to send games in a supergroup/chat + send_games = 0x20, + /// If set, does not allow a user to use inline bots in a supergroup/chat + send_inline = 0x40, + /// If set, does not allow a user to embed links in the messages of a supergroup/chat + embed_links = 0x80, + /// If set, does not allow a user to send stickers in a supergroup/chat + send_polls = 0x100, + /// If set, does not allow any user to change the description of a supergroup/chat + change_info = 0x400, + /// If set, does not allow any user to invite users in a supergroup/chat + invite_users = 0x8000, + /// If set, does not allow any user to pin messages in a supergroup/chat + pin_messages = 0x20000, + } + } + + ///
Derived classes: , ,
See
+ public abstract partial class InputWallPaperBase : ITLObject { } + /// Wallpaper
See
+ [TLDef(0xE630B979)] + public partial class InputWallPaper : InputWallPaperBase + { + /// Wallpaper ID + public long id; + /// Access hash + public long access_hash; + } + /// Wallpaper by slug (a unique ID)
See
+ [TLDef(0x72091C80)] + public partial class InputWallPaperSlug : InputWallPaperBase + { + /// Unique wallpaper ID + public string slug; + } + /// Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using account.saveWallPaper, specifying just the wallpaper ID.
See
+ [TLDef(0x967A462E)] + public partial class InputWallPaperNoFile : InputWallPaperBase + { + /// Wallpaper ID + public long id; + } + + /// Installed wallpapers
See
+ /// a null value means account.wallPapersNotModified + [TLDef(0xCDC3858C)] + public partial class Account_WallPapers : ITLObject + { + /// Hash for pagination, for more info click here + public long hash; + /// Wallpapers + public WallPaperBase[] wallpapers; + } + + /// Settings used by telegram servers for sending the confirm code.
See
+ [TLDef(0xDEBEBE83)] + public partial class CodeSettings : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + + [Flags] public enum Flags + { + /// Whether to allow phone verification via phone calls. + allow_flashcall = 0x1, + /// Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set. + current_number = 0x2, + /// If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs + allow_app_hash = 0x10, + } + } + + /// Wallpaper settings
See
+ [TLDef(0x1DC1BCA4)] + public partial class WallPaperSettings : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// If set, a PNG pattern is to be combined with the color chosen by the user: the main color of the background in RGB24 format + [IfFlag(0)] public int background_color; + /// If set, a PNG pattern is to be combined with the first and second background colors (RGB24 format) in a top-bottom gradient + [IfFlag(4)] public int second_background_color; + /// If set, a PNG pattern is to be combined with the first, second and third background colors (RGB24 format) in a freeform gradient + [IfFlag(5)] public int third_background_color; + /// If set, a PNG pattern is to be combined with the first, second, third and fourth background colors (RGB24 format) in a freeform gradient + [IfFlag(6)] public int fourth_background_color; + /// Intensity of the pattern when it is shown above the main background color, 0-100 + [IfFlag(3)] public int intensity; + /// Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45 + [IfFlag(4)] public int rotation; + + [Flags] public enum Flags + { + /// Field has a value + has_background_color = 0x1, + /// If set, the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12 + blur = 0x2, + /// If set, the background needs to be slightly moved when device is rotated + motion = 0x4, + /// Field has a value + has_intensity = 0x8, + /// Field has a value + has_second_background_color = 0x10, + /// Field has a value + has_third_background_color = 0x20, + /// Field has a value + has_fourth_background_color = 0x40, + } + } + + /// Autodownload settings
See
+ [TLDef(0xE04232F3)] + public partial class AutoDownloadSettings : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Maximum size of photos to preload + public int photo_size_max; + /// Maximum size of videos to preload + public int video_size_max; + /// Maximum size of other files to preload + public int file_size_max; + /// Maximum suggested bitrate for uploading videos + public int video_upload_maxbitrate; + + [Flags] public enum Flags + { + /// Disable automatic media downloads? + disabled = 0x1, + /// Whether to preload the first seconds of videos larger than the specified limit + video_preload_large = 0x2, + /// Whether to preload the next audio track when you're listening to music + audio_preload_next = 0x4, + /// Whether to enable data saving mode in phone calls + phonecalls_less_data = 0x8, + } + } + + /// Media autodownload settings
See
+ [TLDef(0x63CACF26)] + public partial class Account_AutoDownloadSettings : ITLObject + { + /// Low data usage preset + public AutoDownloadSettings low; + /// Medium data usage preset + public AutoDownloadSettings medium; + /// High data usage preset + public AutoDownloadSettings high; + } + + /// Emoji keyword
See
+ [TLDef(0xD5B3B9F9)] + public partial class EmojiKeyword : ITLObject + { + /// Keyword + public string keyword; + /// Emojis associated to keyword + public string[] emoticons; + } + /// Deleted emoji keyword
See
+ [TLDef(0x236DF622)] + public partial class EmojiKeywordDeleted : EmojiKeyword { } + + /// Changes to emoji keywords
See
+ [TLDef(0x5CC761BD)] + public partial class EmojiKeywordsDifference : ITLObject + { + /// Language code for keywords + public string lang_code; + /// Previous emoji keyword list version + public int from_version; + /// Current version of emoji keyword list + public int version; + /// Emojis associated to keywords + public EmojiKeyword[] keywords; + } + + /// An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation
See
+ [TLDef(0xA575739D)] + public partial class EmojiURL : ITLObject + { + /// An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation + public string url; + } + + /// Emoji language
See
+ [TLDef(0xB3FB5361)] + public partial class EmojiLanguage : ITLObject + { + /// Language code + public string lang_code; + } + + /// Folder
See
+ [TLDef(0xFF544E65)] + public partial class Folder : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Folder ID + public int id; + /// Folder title + public string title; + /// Folder picture + [IfFlag(3)] public ChatPhoto photo; + + [Flags] public enum Flags + { + /// Automatically add new channels to this folder + autofill_new_broadcasts = 0x1, + /// Automatically add joined new public supergroups to this folder + autofill_public_groups = 0x2, + /// Automatically add new private chats to this folder + autofill_new_correspondents = 0x4, + /// Field has a value + has_photo = 0x8, + } + } + + /// Peer in a folder
See
+ [TLDef(0xFBD2C296)] + public partial class InputFolderPeer : ITLObject + { + /// Peer + public InputPeer peer; + /// Peer folder ID, for more info click here + public int folder_id; + } + + /// Peer in a folder
See
+ [TLDef(0xE9BAA668)] + public partial class FolderPeer : ITLObject + { + /// Folder peer info + public Peer peer; + /// Peer folder ID, for more info click here + public int folder_id; + } + + /// Indicates how many results would be found by a messages.search call with the same parameters
See
+ [TLDef(0xE844EBFF)] + public partial class Messages_SearchCounter : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Provided message filter + public MessagesFilter filter; + /// Number of results that were found server-side + public int count; + + [Flags] public enum Flags + { + /// If set, the results may be inexact + inexact = 0x2, + } + } + + /// URL authorization result
Derived classes: , ,
See
+ public abstract partial class UrlAuthResult : ITLObject { } + /// Details about the authorization request, for more info click here »
See
+ [TLDef(0x92D33A0E)] + public partial class UrlAuthResultRequest : UrlAuthResult + { + /// Flags, see TL conditional fields + public Flags flags; + /// Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. + public UserBase bot; + /// The domain name of the website on which the user will log in. + public string domain; + + [Flags] public enum Flags + { + /// Whether the bot would like to send messages to the user + request_write_access = 0x1, + } + } + /// Details about an accepted authorization request, for more info click here »
See
+ [TLDef(0x8F8C0E4E)] + public partial class UrlAuthResultAccepted : UrlAuthResult + { + /// The URL name of the website on which the user has logged in. + public string url; + } + /// Details about an accepted authorization request, for more info click here »
See
+ [TLDef(0xA9D6DB1F)] + public partial class UrlAuthResultDefault : UrlAuthResult { } + + /// Geographical location of supergroup (geogroups)
See
+ /// a null value means channelLocationEmpty + [TLDef(0x209B82DB)] + public partial class ChannelLocation : ITLObject + { + /// Geographical location of supergrup + public GeoPoint geo_point; + /// Textual description of the address + public string address; + } + + ///
Derived classes: ,
See
+ public abstract partial class PeerLocatedBase : ITLObject + { + /// Validity period of current data + public abstract DateTime Expires { get; } + } + /// Peer geolocated nearby
See
+ [TLDef(0xCA461B5D)] + public partial class PeerLocated : PeerLocatedBase + { + /// Peer + public Peer peer; + /// Validity period of current data + public DateTime expires; + /// Distance from the peer in meters + public int distance; + + /// Validity period of current data + public override DateTime Expires => expires; + } + /// Current peer
See
+ [TLDef(0xF8EC284B)] + public partial class PeerSelfLocated : PeerLocatedBase + { + /// Expiry of geolocation info for current peer + public DateTime expires; + + /// Expiry of geolocation info for current peer + public override DateTime Expires => expires; + } + + /// Restriction reason.
See
+ [TLDef(0xD072ACB4)] + public partial class RestrictionReason : ITLObject + { + /// Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc) + public string platform; + /// Restriction reason (porno, terms, etc.) + public string reason; + /// Error message to be shown to the user + public string text; + } + + ///
Derived classes: ,
See
+ public abstract partial class InputThemeBase : ITLObject { } + /// Theme
See
+ [TLDef(0x3C5693E9)] + public partial class InputTheme : InputThemeBase + { + /// ID + public long id; + /// Access hash + public long access_hash; + } + /// Theme by theme ID
See
+ [TLDef(0xF5890DF1)] + public partial class InputThemeSlug : InputThemeBase + { + /// Unique theme ID + public string slug; + } + + /// Theme
See
+ [TLDef(0xA00E67D6)] + public partial class Theme : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Theme ID + public long id; + /// Theme access hash + public long access_hash; + /// Unique theme ID + public string slug; + /// Theme name + public string title; + /// Theme + [IfFlag(2)] public DocumentBase document; + /// Theme settings + [IfFlag(3)] public ThemeSettings[] settings; + [IfFlag(6)] public string emoticon; + /// Installation count + [IfFlag(4)] public int installs_count; + + [Flags] public enum Flags + { + /// Whether the current user is the creator of this theme + creator = 0x1, + /// Whether this is the default theme + default_ = 0x2, + /// Field has a value + has_document = 0x4, + /// Field has a value + has_settings = 0x8, + /// Field has a value + has_installs_count = 0x10, + /// Whether this theme is meant to be used as a chat theme + for_chat = 0x20, + /// Field has a value + has_emoticon = 0x40, + } + } + + /// Installed themes
See
+ /// a null value means account.themesNotModified + [TLDef(0x9A3D8C6D)] + public partial class Account_Themes : ITLObject + { + /// Hash for pagination, for more info click here + public long hash; + /// Themes + public Theme[] themes; + } + + ///
Derived classes: , ,
See
+ public abstract partial class Auth_LoginTokenBase : ITLObject { } + /// Login token (for QR code login)
See
+ [TLDef(0x629F1980)] + public partial class Auth_LoginToken : Auth_LoginTokenBase + { + /// Expiry date of QR code + public DateTime expires; + /// Token to render in QR code + public byte[] token; + } + /// Repeat the query to the specified DC
See
+ [TLDef(0x068E9916)] + public partial class Auth_LoginTokenMigrateTo : Auth_LoginTokenBase + { + /// DC ID + public int dc_id; + /// Token to use for login + public byte[] token; + } + /// Login via token (QR code) succeded!
See
+ [TLDef(0x390D5C5E)] + public partial class Auth_LoginTokenSuccess : Auth_LoginTokenBase + { + /// Authorization info + public Auth_AuthorizationBase authorization; + } + + /// Sensitive content settings
See
+ [TLDef(0x57E28221)] + public partial class Account_ContentSettings : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + + [Flags] public enum Flags + { + /// Whether viewing of sensitive (NSFW) content is enabled + sensitive_enabled = 0x1, + /// Whether the current client can change the sensitive content settings to view NSFW content + sensitive_can_change = 0x2, + } + } + + /// Inactive chat list
See
+ [TLDef(0xA927FEC5)] + public partial class Messages_InactiveChats : ITLObject + { + /// When was the chat last active + public int[] dates; + /// Chat list + public Dictionary chats; + /// Users mentioned in the chat list + public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); + } + + /// Basic theme settings
See
+ public enum BaseTheme : uint + { + ///Classic theme + Classic = 0xC3A12462, + ///Day theme + Day = 0xFBD81688, + ///Night theme + Night = 0xB7B31EA8, + ///Tinted theme + Tinted = 0x6D5F77EE, + ///Arctic theme + Arctic = 0x5B11125A, + } + + /// Theme settings
See
+ [TLDef(0x8FDE504F)] + public partial class InputThemeSettings : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Default theme on which this theme is based + public BaseTheme base_theme; + /// Accent color, ARGB format + public int accent_color; + /// Accent color of outgoing messages in ARGB format + [IfFlag(3)] public int outbox_accent_color; + /// The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background.
+ [IfFlag(0)] public int[] message_colors; + /// Wallpaper + [IfFlag(1)] public InputWallPaperBase wallpaper; + /// Wallpaper settings + [IfFlag(1)] public WallPaperSettings wallpaper_settings; + + [Flags] public enum Flags + { + /// Field has a value + has_message_colors = 0x1, + /// Field has a value + has_wallpaper = 0x2, + /// If set, the freeform gradient fill needs to be animated on every sent message + message_colors_animated = 0x4, + /// Field has a value + has_outbox_accent_color = 0x8, + } + } + + /// Theme settings
See
+ [TLDef(0xFA58B6D4)] + public partial class ThemeSettings : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Base theme + public BaseTheme base_theme; + /// Accent color, ARGB format + public int accent_color; + /// Accent color of outgoing messages in ARGB format + [IfFlag(3)] public int outbox_accent_color; + /// The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background.
+ [IfFlag(0)] public int[] message_colors; + /// Wallpaper + [IfFlag(1)] public WallPaperBase wallpaper; + + [Flags] public enum Flags + { + /// Field has a value + has_message_colors = 0x1, + /// Field has a value + has_wallpaper = 0x2, + /// If set, the freeform gradient fill needs to be animated on every sent message. + message_colors_animated = 0x4, + /// Field has a value + has_outbox_accent_color = 0x8, + } + } + + /// Webpage attributes
Derived classes:
See
+ public abstract partial class WebPageAttribute : ITLObject { } + /// Page theme
See
+ [TLDef(0x54B56617)] + public partial class WebPageAttributeTheme : WebPageAttribute + { + /// Flags, see TL conditional fields + public Flags flags; + /// Theme files + [IfFlag(0)] public DocumentBase[] documents; + /// Theme settings + [IfFlag(1)] public ThemeSettings settings; + + [Flags] public enum Flags + { + /// Field has a value + has_documents = 0x1, + /// Field has a value + has_settings = 0x2, + } + } + + ///
Derived classes: , ,
See
+ public abstract partial class MessageUserVoteBase : ITLObject + { + /// User ID + public abstract long UserId { get; } + /// When did the user cast the vote + public abstract DateTime Date { get; } + } + /// How a user voted in a poll
See
+ [TLDef(0x34D247B4)] + public partial class MessageUserVote : MessageUserVoteBase + { + /// User ID + public long user_id; + /// The option chosen by the user + public byte[] option; + /// When did the user cast the vote + public DateTime date; + + /// User ID + public override long UserId => user_id; + /// When did the user cast the vote + public override DateTime Date => date; + } + /// How a user voted in a poll (reduced constructor, returned if an option was provided to messages.getPollVotes)
See
+ [TLDef(0x3CA5B0EC)] + public partial class MessageUserVoteInputOption : MessageUserVoteBase + { + /// The user that voted for the queried option + public long user_id; + /// When did the user cast the vote + public DateTime date; + + /// The user that voted for the queried option + public override long UserId => user_id; + /// When did the user cast the vote + public override DateTime Date => date; + } + /// How a user voted in a multiple-choice poll
See
+ [TLDef(0x8A65E557)] + public partial class MessageUserVoteMultiple : MessageUserVoteBase + { + /// User ID + public long user_id; + /// Options chosen by the user + public byte[][] options; + /// When did the user cast their votes + public DateTime date; + + /// User ID + public override long UserId => user_id; + /// When did the user cast their votes + public override DateTime Date => date; + } + + /// How users voted in a poll
See
+ [TLDef(0x0823F649)] + public partial class Messages_VotesList : ITLObject + { + /// Flags, see TL conditional fields + public Flags flags; + /// Total number of votes for all options (or only for the chosen option, if provided to messages.getPollVotes) + public int count; + /// Vote info for each user + public MessageUserVoteBase[] votes; + /// Info about users that voted in the poll + public Dictionary users; + /// Offset to use with the next messages.getPollVotes request, empty string if no more results are available. + [IfFlag(0)] public string next_offset; + + [Flags] public enum Flags + { + /// Field has a value + has_next_offset = 0x1, + } + } + + /// Credit card info URL provided by the bank
See
+ [TLDef(0xF568028A)] + public partial class BankCardOpenUrl : ITLObject + { + /// Info URL + public string url; + /// Bank name + public string name; + } + + /// Credit card info, provided by the card's bank(s)
See
[TLDef(0x3E24E573)] public partial class Payments_BankCardData : ITLObject { + /// Credit card title public string title; + /// Info URL(s) provided by the card's bank(s) public BankCardOpenUrl[] open_urls; } - ///See + /// Dialog filter AKA folder
See
[TLDef(0x7438F7E8)] public partial class DialogFilter : ITLObject { - [Flags] public enum Flags { contacts = 0x1, non_contacts = 0x2, groups = 0x4, broadcasts = 0x8, bots = 0x10, - exclude_muted = 0x800, exclude_read = 0x1000, exclude_archived = 0x2000, has_emoticon = 0x2000000 } + /// Flags, see TL conditional fields public Flags flags; + /// Folder ID public int id; + /// Folder name public string title; + /// Folder emoticon [IfFlag(25)] public string emoticon; + /// Pinned chats, folders can have unlimited pinned chats public InputPeer[] pinned_peers; + /// Include the following chats in this folder public InputPeer[] include_peers; + /// Exclude the following chats from this folder public InputPeer[] exclude_peers; + + [Flags] public enum Flags + { + /// Whether to include all contacts in this folder + contacts = 0x1, + /// Whether to include all non-contacts in this folder + non_contacts = 0x2, + /// Whether to include all groups in this folder + groups = 0x4, + /// Whether to include all channels in this folder + broadcasts = 0x8, + /// Whether to include all bots in this folder + bots = 0x10, + /// Whether to exclude muted chats from this folder + exclude_muted = 0x800, + /// Whether to exclude read chats from this folder + exclude_read = 0x1000, + /// Whether to exclude archived chats from this folder + exclude_archived = 0x2000, + /// Field has a value + has_emoticon = 0x2000000, + } } - ///See + /// Suggested folders
See
[TLDef(0x77744D4A)] public partial class DialogFilterSuggested : ITLObject { + /// Folder info public DialogFilter filter; + /// Folder description public string description; } - ///See + /// Channel statistics date range
See
[TLDef(0xB637EDAF)] public partial class StatsDateRangeDays : ITLObject { + /// Initial date public DateTime min_date; + /// Final date public DateTime max_date; } - ///See + /// Statistics value couple; initial and final value for period of time currently in consideration
See
[TLDef(0xCB43ACDE)] public partial class StatsAbsValueAndPrev : ITLObject { + /// Current value public double current; + /// Previous value public double previous; } - ///See + /// Channel statistics percentage.
Compute the percentage simply by doing part * total / 100
See
[TLDef(0xCBCE2FE0)] public partial class StatsPercentValue : ITLObject { + /// Partial value public double part; + /// Total value public double total; } - ///See + ///
Derived classes: , ,
See
public abstract partial class StatsGraphBase : ITLObject { } - ///See + /// This channel statistics graph must be generated asynchronously using stats.loadAsyncGraph to reduce server load
See
[TLDef(0x4A27EB2D)] - public partial class StatsGraphAsync : StatsGraphBase { public string token; } - ///See + public partial class StatsGraphAsync : StatsGraphBase + { + /// Token to use for fetching the async graph + public string token; + } + /// An error occurred while generating the statistics graph
See
[TLDef(0xBEDC9822)] - public partial class StatsGraphError : StatsGraphBase { public string error; } - ///See + public partial class StatsGraphError : StatsGraphBase + { + /// The error + public string error; + } + /// Channel statistics graph
See
[TLDef(0x8EA464B6)] public partial class StatsGraph : StatsGraphBase { - [Flags] public enum Flags { has_zoom_token = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Statistics data public DataJSON json; + /// Zoom token [IfFlag(0)] public string zoom_token; + + [Flags] public enum Flags + { + /// Field has a value + has_zoom_token = 0x1, + } } - ///See + /// Message interaction counters
See
[TLDef(0xAD4FC9BD)] public partial class MessageInteractionCounters : ITLObject { + /// Message ID public int msg_id; + /// Views public int views; + /// Number of times this message was forwarded public int forwards; } - ///See + /// Channel statistics.
See
[TLDef(0xBDF78394)] public partial class Stats_BroadcastStats : ITLObject { + /// Period in consideration public StatsDateRangeDays period; + /// Follower count change for period in consideration public StatsAbsValueAndPrev followers; + /// total_viewcount/postcount, for posts posted during the period in consideration (views_per_post).
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date).
public StatsAbsValueAndPrev views_per_post; + /// total_viewcount/postcount, for posts posted during the period in consideration (views_per_post).
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
public StatsAbsValueAndPrev shares_per_post; + /// Percentage of subscribers with enabled notifications public StatsPercentValue enabled_notifications; + /// Channel growth graph (absolute subscriber count) public StatsGraphBase growth_graph; + /// Followers growth graph (relative subscriber count) public StatsGraphBase followers_graph; + /// Muted users graph (relative) public StatsGraphBase mute_graph; + /// Views per hour graph (absolute) public StatsGraphBase top_hours_graph; + /// Interactions graph (absolute) public StatsGraphBase interactions_graph; + /// IV interactions graph (absolute) public StatsGraphBase iv_interactions_graph; + /// Views by source graph (absolute) public StatsGraphBase views_by_source_graph; + /// New followers by source graph (absolute) public StatsGraphBase new_followers_by_source_graph; + /// Subscriber language graph (piechart) public StatsGraphBase languages_graph; + /// Recent message interactions public MessageInteractionCounters[] recent_message_interactions; } - ///
See + ///
Derived classes: ,
See
public abstract partial class Help_PromoDataBase : ITLObject { } - ///See + /// No PSA/MTProxy info is available
See
[TLDef(0x98F6AC75)] - public partial class Help_PromoDataEmpty : Help_PromoDataBase { public DateTime expires; } - ///See + public partial class Help_PromoDataEmpty : Help_PromoDataBase + { + /// Re-fetch PSA/MTProxy info after the specified number of seconds + public DateTime expires; + } + /// MTProxy/Public Service Announcement information
See
[TLDef(0x8C39793F)] public partial class Help_PromoData : Help_PromoDataBase { - [Flags] public enum Flags { proxy = 0x1, has_psa_type = 0x2, has_psa_message = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Expiry of PSA/MTProxy info public DateTime expires; + /// MTProxy/PSA peer public Peer peer; + /// Chat info public Dictionary chats; + /// User info public Dictionary users; + /// PSA type [IfFlag(1)] public string psa_type; + /// PSA message [IfFlag(2)] public string psa_message; + + [Flags] public enum Flags + { + /// MTProxy-related channel + proxy = 0x1, + /// Field has a value + has_psa_type = 0x2, + /// Field has a value + has_psa_message = 0x4, + } + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Animated profile picture in MPEG4 format
See
[TLDef(0xDE33B094)] public partial class VideoSize : ITLObject { - [Flags] public enum Flags { has_video_start_ts = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// u for animated profile pictures, and v for trimmed and downscaled video previews public string type; + /// Video width public int w; + /// Video height public int h; + /// File size public int size; + /// Timestamp that should be shown as static preview to the user (seconds) [IfFlag(0)] public double video_start_ts; + + [Flags] public enum Flags + { + /// Field has a value + has_video_start_ts = 0x1, + } } - ///See + /// Information about an active user in a supergroup
See
[TLDef(0x9D04AF9B)] public partial class StatsGroupTopPoster : ITLObject { + /// User ID public long user_id; + /// Number of messages for statistics period in consideration public int messages; + /// Average number of characters per message public int avg_chars; } - ///See + /// Information about an active admin in a supergroup
See
[TLDef(0xD7584C87)] public partial class StatsGroupTopAdmin : ITLObject { + /// User ID public long user_id; + /// Number of deleted messages for statistics period in consideration public int deleted; + /// Number of kicked users for statistics period in consideration public int kicked; + /// Number of banned users for statistics period in consideration public int banned; } - ///See + /// Information about an active supergroup inviter
See
[TLDef(0x535F779D)] public partial class StatsGroupTopInviter : ITLObject { + /// User ID public long user_id; + /// Number of invitations for statistics period in consideration public int invitations; } - ///See + /// Supergroup statistics
See
[TLDef(0xEF7FF916)] public partial class Stats_MegagroupStats : ITLObject { + /// Period in consideration public StatsDateRangeDays period; + /// Member count change for period in consideration public StatsAbsValueAndPrev members; + /// Message number change for period in consideration public StatsAbsValueAndPrev messages; + /// Number of users that viewed messages, for range in consideration public StatsAbsValueAndPrev viewers; + /// Number of users that posted messages, for range in consideration public StatsAbsValueAndPrev posters; + /// Supergroup growth graph (absolute subscriber count) public StatsGraphBase growth_graph; + /// Members growth (relative subscriber count) public StatsGraphBase members_graph; + /// New members by source graph public StatsGraphBase new_members_by_source_graph; + /// Subscriber language graph (piechart) public StatsGraphBase languages_graph; + /// Message activity graph (stacked bar graph, message type) public StatsGraphBase messages_graph; + /// Group activity graph (deleted, modified messages, blocked users) public StatsGraphBase actions_graph; + /// Activity per hour graph (absolute) public StatsGraphBase top_hours_graph; + /// Activity per day of week graph (absolute) public StatsGraphBase weekdays_graph; + /// Info about most active group members public StatsGroupTopPoster[] top_posters; + /// Info about most active group admins public StatsGroupTopAdmin[] top_admins; + /// Info about most active group inviters public StatsGroupTopInviter[] top_inviters; + /// Info about users mentioned in statistics public Dictionary users; } - ///See + /// Global privacy settings
See
[TLDef(0xBEA2F424)] public partial class GlobalPrivacySettings : ITLObject { - [Flags] public enum Flags { has_archive_and_mute_new_noncontact_peers = 0x1 } + /// Flags, see TL conditional fields public Flags flags; + /// Whether to archive and mute new chats from non-contacts [IfFlag(0)] public bool archive_and_mute_new_noncontact_peers; + + [Flags] public enum Flags + { + /// Field has a value + has_archive_and_mute_new_noncontact_peers = 0x1, + } } - ///See + /// Country code and phone number pattern of a specific country
See
[TLDef(0x4203C5EF)] public partial class Help_CountryCode : ITLObject { - [Flags] public enum Flags { has_prefixes = 0x1, has_patterns = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// ISO country code public string country_code; + /// Possible phone prefixes [IfFlag(0)] public string[] prefixes; + /// Phone patterns: for example, XXX XXX XXX [IfFlag(1)] public string[] patterns; + + [Flags] public enum Flags + { + /// Field has a value + has_prefixes = 0x1, + /// Field has a value + has_patterns = 0x2, + } } - ///See + /// Name, ISO code, localized name and phone codes/patterns of a specific country
See
[TLDef(0xC3878E23)] public partial class Help_Country : ITLObject { - [Flags] public enum Flags { hidden = 0x1, has_name = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// ISO code of country public string iso2; + /// Name of the country in the country's language public string default_name; + /// Name of the country in the user's language, if different from the original name [IfFlag(1)] public string name; + /// Phone codes/patterns public Help_CountryCode[] country_codes; + + [Flags] public enum Flags + { + /// Whether this country should not be shown in the list + hidden = 0x1, + /// Field has a value + has_name = 0x2, + } } - ///See - ///a null value means help.countriesListNotModified + /// Name, ISO code, localized name and phone codes/patterns of all available countries
See
+ /// a null value means help.countriesListNotModified [TLDef(0x87D0759E)] public partial class Help_CountriesList : ITLObject { + /// Name, ISO code, localized name and phone codes/patterns of all available countries public Help_Country[] countries; + /// Hash for pagination, for more info click here public int hash; } - ///See + /// View, forward counter + info about replies of a specific message
See
[TLDef(0x455B853D)] public partial class MessageViews : ITLObject { - [Flags] public enum Flags { has_views = 0x1, has_forwards = 0x2, has_replies = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Viewcount of message [IfFlag(0)] public int views; + /// Forward count of message [IfFlag(1)] public int forwards; + /// Reply and thread information of message [IfFlag(2)] public MessageReplies replies; + + [Flags] public enum Flags + { + /// Field has a value + has_views = 0x1, + /// Field has a value + has_forwards = 0x2, + /// Field has a value + has_replies = 0x4, + } } - ///See + /// View, forward counter + info about replies
See
[TLDef(0xB6C4F543)] public partial class Messages_MessageViews : ITLObject { + /// View, forward counter + info about replies public MessageViews[] views; + /// Chats mentioned in constructor public Dictionary chats; + /// Users mentioned in constructor public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Information about a message thread
See
[TLDef(0xA6341782)] public partial class Messages_DiscussionMessage : ITLObject { - [Flags] public enum Flags { has_max_id = 0x1, has_read_inbox_max_id = 0x2, has_read_outbox_max_id = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Discussion messages public MessageBase[] messages; + /// Message ID of latest reply in this thread [IfFlag(0)] public int max_id; + /// Message ID of latest read incoming message in this thread [IfFlag(1)] public int read_inbox_max_id; + /// Message ID of latest read outgoing message in this thread [IfFlag(2)] public int read_outbox_max_id; + /// Number of unread messages public int unread_count; + /// Chats mentioned in constructor public Dictionary chats; + /// Users mentioned in constructor public Dictionary users; + + [Flags] public enum Flags + { + /// Field has a value + has_max_id = 0x1, + /// Field has a value + has_read_inbox_max_id = 0x2, + /// Field has a value + has_read_outbox_max_id = 0x4, + } + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Message replies and thread information
See
[TLDef(0xA6D57763)] public partial class MessageReplyHeader : ITLObject { - [Flags] public enum Flags { has_reply_to_peer_id = 0x1, has_reply_to_top_id = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// ID of message to which this message is replying public int reply_to_msg_id; + /// For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID [IfFlag(0)] public Peer reply_to_peer_id; + /// ID of the message that started this message thread [IfFlag(1)] public int reply_to_top_id; + + [Flags] public enum Flags + { + /// Field has a value + has_reply_to_peer_id = 0x1, + /// Field has a value + has_reply_to_top_id = 0x2, + } } - ///See + /// Info about the comment section of a channel post, or a simple message thread
See
[TLDef(0x83D60FC2)] public partial class MessageReplies : ITLObject { - [Flags] public enum Flags { comments = 0x1, has_recent_repliers = 0x2, has_max_id = 0x4, has_read_max_id = 0x8 } + /// Flags, see TL conditional fields public Flags flags; + /// Contains the total number of replies in this thread or comment section. public int replies; + /// PTS of the message that started this thread. public int replies_pts; + /// For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews. [IfFlag(1)] public Peer[] recent_repliers; + /// For channel post comments, contains the ID of the associated discussion supergroup [IfFlag(0)] public long channel_id; + /// ID of the latest message in this thread or comment section. [IfFlag(2)] public int max_id; + /// Contains the ID of the latest read message in this thread or comment section. [IfFlag(3)] public int read_max_id; + + [Flags] public enum Flags + { + /// Whether this constructor contains information about the comment section of a channel post, or a simple message thread + comments = 0x1, + /// Field has a value + has_recent_repliers = 0x2, + /// Field has a value + has_max_id = 0x4, + /// Field has a value + has_read_max_id = 0x8, + } } - ///See + /// Information about a blocked peer
See
[TLDef(0xE8FD8014)] public partial class PeerBlocked : ITLObject { + /// Peer ID public Peer peer_id; + /// When was the peer blocked public DateTime date; } - ///See + /// Message statistics
See
[TLDef(0x8999F295)] - public partial class Stats_MessageStats : ITLObject { public StatsGraphBase views_graph; } + public partial class Stats_MessageStats : ITLObject + { + /// Message view graph + public StatsGraphBase views_graph; + } - ///See + ///
Derived classes: ,
See
public abstract partial class GroupCallBase : ITLObject { + /// Group call ID public abstract long ID { get; } + /// Group call access hash public abstract long AccessHash { get; } } - ///See + /// An ended group call
See
[TLDef(0x7780BCB4)] public partial class GroupCallDiscarded : GroupCallBase { + /// Group call ID public long id; + /// Group call access hash public long access_hash; + /// Group call duration public int duration; + /// Group call ID public override long ID => id; + /// Group call access hash public override long AccessHash => access_hash; } - ///See + /// Info about a group call or livestream
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, record_video_active = 0x800 } + /// Flags, see TL conditional fields public Flags flags; + /// Group call ID public long id; + /// Group call access hash public long access_hash; + /// Participant count public int participants_count; + /// Group call title [IfFlag(3)] public string title; + /// DC ID to be used for livestream chunks [IfFlag(4)] public int stream_dc_id; + /// When was the recording started [IfFlag(5)] public DateTime record_start_date; + /// When is the call scheduled to start [IfFlag(7)] public DateTime schedule_date; + /// Number of people currently streaming video into the call [IfFlag(10)] public int unmuted_video_count; + /// Maximum number of people allowed to stream video into the call public int unmuted_video_limit; + /// Version public int version; + [Flags] public enum Flags + { + /// Whether the user should be muted upon joining the call + join_muted = 0x2, + /// Whether the current user can change the value of the join_muted flag using phone.toggleGroupCallSettings + can_change_join_muted = 0x4, + /// Field has a value + has_title = 0x8, + /// Field has a value + has_stream_dc_id = 0x10, + /// Field has a value + has_record_start_date = 0x20, + /// Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants. + join_date_asc = 0x40, + /// Field has a value + has_schedule_date = 0x80, + /// Whether we subscribed to the scheduled call + schedule_start_subscribed = 0x100, + /// Whether you can start streaming video into the call + can_start_video = 0x200, + /// Field has a value + has_unmuted_video_count = 0x400, + /// Whether the group call is currently being recorded + record_video_active = 0x800, + } + + /// Group call ID public override long ID => id; + /// Group call access hash public override long AccessHash => access_hash; } - ///See + /// Points to a specific group call
See
[TLDef(0xD8AA840F)] public partial class InputGroupCall : ITLObject { + /// Group call ID public long id; + /// Group call access hash public long access_hash; } - ///See + /// Info about a group call participant
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 } + /// Flags, see TL conditional fields public Flags flags; + /// Peer information public Peer peer; + /// When did this participant join the group call public DateTime date; + /// When was this participant last active in the group call [IfFlag(3)] public DateTime active_date; + /// Source ID public int source; + /// Volume, if not set the volume is set to 100%. [IfFlag(7)] public int volume; + /// Info about this participant [IfFlag(11)] public string about; + /// Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list. [IfFlag(13)] public long raise_hand_rating; + /// Info about the video stream the participant is currently broadcasting [IfFlag(6)] public GroupCallParticipantVideo video; + /// Info about the screen sharing stream the participant is currently broadcasting [IfFlag(14)] public GroupCallParticipantVideo presentation; + + [Flags] public enum Flags + { + /// Whether the participant is muted + muted = 0x1, + /// Whether the participant has left + left = 0x2, + /// Whether the participant can unmute themselves + can_self_unmute = 0x4, + /// Field has a value + has_active_date = 0x8, + /// Whether the participant has just joined + just_joined = 0x10, + /// If set, and .version < locally stored call.version, info about this participant should be ignored. If (...), and .version > call.version+1, the participant list should be refetched using phone.getGroupParticipants. + versioned = 0x20, + /// Field has a value + has_video = 0x40, + /// Field has a value + has_volume = 0x80, + /// If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor. + min = 0x100, + /// Whether this participant was muted by the current user + muted_by_you = 0x200, + /// Whether our volume can only changed by an admin + volume_by_admin = 0x400, + /// Field has a value + has_about = 0x800, + /// Whether this participant is the current user + self = 0x1000, + /// Field has a value + has_raise_hand_rating = 0x2000, + /// Field has a value + has_presentation = 0x4000, + /// Whether this participant is currently broadcasting video + video_joined = 0x8000, + } } - ///See + /// Contains info about a group call, and partial info about its participants.
See
[TLDef(0x9E727AAD)] public partial class Phone_GroupCall : ITLObject { + /// Info about the group call public GroupCallBase call; + /// A partial list of participants. public GroupCallParticipant[] participants; + /// Next offset to use when fetching the remaining participants using phone.getGroupParticipants public string participants_next_offset; + /// Chats mentioned in the participants vector public Dictionary chats; + /// Users mentioned in the participants vector public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Info about the participants of a group call or livestream
See
[TLDef(0xF47751B6)] public partial class Phone_GroupParticipants : ITLObject { + /// Number of participants public int count; + /// List of participants public GroupCallParticipant[] participants; + /// If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in phone.getGroupParticipants. public string next_offset; + /// Mentioned chats public Dictionary chats; + /// Mentioned users public Dictionary users; + /// Version info public int version; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// Type of the chat from which the inline query was sent.
See
public enum InlineQueryPeerType : uint { - ///See + ///The inline query was sent in a private chat with the bot itself SameBotPM = 0x3081ED9D, - ///See + ///The inline query was sent in a private chat PM = 0x833C0FAC, - ///See + ///The inline query was sent in a chat Chat = 0xD766C50A, - ///See + ///The inline query was sent in a supergroup Megagroup = 0x5EC4BE43, - ///See + ///The inline query was sent in a channel Broadcast = 0x6334EE9A, } - ///See + /// ID of a specific chat import session, click here for more info ».
See
[TLDef(0x1662AF0B)] - public partial class Messages_HistoryImport : ITLObject { public long id; } + public partial class Messages_HistoryImport : ITLObject + { + /// History import ID + public long id; + } - ///See + /// Contains information about a chat export file generated by a foreign chat app, click here for more info.
If neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type.
See
[TLDef(0x5E0FB7B9)] public partial class Messages_HistoryImportParsed : ITLObject { - [Flags] public enum Flags { pm = 0x1, group = 0x2, has_title = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Title of the chat. [IfFlag(2)] public string title; + + [Flags] public enum Flags + { + /// The chat export file was generated from a private chat. + pm = 0x1, + /// The chat export file was generated from a group chat. + group = 0x2, + /// Field has a value + has_title = 0x4, + } } - ///See + /// Messages found and affected by changes
See
[TLDef(0xEF8D3E6C)] public partial class Messages_AffectedFoundMessages : ITLObject { + /// Event count after generation public int pts; + /// Number of events that were generated public int pts_count; + /// If bigger than zero, the request must be repeated to remove more messages public int offset; + /// Affected message IDs public int[] messages; } - ///See + /// When and which user joined the chat using a chat invite
See
[TLDef(0x8C5ADFD9)] public partial class ChatInviteImporter : ITLObject { - [Flags] public enum Flags { requested = 0x1, has_approved_by = 0x2, has_about = 0x4 } public Flags flags; + /// The user public long user_id; + /// When did the user join public DateTime date; [IfFlag(2)] public string about; [IfFlag(1)] public long approved_by; + + [Flags] public enum Flags + { + requested = 0x1, + /// Field has a value + has_approved_by = 0x2, + /// Field has a value + has_about = 0x4, + } } - ///See + /// Info about chat invites exported by a certain admin.
See
[TLDef(0xBDC62DCC)] public partial class Messages_ExportedChatInvites : ITLObject { + /// Number of invites exported by the admin public int count; + /// Exported invites public ExportedChatInvite[] invites; + /// Info about the admin public Dictionary users; } - ///See + ///
Derived classes: ,
See
public abstract partial class Messages_ExportedChatInviteBase : ITLObject { + /// Info about the chat invite public abstract ExportedChatInvite Invite { get; } + /// Mentioned users public abstract Dictionary Users { get; } } - ///See + /// Info about a chat invite
See
[TLDef(0x1871BE50)] public partial class Messages_ExportedChatInvite : Messages_ExportedChatInviteBase { + /// Info about the chat invite public ExportedChatInvite invite; + /// Mentioned users public Dictionary users; + /// Info about the chat invite public override ExportedChatInvite Invite => invite; + /// Mentioned users public override Dictionary Users => users; } - ///See + /// The specified chat invite was replaced with another one
See
[TLDef(0x222600EF)] public partial class Messages_ExportedChatInviteReplaced : Messages_ExportedChatInviteBase { + /// The replaced chat invite public ExportedChatInvite invite; + /// The invite that replaces the previous invite public ExportedChatInvite new_invite; + /// Mentioned users public Dictionary users; + /// The replaced chat invite public override ExportedChatInvite Invite => invite; + /// Mentioned users public override Dictionary Users => users; } - ///See + /// Info about the users that joined the chat using a specific chat invite
See
[TLDef(0x81B6B00A)] public partial class Messages_ChatInviteImporters : ITLObject { + /// Number of users that joined public int count; + /// The users that joined public ChatInviteImporter[] importers; + /// The users that joined public Dictionary users; } - ///See + /// Info about chat invites generated by admins.
See
[TLDef(0xF2ECEF23)] public partial class ChatAdminWithInvites : ITLObject { + /// The admin public long admin_id; + /// Number of invites generated by the admin public int invites_count; + /// Number of revoked invites public int revoked_invites_count; } - ///See + /// Info about chat invites generated by admins.
See
[TLDef(0xB69B72D7)] public partial class Messages_ChatAdminsWithInvites : ITLObject { + /// Info about chat invites generated by admins. public ChatAdminWithInvites[] admins; + /// Mentioned users public Dictionary users; } - ///See + /// Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».
See
[TLDef(0xA24DE717)] - public partial class Messages_CheckedHistoryImportPeer : ITLObject { public string confirm_text; } + public partial class Messages_CheckedHistoryImportPeer : ITLObject + { + /// A confirmation text to be shown to the user, upon importing chat history ». + public string confirm_text; + } - ///See + /// A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.
See
[TLDef(0xAFE5623F)] public partial class Phone_JoinAsPeers : ITLObject { + /// Peers public Peer[] peers; + /// Chats mentioned in the peers vector public Dictionary chats; + /// Users mentioned in the peers vector public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + /// An invite to a group call or livestream
See
[TLDef(0x204BD158)] - public partial class Phone_ExportedGroupCallInvite : ITLObject { public string link; } + public partial class Phone_ExportedGroupCallInvite : ITLObject + { + /// Invite link + public string link; + } - ///See + /// Describes a group of video synchronization source identifiers
See
[TLDef(0xDCB118B7)] public partial class GroupCallParticipantVideoSourceGroup : ITLObject { + /// SDP semantics public string semantics; + /// Source IDs public int[] sources; } - ///See + /// Info about a video stream
See
[TLDef(0x67753AC8)] public partial class GroupCallParticipantVideo : ITLObject { - [Flags] public enum Flags { paused = 0x1, has_audio_source = 0x2 } + /// Flags, see TL conditional fields public Flags flags; + /// Endpoint public string endpoint; + /// Source groups public GroupCallParticipantVideoSourceGroup[] source_groups; + /// Audio source ID [IfFlag(1)] public int audio_source; + + [Flags] public enum Flags + { + /// Whether the stream is currently paused + paused = 0x1, + /// Field has a value + has_audio_source = 0x2, + } } - ///See + /// A suggested short name for a stickerpack
See
[TLDef(0x85FEA03F)] - public partial class Stickers_SuggestedShortName : ITLObject { public string short_name; } + public partial class Stickers_SuggestedShortName : ITLObject + { + /// Suggested short name + public string short_name; + } - ///See + /// Represents a scope where the bot commands, specified using bots.setBotCommands will be valid.
Derived classes: , , , , , ,
See
public abstract partial class BotCommandScope : ITLObject { } - ///See + /// The commands will be valid in all dialogs
See
[TLDef(0x2F6CB2AB)] public partial class BotCommandScopeDefault : BotCommandScope { } - ///See + /// The specified bot commands will only be valid in all private chats with users.
See
[TLDef(0x3C4F04D8)] public partial class BotCommandScopeUsers : BotCommandScope { } - ///See + /// The specified bot commands will be valid in all groups and supergroups.
See
[TLDef(0x6FE1A881)] public partial class BotCommandScopeChats : BotCommandScope { } - ///See + /// The specified bot commands will be valid only for chat administrators, in all groups and supergroups.
See
[TLDef(0xB9AA606A)] public partial class BotCommandScopeChatAdmins : BotCommandScope { } - ///See + /// The specified bot commands will be valid only in a specific dialog.
See
[TLDef(0xDB9D897D)] - public partial class BotCommandScopePeer : BotCommandScope { public InputPeer peer; } - ///See + public partial class BotCommandScopePeer : BotCommandScope + { + /// The dialog + public InputPeer peer; + } + /// The specified bot commands will be valid for all admins of the specified group or supergroup.
See
[TLDef(0x3FD863D1)] public partial class BotCommandScopePeerAdmins : BotCommandScopePeer { } - ///See + /// The specified bot commands will be valid only for a specific user in the specified group or supergroup.
See
[TLDef(0x0A1321F3)] - public partial class BotCommandScopePeerUser : BotCommandScopePeer { public InputUserBase user_id; } + public partial class BotCommandScopePeerUser : BotCommandScopePeer + { + /// The user + public InputUserBase user_id; + } - ///See + ///
Derived classes: , ,
See
public abstract partial class Account_ResetPasswordResult : ITLObject { } - ///See + /// You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset.
See
[TLDef(0xE3779861)] - public partial class Account_ResetPasswordFailedWait : Account_ResetPasswordResult { public DateTime retry_date; } - ///See + public partial class Account_ResetPasswordFailedWait : Account_ResetPasswordResult + { + /// Wait until this date before requesting another reset. + public DateTime retry_date; + } + /// You successfully requested a password reset, please wait until the specified date before finalizing the reset.
See
[TLDef(0xE9EFFC7D)] - public partial class Account_ResetPasswordRequestedWait : Account_ResetPasswordResult { public DateTime until_date; } - ///See + public partial class Account_ResetPasswordRequestedWait : Account_ResetPasswordResult + { + /// Wait until this date before finalizing the reset. + public DateTime until_date; + } + /// The 2FA password was reset successfully.
See
[TLDef(0xE926D63E)] public partial class Account_ResetPasswordOk : Account_ResetPasswordResult { } - ///See + /// A sponsored message
See
[TLDef(0xD151E19A)] public partial class SponsoredMessage : ITLObject { - [Flags] public enum Flags { has_start_param = 0x1, has_entities = 0x2, has_channel_post = 0x4 } + /// Flags, see TL conditional fields public Flags flags; + /// Message ID public byte[] random_id; + /// ID of the sender of the message public Peer from_id; [IfFlag(2)] public int channel_post; + /// Parameter for the bot start message if the sponsored chat is a chat with a bot. [IfFlag(0)] public string start_param; + /// Sponsored message public string message; + /// Message entities for styled text [IfFlag(1)] public MessageEntity[] entities; + + [Flags] public enum Flags + { + /// Field has a value + has_start_param = 0x1, + /// Field has a value + has_entities = 0x2, + /// Field has a value + has_channel_post = 0x4, + } } - ///See + /// A set of sponsored messages associated to a channel
See
[TLDef(0x65A4C7D5)] public partial class Messages_SponsoredMessages : ITLObject { + /// Sponsored messages public SponsoredMessage[] messages; + /// Chats mentioned in the sponsored messages public Dictionary chats; + /// Users mentioned in the sponsored messages public Dictionary users; + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + ///
See
[TLDef(0xC9B0539F)] public partial class SearchResultsCalendarPeriod : ITLObject { @@ -7067,11 +12189,10 @@ namespace TL public int count; } - ///See + ///
See
[TLDef(0x147EE23C)] public partial class Messages_SearchResultsCalendar : ITLObject { - [Flags] public enum Flags { inexact = 0x1, has_offset_id_offset = 0x2 } public Flags flags; public int count; public DateTime min_date; @@ -7081,12 +12202,20 @@ namespace TL public MessageBase[] messages; public Dictionary chats; public Dictionary users; + + [Flags] public enum Flags + { + inexact = 0x1, + /// Field has a value + has_offset_id_offset = 0x2, + } + /// returns a or for the given Peer public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); } - ///See + ///
See
public abstract partial class SearchResultsPosition : ITLObject { } - ///See + ///
See
[TLDef(0x7F648B67)] public partial class SearchResultPosition : SearchResultsPosition { @@ -7095,7 +12224,7 @@ namespace TL public int offset; } - ///See + ///
See
[TLDef(0x53B22BAF)] public partial class Messages_SearchResultsPositions : ITLObject { @@ -7107,7 +12236,9 @@ namespace TL public static class Schema { - ///See + /// Invokes a query after successfull completion of one of the previous queries.
See
+ /// Message identifier on which a current query depends + /// The query itself public static Task InvokeAfterMsg(this Client client, long msg_id, ITLFunction query) => client.CallAsync(writer => { @@ -7117,7 +12248,9 @@ namespace TL return "InvokeAfterMsg"; }); - ///See + /// Invokes a query after a successfull completion of previous queries
See
+ /// List of messages on which a current query depends + /// The query itself public static Task InvokeAfterMsgs(this Client client, long[] msg_ids, ITLFunction query) => client.CallAsync(writer => { @@ -7127,7 +12260,17 @@ namespace TL return "InvokeAfterMsgs"; }); - ///See + /// Initialize connection
See
+ /// Application identifier (see. App configuration) + /// Device model + /// Operation system version + /// Application version + /// Code for the language used on the device's OS, ISO 639-1 standard + /// Language pack to use + /// Code for the language used on the client, ISO 639-1 standard + /// Info about an MTProto proxy + /// Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying timezone offset in seconds. + /// The query itself 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 => { @@ -7148,7 +12291,9 @@ namespace TL return "InitConnection"; }; - ///See + /// Invoke the specified query using the specified API layer
See
+ /// The layer to use + /// The query public static Task InvokeWithLayer(this Client client, int layer, ITLFunction query) => client.CallAsync(writer => { @@ -7158,7 +12303,8 @@ namespace TL return "InvokeWithLayer"; }); - ///See + /// Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).
See
+ /// The query public static Task InvokeWithoutUpdates(this Client client, ITLFunction query) => client.CallAsync(writer => { @@ -7167,7 +12313,9 @@ namespace TL return "InvokeWithoutUpdates"; }); - ///See + /// Invoke with the given message range
See
+ /// Message range + /// Query public static Task InvokeWithMessagesRange(this Client client, MessageRange range, ITLFunction query) => client.CallAsync(writer => { @@ -7177,7 +12325,9 @@ namespace TL return "InvokeWithMessagesRange"; }); - ///See + /// Invoke a method within a takeout session
See
+ /// Takeout session ID + /// Query public static Task InvokeWithTakeout(this Client client, long takeout_id, ITLFunction query) => client.CallAsync(writer => { @@ -7187,7 +12337,11 @@ namespace TL return "InvokeWithTakeout"; }); - ///See + /// Send the verification code for login
See
+ /// Phone number in international format + /// Application identifier (see App configuration) + /// Application secret hash (see App configuration) + /// Settings for the code type to send public static Task Auth_SendCode(this Client client, string phone_number, int api_id, string api_hash, CodeSettings settings) => client.CallAsync(writer => { @@ -7199,7 +12353,11 @@ namespace TL return "Auth_SendCode"; }); - ///See + /// Registers a validated phone number in the system.
See
+ /// Phone number in the international format + /// SMS-message ID + /// New user first name + /// New user last name public static Task Auth_SignUp(this Client client, string phone_number, string phone_code_hash, string first_name, string last_name) => client.CallAsync(writer => { @@ -7211,7 +12369,10 @@ namespace TL return "Auth_SignUp"; }); - ///See + /// Signs in a user with a validated phone number.
See
+ /// Phone number in the international format + /// SMS-message ID, obtained from auth.sendCode + /// Valid numerical code from the SMS-message public static Task Auth_SignIn(this Client client, string phone_number, string phone_code_hash, string phone_code) => client.CallAsync(writer => { @@ -7222,7 +12383,7 @@ namespace TL return "Auth_SignIn"; }); - ///See + /// Logs out the user.
See
public static Task Auth_LogOut(this Client client) => client.CallAsync(writer => { @@ -7230,7 +12391,7 @@ namespace TL return "Auth_LogOut"; }); - ///See + /// Terminates all user's authorized sessions except for the current one.
See
public static Task Auth_ResetAuthorizations(this Client client) => client.CallAsync(writer => { @@ -7238,7 +12399,8 @@ namespace TL return "Auth_ResetAuthorizations"; }); - ///See + /// Returns data for copying authorization to another data-centre.
See
+ /// Number of a target data-centre public static Task Auth_ExportAuthorization(this Client client, int dc_id) => client.CallAsync(writer => { @@ -7247,7 +12409,9 @@ namespace TL return "Auth_ExportAuthorization"; }); - ///See + /// Logs in a user using a key transmitted from his native data-centre.
See
+ /// User ID + /// Authorization key public static Task Auth_ImportAuthorization(this Client client, long id, byte[] bytes) => client.CallAsync(writer => { @@ -7257,7 +12421,11 @@ namespace TL return "Auth_ImportAuthorization"; }); - ///See + /// Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.
See
+ /// Permanent auth_key_id to bind to + /// Random long from Binding message contents + /// Unix timestamp to invalidate temporary key, see Binding message contents + /// See Generating encrypted_message public static Task Auth_BindTempAuthKey(this Client client, long perm_auth_key_id, long nonce, DateTime expires_at, byte[] encrypted_message) => client.CallAsync(writer => { @@ -7269,7 +12437,10 @@ namespace TL return "Auth_BindTempAuthKey"; }); - ///See + /// Login as a bot
See
+ /// Application identifier (see. App configuration) + /// Application identifier hash (see. App configuration) + /// Bot token (see bots) public static Task Auth_ImportBotAuthorization(this Client client, int flags, int api_id, string api_hash, string bot_auth_token) => client.CallAsync(writer => { @@ -7281,7 +12452,8 @@ namespace TL return "Auth_ImportBotAuthorization"; }); - ///See + /// Try logging to an account protected by a 2FA password.
See
+ /// The account's password (see SRP) public static Task Auth_CheckPassword(this Client client, InputCheckPasswordSRP password) => client.CallAsync(writer => { @@ -7290,7 +12462,7 @@ namespace TL return "Auth_CheckPassword"; }); - ///See + /// Request recovery code of a 2FA password, only for accounts with a recovery email configured.
See
public static Task Auth_RequestPasswordRecovery(this Client client) => client.CallAsync(writer => { @@ -7298,7 +12470,9 @@ namespace TL return "Auth_RequestPasswordRecovery"; }); - ///See + /// Reset the 2FA password using the recovery code sent using auth.requestPasswordRecovery.
See
+ /// Code received via email + /// New password public static Task Auth_RecoverPassword(this Client client, string code, Account_PasswordInputSettings new_settings = null) => client.CallAsync(writer => { @@ -7310,7 +12484,9 @@ namespace TL return "Auth_RecoverPassword"; }); - ///See + /// Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.
See
+ /// The phone number + /// The phone code hash obtained from auth.sendCode public static Task Auth_ResendCode(this Client client, string phone_number, string phone_code_hash) => client.CallAsync(writer => { @@ -7320,7 +12496,9 @@ namespace TL return "Auth_ResendCode"; }); - ///See + /// Cancel the login verification code
See
+ /// Phone number + /// Phone code hash from auth.sendCode public static Task Auth_CancelCode(this Client client, string phone_number, string phone_code_hash) => client.CallAsync(writer => { @@ -7330,7 +12508,8 @@ namespace TL return "Auth_CancelCode"; }); - ///See + /// Delete all temporary authorization keys except for the ones specified
See
+ /// The auth keys that shouldn't be dropped. public static Task Auth_DropTempAuthKeys(this Client client, long[] except_auth_keys) => client.CallAsync(writer => { @@ -7339,7 +12518,10 @@ namespace TL return "Auth_DropTempAuthKeys"; }); - ///See + /// Generate a login token, for login via QR code.
The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken URL in the QR code.
See
+ /// Application identifier (see. App configuration) + /// Application identifier hash (see. App configuration) + /// List of already logged-in user IDs, to prevent logging in twice with the same user public static Task Auth_ExportLoginToken(this Client client, int api_id, string api_hash, long[] except_ids) => client.CallAsync(writer => { @@ -7350,7 +12532,8 @@ namespace TL return "Auth_ExportLoginToken"; }); - ///See + /// Login using a redirected login token, generated in case of DC mismatch during QR code login.
See
+ /// Login token public static Task Auth_ImportLoginToken(this Client client, byte[] token) => client.CallAsync(writer => { @@ -7359,7 +12542,8 @@ namespace TL return "Auth_ImportLoginToken"; }); - ///See + /// Accept QR code login token, logging in the app that generated it.
See
+ /// Login token embedded in QR code, for more info, see login via QR code. public static Task Auth_AcceptLoginToken(this Client client, byte[] token) => client.CallAsync(writer => { @@ -7368,7 +12552,8 @@ namespace TL return "Auth_AcceptLoginToken"; }); - ///See + /// Check if the 2FA recovery code sent using auth.requestPasswordRecovery is valid, before passing it to auth.recoverPassword.
See
+ /// Code received via email public static Task Auth_CheckRecoveryPassword(this Client client, string code) => client.CallAsync(writer => { @@ -7377,7 +12562,13 @@ namespace TL return "Auth_CheckRecoveryPassword"; }); - ///See + /// Register device to receive PUSH notifications
See
+ /// Avoid receiving (silent and invisible background) notifications. Useful to save battery. + /// Device token type.
Possible values:
1 - APNS (device token for apple push)
2 - FCM (firebase token for google firebase)
3 - MPNS (channel URI for microsoft push)
4 - Simple push (endpoint for firefox's simple push API)
5 - Ubuntu phone (token for ubuntu push)
6 - Blackberry (token for blackberry push)
7 - Unused
8 - WNS (windows push)
9 - APNS VoIP (token for apple push VoIP)
10 - Web push (web push, see below)
11 - MPNS VoIP (token for microsoft push VoIP)
12 - Tizen (token for tizen push)

For 10 web push, the token must be a JSON-encoded object containing the keys described in
PUSH updates + /// Device token + /// If is transmitted, a sandbox-certificate will be used during transmission. + /// For FCM and APNS VoIP, optional encryption key used to encrypt push notifications + /// List of user identifiers of other users currently using the client public static Task Account_RegisterDevice(this Client client, int token_type, string token, bool app_sandbox, byte[] secret, long[] other_uids, bool no_muted = false) => client.CallAsync(writer => { @@ -7391,7 +12582,10 @@ namespace TL return "Account_RegisterDevice"; }); - ///See + /// Deletes a device by its token, stops sending PUSH-notifications to it.
See
+ /// Device token type.
Possible values:
1 - APNS (device token for apple push)
2 - FCM (firebase token for google firebase)
3 - MPNS (channel URI for microsoft push)
4 - Simple push (endpoint for firefox's simple push API)
5 - Ubuntu phone (token for ubuntu push)
6 - Blackberry (token for blackberry push)
7 - Unused
8 - WNS (windows push)
9 - APNS VoIP (token for apple push VoIP)
10 - Web push (web push, see below)
11 - MPNS VoIP (token for microsoft push VoIP)
12 - Tizen (token for tizen push)

For 10 web push, the token must be a JSON-encoded object containing the keys described in
PUSH updates + /// Device token + /// List of user identifiers of other users currently using the client public static Task Account_UnregisterDevice(this Client client, int token_type, string token, long[] other_uids) => client.CallAsync(writer => { @@ -7402,7 +12596,9 @@ namespace TL return "Account_UnregisterDevice"; }); - ///See + /// Edits notification settings from a given user/group, from all users/all groups.
See
+ /// Notification source + /// Notification settings public static Task Account_UpdateNotifySettings(this Client client, InputNotifyPeerBase peer, InputPeerNotifySettings settings) => client.CallAsync(writer => { @@ -7412,7 +12608,8 @@ namespace TL return "Account_UpdateNotifySettings"; }); - ///See + /// Gets current notification settings for a given user/group, from all users/all groups.
See
+ /// Notification source public static Task Account_GetNotifySettings(this Client client, InputNotifyPeerBase peer) => client.CallAsync(writer => { @@ -7421,7 +12618,7 @@ namespace TL return "Account_GetNotifySettings"; }); - ///See + /// Resets all notification settings from users and groups.
See
public static Task Account_ResetNotifySettings(this Client client) => client.CallAsync(writer => { @@ -7429,7 +12626,10 @@ namespace TL return "Account_ResetNotifySettings"; }); - ///See + /// Updates user profile.
See
+ /// New user first name + /// New user last name + /// New bio public static Task Account_UpdateProfile(this Client client, string first_name = null, string last_name = null, string about = null) => client.CallAsync(writer => { @@ -7444,7 +12644,8 @@ namespace TL return "Account_UpdateProfile"; }); - ///See + /// Updates online user status.
See
+ /// If is transmitted, user status will change to . public static Task Account_UpdateStatus(this Client client, bool offline) => client.CallAsync(writer => { @@ -7453,7 +12654,9 @@ namespace TL return "Account_UpdateStatus"; }); - ///See + /// Returns a list of available wallpapers.
See
+ /// Hash for pagination, for more info click here + /// a null value means account.wallPapersNotModified public static Task Account_GetWallPapers(this Client client, long hash) => client.CallAsync(writer => { @@ -7462,7 +12665,10 @@ namespace TL return "Account_GetWallPapers"; }); - ///See + /// Report a peer for violation of telegram's Terms of Service
See
+ /// The peer to report + /// The reason why this peer is being reported + /// Comment for report moderation public static Task Account_ReportPeer(this Client client, InputPeer peer, ReportReason reason, string message) => client.CallAsync(writer => { @@ -7473,7 +12679,8 @@ namespace TL return "Account_ReportPeer"; }); - ///See + /// Validates a username and checks availability.
See
+ /// username
Accepted characters: A-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters. public static Task Account_CheckUsername(this Client client, string username) => client.CallAsync(writer => { @@ -7482,7 +12689,8 @@ namespace TL return "Account_CheckUsername"; }); - ///
See + /// Changes username for the current user.
See
+ /// username or empty string if username is to be removed
Accepted characters: a-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters. public static Task Account_UpdateUsername(this Client client, string username) => client.CallAsync(writer => { @@ -7491,7 +12699,8 @@ namespace TL return "Account_UpdateUsername"; }); - ///
See + /// Get privacy settings of current account
See
+ /// Peer category whose privacy settings should be fetched public static Task Account_GetPrivacy(this Client client, InputPrivacyKey key) => client.CallAsync(writer => { @@ -7500,7 +12709,9 @@ namespace TL return "Account_GetPrivacy"; }); - ///See + /// Change privacy settings of current account
See
+ /// Peers to which the privacy rules apply + /// New privacy rules public static Task Account_SetPrivacy(this Client client, InputPrivacyKey key, InputPrivacyRule[] rules) => client.CallAsync(writer => { @@ -7510,7 +12721,8 @@ namespace TL return "Account_SetPrivacy"; }); - ///See + /// Delete the user's account from the telegram servers. Can be used, for example, to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured.
See
+ /// Why is the account being deleted, can be empty public static Task Account_DeleteAccount(this Client client, string reason) => client.CallAsync(writer => { @@ -7519,7 +12731,7 @@ namespace TL return "Account_DeleteAccount"; }); - ///See + /// Get days to live of account
See
public static Task Account_GetAccountTTL(this Client client) => client.CallAsync(writer => { @@ -7527,7 +12739,8 @@ namespace TL return "Account_GetAccountTTL"; }); - ///See + /// Set account self-destruction period
See
+ /// Time to live in days public static Task Account_SetAccountTTL(this Client client, AccountDaysTTL ttl) => client.CallAsync(writer => { @@ -7536,7 +12749,9 @@ namespace TL return "Account_SetAccountTTL"; }); - ///See + /// Verify a new phone number to associate to the current account
See
+ /// New phone number + /// Phone code settings public static Task Account_SendChangePhoneCode(this Client client, string phone_number, CodeSettings settings) => client.CallAsync(writer => { @@ -7546,7 +12761,10 @@ namespace TL return "Account_SendChangePhoneCode"; }); - ///See + /// Change the phone number of the current account
See
+ /// New phone number + /// Phone code hash received when calling account.sendChangePhoneCode + /// Phone code received when calling account.sendChangePhoneCode public static Task Account_ChangePhone(this Client client, string phone_number, string phone_code_hash, string phone_code) => client.CallAsync(writer => { @@ -7557,7 +12775,8 @@ namespace TL return "Account_ChangePhone"; }); - ///See + /// When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.
See
+ /// Inactivity period after which to start hiding message texts in PUSH notifications. public static Task Account_UpdateDeviceLocked(this Client client, int period) => client.CallAsync(writer => { @@ -7566,7 +12785,7 @@ namespace TL return "Account_UpdateDeviceLocked"; }); - ///See + /// Get logged-in sessions
See
public static Task Account_GetAuthorizations(this Client client) => client.CallAsync(writer => { @@ -7574,7 +12793,8 @@ namespace TL return "Account_GetAuthorizations"; }); - ///See + /// Log out an active authorized session by its hash
See
+ /// Session hash public static Task Account_ResetAuthorization(this Client client, long hash) => client.CallAsync(writer => { @@ -7583,7 +12803,7 @@ namespace TL return "Account_ResetAuthorization"; }); - ///See + /// Obtain configuration for two-factor authorization with password
See
public static Task Account_GetPassword(this Client client) => client.CallAsync(writer => { @@ -7591,7 +12811,8 @@ namespace TL return "Account_GetPassword"; }); - ///See + /// Get private info associated to the password info (recovery email, telegram passport info & so on)
See
+ /// The password (see SRP) public static Task Account_GetPasswordSettings(this Client client, InputCheckPasswordSRP password) => client.CallAsync(writer => { @@ -7600,7 +12821,9 @@ namespace TL return "Account_GetPasswordSettings"; }); - ///See + /// Set a new 2FA password
See
+ /// The old password (see SRP) + /// The new password (see SRP) public static Task Account_UpdatePasswordSettings(this Client client, InputCheckPasswordSRP password, Account_PasswordInputSettings new_settings) => client.CallAsync(writer => { @@ -7610,7 +12833,9 @@ namespace TL return "Account_UpdatePasswordSettings"; }); - ///See + /// Send confirmation code to cancel account deletion, for more info click here »
See
+ /// The hash from the service notification, for more info click here » + /// Phone code settings public static Task Account_SendConfirmPhoneCode(this Client client, string hash, CodeSettings settings) => client.CallAsync(writer => { @@ -7620,7 +12845,9 @@ namespace TL return "Account_SendConfirmPhoneCode"; }); - ///See + /// Confirm a phone number to cancel account deletion, for more info click here »
See
+ /// Phone code hash, for more info click here » + /// SMS code, for more info click here » public static Task Account_ConfirmPhone(this Client client, string phone_code_hash, string phone_code) => client.CallAsync(writer => { @@ -7630,7 +12857,9 @@ namespace TL return "Account_ConfirmPhone"; }); - ///See + /// Get temporary payment password
See
+ /// SRP password parameters + /// Time during which the temporary password will be valid, in seconds; should be between 60 and 86400 public static Task Account_GetTmpPassword(this Client client, InputCheckPasswordSRP password, int period) => client.CallAsync(writer => { @@ -7640,7 +12869,7 @@ namespace TL return "Account_GetTmpPassword"; }); - ///See + /// Get web login widget authorizations
See
public static Task Account_GetWebAuthorizations(this Client client) => client.CallAsync(writer => { @@ -7648,7 +12877,8 @@ namespace TL return "Account_GetWebAuthorizations"; }); - ///See + /// Log out an active web telegram login session
See
+ /// hash public static Task Account_ResetWebAuthorization(this Client client, long hash) => client.CallAsync(writer => { @@ -7657,7 +12887,7 @@ namespace TL return "Account_ResetWebAuthorization"; }); - ///See + /// Reset all active web telegram login sessions
See
public static Task Account_ResetWebAuthorizations(this Client client) => client.CallAsync(writer => { @@ -7665,7 +12895,7 @@ namespace TL return "Account_ResetWebAuthorizations"; }); - ///See + /// Get all saved Telegram Passport documents, for more info see the passport docs »
See
public static Task Account_GetAllSecureValues(this Client client) => client.CallAsync(writer => { @@ -7673,7 +12903,8 @@ namespace TL return "Account_GetAllSecureValues"; }); - ///See + /// Get saved Telegram Passport document, for more info see the passport docs »
See
+ /// Requested value types public static Task Account_GetSecureValue(this Client client, SecureValueType[] types) => client.CallAsync(writer => { @@ -7682,7 +12913,9 @@ namespace TL return "Account_GetSecureValue"; }); - ///See + /// Securely save Telegram Passport document, for more info see the passport docs »
See
+ /// Secure value, for more info see the passport docs » + /// Passport secret hash, for more info see the passport docs » public static Task Account_SaveSecureValue(this Client client, InputSecureValue value, long secure_secret_id) => client.CallAsync(writer => { @@ -7692,7 +12925,8 @@ namespace TL return "Account_SaveSecureValue"; }); - ///See + /// Delete stored Telegram Passport documents, for more info see the passport docs »
See
+ /// Document types to delete public static Task Account_DeleteSecureValue(this Client client, SecureValueType[] types) => client.CallAsync(writer => { @@ -7701,7 +12935,10 @@ namespace TL return "Account_DeleteSecureValue"; }); - ///See + /// Returns a Telegram Passport authorization form for sharing data with a service
See
+ /// User identifier of the service's bot + /// Telegram Passport element types requested by the service + /// Service's public key public static Task Account_GetAuthorizationForm(this Client client, long bot_id, string scope, string public_key) => client.CallAsync(writer => { @@ -7712,7 +12949,12 @@ namespace TL return "Account_GetAuthorizationForm"; }); - ///See + /// Sends a Telegram Passport authorization form, effectively sharing data with the service
See
+ /// Bot ID + /// Telegram Passport element types requested by the service + /// Service's public key + /// Types of values sent and their hashes + /// Encrypted values public static Task Account_AcceptAuthorization(this Client client, long bot_id, string scope, string public_key, SecureValueHash[] value_hashes, SecureCredentialsEncrypted credentials) => client.CallAsync(writer => { @@ -7725,7 +12967,9 @@ namespace TL return "Account_AcceptAuthorization"; }); - ///See + /// Send the verification phone code for telegram passport.
See
+ /// The phone number to verify + /// Phone code settings public static Task Account_SendVerifyPhoneCode(this Client client, string phone_number, CodeSettings settings) => client.CallAsync(writer => { @@ -7735,7 +12979,10 @@ namespace TL return "Account_SendVerifyPhoneCode"; }); - ///See + /// Verify a phone number for telegram passport.
See
+ /// Phone number + /// Phone code hash received from the call to account.sendVerifyPhoneCode + /// Code received after the call to account.sendVerifyPhoneCode public static Task Account_VerifyPhone(this Client client, string phone_number, string phone_code_hash, string phone_code) => client.CallAsync(writer => { @@ -7746,7 +12993,8 @@ namespace TL return "Account_VerifyPhone"; }); - ///See + /// Send the verification email code for telegram passport.
See
+ /// The email where to send the code public static Task Account_SendVerifyEmailCode(this Client client, string email) => client.CallAsync(writer => { @@ -7755,7 +13003,9 @@ namespace TL return "Account_SendVerifyEmailCode"; }); - ///See + /// Verify an email address for telegram passport.
See
+ /// The email to verify + /// The verification code that was received public static Task Account_VerifyEmail(this Client client, string email, string code) => client.CallAsync(writer => { @@ -7765,7 +13015,14 @@ namespace TL return "Account_VerifyEmail"; }); - ///See + /// Initialize account takeout session
See
+ /// Whether to export contacts + /// Whether to export messages in private chats + /// Whether to export messages in legacy groups + /// Whether to export messages in supergroups + /// Whether to export messages in channels + /// Whether to export files + /// Maximum size of files to export public static Task Account_InitTakeoutSession(this Client client, 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) => client.CallAsync(writer => { @@ -7776,7 +13033,8 @@ namespace TL return "Account_InitTakeoutSession"; }); - ///See + /// Finish account takeout session
See
+ /// Data exported successfully public static Task Account_FinishTakeoutSession(this Client client, bool success = false) => client.CallAsync(writer => { @@ -7785,7 +13043,8 @@ namespace TL return "Account_FinishTakeoutSession"; }); - ///See + /// Verify an email to use as 2FA recovery method.
See
+ /// The phone code that was received after setting a recovery email public static Task Account_ConfirmPasswordEmail(this Client client, string code) => client.CallAsync(writer => { @@ -7794,7 +13053,7 @@ namespace TL return "Account_ConfirmPasswordEmail"; }); - ///See + /// Resend the code to verify an email to use as 2FA recovery method.
See
public static Task Account_ResendPasswordEmail(this Client client) => client.CallAsync(writer => { @@ -7802,7 +13061,7 @@ namespace TL return "Account_ResendPasswordEmail"; }); - ///See + /// Cancel the code that was sent to verify an email to use as 2FA recovery method.
See
public static Task Account_CancelPasswordEmail(this Client client) => client.CallAsync(writer => { @@ -7810,7 +13069,7 @@ namespace TL return "Account_CancelPasswordEmail"; }); - ///See + /// Whether the user will receive notifications when contacts sign up
See
public static Task Account_GetContactSignUpNotification(this Client client) => client.CallAsync(writer => { @@ -7818,7 +13077,8 @@ namespace TL return "Account_GetContactSignUpNotification"; }); - ///See + /// Toggle contact sign up notifications
See
+ /// Whether to disable contact sign up notifications public static Task Account_SetContactSignUpNotification(this Client client, bool silent) => client.CallAsync(writer => { @@ -7827,7 +13087,9 @@ namespace TL return "Account_SetContactSignUpNotification"; }); - ///See + /// Returns list of chats with non-default notification settings
See
+ /// If true, chats with non-default sound will also be returned + /// If specified, only chats of the specified category will be returned public static Task Account_GetNotifyExceptions(this Client client, bool compare_sound = false, InputNotifyPeerBase peer = null) => client.CallAsync(writer => { @@ -7838,7 +13100,8 @@ namespace TL return "Account_GetNotifyExceptions"; }); - ///See + /// Get info about a certain wallpaper
See
+ /// The wallpaper to get info about public static Task Account_GetWallPaper(this Client client, InputWallPaperBase wallpaper) => client.CallAsync(writer => { @@ -7847,7 +13110,10 @@ namespace TL return "Account_GetWallPaper"; }); - ///See + /// Create and upload a new wallpaper
See
+ /// The JPG/PNG wallpaper + /// MIME type of uploaded wallpaper + /// Wallpaper settings public static Task Account_UploadWallPaper(this Client client, InputFileBase file, string mime_type, WallPaperSettings settings) => client.CallAsync(writer => { @@ -7858,7 +13124,10 @@ namespace TL return "Account_UploadWallPaper"; }); - ///See + /// Install/uninstall wallpaper
See
+ /// Wallpaper to save + /// Uninstall wallpaper? + /// Wallpaper settings public static Task Account_SaveWallPaper(this Client client, InputWallPaperBase wallpaper, bool unsave, WallPaperSettings settings) => client.CallAsync(writer => { @@ -7869,7 +13138,9 @@ namespace TL return "Account_SaveWallPaper"; }); - ///See + /// Install wallpaper
See
+ /// Wallpaper to install + /// Wallpaper settings public static Task Account_InstallWallPaper(this Client client, InputWallPaperBase wallpaper, WallPaperSettings settings) => client.CallAsync(writer => { @@ -7879,7 +13150,7 @@ namespace TL return "Account_InstallWallPaper"; }); - ///See + /// Delete installed wallpapers
See
public static Task Account_ResetWallPapers(this Client client) => client.CallAsync(writer => { @@ -7887,7 +13158,7 @@ namespace TL return "Account_ResetWallPapers"; }); - ///See + /// Get media autodownload settings
See
public static Task Account_GetAutoDownloadSettings(this Client client) => client.CallAsync(writer => { @@ -7895,7 +13166,10 @@ namespace TL return "Account_GetAutoDownloadSettings"; }); - ///See + /// Change media autodownload settings
See
+ /// Whether to save settings in the low data usage preset + /// Whether to save settings in the high data usage preset + /// Media autodownload settings public static Task Account_SaveAutoDownloadSettings(this Client client, AutoDownloadSettings settings, bool low = false, bool high = false) => client.CallAsync(writer => { @@ -7905,7 +13179,11 @@ namespace TL return "Account_SaveAutoDownloadSettings"; }); - ///See + /// Upload theme
See
+ /// Theme file uploaded as described in files » + /// Thumbnail + /// File name + /// MIME type, must be application/x-tgtheme-{format}, where format depends on the client public static Task Account_UploadTheme(this Client client, InputFileBase file, string file_name, string mime_type, InputFileBase thumb = null) => client.CallAsync(writer => { @@ -7919,7 +13197,11 @@ namespace TL return "Account_UploadTheme"; }); - ///See + /// Create a theme
See
+ /// Unique theme ID + /// Theme name + /// Theme file + /// Theme settings public static Task Account_CreateTheme(this Client client, string slug, string title, InputDocument document = null, InputThemeSettings[] settings = null) => client.CallAsync(writer => { @@ -7934,7 +13216,13 @@ namespace TL return "Account_CreateTheme"; }); - ///See + /// Update theme
See
+ /// Theme format, a string that identifies the theming engines supported by the client + /// Theme to update + /// Unique theme ID + /// Theme name + /// Theme file + /// Theme settings public static Task Account_UpdateTheme(this Client client, string format, InputThemeBase theme, string slug = null, string title = null, InputDocument document = null, InputThemeSettings[] settings = null) => client.CallAsync(writer => { @@ -7953,7 +13241,9 @@ namespace TL return "Account_UpdateTheme"; }); - ///See + /// Save a theme
See
+ /// Theme to save + /// Unsave public static Task Account_SaveTheme(this Client client, InputThemeBase theme, bool unsave) => client.CallAsync(writer => { @@ -7963,7 +13253,10 @@ namespace TL return "Account_SaveTheme"; }); - ///See + /// Install a theme
See
+ /// Whether to install the dark version + /// Theme format, a string that identifies the theming engines supported by the client + /// Theme to install public static Task Account_InstallTheme(this Client client, bool dark = false, InputThemeBase theme = null, string format = null, BaseTheme base_theme = default) => client.CallAsync(writer => { @@ -7978,7 +13271,10 @@ namespace TL return "Account_InstallTheme"; }); - ///See + /// Get theme information
See
+ /// Theme format, a string that identifies the theming engines supported by the client + /// Theme + /// Document ID public static Task Account_GetTheme(this Client client, string format, InputThemeBase theme, long document_id) => client.CallAsync(writer => { @@ -7989,7 +13285,10 @@ namespace TL return "Account_GetTheme"; }); - ///See + /// Get installed themes
See
+ /// Theme format, a string that identifies the theming engines supported by the client + /// Hash for pagination, for more info click here + /// a null value means account.themesNotModified public static Task Account_GetThemes(this Client client, string format, long hash) => client.CallAsync(writer => { @@ -7999,7 +13298,8 @@ namespace TL return "Account_GetThemes"; }); - ///See + /// Set sensitive content settings (for viewing or hiding NSFW content)
See
+ /// Enable NSFW content public static Task Account_SetContentSettings(this Client client, bool sensitive_enabled = false) => client.CallAsync(writer => { @@ -8008,7 +13308,7 @@ namespace TL return "Account_SetContentSettings"; }); - ///See + /// Get sensitive content settings
See
public static Task Account_GetContentSettings(this Client client) => client.CallAsync(writer => { @@ -8016,7 +13316,8 @@ namespace TL return "Account_GetContentSettings"; }); - ///See + /// Get info about multiple wallpapers
See
+ /// Wallpapers to fetch info about public static Task Account_GetMultiWallPapers(this Client client, InputWallPaperBase[] wallpapers) => client.CallAsync(writer => { @@ -8025,7 +13326,7 @@ namespace TL return "Account_GetMultiWallPapers"; }); - ///See + /// Get global privacy settings
See
public static Task Account_GetGlobalPrivacySettings(this Client client) => client.CallAsync(writer => { @@ -8033,7 +13334,8 @@ namespace TL return "Account_GetGlobalPrivacySettings"; }); - ///See + /// Set global privacy settings
See
+ /// Global privacy settings public static Task Account_SetGlobalPrivacySettings(this Client client, GlobalPrivacySettings settings) => client.CallAsync(writer => { @@ -8042,7 +13344,11 @@ namespace TL return "Account_SetGlobalPrivacySettings"; }); - ///See + /// Report a profile photo of a dialog
See
+ /// The dialog + /// Dialog photo ID + /// Report reason + /// Comment for report moderation public static Task Account_ReportProfilePhoto(this Client client, InputPeer peer, InputPhoto photo_id, ReportReason reason, string message) => client.CallAsync(writer => { @@ -8054,7 +13360,7 @@ namespace TL return "Account_ReportProfilePhoto"; }); - ///See + /// Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »
See
public static Task Account_ResetPassword(this Client client) => client.CallAsync(writer => { @@ -8062,7 +13368,7 @@ namespace TL return "Account_ResetPassword"; }); - ///See + /// Abort a pending 2FA password reset, see here for more info »
See
public static Task Account_DeclinePasswordReset(this Client client) => client.CallAsync(writer => { @@ -8070,7 +13376,9 @@ namespace TL return "Account_DeclinePasswordReset"; }); - ///See + /// Get all available chat themes
See
+ /// Hash for pagination, for more info click here + /// a null value means account.themesNotModified public static Task Account_GetChatThemes(this Client client, long hash) => client.CallAsync(writer => { @@ -8079,7 +13387,8 @@ namespace TL return "Account_GetChatThemes"; }); - ///See + /// Returns basic user info according to their identifiers.
See
+ /// List of user identifiers public static Task Users_GetUsers(this Client client, InputUserBase[] id) => client.CallAsync(writer => { @@ -8088,7 +13397,8 @@ namespace TL return "Users_GetUsers"; }); - ///See + /// Returns extended user info by ID.
See
+ /// User ID public static Task Users_GetFullUser(this Client client, InputUserBase id) => client.CallAsync(writer => { @@ -8097,7 +13407,9 @@ namespace TL return "Users_GetFullUser"; }); - ///See + /// Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).
See
+ /// The user + /// Errors public static Task Users_SetSecureValueErrors(this Client client, InputUserBase id, SecureValueErrorBase[] errors) => client.CallAsync(writer => { @@ -8107,7 +13419,8 @@ namespace TL return "Users_SetSecureValueErrors"; }); - ///See + /// Get contact by telegram IDs
See
+ /// Hash for pagination, for more info click here public static Task Contacts_GetContactIDs(this Client client, long hash) => client.CallAsync(writer => { @@ -8116,7 +13429,7 @@ namespace TL return "Contacts_GetContactIDs"; }); - ///See + /// Returns the list of contact statuses.
See
public static Task Contacts_GetStatuses(this Client client) => client.CallAsync(writer => { @@ -8124,7 +13437,9 @@ namespace TL return "Contacts_GetStatuses"; }); - ///See + /// Returns the current user's contact list.
See
+ /// If there already is a full contact list on the client, a hash of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, will be returned. + /// a null value means contacts.contactsNotModified public static Task Contacts_GetContacts(this Client client, long hash) => client.CallAsync(writer => { @@ -8133,7 +13448,8 @@ namespace TL return "Contacts_GetContacts"; }); - ///See + /// Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.
See
+ /// List of contacts to import public static Task Contacts_ImportContacts(this Client client, InputContact[] contacts) => client.CallAsync(writer => { @@ -8142,7 +13458,8 @@ namespace TL return "Contacts_ImportContacts"; }); - ///See + /// Deletes several contacts from the list.
See
+ /// User ID list public static Task Contacts_DeleteContacts(this Client client, InputUserBase[] id) => client.CallAsync(writer => { @@ -8151,7 +13468,8 @@ namespace TL return "Contacts_DeleteContacts"; }); - ///See + /// Delete contacts by phone number
See
+ /// Phone numbers public static Task Contacts_DeleteByPhones(this Client client, string[] phones) => client.CallAsync(writer => { @@ -8160,7 +13478,8 @@ namespace TL return "Contacts_DeleteByPhones"; }); - ///See + /// Adds the user to the blacklist.
See
+ /// User ID public static Task Contacts_Block(this Client client, InputPeer id) => client.CallAsync(writer => { @@ -8169,7 +13488,8 @@ namespace TL return "Contacts_Block"; }); - ///See + /// Deletes the user from the blacklist.
See
+ /// User ID public static Task Contacts_Unblock(this Client client, InputPeer id) => client.CallAsync(writer => { @@ -8178,7 +13498,9 @@ namespace TL return "Contacts_Unblock"; }); - ///See + /// Returns the list of blocked users.
See
+ /// The number of list elements to be skipped + /// The number of list elements to be returned public static Task Contacts_GetBlocked(this Client client, int offset, int limit) => client.CallAsync(writer => { @@ -8188,7 +13510,9 @@ namespace TL return "Contacts_GetBlocked"; }); - ///See + /// Returns users found by username substring.
See
+ /// Target substring + /// Maximum number of users to be returned public static Task Contacts_Search(this Client client, string q, int limit) => client.CallAsync(writer => { @@ -8198,7 +13522,8 @@ namespace TL return "Contacts_Search"; }); - ///See + /// Resolve a @username to get peer info
See
+ /// @username to resolve public static Task Contacts_ResolveUsername(this Client client, string username) => client.CallAsync(writer => { @@ -8207,7 +13532,19 @@ namespace TL return "Contacts_ResolveUsername"; }); - ///See + /// Get most used peers
See
+ /// Users we've chatted most frequently with + /// Most used bots + /// Most used inline bots + /// Most frequently called users + /// Users to which the users often forwards messages to + /// Chats to which the users often forwards messages to + /// Often-opened groups and supergroups + /// Most frequently visited channels + /// Offset for pagination + /// Maximum number of results to return, see pagination + /// Hash for pagination, for more info click here + /// a null value means contacts.topPeersNotModified public static Task Contacts_GetTopPeers(this Client client, int offset, int limit, long 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) => client.CallAsync(writer => { @@ -8219,7 +13556,9 @@ namespace TL return "Contacts_GetTopPeers"; }); - ///See + /// Reset rating of top peer
See
+ /// Top peer category + /// Peer whose rating should be reset public static Task Contacts_ResetTopPeerRating(this Client client, TopPeerCategory category, InputPeer peer) => client.CallAsync(writer => { @@ -8229,7 +13568,7 @@ namespace TL return "Contacts_ResetTopPeerRating"; }); - ///See + /// Delete saved contacts
See
public static Task Contacts_ResetSaved(this Client client) => client.CallAsync(writer => { @@ -8237,7 +13576,7 @@ namespace TL return "Contacts_ResetSaved"; }); - ///See + /// Get all contacts
See
public static Task Contacts_GetSaved(this Client client) => client.CallAsync(writer => { @@ -8245,7 +13584,8 @@ namespace TL return "Contacts_GetSaved"; }); - ///See + /// Enable/disable top peers
See
+ /// Enable/disable public static Task Contacts_ToggleTopPeers(this Client client, bool enabled) => client.CallAsync(writer => { @@ -8254,7 +13594,12 @@ namespace TL return "Contacts_ToggleTopPeers"; }); - ///See + /// Add an existing telegram user as contact.
See
+ /// Allow the other user to see our phone number? + /// Telegram ID of the other user + /// First name + /// Last name + /// User's phone number public static Task Contacts_AddContact(this Client client, InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false) => client.CallAsync(writer => { @@ -8267,7 +13612,8 @@ namespace TL return "Contacts_AddContact"; }); - ///See + /// If the of a new user allow us to add him as contact, add that user as contact
See
+ /// The user to add as contact public static Task Contacts_AcceptContact(this Client client, InputUserBase id) => client.CallAsync(writer => { @@ -8276,7 +13622,10 @@ namespace TL return "Contacts_AcceptContact"; }); - ///See + /// Get contacts near you
See
+ /// While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag.
Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown. + /// Geolocation + /// If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied. public static Task Contacts_GetLocated(this Client client, InputGeoPoint geo_point, bool background = false, int? self_expires = null) => client.CallAsync(writer => { @@ -8288,7 +13637,11 @@ namespace TL return "Contacts_GetLocated"; }); - ///
See + /// Stop getting notifications about thread replies of a certain user in @replies
See
+ /// Whether to delete the specified message as well + /// Whether to delete all @replies messages from this user as well + /// Whether to also report this user for spam + /// ID of the message in the @replies chat public static Task Contacts_BlockFromReplies(this Client client, int msg_id, bool delete_message = false, bool delete_history = false, bool report_spam = false) => client.CallAsync(writer => { @@ -8298,7 +13651,8 @@ namespace TL return "Contacts_BlockFromReplies"; }); - ///See + /// Returns the list of messages by their IDs.
See
+ /// Message ID list public static Task Messages_GetMessages(this Client client, InputMessage[] id) => client.CallAsync(writer => { @@ -8307,7 +13661,14 @@ namespace TL return "Messages_GetMessages"; }); - ///See + /// Returns the current user dialog list.
See
+ /// Exclude pinned dialogs + /// Peer folder ID, for more info click here + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Offset peer for pagination + /// Number of list elements to be returned + /// Hash for pagination, for more info click here public static Task Messages_GetDialogs(this Client client, DateTime offset_date, int offset_id, InputPeer offset_peer, int limit, long hash, bool exclude_pinned = false, int? folder_id = null) => client.CallAsync(writer => { @@ -8323,7 +13684,15 @@ namespace TL return "Messages_GetDialogs"; }); - ///See + /// Gets back the conversation history with one interlocutor / within a chat
See
+ /// Target peer + /// Only return messages starting from the specified message ID + /// Only return messages sent before the specified date + /// Number of list elements to be skipped, negative values are also accepted. + /// Number of results to return + /// If a positive value was transferred, the method will return only messages with IDs less than max_id + /// If a positive value was transferred, the method will return only messages with IDs more than min_id + /// Result hash public static Task Messages_GetHistory(this Client client, InputPeer peer, int offset_id, DateTime offset_date, int add_offset, int limit, int max_id, int min_id, long hash) => client.CallAsync(writer => { @@ -8339,7 +13708,20 @@ namespace TL return "Messages_GetHistory"; }); - ///See + /// Gets back found messages
See
+ /// User or chat, histories with which are searched, or constructor for global search + /// Text search request + /// Only return messages sent by the specified user ID + /// Thread ID + /// Filter to return only specified message types + /// If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned + /// If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned + /// Only return messages starting from the specified message ID + /// Additional offset + /// Number of results to return + /// Maximum message ID to return + /// Minimum message ID to return + /// Hash public static Task Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter, DateTime min_date, DateTime max_date, int offset_id, int add_offset, int limit, int max_id, int min_id, long hash, InputPeer from_id = null, int? top_msg_id = null) => client.CallAsync(writer => { @@ -8363,7 +13745,9 @@ namespace TL return "Messages_Search"; }); - ///See + /// Marks message history as read.
See
+ /// Target user or group + /// If a positive value is passed, only messages with identifiers less or equal than the given one will be read public static Task Messages_ReadHistory(this Client client, InputPeer peer, int max_id) => client.CallAsync(writer => { @@ -8373,7 +13757,11 @@ namespace TL return "Messages_ReadHistory"; }); - ///See + /// Deletes communication history.
See
+ /// Just clear history for the current user, without actually removing messages for every chat user + /// Whether to delete the message history for all chat participants + /// User or chat, communication history of which will be deleted + /// Maximum ID of message to delete public static Task Messages_DeleteHistory(this Client client, InputPeer peer, int max_id, bool just_clear = false, bool revoke = false, DateTime? min_date = null, DateTime? max_date = null) => client.CallAsync(writer => { @@ -8388,7 +13776,9 @@ namespace TL return "Messages_DeleteHistory"; }); - ///See + /// Deletes messages by their identifiers.
See
+ /// Whether to delete messages for all participants of the chat + /// Message ID list public static Task Messages_DeleteMessages(this Client client, int[] id, bool revoke = false) => client.CallAsync(writer => { @@ -8398,7 +13788,8 @@ namespace TL return "Messages_DeleteMessages"; }); - ///See + /// Confirms receipt of messages by a client, cancels PUSH-notification sending.
See
+ /// Maximum message ID available in a client. public static Task Messages_ReceivedMessages(this Client client, int max_id) => client.CallAsync(writer => { @@ -8407,7 +13798,10 @@ namespace TL return "Messages_ReceivedMessages"; }); - ///See + /// Sends a current user typing event (see for all event types) to a conversation partner or group.
See
+ /// Target user or group + /// Thread ID + /// Type of action
Parameter added in Layer 17. public static Task Messages_SetTyping(this Client client, InputPeer peer, SendMessageAction action, int? top_msg_id = null) => client.CallAsync(writer => { @@ -8420,7 +13814,18 @@ namespace TL return "Messages_SetTyping"; }); - ///See + /// Sends a message to a chat
See
+ /// Set this flag to disable generation of the webpage preview + /// Send this message silently (no notifications for the receivers) + /// Send this message as background message + /// Clear the draft field + /// The destination where the message will be sent + /// The message ID to which this message will reply to + /// The message + /// Unique client message ID required to prevent message resending + /// Reply markup for sending bot buttons + /// Message entities for sending styled text + /// Scheduled message date for scheduled messages public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null) => client.CallAsync(writer => { @@ -8440,7 +13845,18 @@ namespace TL return "Messages_SendMessage"; }); - ///See + /// Send a media
See
+ /// Send message silently (no notification should be triggered) + /// Send message in background + /// Clear the draft + /// Destination + /// Message ID to which this message should reply to + /// Attached media + /// Caption + /// Random ID to avoid resending the same message + /// Reply markup for bot keyboards + /// Message entities for styled text + /// Scheduled message date for scheduled messages public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null) => client.CallAsync(writer => { @@ -8461,7 +13877,17 @@ namespace TL return "Messages_SendMedia"; }); - ///See + /// Forwards messages by their IDs.
See
+ /// Whether to send messages silently (no notification will be triggered on the destination clients) + /// Whether to send the message in background + /// When forwarding games, whether to include your score in the game + /// Whether to forward messages without quoting the original author + /// Whether to strip captions from media + /// Source of messages + /// IDs of messages + /// Random ID to prevent resending of messages + /// Destination peer + /// Scheduled message date for scheduled messages public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, DateTime? schedule_date = null) => client.CallAsync(writer => { @@ -8476,7 +13902,8 @@ namespace TL return "Messages_ForwardMessages"; }); - ///See + /// Report a new incoming chat for spam, if the of the chat allow us to do that
See
+ /// Peer to report public static Task Messages_ReportSpam(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -8485,7 +13912,8 @@ namespace TL return "Messages_ReportSpam"; }); - ///See + /// Get peer settings
See
+ /// The peer public static Task Messages_GetPeerSettings(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -8494,7 +13922,11 @@ namespace TL return "Messages_GetPeerSettings"; }); - ///See + /// Report a message in a chat for violation of telegram's Terms of Service
See
+ /// Peer + /// IDs of messages to report + /// Why are these messages being reported + /// Comment for report moderation public static Task Messages_Report(this Client client, InputPeer peer, int[] id, ReportReason reason, string message) => client.CallAsync(writer => { @@ -8506,7 +13938,8 @@ namespace TL return "Messages_Report"; }); - ///See + /// Returns chat basic info on their IDs.
See
+ /// List of chat IDs public static Task Messages_GetChats(this Client client, long[] id) => client.CallAsync(writer => { @@ -8515,7 +13948,8 @@ namespace TL return "Messages_GetChats"; }); - ///See + /// Returns full chat info according to its ID.
See
+ /// Chat ID public static Task Messages_GetFullChat(this Client client, long chat_id) => client.CallAsync(writer => { @@ -8524,7 +13958,9 @@ namespace TL return "Messages_GetFullChat"; }); - ///See + /// Chanages chat name and sends a service message on it.
See
+ /// Chat ID + /// New chat name, different from the old one public static Task Messages_EditChatTitle(this Client client, long chat_id, string title) => client.CallAsync(writer => { @@ -8534,7 +13970,9 @@ namespace TL return "Messages_EditChatTitle"; }); - ///See + /// Changes chat photo and sends a service message on it
See
+ /// Chat ID + /// Photo to be set public static Task Messages_EditChatPhoto(this Client client, long chat_id, InputChatPhotoBase photo) => client.CallAsync(writer => { @@ -8544,7 +13982,10 @@ namespace TL return "Messages_EditChatPhoto"; }); - ///See + /// Adds a user to a chat and sends a service message on it.
See
+ /// Chat ID + /// User ID to be added + /// Number of last messages to be forwarded public static Task Messages_AddChatUser(this Client client, long chat_id, InputUserBase user_id, int fwd_limit) => client.CallAsync(writer => { @@ -8555,7 +13996,10 @@ namespace TL return "Messages_AddChatUser"; }); - ///See + /// Deletes a user from a chat and sends a service message on it.
See
+ /// Remove the entire chat history of the specified user in this chat. + /// Chat ID + /// User ID to be deleted public static Task Messages_DeleteChatUser(this Client client, long chat_id, InputUserBase user_id, bool revoke_history = false) => client.CallAsync(writer => { @@ -8566,7 +14010,9 @@ namespace TL return "Messages_DeleteChatUser"; }); - ///See + /// Creates a new chat.
See
+ /// List of user IDs to be invited + /// Chat name public static Task Messages_CreateChat(this Client client, InputUserBase[] users, string title) => client.CallAsync(writer => { @@ -8576,7 +14022,9 @@ namespace TL return "Messages_CreateChat"; }); - ///See + /// Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.
See
+ /// Value of the version parameter from , avialable at the client + /// Length of the required random sequence public static Task Messages_GetDhConfig(this Client client, int version, int random_length) => client.CallAsync(writer => { @@ -8586,7 +14034,10 @@ namespace TL return "Messages_GetDhConfig"; }); - ///See + /// Sends a request to start a secret chat to the user.
See
+ /// User ID + /// Unique client request ID required to prevent resending. This also doubles as the chat ID. + /// A = g ^ a mod p, see Wikipedia public static Task Messages_RequestEncryption(this Client client, InputUserBase user_id, int random_id, byte[] g_a) => client.CallAsync(writer => { @@ -8597,7 +14048,10 @@ namespace TL return "Messages_RequestEncryption"; }); - ///See + /// Confirms creation of a secret chat
See
+ /// Secret chat ID + /// B = g ^ b mod p, see Wikipedia + /// 64-bit fingerprint of the received key public static Task Messages_AcceptEncryption(this Client client, InputEncryptedChat peer, byte[] g_b, long key_fingerprint) => client.CallAsync(writer => { @@ -8608,7 +14062,9 @@ namespace TL return "Messages_AcceptEncryption"; }); - ///See + /// Cancels a request for creation and/or delete info on secret chat.
See
+ /// Whether to delete the entire chat history for the other user as well + /// Secret chat ID public static Task Messages_DiscardEncryption(this Client client, int chat_id, bool delete_history = false) => client.CallAsync(writer => { @@ -8618,7 +14074,9 @@ namespace TL return "Messages_DiscardEncryption"; }); - ///See + /// Send typing event by the current user to a secret chat.
See
+ /// Secret chat ID + /// Typing.
Possible values:
, if the user started typing and more than 5 seconds have passed since the last request
, if the user stopped typing public static Task Messages_SetEncryptedTyping(this Client client, InputEncryptedChat peer, bool typing) => client.CallAsync(writer => { @@ -8628,7 +14086,9 @@ namespace TL return "Messages_SetEncryptedTyping"; }); - ///
See + /// Marks message history within a secret chat as read.
See
+ /// Secret chat ID + /// Maximum date value for received messages in history public static Task Messages_ReadEncryptedHistory(this Client client, InputEncryptedChat peer, DateTime max_date) => client.CallAsync(writer => { @@ -8638,7 +14098,11 @@ namespace TL return "Messages_ReadEncryptedHistory"; }); - ///See + /// Sends a text message to a secret chat.
See
+ /// Send encrypted message without a notification + /// Secret chat ID + /// Unique client message ID, necessary to avoid message resending + /// TL-serialization of type, encrypted with a key that was created during chat initialization public static Task Messages_SendEncrypted(this Client client, InputEncryptedChat peer, long random_id, byte[] data, bool silent = false) => client.CallAsync(writer => { @@ -8650,7 +14114,12 @@ namespace TL return "Messages_SendEncrypted"; }); - ///See + /// Sends a message with a file attachment to a secret chat
See
+ /// Whether to send the file without triggering a notification + /// Secret chat ID + /// Unique client message ID necessary to prevent message resending + /// TL-serialization of type, encrypted with a key generated during chat initialization + /// File attachment for the secret chat public static Task Messages_SendEncryptedFile(this Client client, InputEncryptedChat peer, long random_id, byte[] data, InputEncryptedFileBase file, bool silent = false) => client.CallAsync(writer => { @@ -8663,7 +14132,10 @@ namespace TL return "Messages_SendEncryptedFile"; }); - ///See + /// Sends a service message to a secret chat.
See
+ /// Secret chat ID + /// Unique client message ID required to prevent message resending + /// TL-serialization of type, encrypted with a key generated during chat initialization public static Task Messages_SendEncryptedService(this Client client, InputEncryptedChat peer, long random_id, byte[] data) => client.CallAsync(writer => { @@ -8674,7 +14146,8 @@ namespace TL return "Messages_SendEncryptedService"; }); - ///See + /// Confirms receipt of messages in a secret chat by client, cancels push notifications.
See
+ /// Maximum qts value available at the client public static Task Messages_ReceivedQueue(this Client client, int max_qts) => client.CallAsync(writer => { @@ -8683,7 +14156,8 @@ namespace TL return "Messages_ReceivedQueue"; }); - ///See + /// Report a secret chat for spam
See
+ /// The secret chat to report public static Task Messages_ReportEncryptedSpam(this Client client, InputEncryptedChat peer) => client.CallAsync(writer => { @@ -8692,7 +14166,8 @@ namespace TL return "Messages_ReportEncryptedSpam"; }); - ///See + /// Notifies the sender about the recipient having listened a voice message or watched a video.
See
+ /// Message ID list public static Task Messages_ReadMessageContents(this Client client, int[] id) => client.CallAsync(writer => { @@ -8701,7 +14176,10 @@ namespace TL return "Messages_ReadMessageContents"; }); - ///See + /// Get stickers by emoji
See
+ /// The emoji + /// Hash for pagination, for more info click here + /// a null value means messages.stickersNotModified public static Task Messages_GetStickers(this Client client, string emoticon, long hash) => client.CallAsync(writer => { @@ -8711,7 +14189,9 @@ namespace TL return "Messages_GetStickers"; }); - ///See + /// Get all installed stickers
See
+ /// Hash for pagination, for more info click here + /// a null value means messages.allStickersNotModified public static Task Messages_GetAllStickers(this Client client, long hash) => client.CallAsync(writer => { @@ -8720,7 +14200,10 @@ namespace TL return "Messages_GetAllStickers"; }); - ///See + /// Get preview of webpage
See
+ /// Message from which to extract the preview + /// Message entities for styled text + /// a null value means messageMediaEmpty public static Task Messages_GetWebPagePreview(this Client client, string message, MessageEntity[] entities = null) => client.CallAsync(writer => { @@ -8732,7 +14215,11 @@ namespace TL return "Messages_GetWebPagePreview"; }); - ///See + /// Export an invite link for a chat
See
+ /// Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients. + /// Chat + /// Expiration date + /// Maximum number of users that can join using this link public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, bool legacy_revoke_permanent = false, bool request_needed = false, DateTime? expire_date = null, int? usage_limit = null, string title = null) => client.CallAsync(writer => { @@ -8748,7 +14235,8 @@ namespace TL return "Messages_ExportChatInvite"; }); - ///See + /// Check the validity of a chat invite link and get basic info about it
See
+ /// Invite hash in t.me/joinchat/hash public static Task Messages_CheckChatInvite(this Client client, string hash) => client.CallAsync(writer => { @@ -8757,7 +14245,8 @@ namespace TL return "Messages_CheckChatInvite"; }); - ///See + /// Import a chat invite and join a private chat/supergroup/channel
See
+ /// hash from t.me/joinchat/hash public static Task Messages_ImportChatInvite(this Client client, string hash) => client.CallAsync(writer => { @@ -8766,7 +14255,8 @@ namespace TL return "Messages_ImportChatInvite"; }); - ///See + /// Get info about a stickerset
See
+ /// Stickerset public static Task Messages_GetStickerSet(this Client client, InputStickerSet stickerset) => client.CallAsync(writer => { @@ -8775,7 +14265,9 @@ namespace TL return "Messages_GetStickerSet"; }); - ///See + /// Install a stickerset
See
+ /// Stickerset to install + /// Whether to archive stickerset public static Task Messages_InstallStickerSet(this Client client, InputStickerSet stickerset, bool archived) => client.CallAsync(writer => { @@ -8785,7 +14277,8 @@ namespace TL return "Messages_InstallStickerSet"; }); - ///See + /// Uninstall a stickerset
See
+ /// The stickerset to uninstall public static Task Messages_UninstallStickerSet(this Client client, InputStickerSet stickerset) => client.CallAsync(writer => { @@ -8794,7 +14287,11 @@ namespace TL return "Messages_UninstallStickerSet"; }); - ///See + /// Start a conversation with a bot using a deep linking parameter
See
+ /// The bot + /// The chat where to start the bot, can be the bot's private chat or a group + /// Random ID to avoid resending the same message + /// Deep linking parameter public static Task Messages_StartBot(this Client client, InputUserBase bot, InputPeer peer, long random_id, string start_param) => client.CallAsync(writer => { @@ -8806,7 +14303,10 @@ namespace TL return "Messages_StartBot"; }); - ///See + /// Get and increase the view counter of a message sent or forwarded from a channel
See
+ /// Peer where the message was found + /// ID of message + /// Whether to mark the message as viewed and increment the view counter public static Task Messages_GetMessagesViews(this Client client, InputPeer peer, int[] id, bool increment) => client.CallAsync(writer => { @@ -8817,7 +14317,10 @@ namespace TL return "Messages_GetMessagesViews"; }); - ///See + /// Make a user admin in a legacy group.
See
+ /// The ID of the group + /// The user to make admin + /// Whether to make him admin public static Task Messages_EditChatAdmin(this Client client, long chat_id, InputUserBase user_id, bool is_admin) => client.CallAsync(writer => { @@ -8828,7 +14331,8 @@ namespace TL return "Messages_EditChatAdmin"; }); - ///See + /// Turn a legacy group into a supergroup
See
+ /// Legacy group to migrate public static Task Messages_MigrateChat(this Client client, long chat_id) => client.CallAsync(writer => { @@ -8837,7 +14341,16 @@ namespace TL return "Messages_MigrateChat"; }); - ///See + /// Search for messages and peers globally
See
+ /// Peer folder ID, for more info click here + /// Query + /// Global search filter + /// If a positive value was specified, the method will return only messages with date bigger than min_date + /// If a positive value was transferred, the method will return only messages with date smaller than max_date + /// Initially 0, then set to the + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here public static Task Messages_SearchGlobal(this Client client, string q, MessagesFilter filter, DateTime min_date, DateTime max_date, int offset_rate, InputPeer offset_peer, int offset_id, int limit, int? folder_id = null) => client.CallAsync(writer => { @@ -8856,7 +14369,9 @@ namespace TL return "Messages_SearchGlobal"; }); - ///See + /// Reorder installed stickersets
See
+ /// Reorder mask stickersets + /// New stickerset order by stickerset IDs public static Task Messages_ReorderStickerSets(this Client client, long[] order, bool masks = false) => client.CallAsync(writer => { @@ -8866,7 +14381,10 @@ namespace TL return "Messages_ReorderStickerSets"; }); - ///See + /// Get a document by its SHA256 hash, mainly used for gifs
See
+ /// SHA256 of file + /// Size of the file in bytes + /// Mime type public static Task Messages_GetDocumentByHash(this Client client, byte[] sha256, int size, string mime_type) => client.CallAsync(writer => { @@ -8877,7 +14395,9 @@ namespace TL return "Messages_GetDocumentByHash"; }); - ///See + /// Get saved GIFs
See
+ /// Hash for pagination, for more info click here + /// a null value means messages.savedGifsNotModified public static Task Messages_GetSavedGifs(this Client client, long hash) => client.CallAsync(writer => { @@ -8886,7 +14406,9 @@ namespace TL return "Messages_GetSavedGifs"; }); - ///See + /// Add GIF to saved gifs list
See
+ /// GIF to save + /// Whether to remove GIF from saved gifs list public static Task Messages_SaveGif(this Client client, InputDocument id, bool unsave) => client.CallAsync(writer => { @@ -8896,7 +14418,12 @@ namespace TL return "Messages_SaveGif"; }); - ///See + /// Query an inline bot
See
+ /// The bot to query + /// The currently opened chat + /// The geolocation, if requested + /// The query + /// The offset within the results, will be passed directly as-is to the bot. public static Task Messages_GetInlineBotResults(this Client client, InputUserBase bot, InputPeer peer, string query, string offset, InputGeoPoint geo_point = null) => client.CallAsync(writer => { @@ -8911,7 +14438,14 @@ namespace TL return "Messages_GetInlineBotResults"; }); - ///See + /// Answer an inline query, for bots only
See
+ /// Set this flag if the results are composed of media files + /// Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query + /// Unique identifier for the answered query + /// Vector of results for the inline query + /// The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + /// Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes. + /// If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter. public static Task Messages_SetInlineBotResults(this Client client, long query_id, InputBotInlineResultBase[] results, DateTime cache_time, bool gallery = false, bool private_ = false, string next_offset = null, InlineBotSwitchPM switch_pm = null) => client.CallAsync(writer => { @@ -8927,7 +14461,17 @@ namespace TL return "Messages_SetInlineBotResults"; }); - ///See + /// Send a result obtained using messages.getInlineBotResults.
See
+ /// Whether to send the message silently (no notification will be triggered on the other client) + /// Whether to send the message in background + /// Whether to clear the draft + /// Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the ) + /// Destination + /// ID of the message this message should reply to + /// Random ID to avoid resending the same query + /// Query ID from messages.getInlineBotResults + /// Result ID from messages.getInlineBotResults + /// Scheduled message date for scheduled messages public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false, int? reply_to_msg_id = null, DateTime? schedule_date = null) => client.CallAsync(writer => { @@ -8944,7 +14488,9 @@ namespace TL return "Messages_SendInlineBotResult"; }); - ///See + /// Find out if a media message's caption can be edited
See
+ /// Peer where the media was sent + /// ID of message public static Task Messages_GetMessageEditData(this Client client, InputPeer peer, int id) => client.CallAsync(writer => { @@ -8954,7 +14500,15 @@ namespace TL return "Messages_GetMessageEditData"; }); - ///See + /// Edit message
See
+ /// Disable webpage preview + /// Where was the message sent + /// ID of the message to edit + /// New message + /// New attached media + /// Reply markup for inline keyboards + /// Message entities for styled text + /// Scheduled message date for scheduled messages public static Task Messages_EditMessage(this Client client, InputPeer peer, int id, bool no_webpage = false, string message = null, InputMedia media = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null) => client.CallAsync(writer => { @@ -8975,7 +14529,13 @@ namespace TL return "Messages_EditMessage"; }); - ///See + /// Edit an inline bot message
See
+ /// Disable webpage preview + /// Sent inline message ID + /// Message + /// Media + /// Reply markup for inline keyboards + /// Message entities for styled text public static Task Messages_EditInlineBotMessage(this Client client, InputBotInlineMessageIDBase id, bool no_webpage = false, string message = null, InputMedia media = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null) => client.CallAsync(writer => { @@ -8993,7 +14553,12 @@ namespace TL return "Messages_EditInlineBotMessage"; }); - ///See + /// Press an inline callback button and get a callback answer from the bot
See
+ /// Whether this is a "play game" button + /// Where was the inline keyboard sent + /// ID of the Message with the inline keyboard + /// Callback data + /// For buttons , the SRP payload generated using SRP. public static Task Messages_GetBotCallbackAnswer(this Client client, InputPeer peer, int msg_id, bool game = false, byte[] data = null, InputCheckPasswordSRP password = null) => client.CallAsync(writer => { @@ -9008,7 +14573,12 @@ namespace TL return "Messages_GetBotCallbackAnswer"; }); - ///See + /// Set the callback answer to a user button press (bots only)
See
+ /// Whether to show the message as a popup instead of a toast notification + /// Query ID + /// Popup to show + /// URL to open + /// Cache validity public static Task Messages_SetBotCallbackAnswer(this Client client, long query_id, DateTime cache_time, bool alert = false, string message = null, string url = null) => client.CallAsync(writer => { @@ -9023,7 +14593,8 @@ namespace TL return "Messages_SetBotCallbackAnswer"; }); - ///See + /// Get dialog info of specified peers
See
+ /// Peers public static Task Messages_GetPeerDialogs(this Client client, InputDialogPeerBase[] peers) => client.CallAsync(writer => { @@ -9032,7 +14603,12 @@ namespace TL return "Messages_GetPeerDialogs"; }); - ///See + /// Save a message draft associated to a chat.
See
+ /// Disable generation of the webpage preview + /// Message ID the message should reply to + /// Destination of the message that should be sent + /// The draft + /// Message entities for styled text public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, bool no_webpage = false, int? reply_to_msg_id = null, MessageEntity[] entities = null) => client.CallAsync(writer => { @@ -9047,7 +14623,7 @@ namespace TL return "Messages_SaveDraft"; }); - ///See + /// Save get all message drafts.
See
public static Task Messages_GetAllDrafts(this Client client) => client.CallAsync(writer => { @@ -9055,7 +14631,8 @@ namespace TL return "Messages_GetAllDrafts"; }); - ///See + /// Get featured stickers
See
+ /// Hash for pagination, for more info click here public static Task Messages_GetFeaturedStickers(this Client client, long hash) => client.CallAsync(writer => { @@ -9064,7 +14641,8 @@ namespace TL return "Messages_GetFeaturedStickers"; }); - ///See + /// Mark new featured stickers as read
See
+ /// IDs of stickersets to mark as read public static Task Messages_ReadFeaturedStickers(this Client client, long[] id) => client.CallAsync(writer => { @@ -9073,7 +14651,10 @@ namespace TL return "Messages_ReadFeaturedStickers"; }); - ///See + /// Get recent stickers
See
+ /// Get stickers recently attached to photo or video files + /// Hash for pagination, for more info click here + /// a null value means messages.recentStickersNotModified public static Task Messages_GetRecentStickers(this Client client, long hash, bool attached = false) => client.CallAsync(writer => { @@ -9083,7 +14664,10 @@ namespace TL return "Messages_GetRecentStickers"; }); - ///See + /// Add/remove sticker from recent stickers list
See
+ /// Whether to add/remove stickers recently attached to photo or video files + /// Sticker + /// Whether to save or unsave the sticker public static Task Messages_SaveRecentSticker(this Client client, InputDocument id, bool unsave, bool attached = false) => client.CallAsync(writer => { @@ -9094,7 +14678,8 @@ namespace TL return "Messages_SaveRecentSticker"; }); - ///See + /// Clear recent stickers
See
+ /// Set this flag to clear the list of stickers recently attached to photo or video files public static Task Messages_ClearRecentStickers(this Client client, bool attached = false) => client.CallAsync(writer => { @@ -9103,7 +14688,10 @@ namespace TL return "Messages_ClearRecentStickers"; }); - ///See + /// Get all archived stickers
See
+ /// Get mask stickers + /// Offsets for pagination, for more info click here + /// Maximum number of results to return, see pagination public static Task Messages_GetArchivedStickers(this Client client, long offset_id, int limit, bool masks = false) => client.CallAsync(writer => { @@ -9114,7 +14702,9 @@ namespace TL return "Messages_GetArchivedStickers"; }); - ///See + /// Get installed mask stickers
See
+ /// Hash for pagination, for more info click here + /// a null value means messages.allStickersNotModified public static Task Messages_GetMaskStickers(this Client client, long hash) => client.CallAsync(writer => { @@ -9123,7 +14713,8 @@ namespace TL return "Messages_GetMaskStickers"; }); - ///See + /// Get stickers attached to a photo or video
See
+ /// Stickered media public static Task Messages_GetAttachedStickers(this Client client, InputStickeredMedia media) => client.CallAsync(writer => { @@ -9132,7 +14723,13 @@ namespace TL return "Messages_GetAttachedStickers"; }); - ///See + /// Use this method to set the score of the specified user in a game sent as a normal message (bots only).
See
+ /// Set this flag if the game message should be automatically edited to include the current scoreboard + /// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters + /// Unique identifier of target chat + /// Identifier of the sent message + /// User identifier + /// New score public static Task Messages_SetGameScore(this Client client, InputPeer peer, int id, InputUserBase user_id, int score, bool edit_message = false, bool force = false) => client.CallAsync(writer => { @@ -9145,7 +14742,12 @@ namespace TL return "Messages_SetGameScore"; }); - ///See + /// Use this method to set the score of the specified user in a game sent as an inline message (bots only).
See
+ /// Set this flag if the game message should be automatically edited to include the current scoreboard + /// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters + /// ID of the inline message + /// User identifier + /// New score public static Task Messages_SetInlineGameScore(this Client client, InputBotInlineMessageIDBase id, InputUserBase user_id, int score, bool edit_message = false, bool force = false) => client.CallAsync(writer => { @@ -9157,7 +14759,10 @@ namespace TL return "Messages_SetInlineGameScore"; }); - ///See + /// Get highscores of a game
See
+ /// Where was the game sent + /// ID of message with game media attachment + /// Get high scores made by a certain user public static Task Messages_GetGameHighScores(this Client client, InputPeer peer, int id, InputUserBase user_id) => client.CallAsync(writer => { @@ -9168,7 +14773,9 @@ namespace TL return "Messages_GetGameHighScores"; }); - ///See + /// Get highscores of a game sent using an inline bot
See
+ /// ID of inline message + /// Get high scores of a certain user public static Task Messages_GetInlineGameHighScores(this Client client, InputBotInlineMessageIDBase id, InputUserBase user_id) => client.CallAsync(writer => { @@ -9178,7 +14785,10 @@ namespace TL return "Messages_GetInlineGameHighScores"; }); - ///See + /// Get chats in common with a user
See
+ /// User ID + /// Maximum ID of chat to return (see pagination) + /// Maximum number of results to return, see pagination public static Task Messages_GetCommonChats(this Client client, InputUserBase user_id, long max_id, int limit) => client.CallAsync(writer => { @@ -9189,7 +14799,8 @@ namespace TL return "Messages_GetCommonChats"; }); - ///See + /// Get all chats, channels and supergroups
See
+ /// Except these chats/channels/supergroups public static Task Messages_GetAllChats(this Client client, long[] except_ids) => client.CallAsync(writer => { @@ -9198,7 +14809,9 @@ namespace TL return "Messages_GetAllChats"; }); - ///See + /// Get instant view page
See
+ /// URL of IV page to fetch + /// Hash for pagination, for more info click here public static Task Messages_GetWebPage(this Client client, string url, int hash) => client.CallAsync(writer => { @@ -9208,7 +14821,9 @@ namespace TL return "Messages_GetWebPage"; }); - ///See + /// Pin/unpin a dialog
See
+ /// Whether to pin or unpin the dialog + /// The dialog to pin public static Task Messages_ToggleDialogPin(this Client client, InputDialogPeerBase peer, bool pinned = false) => client.CallAsync(writer => { @@ -9218,7 +14833,10 @@ namespace TL return "Messages_ToggleDialogPin"; }); - ///See + /// Reorder pinned dialogs
See
+ /// If set, dialogs pinned server-side but not present in the order field will be unpinned. + /// Peer folder ID, for more info click here + /// New dialog order public static Task Messages_ReorderPinnedDialogs(this Client client, int folder_id, InputDialogPeerBase[] order, bool force = false) => client.CallAsync(writer => { @@ -9229,7 +14847,8 @@ namespace TL return "Messages_ReorderPinnedDialogs"; }); - ///See + /// Get pinned dialogs
See
+ /// Peer folder ID, for more info click here public static Task Messages_GetPinnedDialogs(this Client client, int folder_id) => client.CallAsync(writer => { @@ -9238,7 +14857,10 @@ namespace TL return "Messages_GetPinnedDialogs"; }); - ///See + /// If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an update. Use this method to reply to shipping queries.
See
+ /// Unique identifier for the query to be answered + /// Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. + /// A vector of available shipping options. public static Task Messages_SetBotShippingResults(this Client client, long query_id, string error = null, ShippingOption[] shipping_options = null) => client.CallAsync(writer => { @@ -9252,7 +14874,10 @@ namespace TL return "Messages_SetBotShippingResults"; }); - ///See + /// Once the user has confirmed their payment and shipping details, the bot receives an update.
Use this method to respond to such pre-checkout queries.
Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.
See
+ /// Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead + /// Unique identifier for the query to be answered + /// Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. public static Task Messages_SetBotPrecheckoutResults(this Client client, long query_id, bool success = false, string error = null) => client.CallAsync(writer => { @@ -9264,7 +14889,10 @@ namespace TL return "Messages_SetBotPrecheckoutResults"; }); - ///See + /// Upload a file and associate it to a chat (without actually sending it to the chat)
See
+ /// The chat, can be an for bots + /// File uploaded in chunks as described in files » + /// a null value means messageMediaEmpty public static Task Messages_UploadMedia(this Client client, InputPeer peer, InputMedia media) => client.CallAsync(writer => { @@ -9274,7 +14902,10 @@ namespace TL return "Messages_UploadMedia"; }); - ///See + /// Notify the other user in a private chat that a screenshot of the chat was taken
See
+ /// Other user + /// ID of message that was screenshotted, can be 0 + /// Random ID to avoid message resending public static Task Messages_SendScreenshotNotification(this Client client, InputPeer peer, int reply_to_msg_id, long random_id) => client.CallAsync(writer => { @@ -9285,7 +14916,9 @@ namespace TL return "Messages_SendScreenshotNotification"; }); - ///See + /// Get faved stickers
See
+ /// Hash for pagination, for more info click here + /// a null value means messages.favedStickersNotModified public static Task Messages_GetFavedStickers(this Client client, long hash) => client.CallAsync(writer => { @@ -9294,7 +14927,9 @@ namespace TL return "Messages_GetFavedStickers"; }); - ///See + /// Mark a sticker as favorite
See
+ /// Sticker to mark as favorite + /// Unfavorite public static Task Messages_FaveSticker(this Client client, InputDocument id, bool unfave) => client.CallAsync(writer => { @@ -9304,7 +14939,13 @@ namespace TL return "Messages_FaveSticker"; }); - ///See + /// Get unread messages where we were mentioned
See
+ /// Peer where to look for mentions + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Maximum number of results to return, see pagination + /// Maximum message ID to return, see pagination + /// Minimum message ID to return, see pagination public static Task Messages_GetUnreadMentions(this Client client, InputPeer peer, int offset_id, int add_offset, int limit, int max_id, int min_id) => client.CallAsync(writer => { @@ -9318,7 +14959,8 @@ namespace TL return "Messages_GetUnreadMentions"; }); - ///See + /// Mark mentions as read
See
+ /// Dialog public static Task Messages_ReadMentions(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -9327,7 +14969,10 @@ namespace TL return "Messages_ReadMentions"; }); - ///See + /// Get live location history of a certain user
See
+ /// User + /// Maximum number of results to return, see pagination + /// Hash for pagination, for more info click here public static Task Messages_GetRecentLocations(this Client client, InputPeer peer, int limit, long hash) => client.CallAsync(writer => { @@ -9338,7 +14983,14 @@ namespace TL return "Messages_GetRecentLocations"; }); - ///See + /// Send an album or grouped media
See
+ /// Whether to send the album silently (no notification triggered) + /// Send in background? + /// Whether to clear drafts + /// The destination chat + /// The message to reply to + /// The medias to send + /// Scheduled message date for scheduled messages public static Task Messages_SendMultiMedia(this Client client, 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) => client.CallAsync(writer => { @@ -9353,7 +15005,10 @@ namespace TL return "Messages_SendMultiMedia"; }); - ///See + /// Upload encrypted file and associate it to a secret chat
See
+ /// The secret chat to associate the file to + /// The file + /// a null value means encryptedFileEmpty public static Task Messages_UploadEncryptedFile(this Client client, InputEncryptedChat peer, InputEncryptedFileBase file) => client.CallAsync(writer => { @@ -9363,7 +15018,11 @@ namespace TL return "Messages_UploadEncryptedFile"; }); - ///See + /// Search for stickersets
See
+ /// Exclude featured stickersets from results + /// Query string + /// Hash for pagination, for more info click here + /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchStickerSets(this Client client, string q, long hash, bool exclude_featured = false) => client.CallAsync(writer => { @@ -9374,7 +15033,7 @@ namespace TL return "Messages_SearchStickerSets"; }); - ///See + /// Get message ranges for saving the user's chat history
See
public static Task Messages_GetSplitRanges(this Client client) => client.CallAsync(writer => { @@ -9382,7 +15041,9 @@ namespace TL return "Messages_GetSplitRanges"; }); - ///See + /// Manually mark dialog as unread
See
+ /// Mark as unread/read + /// Dialog public static Task Messages_MarkDialogUnread(this Client client, InputDialogPeerBase peer, bool unread = false) => client.CallAsync(writer => { @@ -9392,7 +15053,7 @@ namespace TL return "Messages_MarkDialogUnread"; }); - ///See + /// Get dialogs manually marked as unread
See
public static Task Messages_GetDialogUnreadMarks(this Client client) => client.CallAsync(writer => { @@ -9400,7 +15061,7 @@ namespace TL return "Messages_GetDialogUnreadMarks"; }); - ///See + /// Clear all drafts.
See
public static Task Messages_ClearAllDrafts(this Client client) => client.CallAsync(writer => { @@ -9408,7 +15069,12 @@ namespace TL return "Messages_ClearAllDrafts"; }); - ///See + /// Pin a message
See
+ /// Pin the message silently, without triggering a notification + /// Whether the message should unpinned or pinned + /// Whether the message should only be pinned on the local side of a one-to-one chat + /// The peer where to pin the message + /// The message to pin or unpin public static Task Messages_UpdatePinnedMessage(this Client client, InputPeer peer, int id, bool silent = false, bool unpin = false, bool pm_oneside = false) => client.CallAsync(writer => { @@ -9419,7 +15085,10 @@ namespace TL return "Messages_UpdatePinnedMessage"; }); - ///See + /// Vote in a
See
+ /// The chat where the poll was sent + /// The message ID of the poll + /// The options that were chosen public static Task Messages_SendVote(this Client client, InputPeer peer, int msg_id, byte[][] options) => client.CallAsync(writer => { @@ -9430,7 +15099,9 @@ namespace TL return "Messages_SendVote"; }); - ///See + /// Get poll results
See
+ /// Peer where the poll was found + /// Message ID of poll message public static Task Messages_GetPollResults(this Client client, InputPeer peer, int msg_id) => client.CallAsync(writer => { @@ -9440,7 +15111,8 @@ namespace TL return "Messages_GetPollResults"; }); - ///See + /// Get count of online users in a chat
See
+ /// The chat public static Task Messages_GetOnlines(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -9449,7 +15121,9 @@ namespace TL return "Messages_GetOnlines"; }); - ///See + /// Edit the description of a group/supergroup/channel.
See
+ /// The group/supergroup/channel. + /// The new description public static Task Messages_EditChatAbout(this Client client, InputPeer peer, string about) => client.CallAsync(writer => { @@ -9459,7 +15133,9 @@ namespace TL return "Messages_EditChatAbout"; }); - ///See + /// Edit the default banned rights of a channel/supergroup/group.
See
+ /// The peer + /// The new global rights public static Task Messages_EditChatDefaultBannedRights(this Client client, InputPeer peer, ChatBannedRights banned_rights) => client.CallAsync(writer => { @@ -9469,7 +15145,8 @@ namespace TL return "Messages_EditChatDefaultBannedRights"; }); - ///See + /// Get localized emoji keywords
See
+ /// Language code public static Task Messages_GetEmojiKeywords(this Client client, string lang_code) => client.CallAsync(writer => { @@ -9478,7 +15155,9 @@ namespace TL return "Messages_GetEmojiKeywords"; }); - ///See + /// Get changed emoji keywords
See
+ /// Language code + /// Previous emoji keyword localization version public static Task Messages_GetEmojiKeywordsDifference(this Client client, string lang_code, int from_version) => client.CallAsync(writer => { @@ -9488,7 +15167,8 @@ namespace TL return "Messages_GetEmojiKeywordsDifference"; }); - ///See + /// Get info about an emoji keyword localization
See
+ /// Language codes public static Task Messages_GetEmojiKeywordsLanguages(this Client client, string[] lang_codes) => client.CallAsync(writer => { @@ -9497,7 +15177,8 @@ namespace TL return "Messages_GetEmojiKeywordsLanguages"; }); - ///See + /// Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation
See
+ /// Language code for which the emoji replacements will be suggested public static Task Messages_GetEmojiURL(this Client client, string lang_code) => client.CallAsync(writer => { @@ -9506,7 +15187,9 @@ namespace TL return "Messages_GetEmojiURL"; }); - ///See + /// Get the number of results that would be found by a messages.search call with the same parameters
See
+ /// Peer where to search + /// Search filters public static Task Messages_GetSearchCounters(this Client client, InputPeer peer, MessagesFilter[] filters) => client.CallAsync(writer => { @@ -9516,7 +15199,11 @@ namespace TL return "Messages_GetSearchCounters"; }); - ///See + /// Get more info about a Seamless Telegram Login authorization request, for more info click here »
See
+ /// Peer where the message is located + /// The message + /// The ID of the button with the authorization request + /// URL used for link URL authorization, click here for more info » public static Task Messages_RequestUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) => client.CallAsync(writer => { @@ -9533,7 +15220,12 @@ namespace TL return "Messages_RequestUrlAuth"; }); - ///See + /// Use this to accept a Seamless Telegram Login authorization request, for more info click here »
See
+ /// Set this flag to allow the bot to send messages to you (if requested) + /// The location of the message + /// Message ID of the message with the login button + /// ID of the login button + /// URL used for link URL authorization, click here for more info » public static Task Messages_AcceptUrlAuth(this Client client, bool write_allowed = false, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) => client.CallAsync(writer => { @@ -9550,7 +15242,8 @@ namespace TL return "Messages_AcceptUrlAuth"; }); - ///See + /// Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the .
See
+ /// Peer public static Task Messages_HidePeerSettingsBar(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -9559,7 +15252,9 @@ namespace TL return "Messages_HidePeerSettingsBar"; }); - ///See + /// Get scheduled messages
See
+ /// Peer + /// Hash for pagination, for more info click here public static Task Messages_GetScheduledHistory(this Client client, InputPeer peer, long hash) => client.CallAsync(writer => { @@ -9569,7 +15264,9 @@ namespace TL return "Messages_GetScheduledHistory"; }); - ///See + /// Get scheduled messages
See
+ /// Peer + /// IDs of scheduled messages public static Task Messages_GetScheduledMessages(this Client client, InputPeer peer, int[] id) => client.CallAsync(writer => { @@ -9579,7 +15276,9 @@ namespace TL return "Messages_GetScheduledMessages"; }); - ///See + /// Send scheduled messages right away
See
+ /// Peer + /// Scheduled message IDs public static Task Messages_SendScheduledMessages(this Client client, InputPeer peer, int[] id) => client.CallAsync(writer => { @@ -9589,7 +15288,9 @@ namespace TL return "Messages_SendScheduledMessages"; }); - ///See + /// Delete scheduled messages
See
+ /// Peer + /// Scheduled message IDs public static Task Messages_DeleteScheduledMessages(this Client client, InputPeer peer, int[] id) => client.CallAsync(writer => { @@ -9599,7 +15300,12 @@ namespace TL return "Messages_DeleteScheduledMessages"; }); - ///See + /// Get poll results for non-anonymous polls
See
+ /// Chat where the poll was sent + /// Message ID + /// Get only results for the specified poll option + /// Offset for results, taken from the next_offset field of , initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in if it is empty, to avoid an infinite loop. + /// Number of results to return public static Task Messages_GetPollVotes(this Client client, InputPeer peer, int id, int limit, byte[] option = null, string offset = null) => client.CallAsync(writer => { @@ -9615,7 +15321,11 @@ namespace TL return "Messages_GetPollVotes"; }); - ///
See + /// Apply changes to multiple stickersets
See
+ /// Uninstall the specified stickersets + /// Archive the specified stickersets + /// Unarchive the specified stickersets + /// Stickersets to act upon public static Task Messages_ToggleStickerSets(this Client client, InputStickerSet[] stickersets, bool uninstall = false, bool archive = false, bool unarchive = false) => client.CallAsync(writer => { @@ -9625,7 +15335,7 @@ namespace TL return "Messages_ToggleStickerSets"; }); - ///See + /// Get folders
See
public static Task Messages_GetDialogFilters(this Client client) => client.CallAsync(writer => { @@ -9633,7 +15343,7 @@ namespace TL return "Messages_GetDialogFilters"; }); - ///See + /// Get suggested folders
See
public static Task Messages_GetSuggestedDialogFilters(this Client client) => client.CallAsync(writer => { @@ -9641,7 +15351,9 @@ namespace TL return "Messages_GetSuggestedDialogFilters"; }); - ///See + /// Update folder
See
+ /// Folder ID + /// Folder info public static Task Messages_UpdateDialogFilter(this Client client, int id, DialogFilter filter = null) => client.CallAsync(writer => { @@ -9653,7 +15365,8 @@ namespace TL return "Messages_UpdateDialogFilter"; }); - ///See + /// Reorder folders
See
+ /// New folder order public static Task Messages_UpdateDialogFiltersOrder(this Client client, int[] order) => client.CallAsync(writer => { @@ -9662,7 +15375,10 @@ namespace TL return "Messages_UpdateDialogFiltersOrder"; }); - ///See + /// Method for fetching previously featured stickers
See
+ /// Offset + /// Maximum number of results to return, see pagination + /// Hash for pagination, for more info click here public static Task Messages_GetOldFeaturedStickers(this Client client, int offset, int limit, long hash) => client.CallAsync(writer => { @@ -9673,7 +15389,16 @@ namespace TL return "Messages_GetOldFeaturedStickers"; }); - ///See + /// Get messages in a reply thread
See
+ /// Peer + /// Message ID + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Maximum number of results to return, see pagination + /// If a positive value was transferred, the method will return only messages with ID smaller than max_id + /// If a positive value was transferred, the method will return only messages with ID bigger than min_id + /// Hash for pagination, for more info click here public static Task Messages_GetReplies(this Client client, InputPeer peer, int msg_id, int offset_id, DateTime offset_date, int add_offset, int limit, int max_id, int min_id, long hash) => client.CallAsync(writer => { @@ -9690,7 +15415,9 @@ namespace TL return "Messages_GetReplies"; }); - ///See + /// Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group
See
+ /// Channel ID + /// Message ID public static Task Messages_GetDiscussionMessage(this Client client, InputPeer peer, int msg_id) => client.CallAsync(writer => { @@ -9700,7 +15427,10 @@ namespace TL return "Messages_GetDiscussionMessage"; }); - ///See + /// Mark a thread as read
See
+ /// Group ID + /// ID of message that started the thread + /// ID up to which thread messages were read public static Task Messages_ReadDiscussion(this Client client, InputPeer peer, int msg_id, int read_max_id) => client.CallAsync(writer => { @@ -9711,7 +15441,8 @@ namespace TL return "Messages_ReadDiscussion"; }); - ///See + /// Unpin all pinned messages
See
+ /// Chat where to unpin public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -9720,7 +15451,8 @@ namespace TL return "Messages_UnpinAllMessages"; }); - ///See + /// Delete a chat
See
+ /// Chat ID public static Task Messages_DeleteChat(this Client client, long chat_id) => client.CallAsync(writer => { @@ -9729,7 +15461,8 @@ namespace TL return "Messages_DeleteChat"; }); - ///See + /// Delete the entire phone call history.
See
+ /// Whether to remove phone call history for participants as well public static Task Messages_DeletePhoneCallHistory(this Client client, bool revoke = false) => client.CallAsync(writer => { @@ -9738,7 +15471,8 @@ namespace TL return "Messages_DeletePhoneCallHistory"; }); - ///See + /// Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».
See
+ /// Beginning of the message file; up to 100 lines. public static Task Messages_CheckHistoryImport(this Client client, string import_head) => client.CallAsync(writer => { @@ -9747,7 +15481,10 @@ namespace TL return "Messages_CheckHistoryImport"; }); - ///See + /// Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».
See
+ /// The Telegram chat where the history should be imported. + /// File with messages to import. + /// Number of media files associated with the chat that will be uploaded using messages.uploadImportedMedia. public static Task Messages_InitHistoryImport(this Client client, InputPeer peer, InputFileBase file, int media_count) => client.CallAsync(writer => { @@ -9758,7 +15495,12 @@ namespace TL return "Messages_InitHistoryImport"; }); - ///See + /// Upload a media file associated with an imported chat, click here for more info ».
See
+ /// The Telegram chat where the media will be imported + /// Identifier of a history import session, returned by messages.initHistoryImport + /// File name + /// Media metadata + /// a null value means messageMediaEmpty public static Task Messages_UploadImportedMedia(this Client client, InputPeer peer, long import_id, string file_name, InputMedia media) => client.CallAsync(writer => { @@ -9770,7 +15512,9 @@ namespace TL return "Messages_UploadImportedMedia"; }); - ///See + /// Complete the history import process, importing all messages into the chat.
To be called only after initializing the import with messages.initHistoryImport and uploading all files using messages.uploadImportedMedia.
See
+ /// The Telegram chat where the messages should be imported, click here for more info » + /// Identifier of a history import session, returned by messages.initHistoryImport. public static Task Messages_StartHistoryImport(this Client client, InputPeer peer, long import_id) => client.CallAsync(writer => { @@ -9780,7 +15524,13 @@ namespace TL return "Messages_StartHistoryImport"; }); - ///See + /// Get info about the chat invites of a specific chat
See
+ /// Whether to fetch revoked chat invites + /// Chat + /// Whether to only fetch chat invites from this admin + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Maximum number of results to return, see pagination public static Task Messages_GetExportedChatInvites(this Client client, InputPeer peer, InputUserBase admin_id, int limit, bool revoked = false, DateTime? offset_date = null, string offset_link = null) => client.CallAsync(writer => { @@ -9796,7 +15546,9 @@ namespace TL return "Messages_GetExportedChatInvites"; }); - ///See + /// Get info about a chat invite
See
+ /// Chat + /// Invite link public static Task Messages_GetExportedChatInvite(this Client client, InputPeer peer, string link) => client.CallAsync(writer => { @@ -9806,7 +15558,12 @@ namespace TL return "Messages_GetExportedChatInvite"; }); - ///See + /// Edit an exported chat invite
See
+ /// Whether to revoke the chat invite + /// Chat + /// Invite link + /// New expiration date + /// Maximum number of users that can join using this link public static Task Messages_EditExportedChatInvite(this Client client, InputPeer peer, string link, bool revoked = false, DateTime? expire_date = null, int? usage_limit = null, bool? request_needed = default, string title = null) => client.CallAsync(writer => { @@ -9825,7 +15582,9 @@ namespace TL return "Messages_EditExportedChatInvite"; }); - ///See + /// Delete all revoked chat invites
See
+ /// Chat + /// ID of the admin that originally generated the revoked chat invites public static Task Messages_DeleteRevokedExportedChatInvites(this Client client, InputPeer peer, InputUserBase admin_id) => client.CallAsync(writer => { @@ -9835,7 +15594,9 @@ namespace TL return "Messages_DeleteRevokedExportedChatInvites"; }); - ///See + /// Delete a chat invite
See
+ /// Peer + /// Invite link public static Task Messages_DeleteExportedChatInvite(this Client client, InputPeer peer, string link) => client.CallAsync(writer => { @@ -9845,7 +15606,8 @@ namespace TL return "Messages_DeleteExportedChatInvite"; }); - ///See + /// Get info about chat invites generated by admins.
See
+ /// Chat public static Task Messages_GetAdminsWithInvites(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -9854,7 +15616,12 @@ namespace TL return "Messages_GetAdminsWithInvites"; }); - ///See + /// Get info about the users that joined the chat using a specific chat invite
See
+ /// Chat + /// Invite link + /// Offsets for pagination, for more info click here + /// User ID for pagination + /// Maximum number of results to return, see pagination public static Task Messages_GetChatInviteImporters(this Client client, InputPeer peer, DateTime offset_date, InputUserBase offset_user, int limit, bool requested = false, string link = null, string q = null) => client.CallAsync(writer => { @@ -9871,7 +15638,9 @@ namespace TL return "Messages_GetChatInviteImporters"; }); - ///See + /// Set maximum Time-To-Live of all messages in the specified chat
See
+ /// The dialog + /// Automatically delete all messages sent in the chat after this many seconds public static Task Messages_SetHistoryTTL(this Client client, InputPeer peer, int period) => client.CallAsync(writer => { @@ -9881,7 +15650,8 @@ namespace TL return "Messages_SetHistoryTTL"; }); - ///See + /// Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ».
See
+ /// The chat where we want to import history ». public static Task Messages_CheckHistoryImportPeer(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -9890,7 +15660,9 @@ namespace TL return "Messages_CheckHistoryImportPeer"; }); - ///See + /// Change the chat theme of a certain chat
See
+ /// Private chat where to change theme + /// Emoji, identifying a specific chat theme; a list of chat themes can be fetched using account.getChatThemes public static Task Messages_SetChatTheme(this Client client, InputPeer peer, string emoticon) => client.CallAsync(writer => { @@ -9900,7 +15672,9 @@ namespace TL return "Messages_SetChatTheme"; }); - ///See + /// Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».
See
+ /// Dialog + /// Message ID public static Task Messages_GetMessageReadParticipants(this Client client, InputPeer peer, int msg_id) => client.CallAsync(writer => { @@ -9910,7 +15684,7 @@ namespace TL return "Messages_GetMessageReadParticipants"; }); - ///See + ///
See
public static Task Messages_GetSearchResultsCalendar(this Client client, InputPeer peer, MessagesFilter filter, int offset_id, DateTime offset_date) => client.CallAsync(writer => { @@ -9922,7 +15696,7 @@ namespace TL return "Messages_GetSearchResultsCalendar"; }); - ///See + ///
See
public static Task Messages_GetSearchResultsPositions(this Client client, InputPeer peer, MessagesFilter filter, int offset_id, int limit) => client.CallAsync(writer => { @@ -9934,7 +15708,7 @@ namespace TL return "Messages_GetSearchResultsPositions"; }); - ///See + ///
See
public static Task Messages_HideChatJoinRequest(this Client client, InputPeer peer, InputUserBase user_id, bool approved = false) => client.CallAsync(writer => { @@ -9945,7 +15719,7 @@ namespace TL return "Messages_HideChatJoinRequest"; }); - ///See + /// Returns a current state of updates.
See
public static Task Updates_GetState(this Client client) => client.CallAsync(writer => { @@ -9953,7 +15727,11 @@ namespace TL return "Updates_GetState"; }); - ///See + /// Get new updates.
See
+ /// PTS, see updates. + /// For fast updating: if provided and pts + pts_total_limit < remote pts, will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000 + /// date, see updates. + /// QTS, see updates. public static Task Updates_GetDifference(this Client client, int pts, DateTime date, int qts, int? pts_total_limit = null) => client.CallAsync(writer => { @@ -9967,7 +15745,12 @@ namespace TL return "Updates_GetDifference"; }); - ///See + /// Returns the difference between the current state of updates of a certain channel and transmitted.
See
+ /// Set to true to skip some possibly unneeded updates and reduce server-side load + /// The channel + /// Messsage filter + /// Persistent timestamp (see updates) + /// How many updates to fetch, max 100000
Ordinary (non-bot) users are supposed to pass 10-100 public static Task Updates_GetChannelDifference(this Client client, InputChannelBase channel, ChannelMessagesFilter filter, int pts, int limit, bool force = false) => client.CallAsync(writer => { @@ -9980,7 +15763,8 @@ namespace TL return "Updates_GetChannelDifference"; }); - ///See + /// Installs a previously uploaded photo as a profile photo.
See
+ /// Input photo public static Task Photos_UpdateProfilePhoto(this Client client, InputPhoto id) => client.CallAsync(writer => { @@ -9989,7 +15773,10 @@ namespace TL return "Photos_UpdateProfilePhoto"; }); - ///See + /// Updates current user profile photo.
See
+ /// File saved in parts by means of upload.saveFilePart method + /// Animated profile picture video + /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview. public static Task Photos_UploadProfilePhoto(this Client client, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null) => client.CallAsync(writer => { @@ -10004,7 +15791,8 @@ namespace TL return "Photos_UploadProfilePhoto"; }); - ///See + /// Deletes profile photos.
See
+ /// Input photos to delete public static Task Photos_DeletePhotos(this Client client, InputPhoto[] id) => client.CallAsync(writer => { @@ -10013,7 +15801,11 @@ namespace TL return "Photos_DeletePhotos"; }); - ///See + /// Returns the list of user photos.
See
+ /// User ID + /// Number of list elements to be skipped + /// If a positive value was transferred, the method will return only photos with IDs less than the set one + /// Number of list elements to be returned public static Task Photos_GetUserPhotos(this Client client, InputUserBase user_id, int offset, long max_id, int limit) => client.CallAsync(writer => { @@ -10025,7 +15817,10 @@ namespace TL return "Photos_GetUserPhotos"; }); - ///See + /// Saves a part of file for futher sending to one of the methods.
See
+ /// Random file identifier created by the client + /// Numerical order of a part + /// Binary data, contend of a part public static Task Upload_SaveFilePart(this Client client, long file_id, int file_part, byte[] bytes) => client.CallAsync(writer => { @@ -10036,7 +15831,12 @@ namespace TL return "Upload_SaveFilePart"; }); - ///See + /// Returns content of a whole file or its part.
See
+ /// Disable some checks on limit and offset values, useful for example to stream videos by keyframes + /// Whether the current client supports CDN downloads + /// File location + /// Number of bytes to be skipped + /// Number of bytes to be returned public static Task Upload_GetFile(this Client client, InputFileLocationBase location, int offset, int limit, bool precise = false, bool cdn_supported = false) => client.CallAsync(writer => { @@ -10048,7 +15848,11 @@ namespace TL return "Upload_GetFile"; }); - ///See + /// Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.
See
+ /// Random file id, created by the client + /// Part sequence number + /// Total number of parts + /// Binary data, part contents public static Task Upload_SaveBigFilePart(this Client client, long file_id, int file_part, int file_total_parts, byte[] bytes) => client.CallAsync(writer => { @@ -10060,7 +15864,10 @@ namespace TL return "Upload_SaveBigFilePart"; }); - ///See + ///
See
+ /// The file to download + /// Number of bytes to be skipped + /// Number of bytes to be returned public static Task Upload_GetWebFile(this Client client, InputWebFileLocationBase location, int offset, int limit) => client.CallAsync(writer => { @@ -10071,7 +15878,10 @@ namespace TL return "Upload_GetWebFile"; }); - ///See + /// Download a CDN file.
See
+ /// File token + /// Offset of chunk to download + /// Length of chunk to download public static Task Upload_GetCdnFile(this Client client, byte[] file_token, int offset, int limit) => client.CallAsync(writer => { @@ -10082,7 +15892,9 @@ namespace TL return "Upload_GetCdnFile"; }); - ///See + /// Request a reupload of a certain file to a CDN DC.
See
+ /// File token + /// Request token public static Task Upload_ReuploadCdnFile(this Client client, byte[] file_token, byte[] request_token) => client.CallAsync(writer => { @@ -10092,7 +15904,9 @@ namespace TL return "Upload_ReuploadCdnFile"; }); - ///See + /// Get SHA256 hashes for verifying downloaded CDN files
See
+ /// File + /// Offset from which to start getting hashes public static Task Upload_GetCdnFileHashes(this Client client, byte[] file_token, int offset) => client.CallAsync(writer => { @@ -10102,7 +15916,9 @@ namespace TL return "Upload_GetCdnFileHashes"; }); - ///See + /// Get SHA256 hashes for verifying downloaded files
See
+ /// File + /// Offset from which to get file hashes public static Task Upload_GetFileHashes(this Client client, InputFileLocationBase location, int offset) => client.CallAsync(writer => { @@ -10112,7 +15928,7 @@ namespace TL return "Upload_GetFileHashes"; }); - ///See + /// Returns current configuration, including data center configuration.
See
public static Task Help_GetConfig(this Client client) => client.CallAsync(Help_GetConfig); public static string Help_GetConfig(BinaryWriter writer) { @@ -10120,7 +15936,7 @@ namespace TL return "Help_GetConfig"; } - ///See + /// Returns info on data centre nearest to the user.
See
public static Task Help_GetNearestDc(this Client client) => client.CallAsync(writer => { @@ -10128,7 +15944,9 @@ namespace TL return "Help_GetNearestDc"; }); - ///See + /// Returns information on update availability for the current application.
See
+ /// Source + /// a null value means help.noAppUpdate public static Task Help_GetAppUpdate(this Client client, string source) => client.CallAsync(writer => { @@ -10137,7 +15955,7 @@ namespace TL return "Help_GetAppUpdate"; }); - ///See + /// Returns localized text of a text message with an invitation.
See
public static Task Help_GetInviteText(this Client client) => client.CallAsync(writer => { @@ -10145,7 +15963,7 @@ namespace TL return "Help_GetInviteText"; }); - ///See + /// Returns the support user for the 'ask a question' feature.
See
public static Task Help_GetSupport(this Client client) => client.CallAsync(writer => { @@ -10153,7 +15971,8 @@ namespace TL return "Help_GetSupport"; }); - ///See + /// Get changelog of current app.
Typically, an constructor will be returned, containing one or more updates with app-specific changelogs.
See
+ /// Previous app version public static Task Help_GetAppChangelog(this Client client, string prev_app_version) => client.CallAsync(writer => { @@ -10162,7 +15981,9 @@ namespace TL return "Help_GetAppChangelog"; }); - ///See + /// Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only
See
+ /// Number of pending updates + /// Error message, if present public static Task Help_SetBotUpdatesStatus(this Client client, int pending_updates_count, string message) => client.CallAsync(writer => { @@ -10172,7 +15993,7 @@ namespace TL return "Help_SetBotUpdatesStatus"; }); - ///See + /// Get configuration for CDN file downloads.
See
public static Task Help_GetCdnConfig(this Client client) => client.CallAsync(writer => { @@ -10180,7 +16001,8 @@ namespace TL return "Help_GetCdnConfig"; }); - ///See + /// Get recently used t.me links
See
+ /// Referer public static Task Help_GetRecentMeUrls(this Client client, string referer) => client.CallAsync(writer => { @@ -10189,7 +16011,7 @@ namespace TL return "Help_GetRecentMeUrls"; }); - ///See + /// Look for updates of telegram's terms of service
See
public static Task Help_GetTermsOfServiceUpdate(this Client client) => client.CallAsync(writer => { @@ -10197,7 +16019,8 @@ namespace TL return "Help_GetTermsOfServiceUpdate"; }); - ///See + /// Accept the new terms of service
See
+ /// ID of terms of service public static Task Help_AcceptTermsOfService(this Client client, DataJSON id) => client.CallAsync(writer => { @@ -10206,7 +16029,9 @@ namespace TL return "Help_AcceptTermsOfService"; }); - ///See + /// Get info about a t.me link
See
+ /// Path in t.me/path + /// a null value means help.deepLinkInfoEmpty public static Task Help_GetDeepLinkInfo(this Client client, string path) => client.CallAsync(writer => { @@ -10215,7 +16040,7 @@ namespace TL return "Help_GetDeepLinkInfo"; }); - ///See + /// Get app-specific configuration, see client configuration for more info on the result.
See
public static Task Help_GetAppConfig(this Client client) => client.CallAsync(writer => { @@ -10223,7 +16048,8 @@ namespace TL return "Help_GetAppConfig"; }); - ///See + /// Saves logs of application on the server.
See
+ /// List of input events public static Task Help_SaveAppLog(this Client client, InputAppEvent[] events) => client.CallAsync(writer => { @@ -10232,7 +16058,9 @@ namespace TL return "Help_SaveAppLog"; }); - ///See + /// Get passport configuration
See
+ /// Hash for pagination, for more info click here + /// a null value means help.passportConfigNotModified public static Task Help_GetPassportConfig(this Client client, int hash) => client.CallAsync(writer => { @@ -10241,7 +16069,7 @@ namespace TL return "Help_GetPassportConfig"; }); - ///See + /// Get localized name of the telegram support user
See
public static Task Help_GetSupportName(this Client client) => client.CallAsync(writer => { @@ -10249,7 +16077,9 @@ namespace TL return "Help_GetSupportName"; }); - ///See + /// Internal use
See
+ /// User ID + /// a null value means help.userInfoEmpty public static Task Help_GetUserInfo(this Client client, InputUserBase user_id) => client.CallAsync(writer => { @@ -10258,7 +16088,11 @@ namespace TL return "Help_GetUserInfo"; }); - ///See + /// Internal use
See
+ /// User + /// Message + /// Message entities for styled text + /// a null value means help.userInfoEmpty public static Task Help_EditUserInfo(this Client client, InputUserBase user_id, string message, MessageEntity[] entities) => client.CallAsync(writer => { @@ -10269,7 +16103,7 @@ namespace TL return "Help_EditUserInfo"; }); - ///See + /// Get MTProxy/Public Service Announcement information
See
public static Task Help_GetPromoData(this Client client) => client.CallAsync(writer => { @@ -10277,7 +16111,8 @@ namespace TL return "Help_GetPromoData"; }); - ///See + /// Hide MTProxy/Public Service Announcement information
See
+ /// Peer to hide public static Task Help_HidePromoData(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -10286,7 +16121,9 @@ namespace TL return "Help_HidePromoData"; }); - ///See + /// Dismiss a suggestion, see here for more info ».
See
+ /// In the case of pending suggestions in , the channel ID. + /// Suggestion, see here for more info ». public static Task Help_DismissSuggestion(this Client client, InputPeer peer, string suggestion) => client.CallAsync(writer => { @@ -10296,7 +16133,10 @@ namespace TL return "Help_DismissSuggestion"; }); - ///See + /// Get name, ISO code, localized name and phone codes/patterns of all available countries
See
+ /// Language code of the current user + /// Hash for pagination, for more info click here + /// a null value means help.countriesListNotModified public static Task Help_GetCountriesList(this Client client, string lang_code, int hash) => client.CallAsync(writer => { @@ -10306,7 +16146,9 @@ namespace TL return "Help_GetCountriesList"; }); - ///See + /// Mark channel/supergroup history as read
See
+ /// Channel/supergroup + /// ID of message up to which messages should be marked as read public static Task Channels_ReadHistory(this Client client, InputChannelBase channel, int max_id) => client.CallAsync(writer => { @@ -10316,7 +16158,9 @@ namespace TL return "Channels_ReadHistory"; }); - ///See + /// Delete messages in a channel/supergroup
See
+ /// Channel/supergroup + /// IDs of messages to delete public static Task Channels_DeleteMessages(this Client client, InputChannelBase channel, int[] id) => client.CallAsync(writer => { @@ -10326,7 +16170,9 @@ namespace TL return "Channels_DeleteMessages"; }); - ///See + /// Delete all messages sent by a certain user in a supergroup
See
+ /// Supergroup + /// User whose messages should be deleted public static Task Channels_DeleteUserHistory(this Client client, InputChannelBase channel, InputUserBase user_id) => client.CallAsync(writer => { @@ -10336,7 +16182,10 @@ namespace TL return "Channels_DeleteUserHistory"; }); - ///See + /// Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup
See
+ /// Supergroup + /// ID of the user that sent the spam messages + /// IDs of spam messages public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputUserBase user_id, int[] id) => client.CallAsync(writer => { @@ -10347,7 +16196,9 @@ namespace TL return "Channels_ReportSpam"; }); - ///See + /// Get channel/supergroup messages
See
+ /// Channel/supergroup + /// IDs of messages to get public static Task Channels_GetMessages(this Client client, InputChannelBase channel, InputMessage[] id) => client.CallAsync(writer => { @@ -10357,7 +16208,13 @@ namespace TL return "Channels_GetMessages"; }); - ///See + /// Get the participants of a supergroup/channel
See
+ /// Channel + /// Which participant types to fetch + /// Offset + /// Limit + /// Hash + /// a null value means channels.channelParticipantsNotModified public static Task Channels_GetParticipants(this Client client, InputChannelBase channel, ChannelParticipantsFilter filter, int offset, int limit, long hash) => client.CallAsync(writer => { @@ -10370,7 +16227,9 @@ namespace TL return "Channels_GetParticipants"; }); - ///See + /// Get info about a channel/supergroup participant
See
+ /// Channel/supergroup + /// Participant to get info about public static Task Channels_GetParticipant(this Client client, InputChannelBase channel, InputPeer participant) => client.CallAsync(writer => { @@ -10380,7 +16239,8 @@ namespace TL return "Channels_GetParticipant"; }); - ///See + /// Get info about channels/supergroups
See
+ /// IDs of channels/supergroups to get info about public static Task Channels_GetChannels(this Client client, InputChannelBase[] id) => client.CallAsync(writer => { @@ -10389,7 +16249,8 @@ namespace TL return "Channels_GetChannels"; }); - ///See + /// Get full info about a channel
See
+ /// The channel to get info about public static Task Channels_GetFullChannel(this Client client, InputChannelBase channel) => client.CallAsync(writer => { @@ -10398,7 +16259,14 @@ namespace TL return "Channels_GetFullChannel"; }); - ///See + /// Create a supergroup/channel.
See
+ /// Whether to create a channel + /// Whether to create a supergroup + /// Whether the supergroup is being created to import messages from a foreign chat service using messages.initHistoryImport + /// Channel title + /// Channel description + /// Geogroup location + /// Geogroup address public static Task Channels_CreateChannel(this Client client, string title, string about, bool broadcast = false, bool megagroup = false, bool for_import = false, InputGeoPoint geo_point = null, string address = null) => client.CallAsync(writer => { @@ -10413,7 +16281,11 @@ namespace TL return "Channels_CreateChannel"; }); - ///See + /// Modify the admin rights of a user in a supergroup/channel.
See
+ /// The supergroup/channel. + /// The ID of the user whose admin rights should be modified + /// The admin rights + /// Indicates the role (rank) of the admin in the group: just an arbitrary string public static Task Channels_EditAdmin(this Client client, InputChannelBase channel, InputUserBase user_id, ChatAdminRights admin_rights, string rank) => client.CallAsync(writer => { @@ -10425,7 +16297,9 @@ namespace TL return "Channels_EditAdmin"; }); - ///See + /// Edit the name of a channel/supergroup
See
+ /// Channel/supergroup + /// New name public static Task Channels_EditTitle(this Client client, InputChannelBase channel, string title) => client.CallAsync(writer => { @@ -10435,7 +16309,9 @@ namespace TL return "Channels_EditTitle"; }); - ///See + /// Change the photo of a channel/supergroup
See
+ /// Channel/supergroup whose photo should be edited + /// New photo public static Task Channels_EditPhoto(this Client client, InputChannelBase channel, InputChatPhotoBase photo) => client.CallAsync(writer => { @@ -10445,7 +16321,9 @@ namespace TL return "Channels_EditPhoto"; }); - ///See + /// Check if a username is free and can be assigned to a channel/supergroup
See
+ /// The channel/supergroup that will assigned the specified username + /// The username to check public static Task Channels_CheckUsername(this Client client, InputChannelBase channel, string username) => client.CallAsync(writer => { @@ -10455,7 +16333,9 @@ namespace TL return "Channels_CheckUsername"; }); - ///See + /// Change the username of a supergroup/channel
See
+ /// Channel + /// New username public static Task Channels_UpdateUsername(this Client client, InputChannelBase channel, string username) => client.CallAsync(writer => { @@ -10465,7 +16345,8 @@ namespace TL return "Channels_UpdateUsername"; }); - ///See + /// Join a channel/supergroup
See
+ /// Channel/supergroup to join public static Task Channels_JoinChannel(this Client client, InputChannelBase channel) => client.CallAsync(writer => { @@ -10474,7 +16355,8 @@ namespace TL return "Channels_JoinChannel"; }); - ///See + /// Leave a channel/supergroup
See
+ /// Channel/supergroup to leave public static Task Channels_LeaveChannel(this Client client, InputChannelBase channel) => client.CallAsync(writer => { @@ -10483,7 +16365,9 @@ namespace TL return "Channels_LeaveChannel"; }); - ///See + /// Invite users to a channel/supergroup
See
+ /// Channel/supergroup + /// Users to invite public static Task Channels_InviteToChannel(this Client client, InputChannelBase channel, InputUserBase[] users) => client.CallAsync(writer => { @@ -10493,7 +16377,8 @@ namespace TL return "Channels_InviteToChannel"; }); - ///See + /// Delete a channel/supergroup
See
+ /// Channel/supergroup to delete public static Task Channels_DeleteChannel(this Client client, InputChannelBase channel) => client.CallAsync(writer => { @@ -10502,7 +16387,11 @@ namespace TL return "Channels_DeleteChannel"; }); - ///See + /// Get link and embed info of a message in a channel/supergroup
See
+ /// Whether to include other grouped media (for albums) + /// Whether to also include a thread ID, if available, inside of the link + /// Channel + /// Message ID public static Task Channels_ExportMessageLink(this Client client, InputChannelBase channel, int id, bool grouped = false, bool thread = false) => client.CallAsync(writer => { @@ -10513,7 +16402,9 @@ namespace TL return "Channels_ExportMessageLink"; }); - ///See + /// Enable/disable message signatures in channels
See
+ /// Channel + /// Value public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool enabled) => client.CallAsync(writer => { @@ -10523,7 +16414,9 @@ namespace TL return "Channels_ToggleSignatures"; }); - ///See + /// Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups.
See
+ /// Get geogroups + /// If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in channels.checkUsername/channels.updateUsername. public static Task Channels_GetAdminedPublicChannels(this Client client, bool by_location = false, bool check_limit = false) => client.CallAsync(writer => { @@ -10532,7 +16425,10 @@ namespace TL return "Channels_GetAdminedPublicChannels"; }); - ///See + /// Ban/unban/kick a user in a supergroup/channel.
See
+ /// The supergroup/channel. + /// Participant to ban + /// The banned rights public static Task Channels_EditBanned(this Client client, InputChannelBase channel, InputPeer participant, ChatBannedRights banned_rights) => client.CallAsync(writer => { @@ -10543,7 +16439,14 @@ namespace TL return "Channels_EditBanned"; }); - ///See + /// Get the admin log of a channel/supergroup
See
+ /// Channel + /// Search query, can be empty + /// Event filter + /// Only show events from these admins + /// Maximum ID of message to return (see pagination) + /// Minimum ID of message to return (see pagination) + /// Maximum number of results to return, see pagination public static Task Channels_GetAdminLog(this Client client, InputChannelBase channel, string q, long max_id, long min_id, int limit, ChannelAdminLogEventsFilter events_filter = null, InputUserBase[] admins = null) => client.CallAsync(writer => { @@ -10561,7 +16464,9 @@ namespace TL return "Channels_GetAdminLog"; }); - ///See + /// Associate a stickerset to the supergroup
See
+ /// Supergroup + /// The stickerset to associate public static Task Channels_SetStickers(this Client client, InputChannelBase channel, InputStickerSet stickerset) => client.CallAsync(writer => { @@ -10571,7 +16476,9 @@ namespace TL return "Channels_SetStickers"; }); - ///See + /// Mark channel/supergroup message contents as read
See
+ /// Channel/supergroup + /// IDs of messages whose contents should be marked as read public static Task Channels_ReadMessageContents(this Client client, InputChannelBase channel, int[] id) => client.CallAsync(writer => { @@ -10581,7 +16488,9 @@ namespace TL return "Channels_ReadMessageContents"; }); - ///See + /// Delete the history of a supergroup
See
+ /// Supergroup whose history must be deleted + /// ID of message up to which the history must be deleted public static Task Channels_DeleteHistory(this Client client, InputChannelBase channel, int max_id) => client.CallAsync(writer => { @@ -10591,7 +16500,9 @@ namespace TL return "Channels_DeleteHistory"; }); - ///See + /// Hide/unhide message history for new channel/supergroup users
See
+ /// Channel/supergroup + /// Hide/unhide public static Task Channels_TogglePreHistoryHidden(this Client client, InputChannelBase channel, bool enabled) => client.CallAsync(writer => { @@ -10601,7 +16512,8 @@ namespace TL return "Channels_TogglePreHistoryHidden"; }); - ///See + /// Get a list of channels/supergroups we left
See
+ /// Offset for pagination public static Task Channels_GetLeftChannels(this Client client, int offset) => client.CallAsync(writer => { @@ -10610,7 +16522,7 @@ namespace TL return "Channels_GetLeftChannels"; }); - ///See + /// Get all groups that can be used as discussion groups.
See
public static Task Channels_GetGroupsForDiscussion(this Client client) => client.CallAsync(writer => { @@ -10618,7 +16530,9 @@ namespace TL return "Channels_GetGroupsForDiscussion"; }); - ///See + /// Associate a group to a channel as discussion group for that channel
See
+ /// Channel + /// Discussion group to associate to the channel public static Task Channels_SetDiscussionGroup(this Client client, InputChannelBase broadcast, InputChannelBase group) => client.CallAsync(writer => { @@ -10628,7 +16542,10 @@ namespace TL return "Channels_SetDiscussionGroup"; }); - ///See + /// Transfer channel ownership
See
+ /// Channel + /// New channel owner + /// 2FA password of account public static Task Channels_EditCreator(this Client client, InputChannelBase channel, InputUserBase user_id, InputCheckPasswordSRP password) => client.CallAsync(writer => { @@ -10639,7 +16556,10 @@ namespace TL return "Channels_EditCreator"; }); - ///See + /// Edit location of geogroup
See
+ /// Geogroup + /// New geolocation + /// Address string public static Task Channels_EditLocation(this Client client, InputChannelBase channel, InputGeoPoint geo_point, string address) => client.CallAsync(writer => { @@ -10650,7 +16570,9 @@ namespace TL return "Channels_EditLocation"; }); - ///See + /// Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds
See
+ /// The supergroup + /// Users will only be able to send one message every seconds seconds, 0 to disable the limitation public static Task Channels_ToggleSlowMode(this Client client, InputChannelBase channel, int seconds) => client.CallAsync(writer => { @@ -10660,7 +16582,7 @@ namespace TL return "Channels_ToggleSlowMode"; }); - ///See + /// Get inactive channels and supergroups
See
public static Task Channels_GetInactiveChannels(this Client client) => client.CallAsync(writer => { @@ -10668,7 +16590,7 @@ namespace TL return "Channels_GetInactiveChannels"; }); - ///See + ///
See
public static Task Channels_ConvertToGigagroup(this Client client, InputChannelBase channel) => client.CallAsync(writer => { @@ -10677,7 +16599,9 @@ namespace TL return "Channels_ConvertToGigagroup"; }); - ///See + /// Mark a specific sponsored message as read
See
+ /// Peer + /// Message ID public static Task Channels_ViewSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id) => client.CallAsync(writer => { @@ -10687,7 +16611,8 @@ namespace TL return "Channels_ViewSponsoredMessage"; }); - ///See + /// Get a list of sponsored messages
See
+ /// Peer public static Task Channels_GetSponsoredMessages(this Client client, InputChannelBase channel) => client.CallAsync(writer => { @@ -10696,7 +16621,9 @@ namespace TL return "Channels_GetSponsoredMessages"; }); - ///See + /// Sends a custom request; for bots only
See
+ /// The method name + /// JSON-serialized method parameters public static Task Bots_SendCustomRequest(this Client client, string custom_method, DataJSON params_) => client.CallAsync(writer => { @@ -10706,7 +16633,9 @@ namespace TL return "Bots_SendCustomRequest"; }); - ///See + /// Answers a custom query; for bots only
See
+ /// Identifier of a custom query + /// JSON-serialized answer to the query public static Task Bots_AnswerWebhookJSONQuery(this Client client, long query_id, DataJSON data) => client.CallAsync(writer => { @@ -10716,7 +16645,10 @@ namespace TL return "Bots_AnswerWebhookJSONQuery"; }); - ///See + /// Set bot command list
See
+ /// Command scope + /// Language code + /// Bot commands public static Task Bots_SetBotCommands(this Client client, BotCommandScope scope, string lang_code, BotCommand[] commands) => client.CallAsync(writer => { @@ -10727,7 +16659,9 @@ namespace TL return "Bots_SetBotCommands"; }); - ///See + /// Clear bot commands for the specified bot scope and language code
See
+ /// Command scope + /// Language code public static Task Bots_ResetBotCommands(this Client client, BotCommandScope scope, string lang_code) => client.CallAsync(writer => { @@ -10737,7 +16671,9 @@ namespace TL return "Bots_ResetBotCommands"; }); - ///See + /// Obtain a list of bot commands for the specified bot scope and language code
See
+ /// Command scope + /// Language code public static Task Bots_GetBotCommands(this Client client, BotCommandScope scope, string lang_code) => client.CallAsync(writer => { @@ -10747,7 +16683,10 @@ namespace TL return "Bots_GetBotCommands"; }); - ///See + /// Get a payment form
See
+ /// The peer where the payment form was sent + /// Message ID of payment form + /// A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color public static Task Payments_GetPaymentForm(this Client client, InputPeer peer, int msg_id, DataJSON theme_params = null) => client.CallAsync(writer => { @@ -10760,7 +16699,9 @@ namespace TL return "Payments_GetPaymentForm"; }); - ///
See + /// Get payment receipt
See
+ /// The peer where the payment receipt was sent + /// Message ID of receipt public static Task Payments_GetPaymentReceipt(this Client client, InputPeer peer, int msg_id) => client.CallAsync(writer => { @@ -10770,7 +16711,11 @@ namespace TL return "Payments_GetPaymentReceipt"; }); - ///See + /// Submit requested order information for validation
See
+ /// Save order information to re-use it for future orders + /// Peer where the payment form was sent + /// Message ID of payment form + /// Requested order information public static Task Payments_ValidateRequestedInfo(this Client client, InputPeer peer, int msg_id, PaymentRequestedInfo info, bool save = false) => client.CallAsync(writer => { @@ -10782,7 +16727,14 @@ namespace TL return "Payments_ValidateRequestedInfo"; }); - ///See + /// Send compiled payment form
See
+ /// Form ID + /// The peer where the payment form was sent + /// Message ID of form + /// ID of saved and validated + /// Chosen shipping option ID + /// Payment credentials + /// Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). public static Task Payments_SendPaymentForm(this Client client, long form_id, InputPeer peer, int msg_id, InputPaymentCredentialsBase credentials, string requested_info_id = null, string shipping_option_id = null, long? tip_amount = null) => client.CallAsync(writer => { @@ -10801,7 +16753,7 @@ namespace TL return "Payments_SendPaymentForm"; }); - ///See + /// Get saved payment information
See
public static Task Payments_GetSavedInfo(this Client client) => client.CallAsync(writer => { @@ -10809,7 +16761,9 @@ namespace TL return "Payments_GetSavedInfo"; }); - ///See + /// Clear saved payment information
See
+ /// Remove saved payment credentials + /// Clear the last order settings saved by the user public static Task Payments_ClearSavedInfo(this Client client, bool credentials = false, bool info = false) => client.CallAsync(writer => { @@ -10818,7 +16772,8 @@ namespace TL return "Payments_ClearSavedInfo"; }); - ///See + /// Get info about a credit card
See
+ /// Credit card number public static Task Payments_GetBankCardData(this Client client, string number) => client.CallAsync(writer => { @@ -10827,7 +16782,15 @@ namespace TL return "Payments_GetBankCardData"; }); - ///See + /// Create a stickerset, bots only.
See
+ /// Whether this is a mask stickerset + /// Whether this is an animated stickerset + /// Stickerset owner + /// Stickerset name, 1-64 chars + /// Sticker set name. Can contain only English letters, digits and underscores. Must end with "by" ( is case insensitive); 1-64 characters + /// Thumbnail + /// Stickers + /// Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers public static Task Stickers_CreateStickerSet(this Client client, InputUserBase user_id, string title, string short_name, InputStickerSetItem[] stickers, bool masks = false, bool animated = false, InputDocument thumb = null, string software = null) => client.CallAsync(writer => { @@ -10844,7 +16807,8 @@ namespace TL return "Stickers_CreateStickerSet"; }); - ///See + /// Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot.
See
+ /// The sticker to remove public static Task Stickers_RemoveStickerFromSet(this Client client, InputDocument sticker) => client.CallAsync(writer => { @@ -10853,7 +16817,9 @@ namespace TL return "Stickers_RemoveStickerFromSet"; }); - ///See + /// Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot
See
+ /// The sticker + /// The new position of the sticker, zero-based public static Task Stickers_ChangeStickerPosition(this Client client, InputDocument sticker, int position) => client.CallAsync(writer => { @@ -10863,7 +16829,9 @@ namespace TL return "Stickers_ChangeStickerPosition"; }); - ///See + /// Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot.
See
+ /// The stickerset + /// The sticker public static Task Stickers_AddStickerToSet(this Client client, InputStickerSet stickerset, InputStickerSetItem sticker) => client.CallAsync(writer => { @@ -10873,7 +16841,9 @@ namespace TL return "Stickers_AddStickerToSet"; }); - ///See + /// Set stickerset thumbnail
See
+ /// Stickerset + /// Thumbnail public static Task Stickers_SetStickerSetThumb(this Client client, InputStickerSet stickerset, InputDocument thumb) => client.CallAsync(writer => { @@ -10883,7 +16853,8 @@ namespace TL return "Stickers_SetStickerSetThumb"; }); - ///See + /// Check whether the given short name is available
See
+ /// Short name public static Task Stickers_CheckShortName(this Client client, string short_name) => client.CallAsync(writer => { @@ -10892,7 +16863,8 @@ namespace TL return "Stickers_CheckShortName"; }); - ///See + /// Suggests a short name for a given stickerpack name
See
+ /// Sticker pack name public static Task Stickers_SuggestShortName(this Client client, string title) => client.CallAsync(writer => { @@ -10901,7 +16873,7 @@ namespace TL return "Stickers_SuggestShortName"; }); - ///See + /// Get phone call configuration to be passed to libtgvoip's shared config
See
public static Task Phone_GetCallConfig(this Client client) => client.CallAsync(writer => { @@ -10909,7 +16881,12 @@ namespace TL return "Phone_GetCallConfig"; }); - ///See + /// Start a telegram phone call
See
+ /// Whether to start a video call + /// Destination of the phone call + /// Random ID to avoid resending the same object + /// Parameter for E2E encryption key exchange » + /// Phone call settings public static Task Phone_RequestCall(this Client client, InputUserBase user_id, int random_id, byte[] g_a_hash, PhoneCallProtocol protocol, bool video = false) => client.CallAsync(writer => { @@ -10922,7 +16899,10 @@ namespace TL return "Phone_RequestCall"; }); - ///See + /// Accept incoming call
See
+ /// The call to accept + /// Parameter for E2E encryption key exchange » + /// Phone call settings public static Task Phone_AcceptCall(this Client client, InputPhoneCall peer, byte[] g_b, PhoneCallProtocol protocol) => client.CallAsync(writer => { @@ -10933,7 +16913,11 @@ namespace TL return "Phone_AcceptCall"; }); - ///See + /// Complete phone call E2E encryption key exchange »
See
+ /// The phone call + /// Parameter for E2E encryption key exchange » + /// Key fingerprint + /// Phone call settings public static Task Phone_ConfirmCall(this Client client, InputPhoneCall peer, byte[] g_a, long key_fingerprint, PhoneCallProtocol protocol) => client.CallAsync(writer => { @@ -10945,7 +16929,8 @@ namespace TL return "Phone_ConfirmCall"; }); - ///See + /// Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.
See
+ /// The phone call we're currently in public static Task Phone_ReceivedCall(this Client client, InputPhoneCall peer) => client.CallAsync(writer => { @@ -10954,7 +16939,12 @@ namespace TL return "Phone_ReceivedCall"; }); - ///See + /// Refuse or end running call
See
+ /// Whether this is a video call + /// The phone call + /// Call duration + /// Why was the call discarded + /// Preferred libtgvoip relay ID public static Task Phone_DiscardCall(this Client client, InputPhoneCall peer, int duration, PhoneCallDiscardReason reason, long connection_id, bool video = false) => client.CallAsync(writer => { @@ -10967,7 +16957,11 @@ namespace TL return "Phone_DiscardCall"; }); - ///See + /// Rate a call
See
+ /// Whether the user decided on their own initiative to rate the call + /// The call to rate + /// Rating in 1-5 stars + /// An additional comment public static Task Phone_SetCallRating(this Client client, InputPhoneCall peer, int rating, string comment, bool user_initiative = false) => client.CallAsync(writer => { @@ -10979,7 +16973,9 @@ namespace TL return "Phone_SetCallRating"; }); - ///See + /// Send phone call debug data to server
See
+ /// Phone call + /// Debug statistics obtained from libtgvoip public static Task Phone_SaveCallDebug(this Client client, InputPhoneCall peer, DataJSON debug) => client.CallAsync(writer => { @@ -10989,7 +16985,9 @@ namespace TL return "Phone_SaveCallDebug"; }); - ///See + /// Send VoIP signaling data
See
+ /// Phone call + /// Signaling payload public static Task Phone_SendSignalingData(this Client client, InputPhoneCall peer, byte[] data) => client.CallAsync(writer => { @@ -10999,7 +16997,11 @@ namespace TL return "Phone_SendSignalingData"; }); - ///See + /// Create a group call or livestream
See
+ /// Associate the group call or livestream to the provided group/supergroup/channel + /// Unique client message ID required to prevent creation of duplicate group calls + /// Call title + /// For scheduled group call or livestreams, the absolute date when the group call will start public static Task Phone_CreateGroupCall(this Client client, InputPeer peer, int random_id, string title = null, DateTime? schedule_date = null) => client.CallAsync(writer => { @@ -11014,7 +17016,13 @@ namespace TL return "Phone_CreateGroupCall"; }); - ///See + /// Join a group call
See
+ /// If set, the user will be muted by default upon joining. + /// If set, the user's video will be disabled by default upon joining. + /// The group call + /// Join the group call, presenting yourself as the specified user/channel + /// The invitation hash from the invite link: https://t.me/username?voicechat=hash + /// WebRTC parameters public static Task Phone_JoinGroupCall(this Client client, InputGroupCall call, InputPeer join_as, DataJSON params_, bool muted = false, bool video_stopped = false, string invite_hash = null) => client.CallAsync(writer => { @@ -11028,7 +17036,9 @@ namespace TL return "Phone_JoinGroupCall"; }); - ///See + /// Leave a group call
See
+ /// The group call + /// Your source ID public static Task Phone_LeaveGroupCall(this Client client, InputGroupCall call, int source) => client.CallAsync(writer => { @@ -11038,7 +17048,9 @@ namespace TL return "Phone_LeaveGroupCall"; }); - ///See + /// Invite a set of users to a group call.
See
+ /// The group call + /// The users to invite. public static Task Phone_InviteToGroupCall(this Client client, InputGroupCall call, InputUserBase[] users) => client.CallAsync(writer => { @@ -11048,7 +17060,8 @@ namespace TL return "Phone_InviteToGroupCall"; }); - ///See + /// Terminate a group call
See
+ /// The group call to terminate public static Task Phone_DiscardGroupCall(this Client client, InputGroupCall call) => client.CallAsync(writer => { @@ -11057,7 +17070,10 @@ namespace TL return "Phone_DiscardGroupCall"; }); - ///See + /// Change group call settings
See
+ /// Invalidate existing invite links + /// Group call + /// Whether all users will bthat join this group calle muted by default upon joining the group call public static Task Phone_ToggleGroupCallSettings(this Client client, InputGroupCall call, bool reset_invite_hash = false, bool? join_muted = default) => client.CallAsync(writer => { @@ -11069,7 +17085,9 @@ namespace TL return "Phone_ToggleGroupCallSettings"; }); - ///See + /// Get info about a group call
See
+ /// The group call + /// Maximum number of results to return, see pagination public static Task Phone_GetGroupCall(this Client client, InputGroupCall call, int limit) => client.CallAsync(writer => { @@ -11079,7 +17097,12 @@ namespace TL return "Phone_GetGroupCall"; }); - ///See + /// Get group call participants
See
+ /// Group call + /// If specified, will fetch group participant info about the specified peers + /// If specified, will fetch group participant info about the specified WebRTC source IDs + /// Offset for results, taken from the next_offset field of , initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in if it is empty, to avoid an infinite loop. + /// Maximum number of results to return,
see pagination public static Task Phone_GetGroupParticipants(this Client client, InputGroupCall call, InputPeer[] ids, int[] sources, string offset, int limit) => client.CallAsync(writer => { @@ -11092,7 +17115,9 @@ namespace TL return "Phone_GetGroupParticipants"; }); - ///See + /// Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs
See
+ /// Group call + /// Source IDs public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, int[] sources) => client.CallAsync(writer => { @@ -11102,7 +17127,12 @@ namespace TL return "Phone_CheckGroupCall"; }); - ///See + /// Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves).
See
+ /// Whether to start or stop recording + /// Whether to also record video streams + /// The group call or livestream + /// Recording title + /// If video stream recording is enabled, whether to record in portrait or landscape mode public static Task Phone_ToggleGroupCallRecord(this Client client, InputGroupCall call, bool start = false, bool video = false, string title = null, bool? video_portrait = default) => client.CallAsync(writer => { @@ -11116,7 +17146,15 @@ namespace TL return "Phone_ToggleGroupCallRecord"; }); - ///See + /// Edit information about a given group call participant
See
+ /// The group call + /// The group call participant (can also be the user itself) + /// Whether to mute or unmute the specified participant + /// New volume + /// Raise or lower hand + /// Start or stop the video stream + /// Pause or resume the video stream + /// Pause or resume the screen sharing stream public static Task Phone_EditGroupCallParticipant(this Client client, InputGroupCall call, InputPeer participant, bool? muted = default, int? volume = null, bool? raise_hand = default, bool? video_stopped = default, bool? video_paused = default, bool? presentation_paused = default) => client.CallAsync(writer => { @@ -11139,7 +17177,9 @@ namespace TL return "Phone_EditGroupCallParticipant"; }); - ///See + /// Edit the title of a group call or livestream
See
+ /// Group call + /// New title public static Task Phone_EditGroupCallTitle(this Client client, InputGroupCall call, string title) => client.CallAsync(writer => { @@ -11149,7 +17189,8 @@ namespace TL return "Phone_EditGroupCallTitle"; }); - ///See + /// Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.
See
+ /// The dialog whose group call or livestream we're trying to join public static Task Phone_GetGroupCallJoinAs(this Client client, InputPeer peer) => client.CallAsync(writer => { @@ -11158,7 +17199,9 @@ namespace TL return "Phone_GetGroupCallJoinAs"; }); - ///See + /// Get an invite link for a group call or livestream
See
+ /// For livestreams, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand). + /// The group call public static Task Phone_ExportGroupCallInvite(this Client client, InputGroupCall call, bool can_self_unmute = false) => client.CallAsync(writer => { @@ -11168,7 +17211,9 @@ namespace TL return "Phone_ExportGroupCallInvite"; }); - ///See + /// Subscribe or unsubscribe to a scheduled group call
See
+ /// Scheduled group call + /// Enable or disable subscription public static Task Phone_ToggleGroupCallStartSubscription(this Client client, InputGroupCall call, bool subscribed) => client.CallAsync(writer => { @@ -11178,7 +17223,8 @@ namespace TL return "Phone_ToggleGroupCallStartSubscription"; }); - ///See + /// Start a scheduled group call.
See
+ /// The scheduled group call public static Task Phone_StartScheduledGroupCall(this Client client, InputGroupCall call) => client.CallAsync(writer => { @@ -11187,7 +17233,9 @@ namespace TL return "Phone_StartScheduledGroupCall"; }); - ///See + /// Set the default peer that will be used to join a group call in a specific dialog.
See
+ /// The dialog + /// The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel. public static Task Phone_SaveDefaultGroupCallJoinAs(this Client client, InputPeer peer, InputPeer join_as) => client.CallAsync(writer => { @@ -11197,7 +17245,9 @@ namespace TL return "Phone_SaveDefaultGroupCallJoinAs"; }); - ///See + /// Start screen sharing in a call
See
+ /// The group call + /// WebRTC parameters public static Task Phone_JoinGroupCallPresentation(this Client client, InputGroupCall call, DataJSON params_) => client.CallAsync(writer => { @@ -11207,7 +17257,8 @@ namespace TL return "Phone_JoinGroupCallPresentation"; }); - ///See + /// Stop screen sharing in a group call
See
+ /// The group call public static Task Phone_LeaveGroupCallPresentation(this Client client, InputGroupCall call) => client.CallAsync(writer => { @@ -11216,7 +17267,9 @@ namespace TL return "Phone_LeaveGroupCallPresentation"; }); - ///See + /// Get localization pack strings
See
+ /// Language pack name + /// Language code public static Task Langpack_GetLangPack(this Client client, string lang_pack, string lang_code) => client.CallAsync(writer => { @@ -11226,7 +17279,10 @@ namespace TL return "Langpack_GetLangPack"; }); - ///See + /// Get strings from a language pack
See
+ /// Language pack name + /// Language code + /// Strings to get public static Task Langpack_GetStrings(this Client client, string lang_pack, string lang_code, string[] keys) => client.CallAsync(writer => { @@ -11237,7 +17293,10 @@ namespace TL return "Langpack_GetStrings"; }); - ///See + /// Get new strings in languagepack
See
+ /// Language pack + /// Language code + /// Previous localization pack version public static Task Langpack_GetDifference(this Client client, string lang_pack, string lang_code, int from_version) => client.CallAsync(writer => { @@ -11248,7 +17307,8 @@ namespace TL return "Langpack_GetDifference"; }); - ///See + /// Get information about all languages in a localization pack
See
+ /// Language pack public static Task Langpack_GetLanguages(this Client client, string lang_pack) => client.CallAsync(writer => { @@ -11257,7 +17317,9 @@ namespace TL return "Langpack_GetLanguages"; }); - ///See + /// Get information about a language in a localization pack
See
+ /// Language pack name + /// Language code public static Task Langpack_GetLanguage(this Client client, string lang_pack, string lang_code) => client.CallAsync(writer => { @@ -11267,7 +17329,8 @@ namespace TL return "Langpack_GetLanguage"; }); - ///See + /// Edit peers in peer folder
See
+ /// New peer list public static Task Folders_EditPeerFolders(this Client client, InputFolderPeer[] folder_peers) => client.CallAsync(writer => { @@ -11276,7 +17339,8 @@ namespace TL return "Folders_EditPeerFolders"; }); - ///See + /// Delete a peer folder
See
+ /// Peer folder ID, for more info click here public static Task Folders_DeleteFolder(this Client client, int folder_id) => client.CallAsync(writer => { @@ -11285,7 +17349,9 @@ namespace TL return "Folders_DeleteFolder"; }); - ///See + /// Get channel statistics
See
+ /// Whether to enable dark theme for graph colors + /// The channel public static Task Stats_GetBroadcastStats(this Client client, InputChannelBase channel, bool dark = false) => client.CallAsync(writer => { @@ -11295,7 +17361,9 @@ namespace TL return "Stats_GetBroadcastStats"; }); - ///See + /// Load channel statistics graph asynchronously
See
+ /// Graph token from constructor + /// Zoom value, if required public static Task Stats_LoadAsyncGraph(this Client client, string token, long? x = null) => client.CallAsync(writer => { @@ -11307,7 +17375,9 @@ namespace TL return "Stats_LoadAsyncGraph"; }); - ///See + /// Get supergroup statistics
See
+ /// Whether to enable dark theme for graph colors + /// Supergroup ID public static Task Stats_GetMegagroupStats(this Client client, InputChannelBase channel, bool dark = false) => client.CallAsync(writer => { @@ -11317,7 +17387,13 @@ namespace TL return "Stats_GetMegagroupStats"; }); - ///See + /// Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
Will return a list of with peer_id equal to the public channel to which this message was forwarded.
See
+ /// Source channel + /// Source message ID + /// Initially 0, then set to the next_rate parameter of + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Maximum number of results to return, see pagination public static Task Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, int offset_rate, InputPeer offset_peer, int offset_id, int limit) => client.CallAsync(writer => { @@ -11331,7 +17407,10 @@ namespace TL return "Stats_GetMessagePublicForwards"; }); - ///See + /// Get message statistics
See
+ /// Whether to enable dark theme for graph colors + /// Channel ID + /// Message ID public static Task Stats_GetMessageStats(this Client client, InputChannelBase channel, int msg_id, bool dark = false) => client.CallAsync(writer => { diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs index c7730e1..1c9c390 100644 --- a/src/TL.Secret.cs +++ b/src/TL.Secret.cs @@ -7,457 +7,691 @@ namespace TL using BinaryWriter = System.IO.BinaryWriter; using Client = WTelegram.Client; - ///See + ///
See
public abstract partial class DecryptedMessageBase : ITLObject { + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public abstract long RandomId { get; } } - ///
See - ///a null value means decryptedMessageMediaEmpty + /// Object describes media contents of an encrypted message.
See
+ /// a null value means decryptedMessageMediaEmpty public abstract partial class DecryptedMessageMedia : ITLObject { } - ///See + /// Object describes the action to which a service message is linked.
See
public abstract partial class DecryptedMessageAction : ITLObject { } - ///See + ///
See
public abstract partial class FileLocationBase : ITLObject { + /// Server volume public abstract long VolumeId { get; } + /// File ID public abstract int LocalId { get; } + /// Checksum to access the file public abstract long Secret { get; } } namespace Layer8 { - ///See + /// Contents of an encrypted message.
See
[TLDef(0x1F814F1F)] public partial class DecryptedMessage : DecryptedMessageBase { + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id; public byte[] random_bytes; + /// Message text public string message; + /// Media content public DecryptedMessageMedia media; + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public override long RandomId => random_id; } - ///
See + /// Contents of an encrypted service message.
See
[TLDef(0xAA48327D)] public partial class DecryptedMessageService : DecryptedMessageBase { + /// Random message ID, assigned by the message author.
Must be equal to the ID passed to the sending method.
public long random_id; public byte[] random_bytes; + /// Action relevant to the service message public DecryptedMessageAction action; + /// Random message ID, assigned by the message author.
Must be equal to the ID passed to the sending method.
public override long RandomId => random_id; } - ///
See + /// Photo attached to an encrypted message.
See
[TLDef(0x32798A8C)] public partial class DecryptedMessageMediaPhoto : DecryptedMessageMedia { + /// Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; + /// Photo width public int w; + /// Photo height public int h; + /// Size of the photo in bytes public int size; + /// Key to decrypt an attached file with a full version public byte[] key; + /// Initialization vector public byte[] iv; } - ///See + /// Video attached to an encrypted message.
See
[TLDef(0x4CEE6EF3)] public partial class DecryptedMessageMediaVideo : DecryptedMessageMedia { + /// Content of thumbnail file (JPEG file, quality 55, set in a square 90x90) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; + /// Duration of video in seconds public int duration; + /// Image width public int w; + /// Image height public int h; + /// File size public int size; + /// Key to decrypt the attached video file public byte[] key; + /// Initialization vector public byte[] iv; } - ///See + /// GeoPont attached to an encrypted message.
See
[TLDef(0x35480A59)] public partial class DecryptedMessageMediaGeoPoint : DecryptedMessageMedia { + /// Latitude of point public double lat; + /// Longtitude of point public double long_; } - ///See + /// Contact attached to an encrypted message.
See
[TLDef(0x588A0A97)] public partial class DecryptedMessageMediaContact : DecryptedMessageMedia { + /// Phone number public string phone_number; + /// Contact's first name public string first_name; + /// Contact's last name public string last_name; + /// Telegram User ID of signed-up contact public int user_id; } - ///See + /// Document attached to a message in a secret chat.
See
[TLDef(0xB095434B)] public partial class DecryptedMessageMediaDocument : DecryptedMessageMedia { + /// Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; public string file_name; + /// File MIME-type public string mime_type; + /// Document size public int size; + /// Key to decrypt the attached document file public byte[] key; + /// Initialization public byte[] iv; } - ///See + /// Audio file attached to a secret chat message.
See
[TLDef(0x6080758F)] public partial class DecryptedMessageMediaAudio : DecryptedMessageMedia { + /// Audio duration in seconds public int duration; + /// File size public int size; + /// Key to decrypt the attached media file public byte[] key; + /// Initialization vector public byte[] iv; } - ///See + /// Setting of a message lifetime after reading.
See
[TLDef(0xA1733AEC)] - public partial class DecryptedMessageActionSetMessageTTL : DecryptedMessageAction { public int ttl_seconds; } - ///See + public partial class DecryptedMessageActionSetMessageTTL : DecryptedMessageAction + { + /// Lifetime in seconds + public int ttl_seconds; + } + /// Messages marked as read.
See
[TLDef(0x0C4F40BE)] - public partial class DecryptedMessageActionReadMessages : DecryptedMessageAction { public long[] random_ids; } - ///See + public partial class DecryptedMessageActionReadMessages : DecryptedMessageAction + { + /// List of message IDs + public long[] random_ids; + } + /// Deleted messages.
See
[TLDef(0x65614304)] - public partial class DecryptedMessageActionDeleteMessages : DecryptedMessageAction { public long[] random_ids; } - ///See + public partial class DecryptedMessageActionDeleteMessages : DecryptedMessageAction + { + /// List of deleted message IDs + public long[] random_ids; + } + /// A screenshot was taken.
See
[TLDef(0x8AC1F475)] - public partial class DecryptedMessageActionScreenshotMessages : DecryptedMessageAction { public long[] random_ids; } - ///See + public partial class DecryptedMessageActionScreenshotMessages : DecryptedMessageAction + { + /// List of affected message ids (that appeared on the screenshot) + public long[] random_ids; + } + /// The entire message history has been deleted.
See
[TLDef(0x6719E45C)] public partial class DecryptedMessageActionFlushHistory : DecryptedMessageAction { } } namespace Layer17 { - ///See + /// User is uploading a video.
See
[TLDef(0x92042FF7)] public partial class SendMessageUploadVideoAction : SendMessageAction { } - ///See + /// User is uploading a voice message.
See
[TLDef(0xE6AC8A6F)] public partial class SendMessageUploadAudioAction : SendMessageAction { } - ///See + /// User is uploading a photo.
See
[TLDef(0x990A3C1A)] public partial class SendMessageUploadPhotoAction : SendMessageAction { } - ///See + /// User is uploading a file.
See
[TLDef(0x8FAEE98E)] public partial class SendMessageUploadDocumentAction : SendMessageAction { } - ///See + /// Contents of an encrypted message.
See
[TLDef(0x204D3878)] public partial class DecryptedMessage : DecryptedMessageBase { + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id; + ///
Message lifetime. Has higher priority than .
Parameter added in
Layer 17.
public int ttl; + /// Message text public string message; + /// Media content public DecryptedMessageMedia media; + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public override long RandomId => random_id; } - ///See + /// Contents of an encrypted service message.
See
[TLDef(0x73164160)] public partial class DecryptedMessageService : DecryptedMessageBase { + /// Random message ID, assigned by the message author.
Must be equal to the ID passed to the sending method.
public long random_id; + /// Action relevant to the service message public DecryptedMessageAction action; + /// Random message ID, assigned by the message author.
Must be equal to the ID passed to the sending method.
public override long RandomId => random_id; } - ///
See + /// Video attached to an encrypted message.
See
[TLDef(0x524A415D)] public partial class DecryptedMessageMediaVideo : DecryptedMessageMedia { + /// Content of thumbnail file (JPEG file, quality 55, set in a square 90x90) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; + /// Duration of video in seconds public int duration; + /// MIME-type of the video file
Parameter added in
Layer 17.
public string mime_type; + /// Image width public int w; + /// Image height public int h; + /// File size public int size; + /// Key to decrypt the attached video file public byte[] key; + /// Initialization vector public byte[] iv; } - ///See + /// Audio file attached to a secret chat message.
See
[TLDef(0x57E0A9CB)] public partial class DecryptedMessageMediaAudio : DecryptedMessageMedia { + /// Audio duration in seconds public int duration; + /// MIME-type of the audio file
Parameter added in
Layer 13.
public string mime_type; + /// File size public int size; + /// Key to decrypt the attached media file public byte[] key; + /// Initialization vector public byte[] iv; } - ///See + /// Request for the other party in a Secret Chat to automatically resend a contiguous range of previously sent messages, as explained in Sequence number is Secret Chats.
See
[TLDef(0x511110B0)] public partial class DecryptedMessageActionResend : DecryptedMessageAction { + /// out_seq_no of the first message to be resent, with correct parity public int start_seq_no; + /// out_seq_no of the last message to be resent, with same parity. public int end_seq_no; } - ///See + /// A notification stating the API layer that is used by the client. You should use your current layer and take notice of the layer used on the other side of a conversation when sending messages.
See
[TLDef(0xF3048883)] - public partial class DecryptedMessageActionNotifyLayer : DecryptedMessageAction { public int layer; } - ///See + public partial class DecryptedMessageActionNotifyLayer : DecryptedMessageAction + { + /// Layer number, must be 17 or higher (this contructor was introduced in Layer 17). + public int layer; + } + /// User is preparing a message: typing, recording, uploading, etc.
See
[TLDef(0xCCB27641)] - public partial class DecryptedMessageActionTyping : DecryptedMessageAction { public SendMessageAction action; } + public partial class DecryptedMessageActionTyping : DecryptedMessageAction + { + /// Type of action + public SendMessageAction action; + } - ///See + /// Sets the layer number for the contents of an encrypted message.
See
[TLDef(0x1BE31789)] public partial class DecryptedMessageLayer : ITLObject { + /// Set of random bytes to prevent content recognition in short encrypted messages.
Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.
Parameter moved here from in
Layer 17.
public byte[] random_bytes; + /// Layer number. Mimimal value - 17 (the layer in which the constructor was added). public int layer; + /// 2x the number of messages in the sender's inbox (including deleted and service messages), incremented by 1 if current user was not the chat creator
Parameter added in Layer 17.
public int in_seq_no; + /// 2x the number of messages in the recipient's inbox (including deleted and service messages), incremented by 1 if current user was the chat creator
Parameter added in Layer 17.
public int out_seq_no; + /// The content of message itself public DecryptedMessageBase message; } } namespace Layer45 { - ///See + /// Defines a sticker
See
[TLDef(0x3A556302)] public partial class DocumentAttributeSticker : DocumentAttribute { + /// Alternative emoji representation of sticker public string alt; + /// Associated stickerset public InputStickerSet stickerset; } - ///See + /// Represents an audio file
See
[TLDef(0xDED218E0)] public partial class DocumentAttributeAudio : DocumentAttribute { + /// Duration in seconds public int duration; + /// Name of song public string title; + /// Performer public string performer; } - ///See + /// Contents of an encrypted message.
See
[TLDef(0x36B091DE)] public partial class DecryptedMessage : DecryptedMessageBase { - [Flags] public enum Flags { has_reply_to_random_id = 0x8, has_entities = 0x80, has_media = 0x200, has_via_bot_name = 0x800 } + /// Flags, see TL conditional fields (added in layer 45) public Flags flags; + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id; + /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
public int ttl; + /// Message text public string message; + /// Media content [IfFlag(9)] public DecryptedMessageMedia media; + /// Message entities for styled text (parameter added in layer 45) [IfFlag(7)] public MessageEntity[] entities; + /// Specifies the ID of the inline bot that generated the message (parameter added in layer 45) [IfFlag(11)] public string via_bot_name; + /// Random message ID of the message this message replies to (parameter added in layer 45) [IfFlag(3)] public long reply_to_random_id; + [Flags] public enum Flags + { + /// Field has a value + has_reply_to_random_id = 0x8, + /// Field has a value + has_entities = 0x80, + /// Field has a value + has_media = 0x200, + /// Field has a value + has_via_bot_name = 0x800, + } + + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public override long RandomId => random_id; } - ///See + /// Photo attached to an encrypted message.
See
[TLDef(0xF1FA8D78)] public partial class DecryptedMessageMediaPhoto : DecryptedMessageMedia { + /// Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; + /// Photo width public int w; + /// Photo height public int h; + /// Size of the photo in bytes public int size; + /// Key to decrypt an attached file with a full version public byte[] key; + /// Initialization vector public byte[] iv; + /// Caption public string caption; } - ///See + /// Video attached to an encrypted message.
See
[TLDef(0x970C8C0E)] public partial class DecryptedMessageMediaVideo : DecryptedMessageMedia { + /// Content of thumbnail file (JPEG file, quality 55, set in a square 90x90) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; + /// Duration of video in seconds public int duration; + /// MIME-type of the video file
Parameter added in
Layer 17.
public string mime_type; + /// Image width public int w; + /// Image height public int h; + /// File size public int size; + /// Key to decrypt the attached video file public byte[] key; + /// Initialization vector public byte[] iv; + /// Caption public string caption; } - ///See + /// Document attached to a message in a secret chat.
See
[TLDef(0x7AFE8AE2)] public partial class DecryptedMessageMediaDocument : DecryptedMessageMedia { + /// Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square) public byte[] thumb; + /// Thumbnail width public int thumb_w; + /// Thumbnail height public int thumb_h; + /// File MIME-type public string mime_type; + /// Document size public int size; + /// Key to decrypt the attached document file public byte[] key; + /// Initialization public byte[] iv; + /// Document attributes for media types public DocumentAttribute[] attributes; + /// Caption public string caption; } - ///See + /// Venue
See
[TLDef(0x8A0DF56F)] public partial class DecryptedMessageMediaVenue : DecryptedMessageMedia { + /// Latitude of venue public double lat; + /// Longitude of venue public double long_; + /// Venue name public string title; + /// Address public string address; + /// Venue provider: currently only "foursquare" needs to be supported public string provider; + /// Venue ID in the provider's database public string venue_id; } - ///See + /// Webpage preview
See
[TLDef(0xE50511D8)] - public partial class DecryptedMessageMediaWebPage : DecryptedMessageMedia { public string url; } + public partial class DecryptedMessageMediaWebPage : DecryptedMessageMedia + { + /// URL of webpage + public string url; + } } namespace Layer73 { - ///See + /// Contents of an encrypted message.
See
[TLDef(0x91CC4674)] public partial class DecryptedMessage : DecryptedMessageBase { - [Flags] public enum Flags { has_reply_to_random_id = 0x8, has_entities = 0x80, has_media = 0x200, has_via_bot_name = 0x800, - has_grouped_id = 0x20000 } + /// Flags, see TL conditional fields (added in layer 45) public Flags flags; + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id; + /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
public int ttl; + /// Message text public string message; + /// Media content [IfFlag(9)] public DecryptedMessageMedia media; + /// Message entities for styled text (parameter added in layer 45) [IfFlag(7)] public MessageEntity[] entities; + /// Specifies the ID of the inline bot that generated the message (parameter added in layer 45) [IfFlag(11)] public string via_bot_name; + /// Random message ID of the message this message replies to (parameter added in layer 45) [IfFlag(3)] public long reply_to_random_id; + /// Random group ID, assigned by the author of message.
Multiple encrypted messages with a photo attached and with the same group ID indicate an album or grouped media (parameter added in layer 45)
[IfFlag(17)] public long grouped_id; + [Flags] public enum Flags + { + /// Field has a value + has_reply_to_random_id = 0x8, + /// Field has a value + has_entities = 0x80, + /// Field has a value + has_media = 0x200, + /// Field has a value + has_via_bot_name = 0x800, + /// Field has a value + has_grouped_id = 0x20000, + } + + /// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public override long RandomId => random_id; } } namespace Layer20 { - ///See + /// Request rekeying, see rekeying process
See
[TLDef(0xF3C9611B)] public partial class DecryptedMessageActionRequestKey : DecryptedMessageAction { + /// Exchange ID public long exchange_id; + /// g_a, see rekeying process public byte[] g_a; } - ///See + /// Accept new key
See
[TLDef(0x6FE1735B)] public partial class DecryptedMessageActionAcceptKey : DecryptedMessageAction { + /// Exchange ID public long exchange_id; + /// B parameter, see rekeying process public byte[] g_b; + /// Key fingerprint, see rekeying process public long key_fingerprint; } - ///See + /// Abort rekeying
See
[TLDef(0xDD05EC6B)] - public partial class DecryptedMessageActionAbortKey : DecryptedMessageAction { public long exchange_id; } - ///See + public partial class DecryptedMessageActionAbortKey : DecryptedMessageAction + { + /// Exchange ID + public long exchange_id; + } + /// Commit new key, see rekeying process
See
[TLDef(0xEC2E0B9B)] public partial class DecryptedMessageActionCommitKey : DecryptedMessageAction { + /// Exchange ID, see rekeying process public long exchange_id; + /// Key fingerprint, see rekeying process public long key_fingerprint; } - ///See + /// NOOP action
See
[TLDef(0xA82FDD63)] public partial class DecryptedMessageActionNoop : DecryptedMessageAction { } } namespace Layer23 { - ///See + /// Image description.
See
[TLDef(0x77BFB61B)] public partial class PhotoSize : PhotoSizeBase { + /// Thumbnail type public string type; public FileLocationBase location; + /// Image width public int w; + /// Image height public int h; + /// File size public int size; + /// Thumbnail type public override string Type => type; } - ///See + /// Description of an image and its content.
See
[TLDef(0xE9A734FA)] public partial class PhotoCachedSize : PhotoSizeBase { + /// Thumbnail type public string type; public FileLocationBase location; + /// Image width public int w; + /// Image height public int h; + /// Binary data, file content public byte[] bytes; + /// Thumbnail type public override string Type => type; } - ///See + /// Defines a sticker
See
[TLDef(0xFB0A5727)] public partial class DocumentAttributeSticker : DocumentAttribute { } - ///See + /// Defines a video
See
[TLDef(0x5910CCCB)] public partial class DocumentAttributeVideo : DocumentAttribute { + /// Duration in seconds public int duration; + /// Video width public int w; + /// Video height public int h; } - ///See + /// Represents an audio file
See
[TLDef(0x051448E5)] - public partial class DocumentAttributeAudio : DocumentAttribute { public int duration; } + public partial class DocumentAttributeAudio : DocumentAttribute + { + /// Duration in seconds + public int duration; + } - ///See + /// Non-e2e documented forwarded from non-secret chat
See
[TLDef(0xFA95B0DD)] public partial class DecryptedMessageMediaExternalDocument : DecryptedMessageMedia { + /// Document ID public long id; + /// access hash public long access_hash; + /// Date public DateTime date; + /// Mime type public string mime_type; + /// Size public int size; + /// Thumbnail public PhotoSizeBase thumb; + /// DC ID public int dc_id; + /// Attributes for media types public DocumentAttribute[] attributes; } - ///See + /// File is currently unavailable.
See
[TLDef(0x7C596B46)] public partial class FileLocationUnavailable : FileLocationBase { + /// Server volume public long volume_id; + /// File ID public int local_id; + /// Checksum to access the file public long secret; + /// Server volume public override long VolumeId => volume_id; + /// File ID public override int LocalId => local_id; + /// Checksum to access the file public override long Secret => secret; } - ///See + /// File location.
See
[TLDef(0x53D69076)] public partial class FileLocation : FileLocationBase { + /// Number of the data center holding the file public int dc_id; + /// Server volume public long volume_id; + /// File ID public int local_id; + /// Checksum to access the file public long secret; + /// Server volume public override long VolumeId => volume_id; + /// File ID public override int LocalId => local_id; + /// Checksum to access the file public override long Secret => secret; } } namespace Layer66 { - ///See + /// User is uploading a round video
See
[TLDef(0xBB718624)] public partial class SendMessageUploadRoundAction : SendMessageAction { } }