From c575f3f7d10e4be9165cc355895bb29ba7bdf521 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 15 Aug 2019 16:40:17 +0200 Subject: [PATCH] If message going into starboard is nsfw and starboard is nsfw too don't put in spoiler --- event/listeners/messageReactionAdd.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index 1725f330..030ac7f2 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -67,7 +67,8 @@ class MessageReactionAddListener extends Listener { .setFooter(reaction.count + ' ' + emote) .setTimestamp(); - if (reaction.message.channel.nsfw) { + // if message come from nsfw channel and the star/shameboard channel isn't nsfw put it in spoiler + if (reaction.message.channel.nsfw && !channel.nsfw) { Embed.setDescription(`||${messageContent}||`); if (messageAttachments != '') { return channel.send(`||${messageAttachments}||`, {embed: Embed});