Advertisement
Aouchan

Animeinfo Command

Mar 28th, 2023 (edited)
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASM (NASM) 2.56 KB | Source Code | 0 0
  1. $nomention
  2. $reply
  3. $allowUserMentions[]
  4. $onlyIf[$guildID!=;You can't use this command in DMs.]
  5. $if[$isSlash==true]
  6.   $defer
  7.   $var[anime;$toLowercase[$message[anime]]]
  8. $else
  9.   $botTyping
  10.   $argsCheck[>1;Please provide an anime to search.]
  11.   $var[anime;$toLowercase[$message]]
  12. $endif
  13. $async[Baka]
  14.  $httpGet[https://kitsu.io/api/edge/anime?filter%5Btext%5D=$url[encode;$var[anime]]]
  15.   $jsonSet[kitsu;$httpResult]
  16.    $jsonParse[$json[kitsu]]
  17.     $var[kitsu;$cropText[$jsonPretty[2];1900;...]]  
  18. $var[banner;$httpResult[data;0;attributes;coverImage;original]]
  19. $endasync $await[Baka]
  20.  $httpGet[https://apiv1.spapi.ga/anime/info?anime=$url[encode;$var[anime]]]
  21.   $jsonSet[results;$httpResult]
  22.    $jsonParse[$json[results]]
  23.     $jsonUnset[description]
  24.    
  25.   $var[spapi;```js
  26.   $jsonSetString[description;$cropText[$httpResult[description];300;...]]
  27.   $replaceText[$replaceText[$replaceText[$jsonPretty[2];\n;;-1];\u0026;;-1];";;-1]```]
  28.    
  29. $var[genres;$replaceText[$replaceText[$replaceText[$replaceText[$httpResult[genres];";;-1];,;, ;-1];[;;1];\];;1]]
  30. $var[studios;$replaceText[$replaceText[$replaceText[$replaceText[$httpResult[studios];";;-1];[;;1];\];;1];,;, ;-1]]
  31.  $if[$var[genres]==]
  32.    $var[tags;N/A]
  33.  $else
  34.    $var[tags;$var[genres]]
  35.  $endif
  36.  
  37.   $if[$httpResult[score]!=N/A]
  38.      $var[score;$httpResult[score]/10]
  39.   $else
  40.      $var[score;$httpResult[score]]
  41.   $endif
  42.  
  43.    $if[$var[banner]==]
  44.     $var[index;1]
  45.    $else
  46.     $var[index;2]
  47.    $endif
  48. $image[$var[banner];1]
  49.  $color[$random[1;16777216];1]
  50.   $title[$httpResult[title];$var[index]]
  51.    $addField[📖 Synopsis;$cropText[$httpResult[description];500;...][Read More\]($httpResult[url]);no;$var[index]]
  52.    $addField[💠 Episodes;$replaceText[$httpResult[episodes];";;-1];no;$var[index]]
  53.    $addField[🌺 Genres;$var[tags];no;$var[index]]
  54.    $addField[⏳ Status;$httpResult[status];no;$var[index]]
  55.    $addField[💌 Titles;**English Title**: $httpResult[english_title]
  56. **Japanese Title**: $httpResult[japanese_title];no;$var[index]]
  57.    $addField[♦️ Ranked;$httpResult[ranked];no;$var[index]]
  58.    $addField[☂️ Rated;$httpResult[rating];no;$var[index]]
  59.    $addField[🌟 Score;$var[score]
  60. $replaceText[$httpResult[scoreStats];";;-1];no;$var[index]]
  61.    $addField[☘️ Studios;$var[studios];no;$var[index]]
  62.    $addField[⌚ Aired;$httpResult[airTime];no;$var[index]]
  63.   $image[$httpResult[poster];$var[index]]
  64.  $color[$optOff[$random[1;16777216]];$var[index]]
  65. $addTimestamp[$var[index]]
  66. $if[$jsonExists[trailer]==true]
  67.   $addButton[no;$httpResult[trailer];Trailer;link]
  68. $else
  69. $endif
  70.  
Tags: BDFD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement