Add autoproxy management commands

This commit is contained in:
Ske
2020-01-23 21:20:22 +01:00
parent ca37c7e6ca
commit 57bc576de6
6 changed files with 155 additions and 8 deletions

View File

@@ -23,6 +23,7 @@ namespace PluralKit.Bot.Commands
public static Command SystemFrontHistory = new Command("system fronthistory", "system [system] fronthistory", "Shows a system's front history");
public static Command SystemFrontPercent = new Command("system frontpercent", "system [system] frontpercent [timespan]", "Shows a system's front breakdown");
public static Command SystemPrivacy = new Command("system privacy", "system privacy <description|members|fronter|fronthistory> <public|private>", "Changes your system's privacy settings");
public static Command Autoproxy = new Command("autoproxy", "autoproxy [off|front|latch|member]", "Sets your system's autoproxy mode for this server");
public static Command MemberInfo = new Command("member", "member <member>", "Looks up information about a member");
public static Command MemberNew = new Command("member new", "member new <name>", "Creates a new member");
public static Command MemberRename = new Command("member rename", "member <member> rename <new name>", "Renames a member");
@@ -87,6 +88,8 @@ namespace PluralKit.Bot.Commands
return HandleMemberCommand(ctx);
if (ctx.Match("switch", "sw"))
return HandleSwitchCommand(ctx);
if (ctx.Match("ap", "autoproxy", "auto"))
return ctx.Execute<AutoproxyCommands>(Autoproxy, m => m.Autoproxy(ctx));
if (ctx.Match("link"))
return ctx.Execute<LinkCommands>(Link, m => m.LinkSystem(ctx));
if (ctx.Match("unlink"))