This commit is contained in:
Erik 2022-07-21 16:37:40 +03:00
parent ce6b430771
commit a15e9f6698
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,4 @@
const { EmbedBuilder } = require("@discordjs/builders");
const { Emojis } = require("../../../constants"); const { Emojis } = require("../../../constants");
const MessageWrapper = require("./MessageWrapper"); const MessageWrapper = require("./MessageWrapper");
@ -147,7 +148,8 @@ class InvokerWrapper {
if(options.embed) options.embeds = [options.embed]; if(options.embed) options.embeds = [options.embed];
if (options.embeds) options.embeds.forEach((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) { if (options.dm) {

View File

@ -119,13 +119,11 @@ class AuditLogObserver extends Observer {
async _logRoleMute(oldMember, newMember) { async _logRoleMute(oldMember, newMember) {
const { guildWrapper: wrapper } = newMember; const { guildWrapper: wrapper } = newMember;
const settings = await wrapper.settings(); const settings = await wrapper.settings();
console.log(1);
if (!settings.moderation.channel) return undefined; if (!settings.moderation.channel) return undefined;
const mutedRole = settings.mute.role; const mutedRole = settings.mute.role;
if (!mutedRole) return undefined; if (!mutedRole) return undefined;
const audit = await this._fetchFirstEntry(newMember.guild, newMember.user, 'MemberRoleUpdate'); const audit = await this._fetchFirstEntry(newMember.guild, newMember.user, 'MemberRoleUpdate');
console.log(audit);
if (!audit) return undefined; if (!audit) return undefined;
let type = null; let type = null;