From b5c29cba29e15e9d2d6f48f8d42f2ed57a34cd76 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 19 Feb 2020 18:38:32 +0100 Subject: [PATCH] I don't fucking know what i did before but i must have been drunk --- event/listeners/messageReactionAdd.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index cc810d3..85f6c5e 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -126,12 +126,17 @@ class MessageReactionAddListener extends Listener { Embed.setFooter(reactionCount, reaction.message.guild.emojis.find(emoji => emoji.name === emote).url); } - let description = reaction.message.content; + let description = ''; + console.log(reaction.message.content); // if message come from nsfw channel and the star/shameboard channel isn't nsfw put it in spoiler - if (!reaction.message.content) - description = reaction.message.embeds[0].description; - else if (!reaction.message.content) - description = ''; + if (reaction.message.embeds[0]) { + if (reaction.message.embeds[0].description) { + description = reaction.message.embeds[0].description; + } + } + else if (reaction.message.content) { + description = reaction.message.content; + } if (reaction.message.channel.nsfw && !channel.nsfw) { Embed.setDescription(`||${description}||`);