Class AuditLogEntry
public class AuditLogEntry : Entity, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonAuditLogEntry>
- Inheritance
-
AuditLogEntry
- Implements
- Derived
- Inherited Members
Constructors
AuditLogEntry(JsonAuditLogEntry, ulong)
public AuditLogEntry(JsonAuditLogEntry jsonModel, ulong guildId)
Parameters
jsonModel
JsonAuditLogEntryguildId
ulong
Properties
ActionType
Type of action that occurred.
public AuditLogEvent ActionType { get; }
Property Value
Changes
Changes made to the TargetId.
public IReadOnlyDictionary<string, AuditLogChange> Changes { get; }
Property Value
GuildId
The ID of the guild this audit log entry belongs to.
public ulong GuildId { get; }
Property Value
Id
The unique identifier for this object.
public override ulong Id { get; }
Property Value
Options
Additional info for certain event types.
public AuditLogEntryInfo? Options { get; }
Property Value
Reason
Reason for the change (1-512 characters).
public string? Reason { get; }
Property Value
TargetId
ID of the affected entity.
public ulong? TargetId { get; }
Property Value
UserId
ID of user that made the changes.
public ulong? UserId { get; }
Property Value
Methods
GetChange<TObject, TValue>(Expression<Func<TObject, TValue?>>)
Finds specified change based on expression
.
public AuditLogChange<TValue> GetChange<TObject, TValue>(Expression<Func<TObject, TValue?>> expression) where TObject : JsonEntity
Parameters
expression
Expression<Func<TObject, TValue>>Expression finding the change, for example:
channel => channel.Name
.
Returns
- AuditLogChange<TValue>
Type Parameters
TObject
TValue
Exceptions
GetChange<TObject, TValue>(Expression<Func<TObject, TValue?>>, JsonTypeInfo<TValue>)
Finds specified change based on expression
.
public AuditLogChange<TValue> GetChange<TObject, TValue>(Expression<Func<TObject, TValue?>> expression, JsonTypeInfo<TValue> jsonTypeInfo) where TObject : JsonEntity
Parameters
expression
Expression<Func<TObject, TValue>>Expression finding the change, for example:
channel => channel.Name
.jsonTypeInfo
JsonTypeInfo<TValue>JsonTypeInfo<T> of the object returned by
expression
.
Returns
- AuditLogChange<TValue>
Type Parameters
TObject
TValue
Exceptions
TryGetChange<TObject, TValue>(Expression<Func<TObject, TValue?>>, out AuditLogChange<TValue>)
Tries to find specified change based on expression
.
public bool TryGetChange<TObject, TValue>(Expression<Func<TObject, TValue?>> expression, out AuditLogChange<TValue> change) where TObject : JsonEntity
Parameters
expression
Expression<Func<TObject, TValue>>Expression finding the change, for example:
channel => channel.Name
.change
AuditLogChange<TValue>The result.
Returns
Type Parameters
TObject
TValue
TryGetChange<TObject, TValue>(Expression<Func<TObject, TValue?>>, JsonTypeInfo<TValue>, out AuditLogChange<TValue>)
Tries to find specified change based on expression
.
public bool TryGetChange<TObject, TValue>(Expression<Func<TObject, TValue?>> expression, JsonTypeInfo<TValue> jsonTypeInfo, out AuditLogChange<TValue> change) where TObject : JsonEntity
Parameters
expression
Expression<Func<TObject, TValue>>Expression finding the change, for example:
channel => channel.Name
.jsonTypeInfo
JsonTypeInfo<TValue>JsonTypeInfo<T> of the object returned by
expression
.change
AuditLogChange<TValue>The result.
Returns
Type Parameters
TObject
TValue