mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Fix
This commit is contained in:
@@ -32,6 +32,7 @@ module.exports = class MagikCommand extends Command {
|
|||||||
const magik = gm(body, 'magik.png');
|
const magik = gm(body, 'magik.png');
|
||||||
magik.out('-liquid-rescale 75%x75%');
|
magik.out('-liquid-rescale 75%x75%');
|
||||||
magik.implode(0.25);
|
magik.implode(0.25);
|
||||||
|
magik.setFormat('png');
|
||||||
const attachment = await this.toBuffer(magik);
|
const attachment = await this.toBuffer(magik);
|
||||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||||
return msg.say({ files: [{ attachment, name: 'magik.png' }] });
|
return msg.say({ files: [{ attachment, name: 'magik.png' }] });
|
||||||
|
|||||||
Reference in New Issue
Block a user