XKCD Link

This commit is contained in:
Daniel Odendahl Jr
2017-05-25 18:15:30 +00:00
parent c22ec43fed
commit f20915b36e
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -35,6 +35,7 @@ module.exports = class XKCDCommand extends Command {
if (type === 'today') {
const embed = new RichEmbed()
.setTitle(`${current.body.num} - ${current.body.title}`)
.setURL(`https://xkcd.com/${current.body.num}`)
.setImage(current.body.img)
.setFooter(current.body.alt);
return msg.embed(embed);
@@ -44,6 +45,7 @@ module.exports = class XKCDCommand extends Command {
.get(`https://xkcd.com/${random}/info.0.json`);
const embed = new RichEmbed()
.setTitle(`${body.num} - ${body.title}`)
.setURL(`https://xkcd.com/${body.num}`)
.setImage(body.img)
.setFooter(body.alt);
return msg.embed(embed);