GuildAuditLogsEntry

export class GuildAuditLogsEntry<TAction extends AuditLogEvent = AuditLogEvent, TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][1] : 'All', TTargetType extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][0] : 'Unknown',>
export class GuildAuditLogsEntry<TAction extends AuditLogEvent = AuditLogEvent, TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][1] : 'All', TTargetType extends GuildAuditLogsTargetType = TAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][0] : 'Unknown',>
Audit logs entry.
NameConstraintsOptionalDefaultDescription
TActionAuditLogEventYesAuditLogEventNone
TActionTypeGuildAuditLogsActionTypeYesTAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][1] : 'All'None
TTargetTypeGuildAuditLogsTargetTypeYesTAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TAction][0] : 'Unknown'None
action:TAction
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:TAction extends keyof GuildAuditLogsEntryExtraField ? GuildAuditLogsEntryExtraField[TAction] : null
Any extra data from the entry
The entry's id
reason:string | null
The reason of this entry
target:TTargetType extends keyof GuildAuditLogsEntryTargetField<TAction> ? GuildAuditLogsEntryTargetField<TAction>[TTargetType] : Role | GuildEmoji | { id: Snowflake } | null
The target of this entry
targetId:Snowflake | null
The id of the target of this entry
Static
Key mirror of all available audit log targets.
targetType:TTargetType
The target type of this entry
Static
actionType(action):GuildAuditLogsActionType
Finds the action type from the guild audit log entry action.
NameTypeOptionalDescription
actionAuditLogEventNoThe action target
isAction(action):this is GuildAuditLogsEntry<TCheckAction, TCheckAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TCheckAction][1] : 'All', TCheckAction extends keyof GuildAuditLogsTypes ? GuildAuditLogsTypes[TCheckAction][0] : 'Unknown'>
Checks whether this GuildAuditLogsEntry is of the specified AuditLogEvent type.
NameTypeOptionalDescription
actionTCheckActionNoThe type to check for
Static
targetType(target):GuildAuditLogsTargetType
Finds the target type of a guild audit log entry.
NameTypeOptionalDescription
targetAuditLogEventNoThe action target
toJSON():unknown