Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomention
- $reply
- $allowUserMentions[]
- $try
- $onlyIf[$guildID!=;]
- $catch
- $ephemeral
- You can not use this command in DMs
- $stop
- $endtry
- $try
- $globalCooldown[7s;]
- $catch
- $ephemeral
- You are on cooldown! Try again <t:$sum[$getTimestamp;$getCooldown[global]]:R>
- $stop
- $endtry
- $if[$isSlash==true]
- $defer
- $var[anime;$toLowercase[$message[anime]]]
- $else
- $botTyping
- $argsCheck[>1;Please provide an anime for me to search!]
- $var[anime;$toLowercase[$message]]
- $endif
- $httpGet[https://kitsu.io/api/edge/anime?filter%5Btext%5D=$url[encode;$var[anime]]]
- $jsonSet[kitsu;$httpResult]
- $jsonParse[$json[kitsu]]
- $var[kitsu.io;$cropText[$replaceText[$jsonPretty[2];";;-1];3000;...]]
- $try
- $onlyIf[$json[data]!=[\];]
- $catch
- $ephemeral
- $if[$isSlash==false]
- Anime `"$message"` not found.
- $else
- Anime `"$message[anime]"` not found.
- $endif
- $stop
- $endtry
- $var[cover.img;$json[data;0;attributes;coverImage;original]]
- $var[synopsis;$cropText[$json[data;0;attributes;description];500;...]]
- $async[nyah]
- $httpGet[$json[data;0;relationships;genres;links;related]]
- $jsonParse[$httpResult]
- $var[q;0]
- $var[Array.Count;$jsonArrayCount[data]]
- $if[$json[data]!=[\]]
- $var[g;$eval[$replaceText[$cropText[$repeatMessage[10;$repeatMessage[3;a]];$var[Array.Count];];a;$replaceText[.json[data\;.var[q\]\;attributes\;name\], .var[q\;.sum[.var[q\]\;1\]\];.;$];-1]]]
- $textSplit[$var[g];,]
- $var[s;$sub[$getTextSplitLength;1]]
- $var[genres;$replaceText[$joinSplitText[,];$splitText[$var[s]],;$splitText[$var[s]]]]
- $else
- $var[i;No Genres Found]
- $endif
- $endasync $await[nyah]
- $async[meow]
- $httpGet[$json[data;0;relationships;animeProductions;links;related]]
- $if[$httpResult[data]!=[\]]
- $var[producer;$httpResult[data;0;relationships;producer;links;related]]
- $httpGet[$var[producer]]
- $jsonParse[$httpResult]
- $if[$json[data;attributes;name]!=]
- $var[studios;$json[data;attributes;name]]
- $endif
- $else
- $var[studios;N/A]
- $endif
- $endasync $await[meow]
- $if[$var[cover.img]==]
- $var[index;1]
- $else
- $var[index;2]
- $endif
- $var[inline?;false]
- $if[$charCount[$var[synopsis]]<=500]
- $var[desc;$var[synopsis]]
- $else
- $var[desc;$var[synopsis][Read More\](https://kitsu.io/anime/$json[data;0;attributes;slug])]
- $endif
- $var[episodes;$trimSpace[$if[$json[data;0;attributes;episodeCount]!=] $json[data;0;attributes;episodeCount] $else No data $endif]]
- $var[status;$trimSpace[$if[$json[data;0;attributes;status]!=] $toTitleCase[$json[data;0;attributes;status]] $else No Data $endif]]
- $var[average.rating;$trimSpace[$if[$json[data;0;attributes;averageRating]!=] $json[data;0;attributes;averageRating] $else No Rating $endif]]
- $var[rank;$trimSpace[$if[$json[data;0;attributes;ratingRank]!=] #$json[data;0;attributes;ratingRank] $else Not ranked $endif]]
- $if[$var[episodes]!=No data]
- $var[length;*(Each $json[data;0;attributes;episodeLength] minutes in length)*]
- $endif
- $if[$json[data;0;attributes;startDate]!=]
- $var[start;From $json[data;0;attributes;startDate] to]
- $else
- $var[start;Not Aired Yet]
- $endif
- $if[$var[start]!=Not Aired Yet]
- $if[$json[data;0;attributes;endDate]!=]
- $var[end;$json[data;0;attributes;endDate]]
- $else
- $var[end;???]
- $endif
- $else
- $var[end;]
- $endif
- $image[$var[cover.img];1]
- $color[$random[1;16777216];1]
- $title[$json[data;0;attributes;canonicalTitle];$var[index]]
- $addField[📖 Synopsis;$var[desc];$var[inline?];$var[index]]
- $addField[💠 Episodes;$var[episodes] $var[length];$var[inline?];$var[index]]
- $addField[🌺 Genres;$var[genres]$var[i];$var[inline?];$var[index]]
- $addField[⏳ Status;$replaceText[$var[status];Tba;To be announced];$var[inline?];$var[index]]
- $addField[💌 Titles;**English Title:** $json[data;0;attributes;titles;en]
- **Japanese Title:** $json[data;0;attributes;titles;ja_jp];$var[inline?];$var[index]]
- $addField[⭐ Ranked;$var[rank];$var[inline?];$var[index]]
- $addField[☂️ Rated;$json[data;0;attributes;ageRating] - $json[data;0;attributes;ageRatingGuide];$var[inline?];$var[index]]
- $addField[🌀 Average Rating;$var[average.rating];$var[inline?];$var[index]]
- $addField[☘️ Studios;$var[studios];$var[inline?];$var[index]]
- $addField[⌚ Aired;$var[start] $var[end];$var[inline?];$var[index]]
- $image[$json[data;0;attributes;posterImage;original];$var[index]]
- $color[$optOff[$random[1;16777216]];$var[index]]
- $addTimestamp[$var[index]]
- $if[$json[data;0;attributes;youtubeVideoId]!=]
- $addButton[no;https://youtu.be/$json[data;0;attributes;youtubeVideoId];Trailer;link]
- $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement