From 339b1bf610fcbb049d2bb1fae71abfd54d397040 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 24 Aug 2022 14:31:49 +0300 Subject: [PATCH] bugfix? --- src/structure/components/observers/AuditLog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;