Minty U

OCR Implement

const Tesseract = require("tesseract.js");
exports.run = async (client, msg, args, prefix) => {
msg.channel.send(`${client.user.username}의 핑은 ${client.ws.ping}ms 입니다!`);
// msg.channel.send(`${client.user.username}의 핑은 ${client.ws.ping}ms 입니다!`);
if (msg.attachments.size > 0) {
msg.attachments.forEach(attachment => {
var ImgURL = attachment.proxyURL;
Tesseract.recognize(
ImgURL,
"eng",
{ logger: (m) => console.log(m) }
).then(({ data: { text } }) => {
// Replying with the extracted test
console.log(text);
msg.reply(text);
});
});
}
};
exports.config = {
......
This file is too large to display.