mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): accept additional number formats in admin limit commands
This commit is contained in:
parent
b88c1b7712
commit
aea6246900
1 changed files with 2 additions and 2 deletions
|
|
@ -284,7 +284,7 @@ public class Admin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newLimitStr = ctx.PopArgument();
|
var newLimitStr = ctx.PopArgument().ToLower().Replace(",", null).Replace("k", "000");
|
||||||
if (!int.TryParse(newLimitStr, out var newLimit))
|
if (!int.TryParse(newLimitStr, out var newLimit))
|
||||||
throw new PKError($"Couldn't parse `{newLimitStr}` as number.");
|
throw new PKError($"Couldn't parse `{newLimitStr}` as number.");
|
||||||
|
|
||||||
|
|
@ -313,7 +313,7 @@ public class Admin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newLimitStr = ctx.PopArgument();
|
var newLimitStr = ctx.PopArgument().ToLower().Replace(",", null).Replace("k", "000");
|
||||||
if (!int.TryParse(newLimitStr, out var newLimit))
|
if (!int.TryParse(newLimitStr, out var newLimit))
|
||||||
throw new PKError($"Couldn't parse `{newLimitStr}` as number.");
|
throw new PKError($"Couldn't parse `{newLimitStr}` as number.");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue