diff --git a/Module/ModTools/CommandBase.cs b/Module/ModTools/CommandBase.cs index 7cf247c..c4e1699 100644 --- a/Module/ModTools/CommandBase.cs +++ b/Module/ModTools/CommandBase.cs @@ -59,7 +59,7 @@ namespace Noikoio.RegexBot.Module.ModTools if (string.IsNullOrWhiteSpace(label)) throw new RuleImportException("Label cannot be blank."); var definition = (JObject)def.Value; - string cmdinvoke = definition["command"].Value(); + string cmdinvoke = definition["command"]?.Value(); if (string.IsNullOrWhiteSpace(cmdinvoke)) throw new RuleImportException($"{label}: 'command' value was not specified."); if (cmdinvoke.Contains(" ")) diff --git a/Module/ModTools/Commands/ConfReload.cs b/Module/ModTools/Commands/ConfReload.cs index d8da69e..093f00b 100644 --- a/Module/ModTools/Commands/ConfReload.cs +++ b/Module/ModTools/Commands/ConfReload.cs @@ -7,7 +7,7 @@ namespace Noikoio.RegexBot.Module.ModTools.Commands class ConfReload : CommandBase { // No configuration. - protected ConfReload(ModTools l, string label, JObject conf) : base(l, label, conf) { } + public ConfReload(ModTools l, string label, JObject conf) : base(l, label, conf) { } // Usage: (command) public override async Task Invoke(SocketGuild g, SocketMessage msg)