this should be async

This commit is contained in:
nolan 2021-06-17 22:15:28 -07:00
parent d6337126c0
commit fb0af6c228

View File

@ -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;