From b586ef5d0affe4dbf639afc4a5ad5dc6378b8e10 Mon Sep 17 00:00:00 2001 From: spiral Date: Thu, 20 Jan 2022 05:24:28 -0500 Subject: [PATCH] feat: add true/false to MatchToggle --- PluralKit.Bot/CommandSystem/Context/ContextArgumentsExt.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/CommandSystem/Context/ContextArgumentsExt.cs b/PluralKit.Bot/CommandSystem/Context/ContextArgumentsExt.cs index 0e58d031..5a7cf9be 100644 --- a/PluralKit.Bot/CommandSystem/Context/ContextArgumentsExt.cs +++ b/PluralKit.Bot/CommandSystem/Context/ContextArgumentsExt.cs @@ -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.");