mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Make PNGs Again
This commit is contained in:
@@ -46,7 +46,7 @@ module.exports = class TriggeredCommand extends Command {
|
||||
for (let i = 0; i < data.length; i += 4) data[i] = Math.max(255, data[i]);
|
||||
ctx.putImageData(imgData, 0, 0);
|
||||
ctx.drawImage(base, 0, 0);
|
||||
return msg.say({ files: [canvas.toBuffer()] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user