fix(AuditLog): default changes to empty array
v13.8.1
This commit is contained in:
parent
1cf045050c
commit
5e0eabd0e9
@ -398,9 +398,9 @@ class GuildAuditLogsEntry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Specific property changes
|
* Specific property changes
|
||||||
* @type {?AuditLogChange[]}
|
* @type {AuditLogChange[]}
|
||||||
*/
|
*/
|
||||||
this.changes = data.changes?.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) ?? null;
|
this.changes = data.changes?.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) ?? [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The entry's id
|
* The entry's id
|
||||||
|
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@ -1122,7 +1122,7 @@ export class GuildAuditLogsEntry<
|
|||||||
private constructor(logs: GuildAuditLogs, guild: Guild, data: RawGuildAuditLogEntryData);
|
private constructor(logs: GuildAuditLogs, guild: Guild, data: RawGuildAuditLogEntryData);
|
||||||
public action: TAction;
|
public action: TAction;
|
||||||
public actionType: TActionType;
|
public actionType: TActionType;
|
||||||
public changes: AuditLogChange[] | null;
|
public changes: AuditLogChange[];
|
||||||
public readonly createdAt: Date;
|
public readonly createdAt: Date;
|
||||||
public readonly createdTimestamp: number;
|
public readonly createdTimestamp: number;
|
||||||
public executor: User | null;
|
public executor: User | null;
|
||||||
|
Loading…
Reference in New Issue
Block a user