Add group front percentages (fixing Git history)

Signed-off-by: Ske <voltasalt@gmail.com>
This commit is contained in:
Spectralitree
2021-02-09 23:36:43 +01:00
committed by Ske
parent 5615aa6c00
commit 7010becd32
6 changed files with 53 additions and 9 deletions

View File

@@ -321,10 +321,11 @@ namespace PluralKit.Bot {
return eb.Build();
}
public Task<Embed> CreateFrontPercentEmbed(FrontBreakdown breakdown, DateTimeZone tz, LookupContext ctx)
public Task<Embed> CreateFrontPercentEmbed(FrontBreakdown breakdown, PKSystem system, PKGroup group, DateTimeZone tz, LookupContext ctx, string embedTitle)
{
var actualPeriod = breakdown.RangeEnd - breakdown.RangeStart;
var eb = new EmbedBuilder()
.Title(embedTitle)
.Color(DiscordUtils.Gray)
.Footer(new($"Since {breakdown.RangeStart.FormatZoned(tz)} ({actualPeriod.FormatDuration()} ago)"));
var maxEntriesToDisplay = 24; // max 25 fields allowed in embed - reserve 1 for "others"