From 7b5072bfbe907bd82bd06da2ef2fd67258a50cf0 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 11 Feb 2020 11:43:34 +0100 Subject: [PATCH] fix undefined --- event/listeners/messageReactionAdd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index 3ee25443..578c8e31 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -128,9 +128,9 @@ class MessageReactionAddListener extends Listener { let description = 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 && reaction.message.embeds[0]) + if (!reaction.message.content && reaction.message.embeds[0].description) description = reaction.message.embeds[0].description; - else if (!reaction.message.content) + else description = ''; if (reaction.message.channel.nsfw && !channel.nsfw) {