From 263ba3e7e34c24e2648c8ce29a41ff7098dbeafa Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Mar 2024 20:59:31 -0400 Subject: [PATCH] Fix --- commands/edit-face/anime-eyes.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/edit-face/anime-eyes.js b/commands/edit-face/anime-eyes.js index 0059c0b1..dbd98628 100644 --- a/commands/edit-face/anime-eyes.js +++ b/commands/edit-face/anime-eyes.js @@ -46,10 +46,10 @@ module.exports = class AnimeEyesCommand extends Command { for (const face of faces) { const faceWidth = face.box.width; const faceHeight = face.box.height; - const leftEye = face.keypoints.find(landmark => landmark.name === 'leftEye'); - ctx.drawImage(leftEye, leftEye.x, leftEye.y, faceWidth / 10, faceHeight / 10); - const rightEye = face.keypoints.find(landmark => landmark.name === 'rightEye'); - ctx.drawImage(rightEye, rightEye.x, rightEye.y, faceWidth / 10, faceHeight / 10); + const leftEyeData = face.keypoints.find(landmark => landmark.name === 'leftEye'); + ctx.drawImage(leftEye, leftEyeData.x, leftEyeData.y, faceWidth / 10, faceHeight / 10); + const rightEyeData = face.keypoints.find(landmark => landmark.name === 'rightEye'); + ctx.drawImage(rightEye, rightEyeData.x, rightEyeData.y, faceWidth / 10, faceHeight / 10); } return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'anime-eyes.png' }] }); } catch (err) {