forked from Galactic/galactic-bot
bugfix?
This commit is contained in:
parent
2f3a5a7a86
commit
339b1bf610
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user