Merge pull request #317 from spiralw/feat/fronters-only
Add flag to remove 'no fronter' item on frontpercent card
This commit is contained in:
@@ -499,8 +499,9 @@ namespace PluralKit.Bot
|
||||
else
|
||||
title.Append($"`{targetSystem.Hid}`");
|
||||
|
||||
var ignoreNoFronters = ctx.MatchFlag("fo", "fronters-only");
|
||||
var frontpercent = await _db.Execute(c => _repo.GetFrontBreakdown(c, targetSystem.Id, target.Id, rangeStart.Value.ToInstant(), now));
|
||||
await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, targetSystem, target, targetSystem.Zone, ctx.LookupContextFor(targetSystem), title.ToString()));
|
||||
await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, targetSystem, target, targetSystem.Zone, ctx.LookupContextFor(targetSystem), title.ToString(), ignoreNoFronters));
|
||||
}
|
||||
|
||||
private async Task<PKSystem> GetGroupSystem(Context ctx, PKGroup target, IPKConnection conn)
|
||||
|
@@ -131,8 +131,9 @@ namespace PluralKit.Bot
|
||||
else
|
||||
title.Append($"`{system.Hid}`");
|
||||
|
||||
var ignoreNoFronters = ctx.MatchFlag("fo", "fronters-only");
|
||||
var frontpercent = await _db.Execute(c => _repo.GetFrontBreakdown(c, system.Id, null, 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, null, system.Zone, ctx.LookupContextFor(system), title.ToString(), ignoreNoFronters));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user