From 1364ebdb6a79811169d9ec119d3610cb4f990d16 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 27 Sep 2018 22:58:16 +0200 Subject: [PATCH] Link to the post --- commands/fun/reddit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/fun/reddit.js b/commands/fun/reddit.js index e793b46..c5b4000 100644 --- a/commands/fun/reddit.js +++ b/commands/fun/reddit.js @@ -34,7 +34,8 @@ module.exports = class redditCommand extends Command { const redditEmbed = new Discord.RichEmbed() .setColor("#ff9900") .setTitle(body.data.children[i].data.title) - .setImage(body.data.children[i].data.preview.images[0].source.url) + .setImage(body.data.children[i].data.url) + .setURL('https://reddit.com' + body.data.children[i].data.permalink) .setFooter(`⬆ ${body.data.children[i].data.ups} 💬 ${body.data.children[i].data.num_comments}`) message.say(redditEmbed);