mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Fix
This commit is contained in:
@@ -41,7 +41,7 @@ module.exports = class SexySinglesCommand extends Command {
|
|||||||
const width = Math.round(base.width * scaleW);
|
const width = Math.round(base.width * scaleW);
|
||||||
const canvas = createCanvas(plate.width + width, plate.height);
|
const canvas = createCanvas(plate.width + width, plate.height);
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
ctx.drawImage(base, 0, 0, plate.width + 1, 0);
|
ctx.drawImage(base, plate.width + 1, 0, width, plate.height);
|
||||||
ctx.drawImage(plate, 0, 0);
|
ctx.drawImage(plate, 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