mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
fix length issue
This commit is contained in:
parent
7ceba43dad
commit
b4ecb8cb98
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ const { perspective } = require("../../../labscore/api");
|
||||||
const { format } = require("../../../labscore/utils/ansi");
|
const { format } = require("../../../labscore/utils/ansi");
|
||||||
const { createEmbed } = require("../../../labscore/utils/embed");
|
const { createEmbed } = require("../../../labscore/utils/embed");
|
||||||
|
|
||||||
const { icon, codeblock, iconPill, smallPill } = require("../../../labscore/utils/markdown");
|
const { icon, codeblock, iconPill, smallPill, stringwrap } = require("../../../labscore/utils/markdown");
|
||||||
const { editOrReply } = require("../../../labscore/utils/message");
|
const { editOrReply } = require("../../../labscore/utils/message");
|
||||||
const { STATICS } = require("../../../labscore/utils/statics");
|
const { STATICS } = require("../../../labscore/utils/statics");
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ function renderPerspectiveAnalysis(payload, input, type){
|
||||||
function perspectiveAnalysisEmbed(context, payload, input, type){
|
function perspectiveAnalysisEmbed(context, payload, input, type){
|
||||||
let score = payload.scores[type];
|
let score = payload.scores[type];
|
||||||
return createEmbed("default", context, {
|
return createEmbed("default", context, {
|
||||||
description: `${iconPill("agreements", `${type.substr(0, 1).toUpperCase()}${type.substr(1, type.length).toLowerCase().replace(/_/g, ' ')}`)} ${smallPill(`${score.toString().substr(2, 2)}.${score.toString().substr(3, 1)}%`)} ${codeblock("ansi", [renderPerspectiveAnalysis(payload,input,type)])}`,
|
description: `${iconPill("agreements", `${type.substr(0, 1).toUpperCase()}${type.substr(1, type.length).toLowerCase().replace(/_/g, ' ')}`)} ${smallPill(`${score.toString().substr(2, 2)}.${score.toString().substr(3, 1)}%`)} ${codeblock("ansi", [stringwrap(renderPerspectiveAnalysis(payload,input,type), 2000)])}`,
|
||||||
footer: {
|
footer: {
|
||||||
iconUrl: STATICS.perspectiveapi,
|
iconUrl: STATICS.perspectiveapi,
|
||||||
text: `Perspective • ${context.application.name}`
|
text: `Perspective • ${context.application.name}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue