fix undefined

merge-requests/5/merge
loicbersier 4 years ago
parent f65b91e1f2
commit 7b5072bfbe

@ -128,9 +128,9 @@ class MessageReactionAddListener extends Listener {
let description = reaction.message.content; let description = reaction.message.content;
// if message come from nsfw channel and the star/shameboard channel isn't nsfw put it in spoiler // 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; description = reaction.message.embeds[0].description;
else if (!reaction.message.content) else
description = ''; description = '';
if (reaction.message.channel.nsfw && !channel.nsfw) { if (reaction.message.channel.nsfw && !channel.nsfw) {

Loading…
Cancel
Save