public async Task <Embed> GetRecentRecordEmbedAsync() { try { var recentRecords = await _justJumpDataAccess.GetRecentRecordsAsync(10); var recentRecordsString = recentRecords.Aggregate("", (currentString, nextHighscore) => currentString + $"{SimplyHelper.ClassToShortString(nextHighscore.Class)} | **__{TempusHelper.TimeSpanToFormattedTime(SimplyHelper.GetTimeSpan(nextHighscore.RunTime))}__** | **{nextHighscore.Map}** | **{nextHighscore.Name}**" + Environment.NewLine); var builder = new EmbedBuilder { Title = "**Recent Map Records**" }; builder.WithDescription(recentRecordsString) .WithColor(ColorConstants.InfoColor) .WithFooter("Updated " + DateTime.Now.ToShortTimeString()); return(builder.Build()); } catch (Exception e) { return(Logger.LogException(e)); } }
public override string ToString() => $"{SimplyHelper.ClassToShortString(Class)} | {Name} | {TempusHelper.TimeSpanToFormattedTime(SimplyHelper.GetTimeSpan(RunTime))}";