Added DmHelpTextKeywords to data/bot.yml

- Bot now sends dm help text ONLY if the message contains one of the keywords specified
  - If no keywords are specified, bot will reply to every DM (like before)
- Fixed several commands which used error color for success confirmation messages
This commit is contained in:
Kwoth
2021-09-16 22:51:58 +02:00
parent 81254ed5f6
commit a09be96200
7 changed files with 47 additions and 22 deletions

View File

@@ -28,19 +28,15 @@ namespace NadekoBot.Services
AddParsedProp("locale", bs => bs.DefaultLocale, ConfigParsers.Culture, ConfigPrinters.Culture);
AddParsedProp("prefix", bs => bs.Prefix, ConfigParsers.String, ConfigPrinters.ToString);
UpdateColors();
Migrate();
}
private void UpdateColors()
private void Migrate()
{
var ok = _data.Color.Ok;
var error = _data.Color.Error;
var pend = _data.Color.Pending;
}
protected override void OnStateUpdate()
{
UpdateColors();
if (_data.Version < 2)
{
ModifyConfig(c => c.Version = 2);
}
}
}
}