Link to the post

This commit is contained in:
loicbersier 2018-09-27 22:58:16 +02:00
parent c159c4d38a
commit 1364ebdb6a

View file

@ -34,7 +34,8 @@ module.exports = class redditCommand extends Command {
const redditEmbed = new Discord.RichEmbed() const redditEmbed = new Discord.RichEmbed()
.setColor("#ff9900") .setColor("#ff9900")
.setTitle(body.data.children[i].data.title) .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}`) .setFooter(`${body.data.children[i].data.ups} 💬 ${body.data.children[i].data.num_comments}`)
message.say(redditEmbed); message.say(redditEmbed);