Advertisement
InsAnya

VerifyCaptcha

Jun 25th, 2024
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. Verify con Captcha
  2.  
  3. Variables:
  4. NombreDeVariable = ValorDeVariable (Ejemplo)
  5.  
  6. verify = {
  7. "verify":"0",
  8. "verifdesc":"Click debajo para verificarte",
  9. "verifimg":" "
  10. }
  11. captcha = 0
  12. (Ambas variables son obligatorias)
  13.  
  14. Primer Código:
  15. Trigger Prefix:
  16. !verify (Trigger Opcional)
  17. Trigger Slash:
  18. /verify (Trigger Opcional)
  19. Opciones Slash:
  20. NombreDeOpción = TipoDeOpción (Opcional/Obligatorio)
  21.  
  22. rol = Role (Obligatorio)
  23. descripción = Text (Opcional)
  24. imagen = attachment (Opcional)
  25.  
  26. (El código debe tener obligatoriamente slash (y sus opciones) y prefix activado)
  27.  
  28. $nomention
  29. $jsonParse[$getServerVar[verify;$guildID]]
  30. $if[$isAdmin[$authorID]==true]
  31. $if[$isSlash==false]
  32. $if[$json[verify]==0]
  33. $title[Verificación]
  34. $description[La verificación en este servidor aún no está establecida, puedes establecerla con </verify:1>.]
  35. $color[DE2E43]
  36. $thumbnail[https://media.discordapp.net/attachments/1163664141601476658/1186142206298439741/756_sin_titulo_20231002215708.png?ex=65922c03&is=657fb703&hm=2793ffa67a7a8cda30b8d9fc4f80126f4b4017f87a20bbfe6a4b1ea3b8f1410b&]
  37. $else
  38. $title[Verificación]
  39. $description[$json[verifdesc]]
  40. $if[$json[verifimg]!=]
  41. $image[$json[verifimg]]
  42. $endif
  43. $addButton[no;verif;Verificarse;success;no;<:si:1158866987829694516>]
  44. $color[77B255]
  45. $thumbnail[https://media.discordapp.net/attachments/1163664141601476658/1186142206017405018/11160-white-heavy-check-mark.png?ex=65922c03&is=657fb703&hm=0b34ce62cf2c9de586b8431b12b89de57fe08b4485fdc7c055766d58492db3b3&]
  46. $endif
  47. $else
  48. $ephemeral
  49. $title[Verificación]
  50. $description[Estableciste la verificación de este servidor, pon el mensaje de verificación usando !verify.]
  51. $thumbnail[https://media.discordapp.net/attachments/1163664141601476658/1186142206017405018/11160-white-heavy-check-mark.png?ex=65922c03&is=657fb703&hm=0b34ce62cf2c9de586b8431b12b89de57fe08b4485fdc7c055766d58492db3b3&]
  52. $addTimestamp
  53. $color[77B255]
  54. $jsonSetString[verify;$message[rol]]
  55. $if[$message[descripción]!=]
  56. $jsonSetString[verifdesc;$message[descripción]]
  57. $endif
  58. $if[$message[imagen]!=]
  59. $jsonSetString[verifimg;$message[imagen]]
  60. $endif
  61. $setServerVar[verify;$jsonStringify;$guildID]
  62. $endif
  63. $else
  64. $title[Verificación]
  65. $description[No puedes establecer esto debido a que ocupas ser un administrador.]
  66. $color[DE2E43]
  67. $thumbnail[https://media.discordapp.net/attachments/1163664141601476658/1186142206298439741/756_sin_titulo_20231002215708.png?ex=65922c03&is=657fb703&hm=2793ffa67a7a8cda30b8d9fc4f80126f4b4017f87a20bbfe6a4b1ea3b8f1410b&]
  68. $addTimestamp
  69. $endif
  70.  
  71.  
  72.  
  73.  
  74.  
  75. Segundo Código:
  76. Trigger:
  77. $onInteraction (Trigger Obligatorio)
  78.  
  79. $if[$customID==verif]
  80. $suppressErrors
  81. $ephemeral
  82. $removeButtons
  83. $if[$hasRole[$authorID;$json[verify]]==false]
  84. $title[Verificación]
  85. $description[Escribe lo que dice la siguiente imagen para verificarte.]
  86. $httpGet[https://edgabot.akiomae.com/AkioUsers/OctavioYT/captcha.php]
  87. $setUserVar[captcha;$httpResult[code];$authorID;$guildID]
  88. $image[$httpResult[image]]
  89. $color[77B255]
  90. $addButton[no;verifcap;Escribir el código;success;no]
  91. $else
  92. $title[:x: | ¡Oops!]
  93. $description[¡Tú ya estás verificado!]
  94. $color[DE2E43]
  95. $endif
  96. $addTimestamp
  97. $endif
  98. $if[$customID==verifcap]
  99. $newModal[verifcaptcha;Verificación]
  100. $addTextInput[captcha;short;Código;4;4;yes]
  101. $endif
  102. $if[$customID==verifcaptcha]
  103. $ephemeral
  104. $if[$getUserVar[captcha;$authorID;$guildID]==$input[captcha]]
  105. $suppressErrors
  106. $ephemeral
  107. $jsonParse[$getServerVar[verify]]
  108. $removeButtons
  109. $if[$hasRole[$authorID;$json[verify]]==false]
  110. $ephemeral
  111. $title[Verificación]
  112. $description[Te verificaste correctamente.]
  113. $if[$json[verifimg]!=]
  114. $image[$json[verifimg]]
  115. $endif
  116. $roleGrant[$authorID;+$json[verify]]
  117. $color[77B255]
  118. $else
  119. $title[:x: | ¡Oops!]
  120. $description[¡Tú ya estás verificado!]
  121. $color[DE2E43]
  122. $endif
  123. $else
  124. $ephemeral
  125. $title[:x: | ¡Oops!]
  126. $description[¡Código incorrecto, vuelve a intentarlo!]
  127. $color[DE2E43]
  128. $endif
  129. $addTimestamp
  130. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement