OCR Scanning part 3
This commit is contained in:
parent
46dc6581a3
commit
fa59f2f3d0
1 changed files with 5 additions and 1 deletions
6
index.js
6
index.js
|
@ -30,9 +30,13 @@ bot.on('messageCreate', (message) => {
|
||||||
if (message.attachments.size > 0) {
|
if (message.attachments.size > 0) {
|
||||||
let image = message.attachments.first().url;
|
let image = message.attachments.first().url;
|
||||||
usermessage = Tesseract.recognize(image,'eng');
|
usermessage = Tesseract.recognize(image,'eng');
|
||||||
|
console.log(usermessage);
|
||||||
|
}
|
||||||
|
else if {
|
||||||
|
usermessage = message.content.toLowerCase();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
usermessage = message.content.toLowerCase();
|
console.log(`Something is broken`);
|
||||||
}
|
}
|
||||||
if (message.author.bot) {
|
if (message.author.bot) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue