forked from Galactic/galactic-bot
bugfixes
This commit is contained in:
parent
ce6b430771
commit
a15e9f6698
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user