mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-20 00:43:36 +03:00
Fix true/false not working in /settings
This commit is contained in:
parent
27b8f15e3b
commit
2ee53964bf
1 changed files with 3 additions and 2 deletions
|
@ -19,12 +19,13 @@ public class BoolOption : Option<bool> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool TryParseBool(string from, out bool value) {
|
private static bool TryParseBool(string from, out bool value) {
|
||||||
|
from = from.ToLower();
|
||||||
value = false;
|
value = false;
|
||||||
switch (from) {
|
switch (from) {
|
||||||
case "1" or "y" or "yes" or "д" or "да":
|
case "true" or "1" or "y" or "yes" or "д" or "да":
|
||||||
value = true;
|
value = true;
|
||||||
return true;
|
return true;
|
||||||
case "0" or "n" or "no" or "н" or "не" or "нет":
|
case "false" or "0" or "n" or "no" or "н" or "не" or "нет" or "нъет":
|
||||||
value = false;
|
value = false;
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue