If message going into starboard is nsfw and starboard is nsfw too don't put in spoiler

This commit is contained in:
loicbersier 2019-08-15 16:40:17 +02:00
parent be73942ab2
commit c575f3f7d1

View file

@ -67,7 +67,8 @@ class MessageReactionAddListener extends Listener {
.setFooter(reaction.count + ' ' + emote) .setFooter(reaction.count + ' ' + emote)
.setTimestamp(); .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}||`); Embed.setDescription(`||${messageContent}||`);
if (messageAttachments != '') { if (messageAttachments != '') {
return channel.send(`||${messageAttachments}||`, {embed: Embed}); return channel.send(`||${messageAttachments}||`, {embed: Embed});