awards fix

This commit is contained in:
jetsparrow 2019-01-06 18:57:48 +03:00
parent ba9f698040
commit d55217e539

View File

@ -34,9 +34,9 @@ namespace JetKarmaBot.Commands
where award.ToId == asker.Id where award.ToId == asker.Id
group award by award.AwardTypeId into g group award by award.AwardTypeId into g
select new { AwardTypeId = g.Key, Amount = g.Sum(x => x.Amount) }; select new { AwardTypeId = g.Key, Amount = g.Sum(x => x.Amount) };
var awardsByType = awardsQuery.ToList();
response = currentLocale["jetkarmabot.status.listalltext"] + "\n" response = currentLocale["jetkarmabot.status.listalltext"] + "\n"
+ string.Join("\n", awardsQuery.Select(a => $" - {db.AwardTypes.Find(a.AwardTypeId).Symbol} {a.Amount}")); + string.Join("\n", awardsByType.Select(a => $" - {db.AwardTypes.Find(a.AwardTypeId).Symbol} {a.Amount}"));
} }
else else