more branch fixing

This commit is contained in:
Spectralitree
2021-03-28 12:20:01 +02:00
parent e7cfd85bd5
commit 1e876ce283
4 changed files with 4 additions and 15 deletions

View File

@@ -124,14 +124,8 @@ namespace PluralKit.Bot
if (rangeStart == null) throw Errors.InvalidDateTime(durationStr);
if (rangeStart.Value.ToInstant() > now) throw Errors.FrontPercentTimeInFuture;
var title = new StringBuilder($"Frontpercent of ");
if (system.Name != null)
title.Append($"{system.Name} (`{system.Hid}`)");
else
title.Append($"`{system.Hid}`");
var frontpercent = await _db.Execute(c => _repo.GetFrontBreakdown(c, system.Id, rangeStart.Value.ToInstant(), now));
await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, system, null, system.Zone, ctx.LookupContextFor(system), title.ToString()));
await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, system, system.Zone, ctx.LookupContextFor(system), title.ToString()));
}
}
}