From e7533aa1892ebcf7aa44d358eee68f81780e8255 Mon Sep 17 00:00:00 2001 From: Navy Date: Tue, 1 Jun 2021 00:43:31 +0300 Subject: [PATCH] bug fix --- structure/client/components/observers/GuildLogging.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/structure/client/components/observers/GuildLogging.js b/structure/client/components/observers/GuildLogging.js index fb2c921..b40d9d3 100644 --- a/structure/client/components/observers/GuildLogging.js +++ b/structure/client/components/observers/GuildLogging.js @@ -77,21 +77,21 @@ class GuildLogger extends Observer { const { messageLog } = message.guild._settings; if(!messageLog.channel) return undefined; - const { ignoredRoles, ignoredChannels } = messageLog; + const { bypass, ignore } = messageLog; const logChannel = await message.guild.resolveChannel(messageLog.channel); if(!logChannel) return undefined; const perms = logChannel.permissionsFor(message.guild.me); if (!perms.has('SEND_MESSAGES') || !perms.has('VIEW_CHANNEL') || !perms.has('EMBED_LINKS')) return undefined; - if(ignoredRoles.length && message.member.roles.cache.size) { + if(bypass.length && message.member.roles.cache.size) { const roles = message.member.roles.cache.map((r) => r.id); - for (const role of ignoredRoles) { + for (const role of bypass) { if (roles.includes(role)) return undefined; } } - if (ignoredChannels && ignoredChannels.includes(message.channel.id)) return undefined; + if (ignore && ignore.includes(message.channel.id)) return undefined; const hook = await message.guild.getWebhook('messageLog');