feat(bot): accept additional number formats in admin limit commands

This commit is contained in:
Iris System 2024-12-30 04:34:41 +00:00
parent b88c1b7712
commit aea6246900

View file

@ -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.");