From fb0af6c228c1e0f49cde0f910ee36219d2172f03 Mon Sep 17 00:00:00 2001 From: nolan Date: Thu, 17 Jun 2021 22:15:28 -0700 Subject: [PATCH] this should be async --- structure/client/components/observers/AuditLog.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/structure/client/components/observers/AuditLog.js b/structure/client/components/observers/AuditLog.js index 7f012cb..31eaa0e 100644 --- a/structure/client/components/observers/AuditLog.js +++ b/structure/client/components/observers/AuditLog.js @@ -1,4 +1,3 @@ -const { InfractionResolves } = require("../../../../util/Constants"); const { Observer } = require("../../../interfaces"); const { Infraction } = require('../../../moderation/interfaces/'); @@ -55,7 +54,7 @@ class AuditLogObserver extends Observer { } async guildMemberRemove(member) { - const settings = member.guild.settings(); + const settings = await member.guild.settings(); if(!settings.moderationLog.channel || !settings.moderationLog.infractions.includes('KICK')) return undefined; //This is checked by the infraction handling, but it may save resources if checked earlier. const audit = await this._fetchFirstEntry(member.guild, member.user, 'MEMBER_KICK'); if(!audit || audit.executor.id === this.client.user.id) return undefined;