Implement ISnowflakeEntity for Audit Log entries

This commit is contained in:
Joe4evr
2018-08-09 18:26:38 +02:00
committed by Finite Reality
parent c1d78189e1
commit 2c3e9193c2
2 changed files with 6 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@@ -9,7 +9,7 @@ namespace Discord
/// <summary> /// <summary>
/// Represents an entry in an audit log /// Represents an entry in an audit log
/// </summary> /// </summary>
public interface IAuditLogEntry : IEntity<ulong> public interface IAuditLogEntry : ISnowflakeEntity
{ {
/// <summary> /// <summary>
/// The action which occured to create this entry /// The action which occured to create this entry

View File

@@ -1,4 +1,5 @@
using System.Linq; using System;
using System.Linq;
using Model = Discord.API.AuditLog; using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
@@ -26,6 +27,8 @@ namespace Discord.Rest
return new RestAuditLogEntry(discord, fullLog, model, user); return new RestAuditLogEntry(discord, fullLog, model, user);
} }
/// <inheritdoc/>
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
/// <inheritdoc/> /// <inheritdoc/>
public ActionType Action { get; } public ActionType Action { get; }
/// <inheritdoc/> /// <inheritdoc/>