Display a count of total rules added on load
This commit is contained in:
parent
01b2ef1f1b
commit
120f31a88b
2 changed files with 4 additions and 3 deletions
|
@ -35,9 +35,9 @@ namespace Noikoio.RegexBot.Feature.AutoMod
|
||||||
string label = def.Name;
|
string label = def.Name;
|
||||||
var rule = new Rule(this, def);
|
var rule = new Rule(this, def);
|
||||||
rules.Add(rule);
|
rules.Add(rule);
|
||||||
await Log($"Added rule '{rule.Label}'");
|
|
||||||
}
|
}
|
||||||
|
if (rules.Count > 0)
|
||||||
|
await Log($"Loaded {rules.Count} rule(s) from configuration.");
|
||||||
return rules.AsReadOnly();
|
return rules.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,10 @@ namespace Noikoio.RegexBot.Feature.AutoRespond
|
||||||
// All validation is left to the constructor
|
// All validation is left to the constructor
|
||||||
var resp = new ResponseDefinition(def);
|
var resp = new ResponseDefinition(def);
|
||||||
responses.Add(resp);
|
responses.Add(resp);
|
||||||
await Log($"Added definition '{resp.Label}'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (responses.Count > 0)
|
||||||
|
await Log($"Loaded {responses.Count} definition(s) from configuration.");
|
||||||
return responses.AsReadOnly();
|
return responses.AsReadOnly();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue