mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat: add true/false to MatchToggle
This commit is contained in:
parent
9f7c47b78e
commit
b586ef5d0a
1 changed files with 2 additions and 2 deletions
|
|
@ -101,9 +101,9 @@ public static class ContextArgumentsExt
|
||||||
|
|
||||||
public static bool MatchToggle(this Context ctx)
|
public static bool MatchToggle(this Context ctx)
|
||||||
{
|
{
|
||||||
if (ctx.Match("yes", "on", "enable"))
|
if (ctx.Match("yes", "on", "enable", "true"))
|
||||||
return true;
|
return true;
|
||||||
else if (ctx.Match("no", "off", "disable"))
|
else if (ctx.Match("no", "off", "disable", "false"))
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
throw new PKError("You must pass either \"on\" or \"off\" to this command.");
|
throw new PKError("You must pass either \"on\" or \"off\" to this command.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue