From 1fc6e3b91efb831df1559d91666ab4261793c776 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Fri, 5 May 2017 23:19:07 +0200 Subject: [PATCH] using correct properties for invites (#1467) --- src/structures/GuildAuditLogs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index ee1ec5156..e53126edd 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -234,10 +234,10 @@ class GuildAuditLogsEntry { return this.target; }); } else if (targetType === Targets.INVITE) { - const change = this.changes.find(c => c.name === 'code'); + const change = this.changes.find(c => c.key === 'code'); this.target = guild.fetchInvites() .then(invites => { - this.target = invites.find(i => i.code === (change.new || change.old)); + this.target = invites.find(i => i.code === (change.new_value || change.old_value)); return this.target; }); } else if (targetType === Targets.MESSAGE) {