Add -all flag on system and group cards (#216)

* Show group count on stats card

* Add -all flag on system and group cards
Shows full count, including private members.

* fix stuff broken by merging conflicts
This commit is contained in:
kittens
2020-09-12 18:10:37 -04:00
committed by GitHub
parent 5ba89d32fc
commit 42b70cde9a
5 changed files with 18 additions and 7 deletions

View File

@@ -44,5 +44,14 @@ namespace PluralKit.Bot
ctx.PopArgument();
return subject;
}
public static bool MatchPrivateFlag(this Context ctx, LookupContext pctx)
{
var privacy = true;
if (ctx.MatchFlag("a", "all")) privacy = false;
if (pctx == LookupContext.ByNonOwner && !privacy) throw Errors.LookupNotAllowed;
return privacy;
}
}
}