diff --git a/src/structure/components/observers/AuditLog.js b/src/structure/components/observers/AuditLog.js index f116fab..9e135de 100644 --- a/src/structure/components/observers/AuditLog.js +++ b/src/structure/components/observers/AuditLog.js @@ -148,8 +148,8 @@ class AuditLogObserver extends Observer { } async _fetchFirstEntry(guild, user, type, subtype = null) { - const me = await guild.resolveMember(this.client.user); - if (!me.permissions.has('ViewAuditLog')) return null; + const me = await guild.resolveMember(this.client.user.id); + if (!me?.permissions.has('ViewAuditLog')) return null; type = AuditLogEvent[type]; const audit = await guild.fetchAuditLogs({ limit: 1, type }).catch(() => null); if (!audit || audit.entries.size === 0) return null;