Fixed bugs relating to config load
This commit is contained in:
parent
7a8a82102f
commit
fe1f466b97
2 changed files with 2 additions and 2 deletions
|
@ -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>();
|
||||
string cmdinvoke = definition["command"]?.Value<string>();
|
||||
if (string.IsNullOrWhiteSpace(cmdinvoke))
|
||||
throw new RuleImportException($"{label}: 'command' value was not specified.");
|
||||
if (cmdinvoke.Contains(" "))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue