mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
using correct properties for invites (#1467)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user