diff --git a/src/commands/ocr/ocr.ts b/src/commands/ocr/ocr.ts index c316f3c..e4e253b 100644 --- a/src/commands/ocr/ocr.ts +++ b/src/commands/ocr/ocr.ts @@ -27,7 +27,7 @@ export function buildOcrPayload( try { return ( new Intl.DisplayNames(["en"], { type: "language" }).of(language) ?? - "unknown" + "Unknown" ); } catch { return "Unknown"; @@ -54,12 +54,15 @@ export function buildOcrPayload( { description: text, color: model === "yandex" ? 0xffdb4d : 0x4285f4, - fields: [ - { - name: "Detected language", - value: languageName, - }, - ], + fields: + text !== "No text detected" + ? [ + { + name: "Detected language", + value: languageName, + }, + ] + : [], ...(imageUrl ? { image: { url: imageUrl } } : {}), author: { name: capitalize(model),