mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 01:00:12 +00:00
feat(bot): added "pk;s fh clear" as alias to "pk;sw delete all" (#567)
This commit is contained in:
parent
b75e3fe7d3
commit
599f0fbc54
2 changed files with 7 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ public class Switch
|
||||||
{
|
{
|
||||||
ctx.CheckSystem();
|
ctx.CheckSystem();
|
||||||
|
|
||||||
if (ctx.Match("all", "clear") || ctx.MatchFlag("all", "clear"))
|
if (ctx.Match("all", "clear") || ctx.MatchFlag("all", "clear", "c"))
|
||||||
{
|
{
|
||||||
// Subcommand: "delete all"
|
// Subcommand: "delete all"
|
||||||
var purgeMsg =
|
var purgeMsg =
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,12 @@ public class SystemFront
|
||||||
|
|
||||||
public async Task SystemFrontHistory(Context ctx, PKSystem system)
|
public async Task SystemFrontHistory(Context ctx, PKSystem system)
|
||||||
{
|
{
|
||||||
|
if (ctx.MatchFlag("clear", "c") || ctx.PeekArgument() == "clear")
|
||||||
|
{
|
||||||
|
await new Switch().SwitchDelete(ctx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (system == null) throw Errors.NoSystemError;
|
if (system == null) throw Errors.NoSystemError;
|
||||||
ctx.CheckSystemPrivacy(system.Id, system.FrontHistoryPrivacy);
|
ctx.CheckSystemPrivacy(system.Id, system.FrontHistoryPrivacy);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue