mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Fix
This commit is contained in:
@@ -58,8 +58,8 @@ module.exports = class FrameCommand extends Command {
|
|||||||
} else {
|
} else {
|
||||||
canvas = createCanvas(base.width, base.height);
|
canvas = createCanvas(base.width, base.height);
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
ctx.drawImage(base, 0, 0);
|
|
||||||
ctx.drawImage(data, frame.xStart, frame.yStart, frame.xSize, frame.ySize);
|
ctx.drawImage(data, frame.xStart, frame.yStart, frame.xSize, frame.ySize);
|
||||||
|
ctx.drawImage(base, 0, 0);
|
||||||
}
|
}
|
||||||
const attachment = canvas.toBuffer();
|
const attachment = canvas.toBuffer();
|
||||||
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.');
|
||||||
|
|||||||
Reference in New Issue
Block a user