diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index bd19fea..8a41f4e 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -457,7 +457,12 @@ class GuildAuditLogsEntry { * Specific property changes * @type {AuditLogChange[]} */ - this.changes = data.changes?.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) ?? []; + this.changes = + data.changes?.map(change => ({ + key: change.key, + ...('old_value' in change ? { old: change.old_value } : {}), + ...('new_value' in change ? { new: change.new_value } : {}), + })) ?? []; /** * The entry's id diff --git a/typings/index.d.ts b/typings/index.d.ts index 1c1e2de..15fb541 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -5197,11 +5197,13 @@ export interface AutoModerationActionMetadataOptions extends Partial = T | PromiseLike;