-
Notifications
You must be signed in to change notification settings - Fork 144
AuditLogEntry
extends Snowflake
Represents an entry made into a guild's audit log.
Instances of this class should not be constructed by users.
Properties Inherited From Snowflake
Name | Type | Description |
---|---|---|
client | Client | A shortcut to the client object to which this container is visible. |
createdAt | number | The Unix time in seconds at which this object was created by Discord. Additional decimal points may be present, though only the first 3 (milliseconds) should be considered accurate. Equivalent to Date.parseSnowflake(Snowflake.id) . |
id | string | The Snowflake ID that can be used to identify the object. This is guaranteed to be unique except in cases where an object shares the ID of its parent. |
parent | Container/Client | The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists. |
timestamp | string | The date and time at which this object was created by Discord, represented as an ISO 8601 string plus microseconds when available. Equivalent to Date.fromSnowflake(Snowflake.id):toISO() . |
Name | Type | Description |
---|---|---|
actionType | number | The action type. Use the actionType enumeration for a human-readable representation. |
changes | table/nil | A table of audit log change objects. The key represents the property of the changed target and the value contains a table of new and possibly old , representing the property's new and old value. |
guild | Guild | The guild in which this audit log entry was found. |
options | table/nil | A table of optional audit log information. |
reason | string/nil | The reason provided by the user for the change. |
targetId | string/nil | The Snowflake ID of the affected entity. Will be nil for certain targets. |
userId | string | The Snowflake ID of the user who commited the action. |
Methods Inherited From Snowflake
Defines the behavior of the ==
operator. Allows containers to be directly compared according to their type and __hash
return values.
Returns: boolean
Returns Snowflake.id
Returns: string
Defines the behavior of the tostring
function. All containers follow the format ClassName: hash
.
Returns: string
Returns a unique Date object that represents when the object was created by Discord. Equivalent to Date.fromSnowflake(Snowflake.id)
This method only operates on data in memory.
Returns: Date
Returns two tables of the target's properties before the change, and after the change.
This method only operates on data in memory.
Returns: table, table
Gets the member object of the user who performed the changes.
This method may make an HTTP request.
Returns: Member/nil
Gets the target object of the affected entity. The returned object can be: Guild, GuildChannel, User, Member, Role, Webhook, Emoji, nil
This method may make an HTTP request.
Returns: *
Gets the user who performed the changes.
This method may make an HTTP request.
Returns: User