mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 06:45:31 +02:00
Make PNGs Again
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = class AchievementCommand extends Command {
|
||||
h: 'Achievement Get!',
|
||||
t: text
|
||||
});
|
||||
return msg.say({ files: [body] });
|
||||
return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
@@ -26,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: [canvas.toBuffer()] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'color.png' }] });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user