From a15e9f6698564fdc57781d1614bfc3a00eb6eb8a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Thu, 21 Jul 2022 16:37:40 +0300 Subject: [PATCH] bugfixes --- src/structure/client/wrappers/InvokerWrapper.js | 4 +++- src/structure/components/observers/AuditLog.js | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structure/client/wrappers/InvokerWrapper.js b/src/structure/client/wrappers/InvokerWrapper.js index 3f3cc5a..7d6f5fc 100644 --- a/src/structure/client/wrappers/InvokerWrapper.js +++ b/src/structure/client/wrappers/InvokerWrapper.js @@ -1,3 +1,4 @@ +const { EmbedBuilder } = require("@discordjs/builders"); const { Emojis } = require("../../../constants"); const MessageWrapper = require("./MessageWrapper"); @@ -147,7 +148,8 @@ class InvokerWrapper { if(options.embed) options.embeds = [options.embed]; if (options.embeds) options.embeds.forEach((embed) => { - if (!embed.data.color) embed.setColor(619452); + if (embed instanceof EmbedBuilder && !embed.data.color) embed.setColor(619452); + else if(!embed.color) embed.color = 619452; }); if (options.dm) { diff --git a/src/structure/components/observers/AuditLog.js b/src/structure/components/observers/AuditLog.js index 9213ea4..744068a 100644 --- a/src/structure/components/observers/AuditLog.js +++ b/src/structure/components/observers/AuditLog.js @@ -119,13 +119,11 @@ class AuditLogObserver extends Observer { async _logRoleMute(oldMember, newMember) { const { guildWrapper: wrapper } = newMember; const settings = await wrapper.settings(); - console.log(1); if (!settings.moderation.channel) return undefined; const mutedRole = settings.mute.role; if (!mutedRole) return undefined; const audit = await this._fetchFirstEntry(newMember.guild, newMember.user, 'MemberRoleUpdate'); - console.log(audit); if (!audit) return undefined; let type = null;