This commit is contained in:
Alex 2020-06-18 23:53:53 -05:00
parent a9cf34717b
commit 0c14891aba

View File

@ -243,6 +243,7 @@ if (command == "xkcd") {
try { try {
var response = await fetch(`https://xkcd.com/${args[0]}/info.0.json`); var response = await fetch(`https://xkcd.com/${args[0]}/info.0.json`);
comic = await response.text(); comic = await response.text();
return comic
} catch (e) { } catch (e) {
console.error(e); console.error(e);
return message.reply("Something went wrong... Check your number and try again later.") return message.reply("Something went wrong... Check your number and try again later.")
@ -251,6 +252,7 @@ if (command == "xkcd") {
} }
getcomic(); getcomic();
let embed = new Discord.MessageEmbed() let embed = new Discord.MessageEmbed()