forked from TeamInklings/Octobot
Improved /settingslist + fixed /settings pt.1 (#65)
This PR is mainly aimed at improving /settingslist and fixing /settings
List of things to do before merging:
- [x] #62
- [x] Add the pages feature to /settingslist
- [x] Add bullets like these ->

And since the development has already been taking more than 2 days, I
suggest splitting the PR into 2 parts.
List of other things that will be in the future PR:
- mctaylors#1
- Fix bot not answering when an invalid setting is specified in
/settings
- Options list for /settings
---------
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
This commit is contained in:
parent
397bb83ba8
commit
05fd343dce
6 changed files with 109 additions and 15 deletions
|
@ -19,12 +19,13 @@ public class BoolOption : Option<bool> {
|
|||
}
|
||||
|
||||
private static bool TryParseBool(string from, out bool value) {
|
||||
from = from.ToLower();
|
||||
value = false;
|
||||
switch (from) {
|
||||
case "1" or "y" or "yes" or "д" or "да":
|
||||
case "true" or "1" or "y" or "yes" or "д" or "да":
|
||||
value = 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;
|
||||
return true;
|
||||
default:
|
||||
|
|
Reference in a new issue