AuditLogEntry

class AuditLogEntry()

Base class for all audit log entries. Use a subclass narrowed by actionType for typed change access.

exported from lib.weeble.d

Properties

AuditLogEntry.actionType

type: readonly AuditLogActionType

The type of action this entry represents.

AuditLogEntry.changes

type: readonly Record<string, { newValue?: unknown; oldValue?: unknown; }>

Raw changes object (use subclass for typed access).

AuditLogEntry.id

type: readonly string

The ID of the audit log entry.

AuditLogEntry.options

type: readonly Record<string, unknown> | null

Additional action metadata supplied by Discord, or null.

AuditLogEntry.reason

type: readonly string | null

Reason for the action, or null if not provided.

AuditLogEntry.targetId

type: readonly string | null

The ID of the affected resource (user, channel, role, etc.), or null.

AuditLogEntry.user

type: readonly User | null

User who performed the audited action, or null if Discord omitted it.

AuditLogEntry.userId

type: readonly string | null

The ID of the user who performed the action, or null.

Methods

static AuditLogEntry.create(data: Record<string, unknown>) AnyAuditLogEntry

Creates the appropriate typed subclass based on actionType.