Update 'index.js'
This commit is contained in:
parent
b663df3801
commit
0e554c4571
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -5,7 +5,6 @@ const {
|
|||
} = require('discord.js');
|
||||
|
||||
const Tesseract = require('tesseract.js');
|
||||
import { createWorker } from 'tesseract.js';
|
||||
|
||||
const bot = new Client({
|
||||
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGES]
|
||||
|
@ -29,6 +28,7 @@ bot.on('guildMemberAdd', (member) => {
|
|||
|
||||
bot.on('messageCreate', (message) => {
|
||||
if (message.attachments.size > 0) {
|
||||
import { createWorker } from 'tesseract.js';
|
||||
let image = message.attachments.first().url;
|
||||
const worker = createWorker({
|
||||
logger: m => console.log(m)
|
||||
|
|
Loading…
Reference in a new issue