Advertisement
ShadowsNemesis

Bdfd Tickets with button

Sep 22nd, 2022 (edited)
1,056
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.04 KB | None | 0 0
  1. ===========================
  2. BDFD Tickets with Button
  3. ===========================
  4. **Note:**
  5. There are two ways to make the ticket channel private for all new tickets made in it:
  6. 1) Edit the category itself and set the readmessages perm for everyone to off
  7. 2) add $editChannelPerms to the second code
  8.  
  9. **Variable:** ticketnumber
  10. **Value:** 00
  11. **Variable:** msgid
  12. **Value:**
  13. ===========================
  14. Code 1:
  15. Trigger: (prefix)ticket
  16.  
  17. $nomention
  18. $title[TICKET]
  19. $description[To create a ticket, click 📩]
  20. $color[1700fb]
  21. $addButton[no;newticket;📩;primary;no;]
  22. $deletecommand
  23. $onlyAdmin[You cannot Use this command!]
  24. $authorIcon[$serverIcon]
  25. $author[$serverName[$guildID]]
  26. ============================
  27. Code 2:
  28. Trigger: $onInteraction
  29.  
  30. $onlyIf[$checkContains[$customID;newticket;createticket]==true;]
  31. $if[$customID==newticket]
  32. $newModal[createticket;Ticket]
  33. $addTextInput[reason;paragraph;reason;10;4000;yes;;breifly explain]
  34. $else
  35.  
  36. $if[$customID==createticket]
  37. $if[$channelExists[$findChannel[Ticket]]==true]
  38. $createChannel[$sum[$getServerVar[ticketnumber];1]-ticket;text;$findChannel[Ticket]]
  39. $setServerVar[ticketnumber;$sum[$getServerVar[ticketnumber];1]]
  40.  
  41.  
  42.  
  43. $elseif[$channelExists[$findChannel[Ticket]]!=true]
  44. $createChannel[Ticket;category]
  45.  
  46.  
  47. $createChannel[$sum[$getServerVar[ticketnumber];1]-ticket;text;$findChannel[Ticket]]
  48. $setServerVar[ticketnumber;$sum[$getServerVar[ticketnumber];1]]
  49.  
  50. $endif
  51.  
  52. $setServerVar[msgid;$sendEmbedMessage[$findChannel[$getServerVar[ticketnumber]-ticket];;__Your Ticket__;;__Reason:__
  53. $input[reason]
  54.  
  55. Please wait until a staff member responds;1700fb;;;;;$serverIcon;;yes;yes]]
  56. $sendMessage[<@$authorID> please head to <#$findChannel[$getServerVar[ticketnumber]-ticket]>]
  57. $c[Made by ShadowsNemesis#0001]
  58.  
  59.  
  60. $async[4]
  61. $replyIn[10]
  62. $clear[1]
  63. $endasync
  64. $endif
  65. $endif
  66.  
  67. =============================
  68. Code 3:
  69. Trigger: (prefix)closeticket
  70.  
  71. $onlyAdmin[sorry admins only]
  72. $onlyIf[$checkContains[$channelName[$channelID];ticket]==true;]
  73.  
  74. $deleteChannels[$channelID]
  75. $nomention
  76. $deletecommand
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement