Skip to content

AuditLogEntry

Defined in: packages/structures/src/audit-log.ts:122

Represents a single entry in a Discord audit log.

T extends number = number

new AuditLogEntry<T>(data): AuditLogEntry<T>

Defined in: packages/structures/src/audit-log.ts:139

Creates an audit log entry.

APIAuditLogEntry

AuditLogEntry<T>

BaseStructure.constructor

readonly actionType: T

Defined in: packages/structures/src/audit-log.ts:128

The action type of this entry.


readonly changes: APIAuditLogChange[]

Defined in: packages/structures/src/audit-log.ts:130

The changes made to the target.


readonly id: string

Defined in: packages/structures/src/base.ts:12

BaseStructure.id


readonly info: AuditLogInfo<T>

Defined in: packages/structures/src/audit-log.ts:134

The action’s details with numbers parsed, typed by action type (undefined for types that have none). options is Discord’s raw object.


readonly options: APIAuditLogOptions | null

Defined in: packages/structures/src/audit-log.ts:132

Additional info for certain action types.


readonly reason: string | null

Defined in: packages/structures/src/audit-log.ts:136

The reason for the change, if any.


readonly targetId: string | null

Defined in: packages/structures/src/audit-log.ts:124

The ID of the affected entity.


readonly userId: string | null

Defined in: packages/structures/src/audit-log.ts:126

The ID of the user who made the changes.

get createdAt(): Date

Defined in: packages/structures/src/base.ts:29

Returns the timestamp this snowflake was created at.

Date

BaseStructure.createdAt


get createdTimestamp(): number

Defined in: packages/structures/src/base.ts:25

Milliseconds since the Unix epoch at which this snowflake was created.

number

BaseStructure.createdTimestamp

change(key): { new: unknown; old: unknown; } | undefined

Defined in: packages/structures/src/audit-log.ts:159

One change by its key ("nick", "permissions"…), or undefined.

string

{ new: unknown; old: unknown; } | undefined


is<K>(type): this is AuditLogEntry<K>

Defined in: packages/structures/src/audit-log.ts:154

Narrows the entry to one action type, so info is typed for it.

K extends number

K

this is AuditLogEntry<K>


toString(): string

Defined in: packages/structures/src/base.ts:21

Returns the snowflake ID as a string.

string

BaseStructure.toString