feat: add true/false to MatchToggle

This commit is contained in:
spiral 2022-01-20 05:24:28 -05:00
parent 9f7c47b78e
commit b586ef5d0a
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -101,9 +101,9 @@ public static class ContextArgumentsExt
public static bool MatchToggle(this Context ctx)
{
if (ctx.Match("yes", "on", "enable"))
if (ctx.Match("yes", "on", "enable", "true"))
return true;
else if (ctx.Match("no", "off", "disable"))
else if (ctx.Match("no", "off", "disable", "false"))
return false;
else
throw new PKError("You must pass either \"on\" or \"off\" to this command.");