Tutorials_for_BDFD

Reaction Rolle en

Jan 6th, 2024 (edited)
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. rr_rolle = 0
  2.  
  3.  
  4. Code 1
  5. Trigger : /rollemenu
  6.  
  7. $nomention
  8. $if[$guildID!=]
  9. $title[Roles menu]
  10. $description[>Please select the 'Gray' button to set the role
  11. >
  12. > You can remove the role with the 'Red' button]
  13.  
  14. $addButton[no;rr-set;Define role;secondary;no;]
  15. $addButton[no;rr-delet;Delete role;danger;no;]
  16. $color[$getVar[color]]
  17. $footer[$getVar[footer]]
  18. $endif
  19.  
  20.  
  21. Code 2
  22. Trigger : $onInteraction[rr-set]
  23.  
  24. $nomention
  25. $newModal[rr-set-2;reactions role]
  26. $addTextInput[modalInput1;short;Please provide the role ID;19;19;yes;;]
  27.  
  28. Code 3
  29. Trigger : $onInteraction[rr-set-2]
  30. BDSCRIPT 2
  31.  
  32. $nomention
  33.  
  34. $if[$roleExists[$input[modalInput1]]==true]
  35.  
  36. $setServerVar[rr_rolle;$input[modalInput1]]
  37. $title[Successful]
  38. $description[<@$authorID>, you have successfully set the role <@&$input[modalInput1]> `{$input[modalInput1]}` as the new reaction role.]
  39. $color[$getVar[color]]
  40. $footer[$getVar[footer]]
  41.  
  42. $else
  43.  
  44.  
  45. $title[Invalid role ID]
  46. $description[<@$authorID> your specification `$input[modalInput1]` is not a valid role ID,
  47. please provide a valid ID]
  48. $color[ff0000]
  49. $endif
  50.  
  51. Code 4
  52. Trigger : $onInteraction[rr-delet]
  53.  
  54. $nomention
  55.  
  56. $if[$roleExists[$getServerVar[rr_rolle]==true]]
  57. $setServerVar[rr_rolle;0]
  58. $title[__Role removed__]
  59. $description[<@$authorID> you have successfully reset the response role to $serverName[$guildID].]
  60. $color[$getVar[color]]
  61. $footer[$getVar[footer]]
  62.  
  63. $else
  64.  
  65. $title[Role not found]
  66. $description[$serverName[$guildID] does not appear to have a response role set]
  67. $color[ff0000]
  68.  
  69. $endif
  70.  
  71. Code 5
  72. Trigger : /rolle-setup
  73.  
  74. $nomention
  75. $if[$roleExists[$getServerVar[rr_rolle]]==true]
  76. $title[<:Rolle:1020945256612642837>〣__Distribution of roles__]
  77. $description[Press the button below to get the role shown below.
  78.  
  79. ╰─➤<@&$getServerVar[rr_rolle]>]
  80. $color[$getVar[color]]
  81.  
  82. $thumbnail[$serverIcon]
  83. $addButton[no;rr;;secondary;no;<:Rolle:1020945256612642837>]
  84. $else
  85. $title[__<:abbrechen:1025819352848670770>〣Error__]
  86. $description[I couldn't find a reaction role on this server,
  87. please set up a role with `/rollemenu` so that this system works here.]
  88. $color[ff0000]
  89. $endif
  90.  
  91.  
  92. Code 6
  93.  
  94. Trigger : $onInteraction[rr]
  95.  
  96. $nomention
  97. $onlyIf[$rolePosition[$highestRole[$botID]]<$rolePosition[$highestRole[$authorID]];Unfortunately I couldn't assign you your role because you have a higher role than me.]
  98.  
  99. $ephemeral
  100. $removeButtons
  101. $title[__Successful__]
  102. $description[Hey <@$authorID>,
  103. you have successfully obtained the role: <@&$getServerVar[rr_rolle]>.
  104.  
  105. > This is just an information window, you can press discard message below]
  106.  
  107. $color[$getVar[color]]
  108. $footer[$getVar[footer]]
  109.  
  110. $roleGrant[$authorID;+$getServerVar[rr_rolle]]
Advertisement
Add Comment
Please, Sign In to add comment