AuditLogEntry - truemedian/Discordia GitHub Wiki

Inherits Snowflake

Represents an entry made into a guild's audit log.

Methods

getBeforeAfter
getTarget
getUser
getMember

Properties

changes
options
actionType
targetId
reason
guild

Inherited from Container
client
parent

Inherited from Snowflake
id
createdAt
timestamp

Methods

:getBeforeAfter( )

Returns two table's of the target's properties before the change, and after the change.

Returns: table, table

:getTarget( )

Gets the target object of the affected entity. The returned object can be: - Guild - GuildChannel - User - Member - Role - Webhook - Emoji - nil

Returns: *

:getUser( )

Gets the user who performed the changes.

Returns: User

:getMember( )

Gets the member object of the user who performed the changes.

Returns: Member

Properties

.changes

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.

Type: table|nil

.options

A table of optional audit log information.

Type: table|nil

.actionType

The action type. Use the actionType enumeration for a human-readable representation.

Type: number

.targetId

The Snowflake ID of the affected entity. Will be nil for certain targets.

Type: string|nil

.reason

The reason provided by the user for the change.

Type: string|nil

.guild

The guild in which this audit log entry was found.

Type: Guild

Inherited from Container

.client

A shortcut to the client object to which this container is visible.

Type: Client

.parent

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.

Type: Container|Client

Inherited from Snowflake

.id

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.

Type: string

.createdAt

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.

Type: number

.timestamp

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().

Type: string

⚠️ **GitHub.com Fallback** ⚠️