Lots of Stuff

This commit is contained in:
Daniel Odendahl Jr
2017-09-18 02:29:10 +00:00
parent 74593deb25
commit 12594758be
56 changed files with 246 additions and 249 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ module.exports = class AchievementCommand extends Command {
h: 'Achievement Get!',
t: text
});
return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] });
return msg.say({ files: [body] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+3 -2
View File
@@ -5,6 +5,7 @@ module.exports = class ColorCommand extends Command {
constructor(client) {
super(client, {
name: 'color',
aliases: ['colour'],
group: 'image-edit',
memberName: 'color',
description: 'Sends an image of the color you choose.',
@@ -12,7 +13,7 @@ module.exports = class ColorCommand extends Command {
args: [
{
key: 'color',
prompt: 'What color do you want to view? This can be HTML (#colorcode) or a name.',
prompt: 'What color do you want to view? This can be #colorcode or a name.',
type: 'string',
parse: color => color.toLowerCase()
}
@@ -25,6 +26,6 @@ module.exports = class ColorCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.fillStyle = color;
ctx.fillRect(0, 0, 250, 250);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'color.png' }] });
return msg.say({ files: [canvas.toBuffer()] });
}
};