fix nolan's bs
This commit is contained in:
parent
058e12634f
commit
ee6959d814
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user