From aea6246900dabc80cf185cc942d13b641d0734df Mon Sep 17 00:00:00 2001 From: Iris System Date: Mon, 30 Dec 2024 04:34:41 +0000 Subject: [PATCH] feat(bot): accept additional number formats in admin limit commands --- PluralKit.Bot/Commands/Admin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Commands/Admin.cs b/PluralKit.Bot/Commands/Admin.cs index 442e2205..c63b6944 100644 --- a/PluralKit.Bot/Commands/Admin.cs +++ b/PluralKit.Bot/Commands/Admin.cs @@ -284,7 +284,7 @@ public class Admin return; } - var newLimitStr = ctx.PopArgument(); + var newLimitStr = ctx.PopArgument().ToLower().Replace(",", null).Replace("k", "000"); if (!int.TryParse(newLimitStr, out var newLimit)) throw new PKError($"Couldn't parse `{newLimitStr}` as number."); @@ -313,7 +313,7 @@ public class Admin return; } - var newLimitStr = ctx.PopArgument(); + var newLimitStr = ctx.PopArgument().ToLower().Replace(",", null).Replace("k", "000"); if (!int.TryParse(newLimitStr, out var newLimit)) throw new PKError($"Couldn't parse `{newLimitStr}` as number.");