AuditLogEntry
Defined in: packages/structures/src/audit-log.ts:122
Represents a single entry in a Discord audit log.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”T extends number = number
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AuditLogEntry<
T>(data):AuditLogEntry<T>
Defined in: packages/structures/src/audit-log.ts:139
Creates an audit log entry.
Parameters
Section titled “Parameters”APIAuditLogEntry
Returns
Section titled “Returns”AuditLogEntry<T>
Overrides
Section titled “Overrides”Properties
Section titled “Properties”actionType
Section titled “actionType”
readonlyactionType:T
Defined in: packages/structures/src/audit-log.ts:128
The action type of this entry.
changes
Section titled “changes”
readonlychanges:APIAuditLogChange[]
Defined in: packages/structures/src/audit-log.ts:130
The changes made to the target.
readonlyid:string
Defined in: packages/structures/src/base.ts:12
Inherited from
Section titled “Inherited from”
readonlyinfo: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.
options
Section titled “options”
readonlyoptions:APIAuditLogOptions|null
Defined in: packages/structures/src/audit-log.ts:132
Additional info for certain action types.
reason
Section titled “reason”
readonlyreason:string|null
Defined in: packages/structures/src/audit-log.ts:136
The reason for the change, if any.
targetId
Section titled “targetId”
readonlytargetId:string|null
Defined in: packages/structures/src/audit-log.ts:124
The ID of the affected entity.
userId
Section titled “userId”
readonlyuserId:string|null
Defined in: packages/structures/src/audit-log.ts:126
The ID of the user who made the changes.
Accessors
Section titled “Accessors”createdAt
Section titled “createdAt”Get Signature
Section titled “Get Signature”get createdAt():
Date
Defined in: packages/structures/src/base.ts:29
Returns the timestamp this snowflake was created at.
Returns
Section titled “Returns”Date
Inherited from
Section titled “Inherited from”createdTimestamp
Section titled “createdTimestamp”Get Signature
Section titled “Get Signature”get createdTimestamp():
number
Defined in: packages/structures/src/base.ts:25
Milliseconds since the Unix epoch at which this snowflake was created.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”BaseStructure.createdTimestamp
Methods
Section titled “Methods”change()
Section titled “change()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”{ 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.
Type Parameters
Section titled “Type Parameters”K extends number
Parameters
Section titled “Parameters”K
Returns
Section titled “Returns”this is AuditLogEntry<K>
toString()
Section titled “toString()”toString():
string
Defined in: packages/structures/src/base.ts:21
Returns the snowflake ID as a string.
Returns
Section titled “Returns”string