mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Restructure system proxy command
This commit is contained in:
parent
f291714cff
commit
f03b4683f7
1 changed files with 8 additions and 1 deletions
|
|
@ -168,7 +168,14 @@ namespace PluralKit.Bot
|
|||
if (ctx.Match("on", "enabled", "true", "yes")) newValue = true;
|
||||
else if (ctx.Match("off", "disabled", "false", "no")) newValue = false;
|
||||
else if (ctx.HasNext()) throw new PKSyntaxError("You must pass either \"on\" or \"off\".");
|
||||
else newValue = !gs.ProxyEnabled;
|
||||
else
|
||||
{
|
||||
if (gs.ProxyEnabled)
|
||||
await ctx.Reply("Proxying in this server is currently **enabled** for your system. To disable it, type `pk;system proxy off`.");
|
||||
else
|
||||
await ctx.Reply("Proxying in this server is currently **disabled** for your system. To enable it, type `pk;system proxy on`.");
|
||||
return;
|
||||
}
|
||||
|
||||
gs.ProxyEnabled = newValue;
|
||||
await _data.SetSystemGuildSettings(ctx.System, ctx.Guild.Id, gs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue