diff --git a/Module/ModLogs/Entry.cs b/Module/ModLogs/Entry.cs index c3bec89..3867b32 100644 --- a/Module/ModLogs/Entry.cs +++ b/Module/ModLogs/Entry.cs @@ -11,6 +11,7 @@ namespace Noikoio.RegexBot.Module.ModLogs { readonly int _logId; readonly DateTime _ts; + readonly ulong _guildId; readonly ulong? _invokeId; readonly ulong _targetId; readonly ulong? _channelId; @@ -26,15 +27,19 @@ namespace Noikoio.RegexBot.Module.ModLogs /// public DateTime Timestamp => _ts; /// - /// Gets the ID of the invoking user. - /// This value exists only if this entry was created through action of another user that is not the target. + /// Gets the ID of the guild to which this log entry corresponds. /// - public ulong? Invoker => _invokeId; + public ulong Guild => _guildId; /// /// Gets the ID of the user to which this log entry corresponds. /// public ulong Target => _targetId; /// + /// Gets the ID of the invoking user. + /// This value exists only if this entry was created through action of another user that is not the target. + /// + public ulong? Invoker => _invokeId; + /// /// Gets the guild channel ID to which this log entry corresponds, if any. /// public ulong? TargetChannel => _channelId; diff --git a/Module/ModLogs/EventListener.cs b/Module/ModLogs/EventListener.cs index 3984696..2ed1932 100644 --- a/Module/ModLogs/EventListener.cs +++ b/Module/ModLogs/EventListener.cs @@ -1,13 +1,28 @@ using System; using System.Collections.Generic; using System.Text; +using System.Threading.Tasks; +using Discord.WebSocket; +using Newtonsoft.Json.Linq; namespace Noikoio.RegexBot.Module.ModLogs { /// - /// Listens for certain events and places them on the log. + /// Listens for Discord-based events and writes them to the log (database). + /// Additionally writes certain messages to a designated logging channel if configured. /// - class EventListener + class EventListener : BotModule { + public override string Name => "ModLogs"; + public EventListener(DiscordSocketClient client) : base(client) + { + + } + + [ConfigSection("modlogs")] + public override Task ProcessConfiguration(JToken configSection) + { + throw new NotImplementedException(); + } } }