AlferZep

vnovel

Mar 30th, 2024
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. $nomention
  2. $jsonParse[
  3. {
  4. "novel":$getVar[novel;$authorID]
  5. }
  6. ]
  7.  
  8. $httpAddHeader[content-type;application/x-www-form-urlencoded]
  9.  
  10. $httpGet[https://pastebin.com/raw/hah8Rk7C]
  11.  
  12. $jsonParse[
  13. {
  14. "novel":$getVar[novel;$authorID],
  15. "link":$httpResult
  16. }
  17. ]
  18.  
  19. $if[$message!=]
  20. $onlyIf[$json[link;$message[1]]!=;There’s no novel of that ID.]
  21.  
  22. $httpPost[https://pastebin.com/api/api_raw.php;api_dev_key=$getVar[paste_key]&api_user_key=$getVar[paste_user_key]&api_paste_key=$replaceText[$json[link;$message[1];link];https://pastebin.com/raw/;]&api_option=show_paste]
  23.  
  24. $jsonParse[
  25. {
  26. "novel":$getVar[novel;$authorID],
  27. "link":$json[link],
  28. "nlink":$httpResult
  29. }
  30. ]
  31.  
  32. $author[$username]
  33. $authorIcon[$authorAvatar]
  34. $title[$json[link;$message[1];title]]
  35. $addField[Author;$json[link;$message[1];author]]
  36. $addField[About;$json[link;$message[1];about]]
  37. $addField[Chapters;$if[$json[nlink;chapters]>0]Chapter $json[nlink;chapters] - $json[nlink;chapter;$json[nlink;chapters];title]$endif
  38. $if[$sub[$json[nlink;chapters];1]>0]Chapter $sub[$json[nlink;chapters];1] - $json[nlink;chapter;$sub[$json[nlink;chapters];1];title]$endif
  39. $if[$sub[$json[nlink;chapters];2]>0]Chapter $sub[$json[nlink;chapters];2] - $json[nlink;chapter;$sub[$json[nlink;chapters];2];title]$endif
  40. $if[$json[nlink;chapters]>=3]*…*$endif
  41. ]
  42. $thumbnail[$json[link;$message[1];thumbnail]]
  43. $addButton[no;novel read $authorID;Read;secondary]
  44. $if[$json[link;$message[1];site]!=none]
  45. $addButton[no;$json[link;$message[1];site];Site;link]
  46. $endif
  47.  
  48. $jsonSet[novel;title;$json[link;$message[1];title]]
  49. $jsonSet[novel;link;$json[link;$message[1];link]]
  50.  
  51. $setVar[novel;$json[novel];$authorID]
  52.  
  53. $else
  54. $title[Select a novel]
  55. $description[New Chapters every weekends.]
  56. $addField[Novels;$if[$json[link;1]!=]1 - $json[link;1;title]$endif
  57. $if[$json[link;2]!=]2 - $json[link;2;title]$endif
  58. $if[$json[link;3]!=]3 - $json[link;3;title]$endif
  59. $if[$json[link;4]!=]4 - $json[link;4;title]$endif
  60. $if[$json[link;5]!=]5 - $json[link;5;title]$endif
  61. $if[$json[link;6]!=]6 - $json[link;6;title]$endif
  62. $if[$json[link;7]!=]7 - $json[link;7;title]$endif
  63. $if[$json[link;8]!=]8 - $json[link;8;title]$endif
  64. $if[$json[link;9]!=]9 - $json[link;9;title]$endif
  65. $if[$json[link;10]!=]10 - $json[link;10;title]$endif]
  66. $footer[example: vnovel 1]
  67. $endif
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
Advertisement
Add Comment
Please, Sign In to add comment