Update 'index.js'

This commit is contained in:
Paul Black 2022-11-05 04:46:13 +00:00
parent b663df3801
commit 0e554c4571

View file

@ -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)