mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 16:22:08 +00:00
using correct properties for invites (#1467)
This commit is contained in:
parent
a4e5713790
commit
a685d24504
1 changed files with 2 additions and 2 deletions
|
|
@ -234,10 +234,10 @@ class GuildAuditLogsEntry {
|
||||||
return this.target;
|
return this.target;
|
||||||
});
|
});
|
||||||
} else if (targetType === Targets.INVITE) {
|
} 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()
|
this.target = guild.fetchInvites()
|
||||||
.then(invites => {
|
.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;
|
return this.target;
|
||||||
});
|
});
|
||||||
} else if (targetType === Targets.MESSAGE) {
|
} else if (targetType === Targets.MESSAGE) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue