Preview deployment

class GuildAuditLogsEntry

export class GuildAuditLogsEntry<TAction extends GuildAuditLogsResolvable = AuditLogEvent, TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes  ? GuildAuditLogsTypes[TAction][1]  : GuildAuditLogsActionType, TTargetType extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes  ? GuildAuditLogsTypes[TAction][0]  : GuildAuditLogsTargetType, TResolvedType = TAction extends null ? AuditLogEvent : TAction,>

Audit logs entry.

Type Parameters

optional
TAction? extends GuildAuditLogsResolvable = AuditLogEvent

optional
TActionType? extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][1] : GuildAuditLogsActionType

optional
TTargetType? extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][0] : GuildAuditLogsTargetType

optional
TResolvedType? = TAction extends null ? AuditLogEvent : TAction

action : TResolvedType

The type of action that occurred.

actionType : TActionType

The action type of this entry

changes : AuditLogChange[]

Specific property changes

readonly
createdAt : Date

The time this entry was created at

readonly
createdTimestamp : number

The timestamp this entry was created at

executor : User | null

The user that executed this entry

executorId : Snowflake | null

The id of the user that executed this entry

extra : TResolvedType extends keyof GuildAuditLogsEntryExtraField ? GuildAuditLogsEntryExtraField[TResolvedType] : null

Any extra data from the entry

The entry's id

reason : string | null

The reason of this entry

target : TTargetType extends keyof GuildAuditLogsEntryTargetField<TActionType> ? GuildAuditLogsEntryTargetField<TActionType>[TTargetType] : Role | GuildEmoji | { id: Snowflake } | null

The target of this entry

targetId : Snowflake | null

The id of the target of this entry

static
Targets : GuildAuditLogsTargets

Key mirror of all available audit log targets.

targetType : TTargetType

The target type of this entry

static
actionType() : GuildAuditLogsActionType

Finds the action type from the guild audit log entry action.

static
targetType() : GuildAuditLogsTargetType

Finds the target type of a guild audit log entry.

toJSON() : unknown