Merge branch 'hokutochen-v4-patch-11221' into 'v4'

Fix for DMHelpText

See merge request Kwoth/nadekobot!283
This commit is contained in:
Kwoth
2023-01-10 14:39:24 +00:00

View File

@@ -45,7 +45,7 @@ public class HelpService : IExecNoCommand, INService
// only send dm help text if it contains one of the keywords, if they're specified
// if they're not, then reply to every DM
if (settings.DmHelpTextKeywords.Any() && !settings.DmHelpTextKeywords.Any(k => msg.Content.Contains(k)))
if (settings.DmHelpTextKeywords is not null && !settings.DmHelpTextKeywords.Any(k => msg.Content.Contains(k)))
return Task.CompletedTask;
var rep = new ReplacementBuilder().WithOverride("%prefix%", () => _bss.Data.Prefix)
@@ -188,4 +188,4 @@ public class HelpService : IExecNoCommand, INService
private string GetText(LocStr str, IGuild guild)
=> _strings.GetText(str, guild?.Id);
}
}