Added missing fields to ModLogs entry

This commit is contained in:
Noikoio 2017-11-17 10:49:37 -08:00
parent 06e559b085
commit 5d5cdd9c84
2 changed files with 25 additions and 5 deletions

View file

@ -11,6 +11,7 @@ namespace Noikoio.RegexBot.Module.ModLogs
{ {
readonly int _logId; readonly int _logId;
readonly DateTime _ts; readonly DateTime _ts;
readonly ulong _guildId;
readonly ulong? _invokeId; readonly ulong? _invokeId;
readonly ulong _targetId; readonly ulong _targetId;
readonly ulong? _channelId; readonly ulong? _channelId;
@ -26,15 +27,19 @@ namespace Noikoio.RegexBot.Module.ModLogs
/// </summary> /// </summary>
public DateTime Timestamp => _ts; public DateTime Timestamp => _ts;
/// <summary> /// <summary>
/// Gets the ID of the invoking user. /// Gets the ID of the guild to which this log entry corresponds.
/// This value exists only if this entry was created through action of another user that is not the target.
/// </summary> /// </summary>
public ulong? Invoker => _invokeId; public ulong Guild => _guildId;
/// <summary> /// <summary>
/// Gets the ID of the user to which this log entry corresponds. /// Gets the ID of the user to which this log entry corresponds.
/// </summary> /// </summary>
public ulong Target => _targetId; public ulong Target => _targetId;
/// <summary> /// <summary>
/// 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.
/// </summary>
public ulong? Invoker => _invokeId;
/// <summary>
/// Gets the guild channel ID to which this log entry corresponds, if any. /// Gets the guild channel ID to which this log entry corresponds, if any.
/// </summary> /// </summary>
public ulong? TargetChannel => _channelId; public ulong? TargetChannel => _channelId;

View file

@ -1,13 +1,28 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Threading.Tasks;
using Discord.WebSocket;
using Newtonsoft.Json.Linq;
namespace Noikoio.RegexBot.Module.ModLogs namespace Noikoio.RegexBot.Module.ModLogs
{ {
/// <summary> /// <summary>
/// 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.
/// </summary> /// </summary>
class EventListener class EventListener : BotModule
{ {
public override string Name => "ModLogs";
public EventListener(DiscordSocketClient client) : base(client)
{
}
[ConfigSection("modlogs")]
public override Task<object> ProcessConfiguration(JToken configSection)
{
throw new NotImplementedException();
}
} }
} }