This commit is contained in:
lilyissillyyy
2025-09-06 00:31:59 -04:00
parent e7c44f36bd
commit 4932586862
+3 -3
View File
@@ -29,14 +29,14 @@ module.exports = class ReadQRCodeCommand extends Command {
ctx.drawImage(img, 0, 0);
const imgData = ctx.getImageData(0, 0, img.width, img.height);
try {
const result = await this.readQrCode(imgData, img.width, img.height);
const result = await this.readQrCode(imgData);
return msg.reply(shorten(result, 2000));
} catch (err) {
return msg.reply(`Could not read QR Code: \`${err.message}\`.`);
}
}
readQrCode(imgData, width, height) {
return decodeQR({ width, height, data: imgData });
readQrCode(imgData) {
return decodeQR(imgData);
}
};