mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 22:27:44 +02:00
Lots of Stuff
This commit is contained in:
@@ -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!`);
|
||||
}
|
||||
|
||||
@@ -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()] });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user