diff --git a/TLSharp.Core/Session.cs b/TLSharp.Core/Session.cs index 7a9cba5..7a13da9 100644 --- a/TLSharp.Core/Session.cs +++ b/TLSharp.Core/Session.cs @@ -54,8 +54,9 @@ namespace TLSharp.Core public class Session { - private const string defaultConnectionAddress = "91.108.56.165"; - private const int defaultConnectionPort = 443; + private const string defaultConnectionAddress = "149.154.175.100";//"149.154.167.50"; + + private const int defaultConnectionPort = 443; public string SessionUserId { get; set; } public string ServerAddress { get; set; } diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index 7d74769..75d0466 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -25,8 +25,8 @@ namespace TLSharp.Core public TelegramClient(int apiId, string apiHash, ISessionStore store = null, string sessionUserId = "session") { - if (store == null) - store = new FileSessionStore(); + if (store == null) + store = new FileSessionStore(); TLContext.Init(); _apiHash = apiHash; @@ -51,16 +51,14 @@ namespace TLSharp.Core _sender = new MtProtoSender(_transport, _session); - if (!reconnect) - { - var config = new TLRequestGetConfig() ; - var request = new TLRequestInitConnection() { api_id = _apiId, app_version = "1.0.0", device_model = "PC", lang_code = "en", query= config, system_version = "Win 10.0" }; - var invokewithLayer = new TLRequestInvokeWithLayer() { layer = 53, query = request }; - await _sender.Send(invokewithLayer); - await _sender.Receive(invokewithLayer); + //set-up layer + var config = new TLRequestGetConfig(); + var request = new TLRequestInitConnection() { api_id = _apiId, app_version = "1.0.0", device_model = "PC", lang_code = "en", query = config, system_version = "Win 10.0" }; + var invokewithLayer = new TLRequestInvokeWithLayer() { layer = 57, query = request }; + await _sender.Send(invokewithLayer); + await _sender.Receive(invokewithLayer); - dcOptions = ((TLConfig)invokewithLayer.Response).dc_options.lists; - } + dcOptions = ((TLConfig)invokewithLayer.Response).dc_options.lists; return true; } @@ -154,62 +152,61 @@ namespace TLSharp.Core await _sender.Send(methodtoExceute); await _sender.Receive(methodtoExceute); - var result = methodtoExceute.GetType().GetProperty("Response").GetValue(methodtoExceute); - - return (T)result; + var result = methodtoExceute.GetType().GetProperty("Response").GetValue(methodtoExceute); + + return (T)result; } + public async Task GetContactsAsync() + { + if (!IsUserAuthorized()) + throw new InvalidOperationException("Authorize user first!"); - public async Task GetContactsAsync() - { - if (!IsUserAuthorized()) - throw new InvalidOperationException("Authorize user first!"); + var req = new TLRequestGetContacts() { hash = "" }; - var req = new TLRequestGetContacts() {hash = ""}; - - return await SendRequestAsync(req); - } + return await SendRequestAsync(req); + } - public async Task SendMessageAsync(TLAbsInputPeer peer, string message) - { - if (!IsUserAuthorized()) - throw new InvalidOperationException("Authorize user first!"); + public async Task SendMessageAsync(TLAbsInputPeer peer, string message) + { + if (!IsUserAuthorized()) + throw new InvalidOperationException("Authorize user first!"); - long uniqueId = Convert.ToInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds); + long uniqueId = Convert.ToInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds); - return await SendRequestAsync( - new TLRequestSendMessage() - { - peer = peer, - message = message, - random_id = uniqueId - }); - } + return await SendRequestAsync( + new TLRequestSendMessage() + { + peer = peer, + message = message, + random_id = uniqueId + }); + } - public async Task SendTypingAsync(TLAbsInputPeer peer) - { - var req = new TLRequestSetTyping() - { - action = new TLSendMessageTypingAction(), - peer = peer - }; - return await SendRequestAsync(req); - } + public async Task SendTypingAsync(TLAbsInputPeer peer) + { + var req = new TLRequestSetTyping() + { + action = new TLSendMessageTypingAction(), + peer = peer + }; + return await SendRequestAsync(req); + } - public async Task GetUserDialogsAsync() - { - var peer = new TLInputPeerSelf(); - return await SendRequestAsync( - new TLRequestGetDialogs() { offset_date = 0, offset_peer = peer, limit = 100 }); - } + public async Task GetUserDialogsAsync() + { + var peer = new TLInputPeerSelf(); + return await SendRequestAsync( + new TLRequestGetDialogs() { offset_date = 0, offset_peer = peer, limit = 100 }); + } - private void OnUserAuthenticated(TLUser TLUser) + private void OnUserAuthenticated(TLUser TLUser) { _session.TLUser = TLUser; _session.SessionExpires = int.MaxValue; _session.Save(); } - + } } diff --git a/TeleSharp.Generator/Program.cs b/TeleSharp.Generator/Program.cs index 00dce76..535017b 100644 --- a/TeleSharp.Generator/Program.cs +++ b/TeleSharp.Generator/Program.cs @@ -72,7 +72,7 @@ namespace TeleSharp.Generator if (nspace.EndsWith(".")) nspace = nspace.Remove(nspace.Length - 1, 1); string temp = NormalStyle.Replace("/* NAMESPACE */", "TeleSharp." + nspace); - temp = (c.type == "himself") ? temp.Replace("/* PARENT */", "TLObject") : temp.Replace("/* PARENT */", GetNameofClass(c.type, true)); + temp = (c.type == "himself") ? temp.Replace("/* PARENT */", "TLObject") : temp.Replace("/* PARENT */", GetNameofClass(c.type, true)); temp = temp.Replace("/*Constructor*/", c.id.ToString()); temp = temp.Replace("/* NAME */", GetNameofClass(c.predicate, false)); #endregion @@ -129,11 +129,7 @@ namespace TeleSharp.Generator } foreach (var c in schema.methods) { - if (c.method.Contains("updateUsername")) - { - - } - string path = (GetNameSpace(c.method).Replace("TeleSharp.TL", "TL\\").Replace(".", "") + "\\" + GetNameofClass(c.method, false,true) + ".cs").Replace("\\\\", "\\"); + string path = (GetNameSpace(c.method).Replace("TeleSharp.TL", "TL\\").Replace(".", "") + "\\" + GetNameofClass(c.method, false, true) + ".cs").Replace("\\\\", "\\"); FileStream classFile = MakeFile(path); using (StreamWriter writer = new StreamWriter(classFile)) { @@ -144,7 +140,7 @@ namespace TeleSharp.Generator string temp = MethodStyle.Replace("/* NAMESPACE */", "TeleSharp." + nspace); temp = temp.Replace("/* PARENT */", "TLMethod"); temp = temp.Replace("/*Constructor*/", c.id.ToString()); - temp = temp.Replace("/* NAME */", GetNameofClass(c.method, false,true)); + temp = temp.Replace("/* NAME */", GetNameofClass(c.method, false, true)); #endregion #region Fields string fields = ""; @@ -244,7 +240,7 @@ namespace TeleSharp.Generator else if (type.IndexOf('.') != -1 && type.IndexOf('?') != -1) return "TLRequest" + FormatName(type.Split('?')[1]); else - return "TLRequest" + FormatName(type) ; + return "TLRequest" + FormatName(type); } } private static bool IsFlagBase(string type) @@ -274,13 +270,12 @@ namespace TeleSharp.Generator { string innerType = type.Split('?')[1]; if (innerType == "true") return result; - else if ((new string[] {"bool","int", "uint", "long", "double" }).Contains(result)) return result + "?"; + else if ((new string[] { "bool", "int", "uint", "long", "double" }).Contains(result)) return result + "?"; else return result; } } public static string GetTypeName(string type) { - if (type.ToLower().Contains("inputcontact")) return "TLInputPhoneContact"; switch (type.ToLower()) { case "#": @@ -304,35 +299,39 @@ namespace TeleSharp.Generator case "x": return "TLObject"; } + if (type.StartsWith("Vector")) return "TLVector<" + GetTypeName(type.Replace("Vector<", "").Replace(">", "")) + ">"; + + if (type.ToLower().Contains("inputcontact")) + return "TLInputPhoneContact"; + + + if (type.IndexOf('.') != -1 && type.IndexOf('?') == -1) + { + + if (interfacesList.Any(x => x.ToLower() == (type).ToLower())) + return FormatName(type.Split('.')[0]) + "." + "TLAbs" + type.Split('.')[1]; + else if (classesList.Any(x => x.ToLower() == (type).ToLower())) + return FormatName(type.Split('.')[0]) + "." + "TL" + type.Split('.')[1]; + else + return FormatName(type.Split('.')[1]); + } + else if (type.IndexOf('?') == -1) + { + if (interfacesList.Any(x => x.ToLower() == type.ToLower())) + return "TLAbs" + type; + else if (classesList.Any(x => x.ToLower() == type.ToLower())) + return "TL" + type; + else + return type; + } else { - if (type.IndexOf('.') != -1 && type.IndexOf('?') == -1) - { - - if (interfacesList.Any(x => x.ToLower() == (type).ToLower())) - return FormatName(type.Split('.')[0]) + "." + "TLAbs" + type.Split('.')[1]; - else if (classesList.Any(x => x.ToLower() == (type).ToLower())) - return FormatName(type.Split('.')[0]) + "." + "TL" + type.Split('.')[1]; - else - return FormatName(type.Split('.')[1]); - } - else if (type.IndexOf('?') == -1) - { - if (interfacesList.Any(x => x.ToLower() == type.ToLower())) - return "TLAbs" + type; - else if (classesList.Any(x => x.ToLower() == type.ToLower())) - return "TL" + type; - else - return type; - } - else - { - return GetTypeName(type.Split('?')[1]); - } + return GetTypeName(type.Split('?')[1]); } + } public static string LookTypeInLists(string src) { @@ -401,7 +400,7 @@ namespace TeleSharp.Generator { if (p.type.ToLower().Contains("vector")) { - return $"{CheckForKeyword(p.name)} = ({GetTypeName(p.type)})ObjectUtils.DeserializeVector<{GetTypeName(p.type).Replace("TLVector<","").Replace(">","")}>(br);"; + return $"{CheckForKeyword(p.name)} = ({GetTypeName(p.type)})ObjectUtils.DeserializeVector<{GetTypeName(p.type).Replace("TLVector<", "").Replace(">", "")}>(br);"; } else return $"{CheckForKeyword(p.name)} = ({GetTypeName(p.type)})ObjectUtils.DeserializeObject(br);"; } diff --git a/TeleSharp.TL/TL/Account/TLRequestConfirmPhone.cs b/TeleSharp.TL/TL/Account/TLRequestConfirmPhone.cs new file mode 100644 index 0000000..9613505 --- /dev/null +++ b/TeleSharp.TL/TL/Account/TLRequestConfirmPhone.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1596029123)] + public class TLRequestConfirmPhone : TLMethod + { + public override int Constructor + { + get + { + return 1596029123; + } + } + + public string phone_code_hash {get;set;} + public string phone_code {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + phone_code_hash = StringUtil.Deserialize(br); +phone_code = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(phone_code_hash,bw); +StringUtil.Serialize(phone_code,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs b/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs new file mode 100644 index 0000000..5abe7be --- /dev/null +++ b/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(353818557)] + public class TLRequestSendConfirmPhoneCode : TLMethod + { + public override int Constructor + { + get + { + return 353818557; + } + } + + public int flags {get;set;} + public bool allow_flashcall {get;set;} + public string hash {get;set;} + public bool? current_number {get;set;} + public Auth.TLSentCode Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = allow_flashcall ? (flags | 1) : (flags & ~1); +flags = current_number != null ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +allow_flashcall = (flags & 1) != 0; +hash = StringUtil.Deserialize(br); +if ((flags & 1) != 0) +current_number = BoolUtil.Deserialize(br); +else +current_number = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +StringUtil.Serialize(hash,bw); +if ((flags & 1) != 0) +BoolUtil.Serialize(current_number.Value,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Auth/TLAuthorization.cs b/TeleSharp.TL/TL/Auth/TLAuthorization.cs index e4445b6..8060687 100644 --- a/TeleSharp.TL/TL/Auth/TLAuthorization.cs +++ b/TeleSharp.TL/TL/Auth/TLAuthorization.cs @@ -7,35 +7,49 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Auth { - [TLObject(-16553231)] + [TLObject(-855308010)] public class TLAuthorization : TLObject { public override int Constructor { get { - return -16553231; + return -855308010; } } - public TLAbsUser user {get;set;} + public int flags {get;set;} + public int? tmp_sessions {get;set;} + public TLAbsUser user {get;set;} public void ComputeFlags() { - + flags = 0; +flags = tmp_sessions != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - user = (TLAbsUser)ObjectUtils.DeserializeObject(br); + flags = br.ReadInt32(); +if ((flags & 1) != 0) +tmp_sessions = br.ReadInt32(); +else +tmp_sessions = null; + +user = (TLAbsUser)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(user,bw); + ComputeFlags(); +bw.Write(flags); +if ((flags & 1) != 0) +bw.Write(tmp_sessions.Value); +ObjectUtils.SerializeObject(user,bw); } } diff --git a/TeleSharp.TL/TL/Auth/TLRequestDropTempAuthKeys.cs b/TeleSharp.TL/TL/Auth/TLRequestDropTempAuthKeys.cs new file mode 100644 index 0000000..d88431f --- /dev/null +++ b/TeleSharp.TL/TL/Auth/TLRequestDropTempAuthKeys.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(-1907842680)] + public class TLRequestDropTempAuthKeys : TLMethod + { + public override int Constructor + { + get + { + return -1907842680; + } + } + + public TLVector except_auth_keys {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + except_auth_keys = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(except_auth_keys,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs b/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs new file mode 100644 index 0000000..a419020 --- /dev/null +++ b/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-1920105769)] + public class TLRequestGetAdminedPublicChannels : TLMethod + { + public override int Constructor + { + get + { + return -1920105769; + } + } + + public Messages.TLChats Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLChats)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs b/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs index ebf15be..c42497d 100644 --- a/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs +++ b/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs @@ -30,7 +30,7 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { - contacts = ObjectUtils.DeserializeVector(br); + contacts = (TLVector)ObjectUtils.DeserializeVector(br); replace = BoolUtil.Deserialize(br); } diff --git a/TeleSharp.TL/TL/Messages/TLAbsFeaturedStickers.cs b/TeleSharp.TL/TL/Messages/TLAbsFeaturedStickers.cs new file mode 100644 index 0000000..bc96191 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLAbsFeaturedStickers.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + public abstract class TLAbsFeaturedStickers : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/Messages/TLAbsRecentStickers.cs b/TeleSharp.TL/TL/Messages/TLAbsRecentStickers.cs new file mode 100644 index 0000000..1e763ff --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLAbsRecentStickers.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + public abstract class TLAbsRecentStickers : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/Messages/TLAbsStickerSetInstallResult.cs b/TeleSharp.TL/TL/Messages/TLAbsStickerSetInstallResult.cs new file mode 100644 index 0000000..bf4da05 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLAbsStickerSetInstallResult.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + public abstract class TLAbsStickerSetInstallResult : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/Messages/TLArchivedStickers.cs b/TeleSharp.TL/TL/Messages/TLArchivedStickers.cs new file mode 100644 index 0000000..3323a85 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLArchivedStickers.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1338747336)] + public class TLArchivedStickers : TLObject + { + public override int Constructor + { + get + { + return 1338747336; + } + } + + public int count {get;set;} + public TLVector sets {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + count = br.ReadInt32(); +sets = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(count); +ObjectUtils.SerializeObject(sets,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs b/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs index 5b41e35..36bc164 100644 --- a/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs +++ b/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs @@ -7,27 +7,31 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(308605382)] + [TLObject(-1324486149)] public class TLBotCallbackAnswer : TLObject { public override int Constructor { get { - return 308605382; + return -1324486149; } } public int flags {get;set;} public bool alert {get;set;} + public bool has_url {get;set;} public string message {get;set;} + public string url {get;set;} public void ComputeFlags() { flags = 0; flags = alert ? (flags | 2) : (flags & ~2); +flags = has_url ? (flags | 8) : (flags & ~8); flags = message != null ? (flags | 1) : (flags & ~1); +flags = url != null ? (flags | 4) : (flags & ~4); } @@ -35,11 +39,17 @@ flags = message != null ? (flags | 1) : (flags & ~1); { flags = br.ReadInt32(); alert = (flags & 2) != 0; +has_url = (flags & 8) != 0; if ((flags & 1) != 0) message = StringUtil.Deserialize(br); else message = null; +if ((flags & 4) != 0) +url = StringUtil.Deserialize(br); +else +url = null; + } @@ -49,8 +59,11 @@ message = null; ComputeFlags(); bw.Write(flags); + if ((flags & 1) != 0) StringUtil.Serialize(message,bw); +if ((flags & 4) != 0) +StringUtil.Serialize(url,bw); } } diff --git a/TeleSharp.TL/TL/Messages/TLFeaturedStickers.cs b/TeleSharp.TL/TL/Messages/TLFeaturedStickers.cs new file mode 100644 index 0000000..de86954 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLFeaturedStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-123893531)] + public class TLFeaturedStickers : TLAbsFeaturedStickers + { + public override int Constructor + { + get + { + return -123893531; + } + } + + public int hash {get;set;} + public TLVector sets {get;set;} + public TLVector unread {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + hash = br.ReadInt32(); +sets = (TLVector)ObjectUtils.DeserializeVector(br); +unread = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(hash); +ObjectUtils.SerializeObject(sets,bw); +ObjectUtils.SerializeObject(unread,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLFeaturedStickersNotModified.cs b/TeleSharp.TL/TL/Messages/TLFeaturedStickersNotModified.cs new file mode 100644 index 0000000..9d55e9e --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLFeaturedStickersNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(82699215)] + public class TLFeaturedStickersNotModified : TLAbsFeaturedStickers + { + public override int Constructor + { + get + { + return 82699215; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLHighScores.cs b/TeleSharp.TL/TL/Messages/TLHighScores.cs new file mode 100644 index 0000000..c355734 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLHighScores.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1707344487)] + public class TLHighScores : TLObject + { + public override int Constructor + { + get + { + return -1707344487; + } + } + + public TLVector scores {get;set;} + public TLVector users {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + scores = (TLVector)ObjectUtils.DeserializeVector(br); +users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(scores,bw); +ObjectUtils.SerializeObject(users,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRecentStickers.cs b/TeleSharp.TL/TL/Messages/TLRecentStickers.cs new file mode 100644 index 0000000..a380db5 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRecentStickers.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1558317424)] + public class TLRecentStickers : TLAbsRecentStickers + { + public override int Constructor + { + get + { + return 1558317424; + } + } + + public int hash {get;set;} + public TLVector stickers {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + hash = br.ReadInt32(); +stickers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(hash); +ObjectUtils.SerializeObject(stickers,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRecentStickersNotModified.cs b/TeleSharp.TL/TL/Messages/TLRecentStickersNotModified.cs new file mode 100644 index 0000000..6cc8064 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRecentStickersNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(186120336)] + public class TLRecentStickersNotModified : TLAbsRecentStickers + { + public override int Constructor + { + get + { + return 186120336; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs new file mode 100644 index 0000000..d4feda9 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1986437075)] + public class TLRequestClearRecentStickers : TLMethod + { + public override int Constructor + { + get + { + return -1986437075; + } + } + + public int flags {get;set;} + public bool attached {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = attached ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +attached = (flags & 1) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs b/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs index 7fcba6b..06c469c 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs @@ -21,6 +21,7 @@ namespace TeleSharp.TL.Messages public int flags {get;set;} public bool silent {get;set;} public bool background {get;set;} + public bool with_my_score {get;set;} public TLAbsInputPeer from_peer {get;set;} public TLVector id {get;set;} public TLVector random_id {get;set;} @@ -33,6 +34,7 @@ namespace TeleSharp.TL.Messages flags = 0; flags = silent ? (flags | 32) : (flags & ~32); flags = background ? (flags | 64) : (flags & ~64); +flags = with_my_score ? (flags | 256) : (flags & ~256); } @@ -41,6 +43,7 @@ flags = background ? (flags | 64) : (flags & ~64); flags = br.ReadInt32(); silent = (flags & 32) != 0; background = (flags & 64) != 0; +with_my_score = (flags & 256) != 0; from_peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); id = (TLVector)ObjectUtils.DeserializeVector(br); random_id = (TLVector)ObjectUtils.DeserializeVector(br); @@ -55,6 +58,7 @@ to_peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); bw.Write(flags); + ObjectUtils.SerializeObject(from_peer,bw); ObjectUtils.SerializeObject(id,bw); ObjectUtils.SerializeObject(random_id,bw); diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs new file mode 100644 index 0000000..3b53dc0 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1475442322)] + public class TLRequestGetArchivedStickers : TLMethod + { + public override int Constructor + { + get + { + return 1475442322; + } + } + + public int flags {get;set;} + public bool masks {get;set;} + public long offset_id {get;set;} + public int limit {get;set;} + public Messages.TLArchivedStickers Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = masks ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +masks = (flags & 1) != 0; +offset_id = br.ReadInt64(); +limit = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +bw.Write(offset_id); +bw.Write(limit); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLArchivedStickers)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetAttachedStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestGetAttachedStickers.cs new file mode 100644 index 0000000..4af7e75 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetAttachedStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-866424884)] + public class TLRequestGetAttachedStickers : TLMethod + { + public override int Constructor + { + get + { + return -866424884; + } + } + + public TLAbsInputStickeredMedia media {get;set;} + public TLVector Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + media = (TLAbsInputStickeredMedia)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(media,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs b/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs index 2b53627..2ebe083 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1494659324)] + [TLObject(-2130010132)] public class TLRequestGetBotCallbackAnswer : TLMethod { public override int Constructor { get { - return -1494659324; + return -2130010132; } } - public TLAbsInputPeer peer {get;set;} + public int flags {get;set;} + public bool game {get;set;} + public TLAbsInputPeer peer {get;set;} public int msg_id {get;set;} public byte[] data {get;set;} public Messages.TLBotCallbackAnswer Response{ get; set;} @@ -26,22 +28,35 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - + flags = 0; +flags = game ? (flags | 2) : (flags & ~2); +flags = data != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + flags = br.ReadInt32(); +game = (flags & 2) != 0; +peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); msg_id = br.ReadInt32(); +if ((flags & 1) != 0) data = BytesUtil.Deserialize(br); +else +data = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(peer,bw); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(peer,bw); bw.Write(msg_id); +if ((flags & 1) != 0) BytesUtil.Serialize(data,bw); } diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetFeaturedStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestGetFeaturedStickers.cs new file mode 100644 index 0000000..1b5c873 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetFeaturedStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(766298703)] + public class TLRequestGetFeaturedStickers : TLMethod + { + public override int Constructor + { + get + { + return 766298703; + } + } + + public int hash {get;set;} + public Messages.TLAbsFeaturedStickers Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(hash); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsFeaturedStickers)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetGameHighScores.cs b/TeleSharp.TL/TL/Messages/TLRequestGetGameHighScores.cs new file mode 100644 index 0000000..90efa41 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetGameHighScores.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-400399203)] + public class TLRequestGetGameHighScores : TLMethod + { + public override int Constructor + { + get + { + return -400399203; + } + } + + public TLAbsInputPeer peer {get;set;} + public int id {get;set;} + public TLAbsInputUser user_id {get;set;} + public Messages.TLHighScores Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); +id = br.ReadInt32(); +user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +bw.Write(id); +ObjectUtils.SerializeObject(user_id,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLHighScores)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetInlineGameHighScores.cs b/TeleSharp.TL/TL/Messages/TLRequestGetInlineGameHighScores.cs new file mode 100644 index 0000000..2762014 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetInlineGameHighScores.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(258170395)] + public class TLRequestGetInlineGameHighScores : TLMethod + { + public override int Constructor + { + get + { + return 258170395; + } + } + + public TLInputBotInlineMessageID id {get;set;} + public TLAbsInputUser user_id {get;set;} + public Messages.TLHighScores Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = (TLInputBotInlineMessageID)ObjectUtils.DeserializeObject(br); +user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(id,bw); +ObjectUtils.SerializeObject(user_id,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLHighScores)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetMaskStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestGetMaskStickers.cs new file mode 100644 index 0000000..0449515 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetMaskStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1706608543)] + public class TLRequestGetMaskStickers : TLMethod + { + public override int Constructor + { + get + { + return 1706608543; + } + } + + public int hash {get;set;} + public Messages.TLAbsAllStickers Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(hash); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsAllStickers)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs new file mode 100644 index 0000000..bb45759 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1587647177)] + public class TLRequestGetRecentStickers : TLMethod + { + public override int Constructor + { + get + { + return 1587647177; + } + } + + public int flags {get;set;} + public bool attached {get;set;} + public int hash {get;set;} + public Messages.TLAbsRecentStickers Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = attached ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +attached = (flags & 1) != 0; +hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +bw.Write(hash); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsRecentStickers)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestInstallStickerSet.cs b/TeleSharp.TL/TL/Messages/TLRequestInstallStickerSet.cs index 62c40e3..795c80b 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestInstallStickerSet.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestInstallStickerSet.cs @@ -7,20 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(2066793382)] + [TLObject(-946871200)] public class TLRequestInstallStickerSet : TLMethod { public override int Constructor { get { - return 2066793382; + return -946871200; } } public TLAbsInputStickerSet stickerset {get;set;} - public bool disabled {get;set;} - public bool Response{ get; set;} + public bool archived {get;set;} + public Messages.TLAbsStickerSetInstallResult Response{ get; set;} public void ComputeFlags() @@ -31,7 +31,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { stickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); -disabled = BoolUtil.Deserialize(br); +archived = BoolUtil.Deserialize(br); } @@ -39,12 +39,12 @@ disabled = BoolUtil.Deserialize(br); { bw.Write(Constructor); ObjectUtils.SerializeObject(stickerset,bw); -BoolUtil.Serialize(disabled,bw); +BoolUtil.Serialize(archived,bw); } public override void deserializeResponse(BinaryReader br) { - Response = BoolUtil.Deserialize(br); + Response = (Messages.TLAbsStickerSetInstallResult)ObjectUtils.DeserializeObject(br); } } diff --git a/TeleSharp.TL/TL/Messages/TLRequestReadFeaturedStickers.cs b/TeleSharp.TL/TL/Messages/TLRequestReadFeaturedStickers.cs new file mode 100644 index 0000000..aee4675 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestReadFeaturedStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1527873830)] + public class TLRequestReadFeaturedStickers : TLMethod + { + public override int Constructor + { + get + { + return 1527873830; + } + } + + public TLVector id {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(id,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs b/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs index dfd9622..1162560 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs @@ -7,36 +7,45 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1613775824)] + [TLObject(2016638777)] public class TLRequestReorderStickerSets : TLMethod { public override int Constructor { get { - return -1613775824; + return 2016638777; } } - public TLVector order {get;set;} + public int flags {get;set;} + public bool masks {get;set;} + public TLVector order {get;set;} public bool Response{ get; set;} public void ComputeFlags() { - + flags = 0; +flags = masks ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - order = (TLVector)ObjectUtils.DeserializeVector(br); + flags = br.ReadInt32(); +masks = (flags & 1) != 0; +order = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(order,bw); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(order,bw); } public override void deserializeResponse(BinaryReader br) diff --git a/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs b/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs new file mode 100644 index 0000000..189d49a --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(958863608)] + public class TLRequestSaveRecentSticker : TLMethod + { + public override int Constructor + { + get + { + return 958863608; + } + } + + public int flags {get;set;} + public bool attached {get;set;} + public TLAbsInputDocument id {get;set;} + public bool unsave {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = attached ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +attached = (flags & 1) != 0; +id = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); +unsave = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(id,bw); +BoolUtil.Serialize(unsave,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs b/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs index a7e2b7b..71b8e6b 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(1209817370)] + [TLObject(-920136629)] public class TLRequestSetBotCallbackAnswer : TLMethod { public override int Constructor { get { - return 1209817370; + return -920136629; } } @@ -22,6 +22,7 @@ namespace TeleSharp.TL.Messages public bool alert {get;set;} public long query_id {get;set;} public string message {get;set;} + public string url {get;set;} public bool Response{ get; set;} @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Messages flags = 0; flags = alert ? (flags | 2) : (flags & ~2); flags = message != null ? (flags | 1) : (flags & ~1); +flags = url != null ? (flags | 4) : (flags & ~4); } @@ -43,6 +45,11 @@ message = StringUtil.Deserialize(br); else message = null; +if ((flags & 4) != 0) +url = StringUtil.Deserialize(br); +else +url = null; + } @@ -55,6 +62,8 @@ bw.Write(flags); bw.Write(query_id); if ((flags & 1) != 0) StringUtil.Serialize(message,bw); +if ((flags & 4) != 0) +StringUtil.Serialize(url,bw); } public override void deserializeResponse(BinaryReader br) diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs b/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs new file mode 100644 index 0000000..423efdd --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1896289088)] + public class TLRequestSetGameScore : TLMethod + { + public override int Constructor + { + get + { + return -1896289088; + } + } + + public int flags {get;set;} + public bool edit_message {get;set;} + public TLAbsInputPeer peer {get;set;} + public int id {get;set;} + public TLAbsInputUser user_id {get;set;} + public int score {get;set;} + public TLAbsUpdates Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = edit_message ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +edit_message = (flags & 1) != 0; +peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); +id = br.ReadInt32(); +user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); +score = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(peer,bw); +bw.Write(id); +ObjectUtils.SerializeObject(user_id,bw); +bw.Write(score); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs b/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs new file mode 100644 index 0000000..d3efa0b --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(363700068)] + public class TLRequestSetInlineGameScore : TLMethod + { + public override int Constructor + { + get + { + return 363700068; + } + } + + public int flags {get;set;} + public bool edit_message {get;set;} + public TLInputBotInlineMessageID id {get;set;} + public TLAbsInputUser user_id {get;set;} + public int score {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = edit_message ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +edit_message = (flags & 1) != 0; +id = (TLInputBotInlineMessageID)ObjectUtils.DeserializeObject(br); +user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); +score = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(id,bw); +ObjectUtils.SerializeObject(user_id,bw); +bw.Write(score); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLStickerSetInstallResultArchive.cs b/TeleSharp.TL/TL/Messages/TLStickerSetInstallResultArchive.cs new file mode 100644 index 0000000..509f830 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLStickerSetInstallResultArchive.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(904138920)] + public class TLStickerSetInstallResultArchive : TLAbsStickerSetInstallResult + { + public override int Constructor + { + get + { + return 904138920; + } + } + + public TLVector sets {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + sets = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(sets,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLStickerSetInstallResultSuccess.cs b/TeleSharp.TL/TL/Messages/TLStickerSetInstallResultSuccess.cs new file mode 100644 index 0000000..667bfdd --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLStickerSetInstallResultSuccess.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(946083368)] + public class TLStickerSetInstallResultSuccess : TLAbsStickerSetInstallResult + { + public override int Constructor + { + get + { + return 946083368; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/Photos/TLRequestUpdateProfilePhoto.cs b/TeleSharp.TL/TL/Photos/TLRequestUpdateProfilePhoto.cs index 42f095a..521d4e7 100644 --- a/TeleSharp.TL/TL/Photos/TLRequestUpdateProfilePhoto.cs +++ b/TeleSharp.TL/TL/Photos/TLRequestUpdateProfilePhoto.cs @@ -7,19 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Photos { - [TLObject(-285902432)] + [TLObject(-256159406)] public class TLRequestUpdateProfilePhoto : TLMethod { public override int Constructor { get { - return -285902432; + return -256159406; } } public TLAbsInputPhoto id {get;set;} - public TLAbsInputPhotoCrop crop {get;set;} public TLAbsUserProfilePhoto Response{ get; set;} @@ -31,7 +30,6 @@ namespace TeleSharp.TL.Photos public override void DeserializeBody(BinaryReader br) { id = (TLAbsInputPhoto)ObjectUtils.DeserializeObject(br); -crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); } @@ -39,7 +37,6 @@ crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); { bw.Write(Constructor); ObjectUtils.SerializeObject(id,bw); -ObjectUtils.SerializeObject(crop,bw); } public override void deserializeResponse(BinaryReader br) diff --git a/TeleSharp.TL/TL/Photos/TLRequestUploadProfilePhoto.cs b/TeleSharp.TL/TL/Photos/TLRequestUploadProfilePhoto.cs index 7119b15..4693789 100644 --- a/TeleSharp.TL/TL/Photos/TLRequestUploadProfilePhoto.cs +++ b/TeleSharp.TL/TL/Photos/TLRequestUploadProfilePhoto.cs @@ -7,21 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Photos { - [TLObject(-720397176)] + [TLObject(1328726168)] public class TLRequestUploadProfilePhoto : TLMethod { public override int Constructor { get { - return -720397176; + return 1328726168; } } public TLAbsInputFile file {get;set;} - public string caption {get;set;} - public TLAbsInputGeoPoint geo_point {get;set;} - public TLAbsInputPhotoCrop crop {get;set;} public Photos.TLPhoto Response{ get; set;} @@ -33,9 +30,6 @@ namespace TeleSharp.TL.Photos public override void DeserializeBody(BinaryReader br) { file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); -caption = StringUtil.Deserialize(br); -geo_point = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); -crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); } @@ -43,9 +37,6 @@ crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); { bw.Write(Constructor); ObjectUtils.SerializeObject(file,bw); -StringUtil.Serialize(caption,bw); -ObjectUtils.SerializeObject(geo_point,bw); -ObjectUtils.SerializeObject(crop,bw); } public override void deserializeResponse(BinaryReader br) diff --git a/TeleSharp.TL/TL/TLAbsInputGame.cs b/TeleSharp.TL/TL/TLAbsInputGame.cs new file mode 100644 index 0000000..16334de --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsInputGame.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputGame : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsInputStickeredMedia.cs b/TeleSharp.TL/TL/TLAbsInputStickeredMedia.cs new file mode 100644 index 0000000..23d182d --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsInputStickeredMedia.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputStickeredMedia : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsStickerSetCovered.cs b/TeleSharp.TL/TL/TLAbsStickerSetCovered.cs new file mode 100644 index 0000000..2a558fb --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsStickerSetCovered.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsStickerSetCovered : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLChatInvite.cs b/TeleSharp.TL/TL/TLChatInvite.cs index b127691..9798a25 100644 --- a/TeleSharp.TL/TL/TLChatInvite.cs +++ b/TeleSharp.TL/TL/TLChatInvite.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1813406880)] + [TLObject(-613092008)] public class TLChatInvite : TLAbsChatInvite { public override int Constructor { get { - return -1813406880; + return -613092008; } } @@ -24,6 +24,9 @@ namespace TeleSharp.TL public bool @public {get;set;} public bool megagroup {get;set;} public string title {get;set;} + public TLAbsChatPhoto photo {get;set;} + public int participants_count {get;set;} + public TLVector participants {get;set;} public void ComputeFlags() @@ -33,6 +36,7 @@ flags = channel ? (flags | 1) : (flags & ~1); flags = broadcast ? (flags | 2) : (flags & ~2); flags = @public ? (flags | 4) : (flags & ~4); flags = megagroup ? (flags | 8) : (flags & ~8); +flags = participants != null ? (flags | 16) : (flags & ~16); } @@ -44,6 +48,13 @@ broadcast = (flags & 2) != 0; @public = (flags & 4) != 0; megagroup = (flags & 8) != 0; title = StringUtil.Deserialize(br); +photo = (TLAbsChatPhoto)ObjectUtils.DeserializeObject(br); +participants_count = br.ReadInt32(); +if ((flags & 16) != 0) +participants = (TLVector)ObjectUtils.DeserializeVector(br); +else +participants = null; + } @@ -57,6 +68,10 @@ bw.Write(flags); StringUtil.Serialize(title,bw); +ObjectUtils.SerializeObject(photo,bw); +bw.Write(participants_count); +if ((flags & 16) != 0) +ObjectUtils.SerializeObject(participants,bw); } } diff --git a/TeleSharp.TL/TL/TLConfig.cs b/TeleSharp.TL/TL/TLConfig.cs index e3cd209..92b8ee3 100644 --- a/TeleSharp.TL/TL/TLConfig.cs +++ b/TeleSharp.TL/TL/TLConfig.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-918482040)] + [TLObject(-1704251862)] public class TLConfig : TLObject { public override int Constructor { get { - return -918482040; + return -1704251862; } } - public int date {get;set;} + public int flags {get;set;} + public int date {get;set;} public int expires {get;set;} public bool test_mode {get;set;} public int this_dc {get;set;} @@ -38,17 +39,22 @@ namespace TeleSharp.TL public int saved_gifs_limit {get;set;} public int edit_time_limit {get;set;} public int rating_e_decay {get;set;} + public int stickers_recent_limit {get;set;} + public int? tmp_sessions {get;set;} public TLVector disabled_features {get;set;} public void ComputeFlags() { - + flags = 0; +flags = tmp_sessions != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - date = br.ReadInt32(); + flags = br.ReadInt32(); +date = br.ReadInt32(); expires = br.ReadInt32(); test_mode = BoolUtil.Deserialize(br); this_dc = br.ReadInt32(); @@ -68,6 +74,12 @@ push_chat_limit = br.ReadInt32(); saved_gifs_limit = br.ReadInt32(); edit_time_limit = br.ReadInt32(); rating_e_decay = br.ReadInt32(); +stickers_recent_limit = br.ReadInt32(); +if ((flags & 1) != 0) +tmp_sessions = br.ReadInt32(); +else +tmp_sessions = null; + disabled_features = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -75,7 +87,9 @@ disabled_features = (TLVector)ObjectUtils.DeserializeVector attributes {get;set;} @@ -42,6 +43,7 @@ mime_type = StringUtil.Deserialize(br); size = br.ReadInt32(); thumb = (TLAbsPhotoSize)ObjectUtils.DeserializeObject(br); dc_id = br.ReadInt32(); +version = br.ReadInt32(); attributes = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -56,6 +58,7 @@ StringUtil.Serialize(mime_type,bw); bw.Write(size); ObjectUtils.SerializeObject(thumb,bw); bw.Write(dc_id); +bw.Write(version); ObjectUtils.SerializeObject(attributes,bw); } diff --git a/TeleSharp.TL/TL/TLDocumentAttributeHasStickers.cs b/TeleSharp.TL/TL/TLDocumentAttributeHasStickers.cs new file mode 100644 index 0000000..706cfaa --- /dev/null +++ b/TeleSharp.TL/TL/TLDocumentAttributeHasStickers.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1744710921)] + public class TLDocumentAttributeHasStickers : TLAbsDocumentAttribute + { + public override int Constructor + { + get + { + return -1744710921; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs b/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs index f352f61..3c784c8 100644 --- a/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs +++ b/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs @@ -7,38 +7,56 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(978674434)] + [TLObject(1662637586)] public class TLDocumentAttributeSticker : TLAbsDocumentAttribute { public override int Constructor { get { - return 978674434; + return 1662637586; } } - public string alt {get;set;} + public int flags {get;set;} + public bool mask {get;set;} + public string alt {get;set;} public TLAbsInputStickerSet stickerset {get;set;} + public TLMaskCoords mask_coords {get;set;} public void ComputeFlags() { - + flags = 0; +flags = mask ? (flags | 2) : (flags & ~2); +flags = mask_coords != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - alt = StringUtil.Deserialize(br); + flags = br.ReadInt32(); +mask = (flags & 2) != 0; +alt = StringUtil.Deserialize(br); stickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); +if ((flags & 1) != 0) +mask_coords = (TLMaskCoords)ObjectUtils.DeserializeObject(br); +else +mask_coords = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - StringUtil.Serialize(alt,bw); + ComputeFlags(); +bw.Write(flags); + +StringUtil.Serialize(alt,bw); ObjectUtils.SerializeObject(stickerset,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(mask_coords,bw); } } diff --git a/TeleSharp.TL/TL/TLGame.cs b/TeleSharp.TL/TL/TLGame.cs new file mode 100644 index 0000000..3ffebf3 --- /dev/null +++ b/TeleSharp.TL/TL/TLGame.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1107729093)] + public class TLGame : TLObject + { + public override int Constructor + { + get + { + return -1107729093; + } + } + + public int flags {get;set;} + public long id {get;set;} + public long access_hash {get;set;} + public string short_name {get;set;} + public string title {get;set;} + public string description {get;set;} + public TLAbsPhoto photo {get;set;} + public TLAbsDocument document {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = document != null ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +id = br.ReadInt64(); +access_hash = br.ReadInt64(); +short_name = StringUtil.Deserialize(br); +title = StringUtil.Deserialize(br); +description = StringUtil.Deserialize(br); +photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); +if ((flags & 1) != 0) +document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); +else +document = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(id); +bw.Write(access_hash); +StringUtil.Serialize(short_name,bw); +StringUtil.Serialize(title,bw); +StringUtil.Serialize(description,bw); +ObjectUtils.SerializeObject(photo,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(document,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLHighScore.cs b/TeleSharp.TL/TL/TLHighScore.cs new file mode 100644 index 0000000..d780248 --- /dev/null +++ b/TeleSharp.TL/TL/TLHighScore.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1493171408)] + public class TLHighScore : TLObject + { + public override int Constructor + { + get + { + return 1493171408; + } + } + + public int pos {get;set;} + public int user_id {get;set;} + public int score {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + pos = br.ReadInt32(); +user_id = br.ReadInt32(); +score = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(pos); +bw.Write(user_id); +bw.Write(score); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs b/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs new file mode 100644 index 0000000..719f6f8 --- /dev/null +++ b/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1262639204)] + public class TLInputBotInlineMessageGame : TLAbsInputBotInlineMessage + { + public override int Constructor + { + get + { + return 1262639204; + } + } + + public int flags {get;set;} + public TLAbsReplyMarkup reply_markup {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = reply_markup != null ? (flags | 4) : (flags & ~4); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +if ((flags & 4) != 0) +reply_markup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); +else +reply_markup = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +if ((flags & 4) != 0) +ObjectUtils.SerializeObject(reply_markup,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputBotInlineResultGame.cs b/TeleSharp.TL/TL/TLInputBotInlineResultGame.cs new file mode 100644 index 0000000..acffa0c --- /dev/null +++ b/TeleSharp.TL/TL/TLInputBotInlineResultGame.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1336154098)] + public class TLInputBotInlineResultGame : TLAbsInputBotInlineResult + { + public override int Constructor + { + get + { + return 1336154098; + } + } + + public string id {get;set;} + public string short_name {get;set;} + public TLAbsInputBotInlineMessage send_message {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = StringUtil.Deserialize(br); +short_name = StringUtil.Deserialize(br); +send_message = (TLAbsInputBotInlineMessage)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(id,bw); +StringUtil.Serialize(short_name,bw); +ObjectUtils.SerializeObject(send_message,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputChatPhoto.cs b/TeleSharp.TL/TL/TLInputChatPhoto.cs index 39cefa1..9fbf75f 100644 --- a/TeleSharp.TL/TL/TLInputChatPhoto.cs +++ b/TeleSharp.TL/TL/TLInputChatPhoto.cs @@ -7,19 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1293828344)] + [TLObject(-1991004873)] public class TLInputChatPhoto : TLAbsInputChatPhoto { public override int Constructor { get { - return -1293828344; + return -1991004873; } } public TLAbsInputPhoto id {get;set;} - public TLAbsInputPhotoCrop crop {get;set;} public void ComputeFlags() @@ -30,7 +29,6 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { id = (TLAbsInputPhoto)ObjectUtils.DeserializeObject(br); -crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); } @@ -38,7 +36,6 @@ crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); { bw.Write(Constructor); ObjectUtils.SerializeObject(id,bw); -ObjectUtils.SerializeObject(crop,bw); } } diff --git a/TeleSharp.TL/TL/TLInputChatUploadedPhoto.cs b/TeleSharp.TL/TL/TLInputChatUploadedPhoto.cs index 1c51302..261abd1 100644 --- a/TeleSharp.TL/TL/TLInputChatUploadedPhoto.cs +++ b/TeleSharp.TL/TL/TLInputChatUploadedPhoto.cs @@ -7,19 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1809496270)] + [TLObject(-1837345356)] public class TLInputChatUploadedPhoto : TLAbsInputChatPhoto { public override int Constructor { get { - return -1809496270; + return -1837345356; } } public TLAbsInputFile file {get;set;} - public TLAbsInputPhotoCrop crop {get;set;} public void ComputeFlags() @@ -30,7 +29,6 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); -crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); } @@ -38,7 +36,6 @@ crop = (TLAbsInputPhotoCrop)ObjectUtils.DeserializeObject(br); { bw.Write(Constructor); ObjectUtils.SerializeObject(file,bw); -ObjectUtils.SerializeObject(crop,bw); } } diff --git a/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs b/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs index c3c3598..7ea3962 100644 --- a/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs +++ b/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1313188841)] + [TLObject(1125058340)] public class TLInputDocumentFileLocation : TLAbsInputFileLocation { public override int Constructor { get { - return 1313188841; + return 1125058340; } } public long id {get;set;} public long access_hash {get;set;} + public int version {get;set;} public void ComputeFlags() @@ -31,6 +32,7 @@ namespace TeleSharp.TL { id = br.ReadInt64(); access_hash = br.ReadInt64(); +version = br.ReadInt32(); } @@ -39,6 +41,7 @@ access_hash = br.ReadInt64(); bw.Write(Constructor); bw.Write(id); bw.Write(access_hash); +bw.Write(version); } } diff --git a/TeleSharp.TL/TL/TLInputGameID.cs b/TeleSharp.TL/TL/TLInputGameID.cs new file mode 100644 index 0000000..d397528 --- /dev/null +++ b/TeleSharp.TL/TL/TLInputGameID.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(53231223)] + public class TLInputGameID : TLAbsInputGame + { + public override int Constructor + { + get + { + return 53231223; + } + } + + public long id {get;set;} + public long access_hash {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = br.ReadInt64(); +access_hash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(id); +bw.Write(access_hash); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputGameShortName.cs b/TeleSharp.TL/TL/TLInputGameShortName.cs new file mode 100644 index 0000000..0231027 --- /dev/null +++ b/TeleSharp.TL/TL/TLInputGameShortName.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1020139510)] + public class TLInputGameShortName : TLAbsInputGame + { + public override int Constructor + { + get + { + return -1020139510; + } + } + + public TLAbsInputUser bot_id {get;set;} + public string short_name {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + bot_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); +short_name = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(bot_id,bw); +StringUtil.Serialize(short_name,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs b/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs new file mode 100644 index 0000000..e81ee17 --- /dev/null +++ b/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-437690244)] + public class TLInputMediaDocumentExternal : TLAbsInputMedia + { + public override int Constructor + { + get + { + return -437690244; + } + } + + public string url {get;set;} + public string caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +caption = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +StringUtil.Serialize(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputMediaGame.cs b/TeleSharp.TL/TL/TLInputMediaGame.cs new file mode 100644 index 0000000..55cda86 --- /dev/null +++ b/TeleSharp.TL/TL/TLInputMediaGame.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-750828557)] + public class TLInputMediaGame : TLAbsInputMedia + { + public override int Constructor + { + get + { + return -750828557; + } + } + + public TLAbsInputGame id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = (TLAbsInputGame)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(id,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs b/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs new file mode 100644 index 0000000..a252aab --- /dev/null +++ b/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1252045032)] + public class TLInputMediaPhotoExternal : TLAbsInputMedia + { + public override int Constructor + { + get + { + return -1252045032; + } + } + + public string url {get;set;} + public string caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +caption = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +StringUtil.Serialize(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs b/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs index 9a66ef1..23a57a8 100644 --- a/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs +++ b/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs @@ -7,44 +7,58 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(495530093)] + [TLObject(-797904407)] public class TLInputMediaUploadedDocument : TLAbsInputMedia { public override int Constructor { get { - return 495530093; + return -797904407; } } - public TLAbsInputFile file {get;set;} + public int flags {get;set;} + public TLAbsInputFile file {get;set;} public string mime_type {get;set;} public TLVector attributes {get;set;} public string caption {get;set;} + public TLVector stickers {get;set;} public void ComputeFlags() { - + flags = 0; +flags = stickers != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); + flags = br.ReadInt32(); +file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); mime_type = StringUtil.Deserialize(br); attributes = (TLVector)ObjectUtils.DeserializeVector(br); caption = StringUtil.Deserialize(br); +if ((flags & 1) != 0) +stickers = (TLVector)ObjectUtils.DeserializeVector(br); +else +stickers = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(file,bw); + ComputeFlags(); +bw.Write(flags); +ObjectUtils.SerializeObject(file,bw); StringUtil.Serialize(mime_type,bw); ObjectUtils.SerializeObject(attributes,bw); StringUtil.Serialize(caption,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(stickers,bw); } } diff --git a/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs b/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs index 474ed6a..beb4050 100644 --- a/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs +++ b/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs @@ -7,38 +7,52 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-139464256)] + [TLObject(1661770481)] public class TLInputMediaUploadedPhoto : TLAbsInputMedia { public override int Constructor { get { - return -139464256; + return 1661770481; } } - public TLAbsInputFile file {get;set;} + public int flags {get;set;} + public TLAbsInputFile file {get;set;} public string caption {get;set;} + public TLVector stickers {get;set;} public void ComputeFlags() { - + flags = 0; +flags = stickers != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); + flags = br.ReadInt32(); +file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); caption = StringUtil.Deserialize(br); +if ((flags & 1) != 0) +stickers = (TLVector)ObjectUtils.DeserializeVector(br); +else +stickers = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(file,bw); + ComputeFlags(); +bw.Write(flags); +ObjectUtils.SerializeObject(file,bw); StringUtil.Serialize(caption,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(stickers,bw); } } diff --git a/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs b/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs index bfe9673..17b1c84 100644 --- a/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs +++ b/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs @@ -7,47 +7,61 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1386138479)] + [TLObject(1356369070)] public class TLInputMediaUploadedThumbDocument : TLAbsInputMedia { public override int Constructor { get { - return -1386138479; + return 1356369070; } } - public TLAbsInputFile file {get;set;} + public int flags {get;set;} + public TLAbsInputFile file {get;set;} public TLAbsInputFile thumb {get;set;} public string mime_type {get;set;} public TLVector attributes {get;set;} public string caption {get;set;} + public TLVector stickers {get;set;} public void ComputeFlags() { - + flags = 0; +flags = stickers != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); + flags = br.ReadInt32(); +file = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); thumb = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); mime_type = StringUtil.Deserialize(br); attributes = (TLVector)ObjectUtils.DeserializeVector(br); caption = StringUtil.Deserialize(br); +if ((flags & 1) != 0) +stickers = (TLVector)ObjectUtils.DeserializeVector(br); +else +stickers = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(file,bw); + ComputeFlags(); +bw.Write(flags); +ObjectUtils.SerializeObject(file,bw); ObjectUtils.SerializeObject(thumb,bw); StringUtil.Serialize(mime_type,bw); ObjectUtils.SerializeObject(attributes,bw); StringUtil.Serialize(caption,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(stickers,bw); } } diff --git a/TeleSharp.TL/TL/TLInputStickeredMediaDocument.cs b/TeleSharp.TL/TL/TLInputStickeredMediaDocument.cs new file mode 100644 index 0000000..800913c --- /dev/null +++ b/TeleSharp.TL/TL/TLInputStickeredMediaDocument.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(70813275)] + public class TLInputStickeredMediaDocument : TLAbsInputStickeredMedia + { + public override int Constructor + { + get + { + return 70813275; + } + } + + public TLAbsInputDocument id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(id,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputStickeredMediaPhoto.cs b/TeleSharp.TL/TL/TLInputStickeredMediaPhoto.cs new file mode 100644 index 0000000..6d8ffda --- /dev/null +++ b/TeleSharp.TL/TL/TLInputStickeredMediaPhoto.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1251549527)] + public class TLInputStickeredMediaPhoto : TLAbsInputStickeredMedia + { + public override int Constructor + { + get + { + return 1251549527; + } + } + + public TLAbsInputPhoto id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = (TLAbsInputPhoto)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(id,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLKeyboardButtonGame.cs b/TeleSharp.TL/TL/TLKeyboardButtonGame.cs new file mode 100644 index 0000000..8b475c5 --- /dev/null +++ b/TeleSharp.TL/TL/TLKeyboardButtonGame.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1358175439)] + public class TLKeyboardButtonGame : TLAbsKeyboardButton + { + public override int Constructor + { + get + { + return 1358175439; + } + } + + public string text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs b/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs index 49875a6..7c0459a 100644 --- a/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs +++ b/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs @@ -7,29 +7,35 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-367298028)] + [TLObject(90744648)] public class TLKeyboardButtonSwitchInline : TLAbsKeyboardButton { public override int Constructor { get { - return -367298028; + return 90744648; } } - public string text {get;set;} + public int flags {get;set;} + public bool same_peer {get;set;} + public string text {get;set;} public string query {get;set;} public void ComputeFlags() { - + flags = 0; +flags = same_peer ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - text = StringUtil.Deserialize(br); + flags = br.ReadInt32(); +same_peer = (flags & 1) != 0; +text = StringUtil.Deserialize(br); query = StringUtil.Deserialize(br); } @@ -37,7 +43,10 @@ query = StringUtil.Deserialize(br); public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - StringUtil.Serialize(text,bw); + ComputeFlags(); +bw.Write(flags); + +StringUtil.Serialize(text,bw); StringUtil.Serialize(query,bw); } diff --git a/TeleSharp.TL/TL/TLMaskCoords.cs b/TeleSharp.TL/TL/TLMaskCoords.cs new file mode 100644 index 0000000..0d0e890 --- /dev/null +++ b/TeleSharp.TL/TL/TLMaskCoords.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1361650766)] + public class TLMaskCoords : TLObject + { + public override int Constructor + { + get + { + return -1361650766; + } + } + + public int n {get;set;} + public double x {get;set;} + public double y {get;set;} + public double zoom {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + n = br.ReadInt32(); +x = br.ReadDouble(); +y = br.ReadDouble(); +zoom = br.ReadDouble(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(n); +bw.Write(x); +bw.Write(y); +bw.Write(zoom); + + } + } +} diff --git a/TeleSharp.TL/TL/TLMessageActionGameScore.cs b/TeleSharp.TL/TL/TLMessageActionGameScore.cs new file mode 100644 index 0000000..2a0d308 --- /dev/null +++ b/TeleSharp.TL/TL/TLMessageActionGameScore.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1834538890)] + public class TLMessageActionGameScore : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -1834538890; + } + } + + public long game_id {get;set;} + public int score {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + game_id = br.ReadInt64(); +score = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(game_id); +bw.Write(score); + + } + } +} diff --git a/TeleSharp.TL/TL/TLMessageMediaGame.cs b/TeleSharp.TL/TL/TLMessageMediaGame.cs new file mode 100644 index 0000000..46a2462 --- /dev/null +++ b/TeleSharp.TL/TL/TLMessageMediaGame.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-38694904)] + public class TLMessageMediaGame : TLAbsMessageMedia + { + public override int Constructor + { + get + { + return -38694904; + } + } + + public TLGame game {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + game = (TLGame)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(game,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoto.cs b/TeleSharp.TL/TL/TLPhoto.cs index f181fef..a670bcd 100644 --- a/TeleSharp.TL/TL/TLPhoto.cs +++ b/TeleSharp.TL/TL/TLPhoto.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-840088834)] + [TLObject(-1836524247)] public class TLPhoto : TLAbsPhoto { public override int Constructor { get { - return -840088834; + return -1836524247; } } - public long id {get;set;} + public int flags {get;set;} + public bool has_stickers {get;set;} + public long id {get;set;} public long access_hash {get;set;} public int date {get;set;} public TLVector sizes {get;set;} @@ -26,12 +28,16 @@ namespace TeleSharp.TL public void ComputeFlags() { - + flags = 0; +flags = has_stickers ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - id = br.ReadInt64(); + flags = br.ReadInt32(); +has_stickers = (flags & 1) != 0; +id = br.ReadInt64(); access_hash = br.ReadInt64(); date = br.ReadInt32(); sizes = (TLVector)ObjectUtils.DeserializeVector(br); @@ -41,7 +47,10 @@ sizes = (TLVector)ObjectUtils.DeserializeVector( public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(id); + ComputeFlags(); +bw.Write(flags); + +bw.Write(id); bw.Write(access_hash); bw.Write(date); ObjectUtils.SerializeObject(sizes,bw); diff --git a/TeleSharp.TL/TL/TLSendMessageGamePlayAction.cs b/TeleSharp.TL/TL/TLSendMessageGamePlayAction.cs new file mode 100644 index 0000000..39f8943 --- /dev/null +++ b/TeleSharp.TL/TL/TLSendMessageGamePlayAction.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-580219064)] + public class TLSendMessageGamePlayAction : TLAbsSendMessageAction + { + public override int Constructor + { + get + { + return -580219064; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLStickerSet.cs b/TeleSharp.TL/TL/TLStickerSet.cs index 1b3bd05..166bf1a 100644 --- a/TeleSharp.TL/TL/TLStickerSet.cs +++ b/TeleSharp.TL/TL/TLStickerSet.cs @@ -20,8 +20,9 @@ namespace TeleSharp.TL public int flags {get;set;} public bool installed {get;set;} - public bool disabled {get;set;} + public bool archived {get;set;} public bool official {get;set;} + public bool masks {get;set;} public long id {get;set;} public long access_hash {get;set;} public string title {get;set;} @@ -34,8 +35,9 @@ namespace TeleSharp.TL { flags = 0; flags = installed ? (flags | 1) : (flags & ~1); -flags = disabled ? (flags | 2) : (flags & ~2); +flags = archived ? (flags | 2) : (flags & ~2); flags = official ? (flags | 4) : (flags & ~4); +flags = masks ? (flags | 8) : (flags & ~8); } @@ -43,8 +45,9 @@ flags = official ? (flags | 4) : (flags & ~4); { flags = br.ReadInt32(); installed = (flags & 1) != 0; -disabled = (flags & 2) != 0; +archived = (flags & 2) != 0; official = (flags & 4) != 0; +masks = (flags & 8) != 0; id = br.ReadInt64(); access_hash = br.ReadInt64(); title = StringUtil.Deserialize(br); @@ -62,6 +65,7 @@ bw.Write(flags); + bw.Write(id); bw.Write(access_hash); StringUtil.Serialize(title,bw); diff --git a/TeleSharp.TL/TL/TLStickerSetCovered.cs b/TeleSharp.TL/TL/TLStickerSetCovered.cs new file mode 100644 index 0000000..824a41c --- /dev/null +++ b/TeleSharp.TL/TL/TLStickerSetCovered.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1678812626)] + public class TLStickerSetCovered : TLAbsStickerSetCovered + { + public override int Constructor + { + get + { + return 1678812626; + } + } + + public TLStickerSet @set {get;set;} + public TLAbsDocument cover {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + @set = (TLStickerSet)ObjectUtils.DeserializeObject(br); +cover = (TLAbsDocument)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(@set,bw); +ObjectUtils.SerializeObject(cover,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLStickerSetMultiCovered.cs b/TeleSharp.TL/TL/TLStickerSetMultiCovered.cs new file mode 100644 index 0000000..f3f5d1b --- /dev/null +++ b/TeleSharp.TL/TL/TLStickerSetMultiCovered.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(872932635)] + public class TLStickerSetMultiCovered : TLAbsStickerSetCovered + { + public override int Constructor + { + get + { + return 872932635; + } + } + + public TLStickerSet @set {get;set;} + public TLVector covers {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + @set = (TLStickerSet)ObjectUtils.DeserializeObject(br); +covers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(@set,bw); +ObjectUtils.SerializeObject(covers,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs b/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs index ac72e51..1ef7fce 100644 --- a/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs +++ b/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs @@ -7,47 +7,70 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1500747636)] + [TLObject(-415938591)] public class TLUpdateBotCallbackQuery : TLAbsUpdate { public override int Constructor { get { - return -1500747636; + return -415938591; } } - public long query_id {get;set;} + public int flags {get;set;} + public long query_id {get;set;} public int user_id {get;set;} public TLAbsPeer peer {get;set;} public int msg_id {get;set;} + public long chat_instance {get;set;} public byte[] data {get;set;} + public string game_short_name {get;set;} public void ComputeFlags() { - + flags = 0; +flags = data != null ? (flags | 1) : (flags & ~1); +flags = game_short_name != null ? (flags | 2) : (flags & ~2); + } public override void DeserializeBody(BinaryReader br) { - query_id = br.ReadInt64(); + flags = br.ReadInt32(); +query_id = br.ReadInt64(); user_id = br.ReadInt32(); peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); msg_id = br.ReadInt32(); +chat_instance = br.ReadInt64(); +if ((flags & 1) != 0) data = BytesUtil.Deserialize(br); +else +data = null; + +if ((flags & 2) != 0) +game_short_name = StringUtil.Deserialize(br); +else +game_short_name = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(query_id); + ComputeFlags(); +bw.Write(flags); +bw.Write(query_id); bw.Write(user_id); ObjectUtils.SerializeObject(peer,bw); bw.Write(msg_id); +bw.Write(chat_instance); +if ((flags & 1) != 0) BytesUtil.Serialize(data,bw); +if ((flags & 2) != 0) +StringUtil.Serialize(game_short_name,bw); } } diff --git a/TeleSharp.TL/TL/TLUpdateConfig.cs b/TeleSharp.TL/TL/TLUpdateConfig.cs new file mode 100644 index 0000000..ad80876 --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateConfig.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1574314746)] + public class TLUpdateConfig : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1574314746; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs b/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs index b34afc0..de61535 100644 --- a/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs +++ b/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs @@ -7,44 +7,67 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(750622127)] + [TLObject(-103646630)] public class TLUpdateInlineBotCallbackQuery : TLAbsUpdate { public override int Constructor { get { - return 750622127; + return -103646630; } } - public long query_id {get;set;} + public int flags {get;set;} + public long query_id {get;set;} public int user_id {get;set;} public TLInputBotInlineMessageID msg_id {get;set;} + public long chat_instance {get;set;} public byte[] data {get;set;} + public string game_short_name {get;set;} public void ComputeFlags() { - + flags = 0; +flags = data != null ? (flags | 1) : (flags & ~1); +flags = game_short_name != null ? (flags | 2) : (flags & ~2); + } public override void DeserializeBody(BinaryReader br) { - query_id = br.ReadInt64(); + flags = br.ReadInt32(); +query_id = br.ReadInt64(); user_id = br.ReadInt32(); msg_id = (TLInputBotInlineMessageID)ObjectUtils.DeserializeObject(br); +chat_instance = br.ReadInt64(); +if ((flags & 1) != 0) data = BytesUtil.Deserialize(br); +else +data = null; + +if ((flags & 2) != 0) +game_short_name = StringUtil.Deserialize(br); +else +game_short_name = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(query_id); + ComputeFlags(); +bw.Write(flags); +bw.Write(query_id); bw.Write(user_id); ObjectUtils.SerializeObject(msg_id,bw); +bw.Write(chat_instance); +if ((flags & 1) != 0) BytesUtil.Serialize(data,bw); +if ((flags & 2) != 0) +StringUtil.Serialize(game_short_name,bw); } } diff --git a/TeleSharp.TL/TL/TLUpdatePtsChanged.cs b/TeleSharp.TL/TL/TLUpdatePtsChanged.cs new file mode 100644 index 0000000..746ef21 --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdatePtsChanged.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(861169551)] + public class TLUpdatePtsChanged : TLAbsUpdate + { + public override int Constructor + { + get + { + return 861169551; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateReadFeaturedStickers.cs b/TeleSharp.TL/TL/TLUpdateReadFeaturedStickers.cs new file mode 100644 index 0000000..0479235 --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateReadFeaturedStickers.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1461528386)] + public class TLUpdateReadFeaturedStickers : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1461528386; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateRecentStickers.cs b/TeleSharp.TL/TL/TLUpdateRecentStickers.cs new file mode 100644 index 0000000..9f49524 --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateRecentStickers.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1706939360)] + public class TLUpdateRecentStickers : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1706939360; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs b/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs index 94f82e7..8dfdb92 100644 --- a/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs +++ b/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs @@ -7,35 +7,44 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-253774767)] + [TLObject(196268545)] public class TLUpdateStickerSetsOrder : TLAbsUpdate { public override int Constructor { get { - return -253774767; + return 196268545; } } - public TLVector order {get;set;} + public int flags {get;set;} + public bool masks {get;set;} + public TLVector order {get;set;} public void ComputeFlags() { - + flags = 0; +flags = masks ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - order = (TLVector)ObjectUtils.DeserializeVector(br); + flags = br.ReadInt32(); +masks = (flags & 1) != 0; +order = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(order,bw); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(order,bw); } } diff --git a/TeleSharp.TL/TeleSharp.TL.csproj b/TeleSharp.TL/TeleSharp.TL.csproj index 46e2a18..00f4c32 100644 --- a/TeleSharp.TL/TeleSharp.TL.csproj +++ b/TeleSharp.TL/TeleSharp.TL.csproj @@ -60,6 +60,7 @@ + @@ -73,6 +74,7 @@ + @@ -95,6 +97,7 @@ + @@ -125,6 +128,7 @@ + @@ -187,14 +191,18 @@ + + + + @@ -204,14 +212,20 @@ + + + + + + @@ -227,19 +241,26 @@ + + + + + + + @@ -249,6 +270,7 @@ + @@ -258,6 +280,7 @@ + @@ -270,7 +293,9 @@ + + @@ -281,6 +306,8 @@ + + @@ -333,6 +360,7 @@ + @@ -342,6 +370,7 @@ + @@ -361,6 +390,7 @@ + @@ -430,6 +460,7 @@ + @@ -451,11 +482,14 @@ + + + @@ -464,6 +498,7 @@ + @@ -482,14 +517,19 @@ + + + + + @@ -535,6 +575,8 @@ + + @@ -543,11 +585,13 @@ + + @@ -560,6 +604,7 @@ + @@ -579,6 +624,7 @@ + @@ -625,6 +671,7 @@ + @@ -635,6 +682,8 @@ + + @@ -656,6 +705,7 @@ + @@ -676,11 +726,14 @@ + + +