Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박건희
/
emon_bot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Minty U
2022-05-25 00:36:01 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0867734a6bdba10564ae8fdf6b90fc023a7f6941
0867734a
1 parent
ba971b92
OCR Implement
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
Commands/OCR/ocr.js
eng.traineddata
Commands/OCR/ocr.js
View file @
0867734
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
=
{
...
...
eng.traineddata
0 → 100644
View file @
0867734
This file is too large to display.
Please
register
or
login
to post a comment