Fix stray pixel

This commit is contained in:
Dragon Fire
2021-03-07 20:27:03 -05:00
parent 3151bed43e
commit 57a3bbdbc1
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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' }] });
+1 -1
View File
@@ -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' }] });
+1 -1
View File
@@ -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.');