mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
add stringwrap by words, limit ani description length
This commit is contained in:
parent
d58fa1fbe4
commit
19979e440e
3 changed files with 26 additions and 5 deletions
|
@ -4,7 +4,7 @@ const { PERMISSION_GROUPS, OMNI_ANIME_FORMAT_TYPES } = require('#constants');
|
|||
|
||||
const { createEmbed, formatPaginationEmbeds, page, hexToEmbedColor } = require('#utils/embed');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
const { smallPill, link, pill } = require('#utils/markdown');
|
||||
const { smallPill, link, pill, stringwrapPreserveWords} = require('#utils/markdown');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
const { InteractionContextTypes, ApplicationIntegrationTypes, ApplicationCommandOptionTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
|
@ -30,7 +30,7 @@ function renderAnimeResultsPage(context, res){
|
|||
if(res.subtitle) result.description += `-# ${res.subtitle}\n\n`;
|
||||
if(res.subtype) result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.subtype]) + " "
|
||||
if(res.genres) result.description += res.genres.map((r)=>smallPill(r)).join(" ") + "\n\n";
|
||||
if(res.description) result.description += res.description;
|
||||
if(res.description) result.description += stringwrapPreserveWords(res.description, 600);
|
||||
if(res.attribution?.description) result.description += `\n\n-# Source • ${res.attribution.description}`
|
||||
|
||||
// Render Images
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue