mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 23:05:04 +02:00
Fix
This commit is contained in:
@@ -40,7 +40,7 @@ module.exports = class BlurCommand extends Command {
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(data, 0, 0);
|
||||
stackBlur.canvasRGBA(canvas, 0, 0, canvas.width, canvas.height, radius);
|
||||
const attachment = canvas.toBuffer();
|
||||
const attachment = canvas.toBuffer('image/png');
|
||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||
return msg.say({ files: [{ attachment, name: 'blur.png' }] });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user