Advertisement
Aouchan

Server Roles List

Nov 30th, 2023 (edited)
824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.16 KB | Source Code | 0 0
  1. Trigger: Any Trigger you want
  2.  
  3. $nomention
  4. $c[⁠▽ If you want to use this code you'll need an API key ▽]
  5. $c[▽ Visit -> https://dadocs.rickyjs.xyz/ for more information ▽]
  6.  
  7. $if[$isSlash==true]
  8.    $defer
  9. $else
  10.    $reply
  11.    $allowUserMentions[]
  12.    $botTyping
  13. $endif
  14.  
  15. $httpAddHeader[guild-id;$guildID]
  16. $httpAddHeader[apikey;$getVar[ApiKey]]
  17. $httpAddHeader[bot-token;$getVar[BotToken]]
  18.  
  19. $httpGet[https://bdfddata.rickyjs.xyz/release/guild/roles]
  20. $jsonParse[$httpResult]
  21.  
  22. $async[]
  23.  $httpGet[https://bdfddata.rickyjs.xyz/release/guild/members]
  24.  $var[mems;$httpResult]
  25. $endasync $await[]
  26.  
  27. $var[h;1]
  28. $var[sep;$url[decode;%0A]]
  29. $var[roles;$eval[$repeatMessage[10;%{DOL}%if[%{DOL}%json[details\;%{DOL}%var[h\]\;id\]!=\]%{DOL}%var[h\]. <@&%{DOL}%json[details\;%{DOL}%var[h\]\;id\]> - %{DOL}%textSplit[%{DOL}%var[mems\]\;%{DOL}%json[details\;%{DOL}%var[h\]\;id\]\]%{DOL}%var[r.%{DOL}%var[h\]\;%{DOL}%sub[%{DOL}%getTextSplitLength\;1\]\] **%{DOL}%var[r.%{DOL}%var[h\]\] %{DOL}%if[%{DOL}%var[r.%{DOL}%var[h\]\]==1\]Member%{DOL}%elseMembers%{DOL}%endif**%{DOL}%var[sep\]%{DOL}%else %{DOL}%stop%{DOL}%endif%{DOL}%var[h\;%{DOL}%sum[1\;%{DOL}%var[h\]\]\]]]]
  30.  
  31. $var[rc;$sub[$roleCount;1]]
  32.  
  33. $enableDecimals[true]
  34. $var[div;$divide[$var[rc];10]]
  35.  
  36. $if[$checkContains[$var[div];.]==true]
  37.    $textSplit[$var[div];.]
  38.    $var[tpg;$sum[1;$splitText[1]]]
  39. $else
  40.    $var[tpg;$var[div]]
  41. $endif
  42.  
  43. $title[Server Roles ($var[rc])]
  44. $description[$var[roles]]
  45. $color[84e7e2]
  46. $footer[Page 1/$var[tpg]]
  47.  
  48. $var[prev.arrow;<:Meow_PreviousPage:1179715759069470741>]
  49. $var[next.arrow;<:Meow_NextPage:1179715792292560977>]
  50. $var[last.arrow;<:Meow_LastPage:1179715820763500605>]
  51. $var[first.arrow;<:Meow_FirstPage:1179715724013477898>]
  52. $var[modal.emoji;📝]
  53.  
  54. $addButton[no;roleList-$authorID-frontmenu;;primary;yes;$var[first.arrow]]
  55. $addButton[no;roleList-$authorID-backmenu;;primary;yes;$var[prev.arrow]]
  56. $addButton[no;rl-$authorID-customPageModal;;secondary;no;$var[modal.emoji]]
  57. $addButton[no;roleList-$authorID-nextmenu;;primary;$checkCondition[$var[rc]<=10];$var[next.arrow]]
  58. $addButton[no;roleList-$authorID-lastmenu;;primary;$checkCondition[$var[rc]<=10];$var[last.arrow]]
  59.  
Tags: BDFD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement