diff --git a/event/listeners/message.js b/event/listeners/message.js index 9d4e7fc..5ea568a 100644 --- a/event/listeners/message.js +++ b/event/listeners/message.js @@ -67,7 +67,7 @@ class messageListener extends Listener { censoredMessage = censoredMessage.replace(regex, '█'.repeat(bannedWords[i].get('word').length)); } let Embed = this.client.util.embed() - .setColor(message.member.displayHexColor) + .setColor(message.member ? message.member.displayHexColor : 'NAVY') .setAuthor(message.author.username, message.author.displayAvatarURL()) .setDescription(censoredMessage); diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index 67c2002..3dbbe7a 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -95,7 +95,7 @@ class MessageReactionAddListener extends Listener { description = ''; let Embed = client.util.embed() - .setColor(reaction.message.member.displayHexColor) + .setColor(reaction.message.member ? reaction.message.member.displayHexColor : 'NAVY') .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true) .addField('Channel', reaction.message.channel, true) @@ -119,7 +119,7 @@ class MessageReactionAddListener extends Listener { } let Embed = client.util.embed() - .setColor(reaction.message.member.displayHexColor) + .setColor(reaction.message.member ? reaction.message.member.displayHexColor : 'NAVY') .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true) .addField('Channel', reaction.message.channel, true) diff --git a/event/listeners/messageReactionRemove.js b/event/listeners/messageReactionRemove.js index feaf587..21a1e19 100644 --- a/event/listeners/messageReactionRemove.js +++ b/event/listeners/messageReactionRemove.js @@ -92,7 +92,7 @@ class messageReactionRemoveListener extends Listener { description = ''; let Embed = client.util.embed() - .setColor(reaction.message.member.displayHexColor) + .setColor(reaction.message.member ? reaction.message.member.displayHexColor : 'NAVY') .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true) .addField('Channel', reaction.message.channel, true)