Heisisi

$onInteraction

Mar 18th, 2026 (edited)
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. $nomention
  2. $allowRoleMentions[] $c[ credits cenzo.tz & catearuwu]
  3.  
  4. $c[ join my discord server for api support https://discord.gg/acd2sTKHtW]
  5.  
  6. $c[ credits cenzo.tz & catearuwu]
  7.  
  8. $if[$customID==custommsg_submit]
  9.  
  10. $try
  11. $jsonParse[$getUserVar[ticketConfig;$botID]]
  12. $catch
  13. $jsonParse[{}]
  14. $endtry
  15.  
  16. $jsonSetString[customMessage;$input[msg]]
  17. $setUserVar[ticketConfig;$jsonStringify;$botID]
  18.  
  19. $reply
  20. Custom message saved.
  21.  
  22. $stop
  23. $endif
  24.  
  25.  
  26. $if[$checkContains[$customID;ticket panel button]]
  27.  
  28. $if[$getUserVar[ticketc]==1]
  29. $ephemeral
  30. You already have ticket open!
  31. $removeButtons
  32. $stop
  33. $endif
  34.  
  35. $setServerVar[untitled;$sum[$getServerVar[untitled];1]]
  36.  
  37. $newModal[modal;Why are you creating this ticket?]
  38. $addTextInput[modalInput1;short;Why do you want to make a ticket?;1;100;yes;;E.g support/help]
  39.  
  40. $elseif[$checkContains[$customID;ticket setup]]
  41.  
  42. $if[$checkContains[$customID;$authorID]==false]
  43. $ephemeral
  44. $removeAllComponents
  45. This interaction is not for you!! loser!!
  46. $c[CHANGE THIS ERROR MESSAGE LATER]
  47. $stop
  48.  
  49. $elseif[$checkUserPerms[$authorID;manageserver]==false]
  50. $c[foiled]
  51. $ephemeral
  52. $removeAllComponents
  53. You don't have enough permissions to interact with this panel!
  54. $stop
  55. $endif
  56.  
  57. $try
  58. $jsonParse[$getUserVar[ticketConfig;$botID]]
  59. $catch
  60. $jsonParse[{}]
  61. $endtry
  62.  
  63. $if[$checkContains[$customID;customMessage]]
  64. $newModal[custommsg_submit;Set Custom Ticket]
  65. $addTextInput[msg;paragraph;Enter ticket message;1;1000;yes;;You can use {username}, {mention}, etc.]
  66.  
  67. $elseif[$checkContains[$customID;category]]
  68. $jsonSetString[ct;$getChannelSelectChannelID[1]]
  69.  
  70. $elseif[$checkContains[$customID;staff]]
  71. $jsonSetString[staff;$getRoleSelectRoleID[1]]
  72.  
  73. $elseif[$checkContains[$customID;channel]]
  74. $jsonSetString[transcriptchannel;$getChannelSelectChannelID[1]]
  75. $endif
  76.  
  77. $setUserVar[ticketConfig;$jsonStringify;$botID]
  78.  
  79.  
  80. $if[$customID!=ticket setup customMessage $authorID]
  81.  
  82. $try
  83. $jsonParse[$getUserVar[ticketConfig;$botID]]
  84. $catch
  85. $jsonParse[{}]
  86. $endtry
  87.  
  88. $addContainer[cont]
  89.  
  90. $addSection[sec;cont]
  91. $addTextDisplay[# Ticket Config
  92. The ticket settings can be configured here.;sec]
  93. $addThumbnail[$serverIcon[$guildID];;false;sec]
  94.  
  95. $addSeparator[true;small;cont]
  96.  
  97. $addTextDisplay[**Ticket Category**: $replaceText[$replaceText[$checkCondition[$json[ct]==];true;Not Set];false;<#$json[ct]>];cont]
  98. $addTextDisplay[* The category where tickets will be created.;cont]
  99.  
  100. $addActionRow[row1;cont]
  101. $addChannelSelect[ticket setup category $authorID;Choose an category;1;1;false;row1;category]
  102.  
  103. $addSeparator[true;small;cont]
  104.  
  105. $addTextDisplay[**Ticket Staff**: $replaceText[$replaceText[$checkCondition[$json[staff]==];true;Not Set];false;<@&$json[staff]>];cont]
  106. $addTextDisplay[* The role that takes care of tickets, the role will get mentioned when someone creates a ticket.;cont]
  107.  
  108. $addActionRow[row2;cont]
  109. $addRoleSelect[ticket setup staff $authorID;Choose an staff role;1;1;false;row2]
  110.  
  111. $addSeparator[true;small;cont]
  112.  
  113. $addTextDisplay[**Transcript Channel**: $replaceText[$replaceText[$checkCondition[$json[transcriptchannel]==];true;Not Set];false;<#$json[transcriptchannel]>];cont]
  114. $addTextDisplay[* The channel where transcripts will be sent.;cont]
  115.  
  116. $addActionRow[row3;cont]
  117. $addChannelSelect[ticket setup channel $authorID;Choose an channel;1;1;false;row3;text]
  118.  
  119. $addSeparator[true;small;cont]
  120.  
  121. $addTextDisplay[**Custom Ticket Message**: $replaceText[$replaceText[$checkCondition[$json[customMessage]==];true;Not set];false;Set];cont]
  122. $addTextDisplay[* This message will be sent inside the ticket.;cont]
  123.  
  124. $addActionRow[row4;cont]
  125. $addButtonCV2[ticket setup customMessage $authorID;Set Custom Message;primary;false;;row4]
  126.  
  127. $endif
  128. $endif
Advertisement
Add Comment
Please, Sign In to add comment