diff --git a/structure/client/components/observers/AuditLog.js b/structure/client/components/observers/AuditLog.js index 80ad21e..cca4496 100644 --- a/structure/client/components/observers/AuditLog.js +++ b/structure/client/components/observers/AuditLog.js @@ -24,7 +24,7 @@ class AuditLogObserver extends Observer { } async guildBanAdd(guild, user) { - const settings = guild.settings(); + const settings = await guild.settings(); if(!settings.moderationLog.channel || !settings.moderationLog.infractions.includes('BAN')) return undefined; //This is checked by the infraction handling, but it may save resources if checked earlier. const audit = await this._fetchFirstEntry(guild, user, 'MEMBER_BAN_ADD'); if(!audit || audit.executor.id === this.client.user.id) return undefined; @@ -39,7 +39,7 @@ class AuditLogObserver extends Observer { } async guildBanRemove(guild, user) { - const settings = guild.settings(); + const settings = await guild.settings(); if(!settings.moderationLog.channel || !settings.moderationLog.infractions.includes('UNBAN')) return undefined; //This is checked by the infraction handling, but it may save resources if checked earlier. const audit = await this._fetchFirstEntry(guild, user, 'MEMBER_BAN_REMOVE'); if(!audit || audit.executor.id === this.client.user.id) return undefined;