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 ->
![](fdf1a3b8-bb64-473d-9f57-bc6e34812811)

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:
Macintxsh 2023-07-25 17:53:11 +03:00 committed by GitHub
parent 397bb83ba8
commit 05fd343dce
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 15 deletions

View file

@ -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: