You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
439 B

const xkcd = require('xkcd-api');
module.exports = {
name: 'comic',
description: 'Send a random xkcd comic.',
execute(message) {
var message = message;
xkcd.random(function(error, response) {
if (error) {
console.error(error);
} else {
message.channel.send(`**${response.safe_title}**\n*${response.alt}*`, {files: [response.img]})
}
});
},
};