rajat_cj

BDFD • Verification

Jun 30th, 2022 (edited)
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.20 KB | None | 0 0
  1. "Button Verification for BDFD"
  2. "- Function by Rajat#1004"
  3.  
  4.  
  5.  
  6. "Code 1"
  7. "--------------------------------------------------------------------------------"
  8. "Trigger : .verify"
  9. "Language : BDScript 2"
  10. "Code :"
  11.  
  12.  
  13.  
  14. $nomention
  15. $onlyIf[$isAdmin[$authorID]==true; Verification can only be staryed by Admin]
  16. $title[Verification]
  17. $description[Customized the embed to your needs]
  18. $addButton[yes;userverification.start;Verify;success;no;]
  19.  
  20.  
  21.  
  22.  
  23. "Code 2"
  24. "--------------------------------------------------------------------------------"
  25. "Trigger : $onInteraction"
  26. "Language : BDScript 2"
  27. "Code :"
  28.  
  29.  
  30.  
  31. $var[captcha;true]        $c[Type "false" to verify the member directly on click, no captcha]
  32.  
  33. $var[role;Role ID]        $c[Role ID of verified/unverified role]
  34.  
  35. $var[type;+]              $c[Type "-" to remove the role ID mentioned above instead of adding upon verification]
  36.  
  37. $var[case-sensitive;true] $c[Set "false" to make the bot accept any cases.]
  38.  
  39. $nomention
  40. $onlyIf[$checkContains[$customID;userverification]==true;]
  41. $ephemeral
  42. $if[$checkContains[$customID;userverification.start]==true]
  43. $if[$var[captcha]==true]
  44. $var[text;$randomString[5]]
  45. $removeButtons
  46. $color[#303136]
  47. $image[https://flamingtext.com/net-fu/proxy_form.cgi?script=crafts-logo&text=++++++$var[text]++++++&_loc=generate&imageoutput=true&backgroundRadio=1&backgroundColor=%23303136]
  48. $addButton[yes;userverification.modal.$var[text];Enter Captcha;success;no;]
  49. $addButton[no;userverification.start;Generate New Captcha;secondary;no;]
  50. $else
  51. $removeButtons
  52. $roleGrant[$authorID;$var[type]$var[role]]
  53. ✅ You are Verified.
  54. $endif
  55. $elseif[$checkContains[$customID;userverification.modal]==true]
  56. $textSplit[$customID;.]
  57. $newModal[userverification.input.$splitText[3];Captcha]
  58. $addTextInput[cap;short;Enter Captcha Here;5;5;yes;;]
  59. $elseif[$checkContains[$customID;userverification.input]==true]
  60. $textSplit[$customID;.]
  61. $if[$var[case-sensitive]==false]
  62. $var[input;$toLowercase[$input[cap]]]
  63. $var[capth;$toLowercase[$splitText[3]]]
  64. $else
  65. $var[input;$input[cap]]
  66. $var[capth;$splitText[3]]
  67. $endif
  68. $if[$var[input]==$var[capth]]
  69. $roleGrant[$authorID;$var[type]$var[role]]
  70. ✅ You are Verified.
  71. $else
  72. ❗ Wrong Captcha!
  73. $endif
  74. $endif
  75.  
Add Comment
Please, Sign In to add comment