Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Add a color command
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Ray committed Oct 18, 2018
1 parent 2c1fc6a commit ba9bd04
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions commands/color.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const Discord = require('discord.js');
//const superagent = require ('superagent');
exports.run = async (client, message, args) => {
//https://dummyimage.com/600x400/000/fff
const colorCode = args.join(' ');
const msg = await message.channel.send('Loading...');
try {
const embed = new Discord.RichEmbed()
.setColor(colorCode)
.setTitle('COLOR')
.addField('Hex Code', `#${colorCode.toUpperCase()}`, true)
.setImage(`https://dummyimage.com/600x400/${colorCode}/ffffff&text=Moonglow`)
.setFooter(client.user.username, client.user.avatarURL)
.setTimestamp();
msg.edit(embed);
} catch (err) {
msg.edit(err);
message.channel.send('An error has occurred while processing.');
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'Standard User'
};

exports.help = {
name: 'color',
category: 'Fun',
description: 'Gets a color and provides it.',
usage: 'color [...hex code]'
};

0 comments on commit ba9bd04

Please sign in to comment.