report request content to basecamp

This commit is contained in:
derpystuff 2024-03-24 11:33:46 +01:00
parent a3ae9d819c
commit a2f195f983
5 changed files with 7 additions and 7 deletions

View file

@ -42,7 +42,7 @@ module.exports = {
thumbnail: {
url: attachment
},
description: codeblock("ansi", ["" + ocr.response.body.text]),
description: codeblock("ansi", ["" + ocr.response.body.text.substr(0,3900)]),
footer: {
iconUrl: STATICS.google,
text: `Google Cloud Vision • ${context.application.name} • Took ${ocr.timings}s`

View file

@ -46,7 +46,7 @@ module.exports = {
let toFlag = TRANSLATE_LANGUAGE_MAPPINGS[translate.response.body.language.to] || ''
return editOrReply(context, createEmbed("default", context, {
description: `${icon("locale")} ${fromFlag} ${pill(TRANSLATE_LANGUAGES[translate.response.body.language.from || sourceLanguage])} ${icon("arrow_right")} ${toFlag} ${pill(TRANSLATE_LANGUAGES[translate.response.body.language.to])}\n${codeblock("ansi", [translate.response.body.translation.substr(0,4000)])}`,
description: `${icon("locale")} ${fromFlag} ${pill(TRANSLATE_LANGUAGES[translate.response.body.language.from || sourceLanguage])} ${icon("arrow_right")} ${toFlag} ${pill(TRANSLATE_LANGUAGES[translate.response.body.language.to])}\n${codeblock("ansi", [translate.response.body.translation.substr(0,3900)])}`,
thumbnail: {
url: attachment
},

View file

@ -38,7 +38,7 @@ module.exports = {
return editOrReply(context, {
embeds: [createEmbed("default", context, {
description: codeblock("md", [ recog.response.body.transcription_with_speakers ]),
description: codeblock("md", [ recog.response.body.transcription_with_speakers.substr(0,3900) ]),
footer: {
iconUrl: STATICS.google,
text: `Google Cloud • Confidence: ${(recog.response.body.confidence* 100).toFixed(1)}% • ${context.application.name}`