BDFD_Berk

Semi Reaction roles Bot Designer for Discord

Sep 18th, 2020 (edited)
1,824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Reaction role command with confirmation, require setup, Part 1// https://discord.gg/GfUYzXnA
  2.  
  3. //Follow the steps and do ++rstart (emote) to start the setup!
  4. +How this work after do the setup?
  5. -Users react to the message, then they say "confirm" and they get the provided role in the setup.
  6.  
  7. Variables requireds:
  8. vsetup (with value: 1), vemote, vmessage, vmain, vuser, vrole, vchannel.
  9. Note: The only variable with value is vsetup//
  10.  
  11. //Important: add the commands in order//
  12.  
  13. //(prefix)vsetup
  14. $nomention
  15. $onlyBotPerms[manageroles;]
  16. $onlyPerms[manageroles;]
  17.  
  18. $deletecommand
  19. $onlyIf[$getServerVar[vsetup]==2;]
  20. $onlyIf[$message[1]!=;Type the message ID of the bot message where the user should react.]
  21. $onlyIf[$isNumber[$message[1]]==true;Type the message ID of the bot message where the user should react.]
  22. $setServerVar[vsetup;3]
  23. $setServerVar[vmessage;$message[1]]
  24.  
  25. $color[8000FF]
  26. $author[1 step more!]
  27. $description[``Now please do ++vsetup (@role, mention it), obviously without the "()"``
  28. ]
  29. $footer[This message gonna be deleted in 35s]
  30. $deleteIn[20s]
  31. $suppressErrors
  32.  
  33. //Reaction role with confirm Part 2
  34.  
  35. //(prefix)vstart
  36. $nomention
  37. $onlyBotPerms[manageroles;]
  38. $onlyPerms[manageroles;]
  39.  
  40. $onlyIf[$getServerVar[vsetup]==1;]
  41. $onlyIf[$message[1]!=;Put a valid emote]
  42. $setServerVar[vsetup;2]
  43. $setServerVar[vemote;$message[1]]
  44. $setServerVar[vchannel;$channelID]
  45.  
  46. $deletecommand
  47. $color[8000FF]
  48. $author[Verify]
  49. $description[``Admin, now copy the ID of this message, and do ++vsetup (The message ID) obviously without the "()" to finish``
  50. [Click here](https://cdn.discordapp.com/attachments/699498415968485407/721102197495955526/5And_.jpg) if you don't know how to copy the message ID, also you need turn on the developer mode, [click here](https://cdn.discordapp.com/attachments/699498415968485407/721102197672247326/1And_.jpg) if you don't know how turn it on.
  51.  
  52. After doing two steps more the users can react to the reaction of this message and say "``confirm``" to get the role!]
  53. $editIn[50s;React to this message and say "confirm" to get the role!]
  54. $addReactions[$message[1]]
  55. $suppressErrors
  56.  
  57. //Reaction role with confirm command, part 3
  58.  
  59. //(prefix)vsetup
  60. $nomention
  61. $onlyBotPerms[manageroles;The bot don't have Permissions to do this, it need manage roles perms.]
  62. $onlyPerms[manageroles;]
  63.  
  64. $deletecommand
  65. $onlyIf[$getServerVar[vsetup]==3;]
  66. $onlyIf[$message[1]!=;]
  67. $onlyIf[$mentionedRoles[<]!=;]
  68. $setServerVar[vsetup;1]
  69.  
  70. $color[8000FF]
  71. $author[Ready!]
  72. $description[``Now the users can react to the first setup message, and say "confirm" to get the role!``
  73. Check if this information is right:
  74.  
  75. ``Role to get:`` <@&$mentionedRoles[<]>
  76. ``Channel where is the bot first setup message:`` <#$getServerVar[vchannel]>
  77. ``message ID (from the message where the user should react):`` $getServerVar[vmessage]]
  78. $footer[This message gonna be deleted in 30s]
  79. $setServerVar[vrole;$mentionedRoles[<]]
  80. $deleteIn[30s]
  81. $suppressErrors
  82.  
  83.  
  84. //Important: All the confirm commands needs be in BDScript unstable mode, if you don't know how turn this mode on, join the support server//
  85. Trigger: confirm
  86. $nomention
  87. $deleteIn[1s]
  88. $deletecommand
  89. $setUserVar[vuser;$username[$authorID]#$discriminator[$authorID]]
  90. $suppressErrors
  91.  
  92.  
  93. //Trigger: confirm
  94. $nomention
  95. $deleteIn[1s]
  96. $setUserVar[vmain;$getReactions[$getServerVar[vchannel];$getServerVar[vmessage];$getUserVar[vuser];$getServerVar[vemote]]]
  97. $suppressErrors
  98.  
  99.  
  100. //Trigger: confirm
  101. $nomention
  102. $onlyIf[$hasRole[$authorID;$getServerVar[vrole]]==false;]
  103. $onlyIf[$checkContains[$getUserVar[vmain];$username#$discriminator[$authorID]$username#$discriminator[$authorID]]==true;]
  104.  
  105. $deleteIn[1s]
  106. $addCmdReactions[👌]
  107. $giveRole[$authorID;$getServerVar[vrole]]
  108. $suppressErrors
  109.  
  110.  
  111. //(Try don't edit the functions if you don't know how the command works)
Add Comment
Please, Sign In to add comment