fixed the issue where manual library selection was selected, but no library was checked

This commit is contained in:
13xforever 2018-07-20 23:11:09 +05:00 committed by Roberto Anić Banić
parent 5a0c7c75ed
commit ae9fea4785
2 changed files with 25 additions and 16 deletions

View File

@ -54,6 +54,8 @@ namespace CompatBot.EventHandlers
if (result == null)
await args.Channel.SendMessageAsync("Log analysis failed, most likely cause is a truncated/invalid log. Please run the game again and reupload the new copy.").ConfigureAwait(false);
else
{
try
{
await args.Channel.SendMessageAsync(embed: await result.AsEmbedAsync(args.Client, args.Message).ConfigureAwait(false)).ConfigureAwait(false);
if (result.Error == LogParseState.ErrorCode.PiracyDetected)
@ -75,6 +77,11 @@ namespace CompatBot.EventHandlers
);
}
}
catch (Exception e)
{
args.Client.DebugLogger.LogMessage(LogLevel.Error, "", "Sending log results failed: " + e, DateTime.Now);
}
}
return;
}

View File

@ -121,6 +121,8 @@ namespace CompatBot.Utils.ResultFormatters
var libList = libs.Split('\n').Select(l => l.Trim(' ', '\t', '-', '\r', '[', ']')).Where(s => !string.IsNullOrEmpty(s)).ToList();
items["library_list"] = libList.Count > 0 ? string.Join(", ", libList) : "None";
}
else
items["library_list"] = "None";
foreach (var key in items.AllKeys)
{