diff --git a/commands/interaction/slash/search/anime.js b/commands/interaction/slash/search/anime.js index 1d3f18a..08a0176 100644 --- a/commands/interaction/slash/search/anime.js +++ b/commands/interaction/slash/search/anime.js @@ -33,8 +33,12 @@ function renderAnimeResultsPage(context, res, includeSupplementalData = true){ // Render Description if(res.subtitle) result.description += `-# ${res.subtitle}\n\n`; if(res.type !== "ANIME") result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.type]) + " " - 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"; + else { + if(res.subtype) result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.subtype]) + " " + else result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.type]) + " " + } + if(res.genres) result.description += res.genres.map((r)=>smallPill(r)).join(" ") + "\n"; + if(res.tags) result.description += "-# " + res.tags.map((t)=>smallPill(t)).join(" ") + "\n\n"; if(res.description) result.description += stringwrapPreserveWords(res.description, 600); if(res.attribution?.description) result.description += `\n\n-# Source • ${res.attribution.description}` diff --git a/commands/message/search/anime.js b/commands/message/search/anime.js index 6389dd4..4b9d99d 100644 --- a/commands/message/search/anime.js +++ b/commands/message/search/anime.js @@ -32,8 +32,12 @@ function renderAnimeResultsPage(context, res, includeSupplementalData = true){ // Render Description if(res.subtitle) result.description += `-# ${res.subtitle}\n\n`; if(res.type !== "ANIME") result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.type]) + " " - 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"; + else { + if(res.subtype) result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.subtype]) + " " + else result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.type]) + " " + } + if(res.genres) result.description += res.genres.splice(0,3).map((r)=>smallPill(r)).join(" ") + "\n"; + if(res.tags) result.description += "-# " + res.tags.map((t)=>smallPill(t)).join(" ") + "\n\n"; if(res.description) result.description += stringwrapPreserveWords(res.description, 600); if(res.attribution?.description) result.description += `\n\n-# Source • ${res.attribution.description}` diff --git a/labscore/constants.js b/labscore/constants.js index fa6c8ea..b4ed874 100644 --- a/labscore/constants.js +++ b/labscore/constants.js @@ -1877,6 +1877,7 @@ module.exports.PROVISIONAL_ACCOUNT_AVATARS = Object.freeze([ // Anime Format Types (/omni_service/endpoints/anime.js) module.exports.OMNI_ANIME_FORMAT_TYPES = Object.freeze({ + ANIME: "Anime", TV: "TV", TV_SHORT: "TV Short", MOVIE: "Movie",