diff --git a/TeleSharp.TL/TLContext.cs b/TeleSharp.TL/TLContext.cs index 74b6cec..8550c28 100644 --- a/TeleSharp.TL/TLContext.cs +++ b/TeleSharp.TL/TLContext.cs @@ -14,19 +14,16 @@ namespace TeleSharp.TL public static void Init() { - try - { - Types = new Dictionary(); - Types = (from t in Assembly.GetExecutingAssembly().GetTypes() - where t.IsClass && t.Namespace.StartsWith("TeleSharp.TL") - where t.IsSubclassOf(typeof(TLObject)) - where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null - select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x); - Types.Add(481674261, typeof(TLVector<>)); - } - catch - { + Types = new Dictionary(); + Types = (from t in Assembly.GetExecutingAssembly().GetTypes() + where t.IsClass && t.Namespace.StartsWith("TeleSharp.TL") + where t.IsSubclassOf(typeof(TLObject)) + where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null + select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x); + if (!Types.ContainsKey(481674261)) + { + Types.Add(481674261, typeof(TLVector<>)); } } public static Type getType(int Constructor)