Advertisement
IzanaYT

Role Miembros - List - ES

Jan 6th, 2024 (edited)
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.10 KB | None | 0 0
  1. Discord: https://discord.gg/dru9uRYKqq
  2. Youtube: https://www.youtube.com/channel/UCyW5t7v-DmUtfYpk0tKEQrA
  3. Tag: izana.py Owner de BDS World
  4.  
  5. Primer codigo:
  6.  
  7.  
  8. Prefix: !rol-lista
  9. Codigo:
  10.  
  11. $nomention
  12. $color[$random[0;999999]]
  13.  
  14. $author[]
  15. $allowRoleMentions[]
  16.  
  17. $c[tu token aqui abajo]
  18. $var[token;token aqui]
  19.  
  20. $httpGet[https://v9pcf4-8000.csb.app/roles_members/?guild_id=$guildID&token=$var[token]&limit=10&page=1]
  21. $jsonParse[$httpResult]
  22. $var[rep;$cropText[$repeatMessage[10;$repeatMessage[10;$repeatMessage[10;a]]];10;]]
  23. $var[s;0]
  24. $description[
  25. $eval[$replaceText[$var[rep];a;$trimSpace[
  26. %{DOL}%if[%{DOL}%roleExists[%{DOL}%findRole[%{DOL}%json[roles_members%{-SEMICOL-}%%{DOL}%var[s\]%{-SEMICOL-}%role_name\]\]\]==true\] <@&%{DOL}%findRole[%{DOL}%json[roles_members%{-SEMICOL-}%%{DOL}%var[s\]%{-SEMICOL-}%role_name\]\]> - Miembros: %{DOL}%json[roles_members%{-SEMICOL-}%%{DOL}%var[s\]%{-SEMICOL-}%role_count\] %{DOL}%endif
  27. %{DOL}%var[s%{-SEMICOL-}%%{DOL}%sum[%{DOL}%var[s\]%{-SEMICOL-}%1\]\]
  28. ];-1]]]
  29. $addButton[false;pageant_1_$authorID;Anterior;primary;true;]
  30. $if[$jsonArrayCount[roles_members]!=-1]
  31. $var[condicion;false]
  32. $else
  33. $var[condicion;true]
  34. $endif
  35. $footer[Pagina 1/$httpResult[total_pages] - Total roles: $roleCount - Resultados motrados: 10]
  36. $addButton[false;pagesig_1_$authorID;Siguiente;primary;$var[condicion]]
  37.  
  38.  
  39.  
  40.  
  41. Interaciones de los botones:
  42.  
  43. Prefix: $onInteraction
  44. Codigo:
  45. $nomention
  46. $c[tu token aqui abajo]
  47. $var[token;token aqui]
  48.  
  49. $textSplit[$getEmbedData[$channelID;$messageID;1;footer];/]
  50. $var[otro;$splitText[2]]
  51. $textSplit[$splitText[1]; ]
  52. $var[numero;$splitText[2]]
  53.  
  54. $var[customizable;$customID]
  55. $if[$or[$checkContains[$var[customizable];pagesig]==true;$checkContains[$var[customizable];pageant]==true]==true]
  56. $removeButtons
  57. $color[$random[0;999999]]
  58.  
  59.  
  60.  
  61.  
  62. $textSplit[$customID;_]
  63. $if[$splitText[1]==pagesig]
  64. $var[contador;$sum[$var[numero];1]]
  65. $elseif[$splitText[1]==pageant]
  66. $var[contador;$sub[$var[numero];1]]
  67. $endif
  68. $httpGet[https://v9pcf4-8000.csb.app/roles_members/?guild_id=$guildID&token=$var[token]&limit=10&page=$var[contador]]
  69. $jsonParse[$httpResult]
  70. $var[rep;$cropText[$repeatMessage[10;$repeatMessage[10;$repeatMessage[10;a]]];10;]]
  71. $var[s;0]
  72. $description[
  73. $eval[$replaceText[$var[rep];a;$trimSpace[
  74. %{DOL}%if[%{DOL}%roleExists[%{DOL}%findRole[%{DOL}%json[roles_members%{-SEMICOL-}%%{DOL}%var[s\]%{-SEMICOL-}%role_name\]\]\]==true\] <@&%{DOL}%findRole[%{DOL}%json[roles_members%{-SEMICOL-}%%{DOL}%var[s\]%{-SEMICOL-}%role_name\]\]> - Miembros: %{DOL}%json[roles_members%{-SEMICOL-}%%{DOL}%var[s\]%{-SEMICOL-}%role_count\] %{DOL}%endif
  75. %{DOL}%var[s%{-SEMICOL-}%%{DOL}%sum[%{DOL}%var[s\]%{-SEMICOL-}%1\]\]
  76. ];-1]]]
  77. $if[$var[contador]==1]
  78. $var[retornar;true]
  79. $else
  80. $var[retornar;false]
  81. $endif
  82. $if[$var[contador]==$httpResult[total_pages]]
  83. $var[retornar_2;true]
  84. $else
  85. $var[retornar_2;false]
  86. $endif
  87. $addButton[false;pageant_$authorID_1;Anterior;primary;$var[retornar];]
  88. $addButton[false;pagesig_$authorID_1;Siguiente;primary;$var[retornar_2];]
  89.  
  90. $footer[Pagina $var[contador]/$httpResult[total_pages] - Total roles: $roleCount - Resultados motrados: 10]
  91. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement