Updated notes

This commit is contained in:
Noikoio 2018-02-22 18:05:50 -08:00
parent 2b56dab0e3
commit 8c0ae8fd44

View file

@ -20,7 +20,8 @@ namespace Noikoio.RegexBot.Module.ModLogs
public ModLogs(DiscordSocketClient client) : base(client) public ModLogs(DiscordSocketClient client) : base(client)
{ {
if (!RegexBot.Config.DatabaseAvailable) return; // do nothing; warn in ProcessConfiguration // Do nothing if database unavailable. The user will be informed by ProcessConfiguration.
if (!RegexBot.Config.DatabaseAvailable) return;
_msgCacheInstance = new MessageCache(client, Log, GetConfig); _msgCacheInstance = new MessageCache(client, Log, GetConfig);
@ -36,13 +37,13 @@ namespace Noikoio.RegexBot.Module.ModLogs
if (!RegexBot.Config.DatabaseAvailable) if (!RegexBot.Config.DatabaseAvailable)
{ {
await Log("Database access is not available. This module will not load."); await Log("Database access is not available. This module be unavailable.");
return null; return null;
} }
try try
{ {
// MessageCache debug: will store an EntityName or die trying // MessageCache testing: will store an EntityName or die trying
EntityName? mctarget = new EntityName(conf["mctarget"].Value<string>(), EntityType.Channel); EntityName? mctarget = new EntityName(conf["mctarget"].Value<string>(), EntityType.Channel);
await Log("Enabled MessageCache test on " + mctarget.Value.ToString()); await Log("Enabled MessageCache test on " + mctarget.Value.ToString());
return mctarget; return mctarget;
@ -52,19 +53,25 @@ namespace Noikoio.RegexBot.Module.ModLogs
// well, not really die // well, not really die
return null; return null;
} }
/* /*
* Ideas: * Concept:
* -Reporting: * "ModLogs": {
* --Reporting channel * "AutoReporting": {
* --Types to report * // behavior for how to output to the reporting channel
* ---Ignored if no reporting channel has been set * // MessageCache looks for configuration values within here.
* ---Default to join, quit, kick, ban, ... * "Channel": "something compatible with EntityName",
* ---Any override will disregard defaults * "Events": "perhaps a single string of separated event types"
* -also how will commands work? how to tie into commands mod? * },
* --modlogs command should also only report a subset of things. custom. * "QueryOptions": {
* ---ex: don't report nick changes * // Behavior for the query command (which is defined here rather than ModTools)
* // Need to stress in the documentation that "msgedit" and "msgdelete" events
* // are not kept and cannot be queried
* "QueryCommand": "!modlogs",
* "Permission": "Moderators", // either a string that says "Moderators" or an EntityList
* "DefaultQueryEvents": "another single string of separated event types",
* }
* }
*/ */
} }
} }