This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthew Ray
committed
Oct 18, 2018
1 parent
2c1fc6a
commit ba9bd04
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]' | ||
}; |