This commit is contained in:
Daniel Odendahl Jr
2017-06-05 18:36:56 +00:00
parent b2a69b8a49
commit e0421885bf
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class XKCDCommand extends Command {
return msg.embed(embed);
} else {
const choice = parseInt(type, 10);
if (isNaN(choice) || current.body.num < choice || choice < 0) return msg.say('Invalid Number');
if (isNaN(choice) || current.body.num < choice || choice < 1) return msg.say('Invalid Number.');
const { body } = await snekfetch
.get(`https://xkcd.com/${choice}/info.0.json`);
const embed = new RichEmbed()