diff --git a/NadekoBot/Classes/NadekoStats.cs b/NadekoBot/Classes/NadekoStats.cs index 85df50ff..68a41a91 100644 --- a/NadekoBot/Classes/NadekoStats.cs +++ b/NadekoBot/Classes/NadekoStats.cs @@ -11,7 +11,7 @@ namespace NadekoBot { public class NadekoStats { - public string BotVersion = "0.8-beta13"; + public string BotVersion = "NadekoBot 0.8-beta13"; private static readonly NadekoStats _instance = new NadekoStats(); public static NadekoStats Instance => _instance; @@ -49,7 +49,7 @@ namespace NadekoBot public void LoadStats() { var sb = new System.Text.StringBuilder(); - sb.AppendLine("`Author: Kwoth`"); + sb.AppendLine("`Author: Kwoth` `Library: Discord.Net`"); //$"\nDiscord.Net version: {DiscordConfig.LibVersion}" + //$"\nRuntime: {_client.GetRuntime()}" + sb.AppendLine($"`Bot Version: {BotVersion}`"); diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index 178ff9f1..16e8eb24 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -667,13 +667,16 @@ namespace NadekoBot.Modules { } public void SaveParseToDb(string where) where T : IDataModel { - var data = File.ReadAllText(where); - var arr = JObject.Parse(data)["results"] as JArray; - var objects = new List(); - foreach (JObject obj in arr) { - objects.Add(obj.ToObject()); + try { + var data = File.ReadAllText(where); + var arr = JObject.Parse(data)["results"] as JArray; + var objects = new List(); + foreach (JObject obj in arr) { + objects.Add(obj.ToObject()); + } + Classes.DBHandler.Instance.InsertMany(objects); } - Classes.DBHandler.Instance.InsertMany(objects); + catch { } } } }