Tutorials_for_BDFD

suggestsystem 2.0

Oct 3rd, 2022
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. ------------
  2. Variable: suggchannel
  3. Value : 0
  4. -------------
  5. Code 1 : suggest
  6. -------------
  7. $nomention
  8. $sendMessage[🟢 | **suggest**, *suggestions sent successfully!*]
  9.  
  10. $if[$getServerVar[suggchannel]!=]
  11.  
  12. $useChannel[$getServerVar[suggchannel]]
  13. $color[00ff00]
  14. $title[Suggestion from $username]
  15. $description[
  16. **Suggestion:**
  17. ```ms
  18. $message[1;msg]
  19. ```
  20. **React:**
  21. 🟢 Yes
  22. 🟠 Why not
  23. 🔴 No]
  24. $addReactions[🟢;🟠;🔴]
  25. $addButton[yes;answer;Answer;primary;no;;]
  26. $addButton[no;thread;Create Thread;secondary;no;;]
  27. $else
  28. $ephemeral
  29. $description[🔴 | **error**, *there is no suggestion channel defined on the server*]
  30. $color[00ff00]
  31. $endif
  32. -----------
  33.  
  34. Code 2 : $onInteraction[theard]
  35. ------------
  36. $nomention
  37. $title[$getEmbedData[$channelID;$messageID;1;title]]
  38. $description[$getEmbedData[$channelID;$messageID;1;description]]
  39. $var[id;$startThread[Suggestion Comments;$channelID;$messageID;10080;yes]]
  40. $removeComponent[$customID]
  41. --------------
  42.  
  43. Code 3 : $onInteraction[answer]
  44. --------------
  45. $nomention
  46.  
  47. $if[$isAdmin[$authorID]]
  48. $newModal[ansed@$messageID;Title]
  49. $addTextInput[ans;paragraph;Answer Here;1;2000;yes;;]
  50. $else
  51. $ephemeral
  52. $color[00ffff]
  53. $description[🔴 | **error**, *you do not have administrator permissions !*]
  54. $removeButtons
  55. $endif
  56. -----------------
  57.  
  58. Code 4 : setchannel
  59. -------------
  60. $nomention
  61. $deletecommand
  62. $if[$and[$isAdmin[$authorID]==true;$mentionedChannels[1]==]==true]
  63. $description[🔴 | **error**, *no channel was mentioned.*]
  64. $color[2F3136]
  65. $elseif[$and[$isAdmin[$authorID]==true;$mentionedChannels[1]!=]==true]
  66. $description[*🟢 | suggestions will be posted in <#$mentionedChannels[1]> !*]
  67. $color[2F3136]
  68. $setServerVar[suggchannel;$mentionedChannels[1]]
  69. $endif
  70. $if[$isAdmin[$authorID]==false]
  71. $color[2F3136]
  72. $ephemeral
  73. $description[🔴 | **error**, *you do not have administrator permissions !*]
  74. $endif
  75. ----------------
  76.  
  77. Code 5 : $onInteraction
  78. --------------
  79. $onlyIf[$checkContains[$customID;ansed]==true;]
  80. $textSplit[$customID;@]
  81.  
  82. $editMessage[$channelID;$splitText[2];;$getEmbedData[$channelID;$splitText[2];1;title];$getEmbedData[$channelID;$splitText[2];1;description]
  83.  
  84. **Answered By $username**
  85. $input[ans];ff8888;]
  86. $editButton[answer;Answered;primary;yes;;$splitText[2]]
Advertisement
Add Comment
Please, Sign In to add comment