mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix stray pixel
This commit is contained in:
@@ -45,7 +45,7 @@ module.exports = class DislikeCommand extends Command {
|
||||
const canvas = createCanvas(plate.width, plate.height + height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(base, 0, 0, plate.width, height);
|
||||
ctx.drawImage(plate, 0, height + 1);
|
||||
ctx.drawImage(plate, 0, height);
|
||||
const attachment = canvas.toBuffer();
|
||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||
return msg.say({ files: [{ attachment, name: 'dislike.png' }] });
|
||||
|
||||
@@ -45,7 +45,7 @@ module.exports = class LikeCommand extends Command {
|
||||
const canvas = createCanvas(plate.width, plate.height + height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(base, 0, 0, plate.width, height);
|
||||
ctx.drawImage(plate, 0, height + 1);
|
||||
ctx.drawImage(plate, 0, height);
|
||||
const attachment = canvas.toBuffer();
|
||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||
return msg.say({ files: [{ attachment, name: 'like.png' }] });
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = class SexySinglesCommand extends Command {
|
||||
const width = Math.round(base.width * scaleW);
|
||||
const canvas = createCanvas(plate.width + width, plate.height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(base, plate.width + 1, 0, width, plate.height);
|
||||
ctx.drawImage(base, plate.width, 0, width, plate.height);
|
||||
ctx.drawImage(plate, 0, 0);
|
||||
const attachment = canvas.toBuffer();
|
||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||
|
||||
Reference in New Issue
Block a user