added try catch to tesseract
diff --git a/src/reflex/scanners.ts b/src/reflex/scanners.ts
index f64a520..a6e94d6 100644
--- a/src/reflex/scanners.ts
+++ b/src/reflex/scanners.ts
@@ -198,12 +198,16 @@
}
export async function TestImage(url: string): Promise<string | null> {
- const text = await Tesseract.recognize(url, {
- lang: "eng",
- oem: 1,
- psm: 3
- });
- return text;
+ try {
+ const text = await Tesseract.recognize(url, {
+ lang: "eng",
+ oem: 1,
+ psm: 3
+ });
+ return text;
+ } catch {
+ return null;
+ }
}
export async function doMemberChecks(member: Discord.GuildMember): Promise<void> {