Advertisement
VodaGamarz

$onInteraction

Apr 6th, 2025
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.98 KB | None | 0 0
  1. $nomention
  2. $defer
  3. $onlyBotPerms[embedlinks;managechannels;sendmessages;managemessages;manageroles;$ephemeral **๐ŸšซCommand Error:**The bot not has all permissions that need to run the command.]
  4. $async[loop1]
  5.   $textSplit[$getUserVar[ticket;1144124427668312126;$guildID];.]
  6.   $var[loop1;2]
  7.   $try $var[is_bl;$hasRole[$authorID;$splitText[$var[loop1]]]] $endtry
  8.   $var[code;%{DOL}%if[%{DOL}%var[is_bl\]!=true\]
  9.   %{DOL}%try %{DOL}%var[is_bl\;%{DOL}%hasRole[%{DOL}%authorID\;%{DOL}%splitText[%{DOL}%var[loop1\]\]\]\] %{DOL}%endtry
  10.   %{DOL}%var[loop1\;%{DOL}%sum[%{DOL}%var[loop1\]\;1\]\]
  11.   %{DOL}%endif]
  12.   $eval[$replaceText[$cropText[$repeatMessage[10;$repeatMessage[10;$repeatMessage[3;0]]];239;];0;$var[code];-1]]
  13. $endasync
  14.  
  15. $async[loop2]
  16.   $textSplit[$getUserVar[ticket;1344668722299928629;$guildID];.]
  17.   $var[loop2;2]
  18.   $try $var[is_staff;$hasRole[$authorID;$splitText[$var[loop2]]]] $endtry
  19.   $var[code2;%{DOL}%if[%{DOL}%var[is_staff\]!=true\]
  20.   %{DOL}%try %{DOL}%var[is_staff\;%{DOL}%hasRole[%{DOL}%authorID\;%{DOL}%splitText[%{DOL}%var[loop2\]\]\]\] %{DOL}%endtry
  21.   %{DOL}%var[loop2\;%{DOL}%sum[%{DOL}%var[loop2\]\;1\]\]
  22.   %{DOL}%endif]
  23.   $eval[$replaceText[$cropText[$repeatMessage[10;$repeatMessage[10;$repeatMessage[3;0]]];239;];0;$var[code2];-1]]
  24. $endasync
  25. $await[loop1]
  26. $if[$var[is_bl]==true]
  27. $ephemeral
  28. $title[๐Ÿšซ Command Error]
  29. $description[You cannot use this button because you have ticket blacklist role.]
  30. $color[ff0000]
  31. $removeAllComponents
  32. $stop
  33. $endif
  34. $if[$customID==t.tic.close&save.p]
  35. $textSplit[$getChannelVar[ticket3;$channelID];.]
  36. $if[$splitText[1]!=true]
  37. $ephemeral
  38. $title[๐Ÿšซ Only Channel(s)]
  39. $description[The channel isn't a ticket.Use this command in a ticket.]
  40. $color[ff0000]
  41. $removeAllComponents
  42. $stop
  43. $endif
  44. $c[here the already close ticket error ]
  45. $if[$splitText[3]==true]
  46. $ephemeral
  47. $title[๐Ÿšซ Command Error]
  48. $description[The ticket is already closed.]
  49. $color[ff0000]
  50. $removeAllComponents
  51. $stop
  52. $endif
  53. $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
  54. $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
  55. $title[๐Ÿšซ Mission Permission]
  56. $description[You don't have enough permission to use this command.]
  57. $color[ff0000]
  58. $removeAllComponents
  59. $stop
  60. $endif
  61.  
  62. $var[id1;$sendEmbedMessage[$channelID;**<@$authorID>**,;Close Ticket Confirmation;https://discord.com/channels/$guildID/$channelID;Are you sure you want to close and save this ticket?;0e86d4;$username[$authorID]#$discriminator[$authorID];$authorAvatar;#$channelName[$channelID];$serverIcon;;;yes;yes]]
  63. $removeAllComponents
  64. $addButton[no;t.tic.close&save.p.y.$authorID;Confirm;success;no;โœ”;$var[id1]]
  65. $addButton[no;t.tic.close&save.p.n.$authorID;Cancel;danger;no;โŒ;$var[id1]]
  66.  
  67. $endif
  68.  
  69. $if[$customID==t.tic.close&save.r]
  70. $textSplit[$getChannelVar[ticket3;$channelID];.]
  71. $if[$splitText[1]!=true]
  72. $ephemeral
  73. $title[๐Ÿšซ Only Channel(s)]
  74. $description[The channel isn't a ticket.Use this command in a ticket.]
  75. $color[ff0000]
  76. $removeAllComponents
  77. $stop
  78. $endif
  79. $c[here the already close ticket error ]
  80. $if[$splitText[3]==true]
  81. $ephemeral
  82. $title[๐Ÿšซ Command Error]
  83. $description[The ticket is already closed.]
  84. $color[ff0000]
  85. $removeAllComponents
  86. $stop
  87. $endif
  88. $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
  89. $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
  90. $title[๐Ÿšซ Mission Permission]
  91. $description[You don't have enough permission to use this command.]
  92. $color[ff0000]
  93. $removeAllComponents
  94. $stop
  95. $endif
  96. $ephemeral
  97. $var[id1;$sendEmbedMessage[$channelID;**<@$authorID>**,;Close Ticket Confirmation;https://discord.com/channels/$guildID/$channelID;Are you sure you want to close and save this ticket?;0e86d4;$username[$authorID]#$discriminator[$authorID];$authorAvatar;#$channelName[$channelID];$serverIcon;;;yes;yes]]
  98. $removeAllComponents
  99. $addButton[no;t.tic.close&save.p.y.$authorID;Confirm;success;no;โœ”;$var[id1]]
  100. $addButton[no;t.tic.close&save.p.n.$authorID;Cancel;danger;no;โŒ;$var[id1]]
  101. $endif
  102.  
  103. $if[$customID==t.tic.close&save.s]
  104. $textSplit[$getChannelVar[ticket3;$channelID];.]
  105. $if[$splitText[1]!=true]
  106. $ephemeral
  107. $title[๐Ÿšซ Only Channel(s)]
  108. $description[The channel isn't a ticket.Use this command in a ticket.]
  109. $color[ff0000]
  110. $removeAllComponents
  111. $stop
  112. $endif
  113. $c[here the already close ticket error ]
  114. $if[$splitText[3]==true]
  115. $ephemeral
  116. $title[๐Ÿšซ Command Error]
  117. $description[The ticket is already closed.]
  118. $color[ff0000]
  119. $removeAllComponents
  120. $stop
  121. $endif
  122. $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
  123. $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
  124. $title[๐Ÿšซ Mission Permission]
  125. $description[You don't have enough permission to use this command.]
  126. $color[ff0000]
  127. $removeAllComponents
  128. $stop
  129. $endif
  130. $ephemeral
  131. $var[id1;$sendEmbedMessage[$channelID;**<@$authorID>**,;Close Ticket Confirmation;https://discord.com/channels/$guildID/$channelID;Are you sure you want to close and save this ticket?;0e86d4;$username[$authorID]#$discriminator[$authorID];$authorAvatar;#$channelName[$channelID];$serverIcon;;;yes;yes]]
  132. $removeAllComponents
  133. $addButton[no;t.tic.close&save.p.y.$authorID;Confirm;success;no;โœ”;$var[id1]]
  134. $addButton[no;t.tic.close&save.p.n.$authorID;Cancel;danger;no;โŒ;$var[id1]]
  135. $endif
  136.  
  137. $if[$checkContains[$customID;t.tic.close&save.p.y]]
  138. $if[$checkContains[$customID;$authorID]]
  139. $textSplit[$getChannelVar[ticket3;$channelID];.]
  140. $if[$splitText[3]==true]
  141. $ephemeral
  142. $title[๐Ÿšซ Command Error]
  143. $description[The ticket is already closed.]
  144. $color[ff0000]
  145. $removeAllComponents
  146. $stop
  147. $endif
  148. $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
  149. $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
  150. $title[๐Ÿšซ Mission Permission]
  151. $description[You don't have enough permission to use this command.]
  152. $color[ff0000]
  153. $removeAllComponents
  154. $stop
  155. $endif
  156. $setChannelVar[ticket3;$getChannelVar[ticket3;$channelID].true;$channelID]
  157. $textSplit[$getUserVar[ticket3;$authorID];.]
  158. $editSplitText[2;N/A]
  159. $setUserVar[ticket3;$joinSplitText[.];$authorID]
  160. $textSplit[$getChannelVar[ticket3;$channelID];.]
  161. $deleteMessage[$channelID;$messageID]
  162. $await[3]
  163.  
  164. $var[id2;$sendEmbedMessage[$channelID;;<a:tick1:1345334657515917373> Successfully Closed & Saved the ticket!;;Successfully closed and saved the ticket.;2ecc71;$username[$authorID]#$discriminator[$authorID];$authorAvatar;#$channelName[$channelID];$serverIcon;;;yes;no]]
  165. $endasync
  166.  
  167. $await[3]
  168.  
  169. $addButton[no;t.tic.open.p;Open;success;no;๐Ÿ”“;$var[id2]]
  170. $addButton[no;t.tic.delete.p;Delete Ticket;danger;no;๐Ÿšฎ;$var[id2]]
  171. $addButton[yes;t.tic.staff.panel;Staff Panel;primary;no;๐Ÿ›ก๏ธ;$var[id2]]
  172. $async[1]
  173. $textSplit[$getChannelVar[ticket3;$channelID];.]
  174. $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
  175. $setUserVar[ticket3;Value;$json[author];$guildID]
  176. $editChannelPerms[$channelID;$json[author];-readmessages]
  177. $endasync
  178. $else
  179. $ephemeral
  180. $title[๐Ÿšซ Author Only]
  181. $color[ff0000]
  182. $description[The button not owned by you,run the command yourself.]
  183. $endif
  184. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement