Advertisement
Aouchan

Server Roles List

Nov 30th, 2023 (edited)
1,213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.51 KB | Source Code | 0 0
  1. Trigger: Any Trigger you want
  2.  
  3. $nomention
  4. $reply
  5. $allowUserMentions[]
  6.  
  7. $c[⁠ ▽ If you want to use this code you'll need an API key ▽ ]
  8. $c[ ▽ Visit -> https://dadocs.rickyjs.xyz/ for more information ▽ ]
  9.  
  10. $var[prev-arrow.emoji;<:Meow_PreviousPage:1179715759069470741>]
  11. $var[next-arrow.emoji;<:Meow_NextPage:1179715792292560977>]
  12. $var[last-arrow.emoji;<:Meow_LastPage:1179715820763500605>]
  13. $var[first-arrow.emoji;<:Meow_FirstPage:1179715724013477898>]
  14.  
  15. $var[note.emoji;📝]
  16. $var[cross.emoji;❌]
  17.  
  18. $var[color;84e7e2]
  19.  
  20. $if[$guildID==]
  21.    $var[cross.emoji] You cant use this in dms!
  22.    $stop
  23. $endif
  24.  
  25. $if[$isSlash==true]
  26.    $defer
  27. $else
  28.    $botTyping
  29. $endif
  30.  
  31. $var[key;$getVar[ApiKey]]
  32. $var[token;$getVar[BotToken]]
  33.  
  34. $httpAddHeader[guild-id;$guildID]
  35. $httpAddHeader[apikey;$var[key]]
  36. $httpAddHeader[bot-token;$var[token]]
  37.  
  38. $httpGet[https://bdfddata.rickyjs.xyz/release/guild/roles]
  39. $jsonParse[$httpResult]
  40.  
  41. $async[]
  42.  $httpGet[https://bdfddata.rickyjs.xyz/release/guild/members]
  43.  $var[mems;$httpResult]
  44. $endasync $await[]
  45.  
  46. $var[h;1]
  47. $var[sep;$url[decode;%0A]]
  48. $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\]\]\]]]]
  49.  
  50. $var[guild.roles.count;$sub[$roleCount;1]]
  51.  
  52. $enableDecimals[true]
  53. $var[div;$divide[$var[guild.roles.count];10]]
  54.  
  55. $if[$checkContains[$var[div];.]==true]
  56.    $textSplit[$var[div];.]
  57.    $var[total.pages;$sum[1;$splitText[1]]]
  58. $else
  59.    $var[total.pages;$var[div]]
  60. $endif
  61.  
  62. $title[Server Roles ($var[guild.roles.count])]
  63. $description[$var[roles]]
  64. $color[$var[color]]
  65. $footer[Page 1/$var[total.pages]]
  66.  
  67. $addButton[no;GuildRolesList-$authorID-FirstPage;;primary;yes;$var[first-arrow.emoji]]
  68. $addButton[no;GuildRolesList-$authorID-PrevPage;;primary;yes;$var[prev-arrow.emoji]]
  69. $addButton[no;GuildRolesListModal-$authorID-CustomPageModal;;secondary;no;$var[note.emoji]]
  70. $addButton[no;GuildRolesList-$authorID-NextPage;;primary;$checkCondition[$var[total.pages]==1];$var[next-arrow.emoji]]
  71. $addButton[no;GuildRolesList-$authorID-LastPage;;primary;$checkCondition[$var[total.pages]==1];$var[last-arrow.emoji]]
  72.  
  73.  
Tags: BDFD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement