const { Command } = require('discord-akairo');
const { RichEmbed } = require('discord.js');
const xkcd = require('relevant-xkcd');

function exec(message, args){
    const sendComic = comic => {
        const embed = new RichEmbed()
        .setTitle(comic.title)
        .setURL(comic.explainURL)
        .setDescription(comic.altText)
        .setImage(comic.imageURL)
        .setFooter(comic.xkcdURL);
        
        return message.edit('', { embed });
    };

    if (!args.content){
        return xkcd.fetchRandom().then(sendComic);
    }

    if (!isNaN(args.content) && parseInt(args.content) === 0){
        return xkcd.fetchCurrent().then(sendComic);
    }

    if (!isNaN(args.content)){
        return xkcd.fetchComic(parseInt(args.content)).then(sendComic);
    }

    return xkcd.fetchRelevant(args.content).then(sendComic);
}

module.exports = new Command('xkcd', exec, {
    aliases: ['xkcd'],
    args: [
        {
            id: 'content',
            match: 'content'
        }
    ]
});

@@ -206,30 +206,335 @@
 nst 
-embed = new RichEmbed(
+color = this.client.config.color === 'random'%0A        ? (1 %3C%3C 24) * Math.random() %7C 0%0A        : this.client.config.color === 'auto'%0A        ? message.guild%0A        ? this.client.util.displayColor(message.member)%0A        : 0%0A        : this.client.config.color %7C%7C 0;%0A%0A        const embed = new RichEmbed()%0A        .setColor(color
 )%0A  

Set xkcd embed color