IzanaYT

Ticket Avanzado con logs

Jun 9th, 2023 (edited)
1,974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.69 KB | None | 0 0
  1. Youtube:
  2. Discord: Izana#7096
  3. Discord Soporte: https://discord.gg/dru9uRYKqq
  4.  
  5. Variables Necesarias
  6.  
  7. Nombre: ticket
  8. Valor: 0
  9.  
  10. Nombre: soporte
  11. Valor:
  12.  
  13. Nombre: titulo
  14. Valor:
  15.  
  16. Nombre: ticketusario
  17. Valor: 0
  18.  
  19. Nombre: descripcion
  20. Valor:
  21.  
  22. Nombre: hex
  23. Valor: #5d3333
  24.  
  25. 1.- !crear ticket
  26.  
  27. Trigger: !ticket(o el que quieras)
  28.  
  29. Codigo:
  30.  
  31. $nomention
  32. $suppressErrors
  33. $onlyIf[$and[$isNumber[$getServerVar[soporte]]==true]==true;:x: Establece el logs de soporte primero]
  34. $onlyBotPerms[manageserver;:x: El bot requiere el permiso: "Administrar servidor"]
  35. $c[AYUDENME]
  36. $onlyBotPerms[sendmessages;:x: El bot requiere el permiso: "Enviar mensajes"]
  37.  
  38.  
  39. $setServerVar[ticket;$sum[$getServerVar[ticket];1]]
  40. $setUserVar[ticketusario;$sum[$getUserVar[ticketusario];1]]
  41. $var[N;$getServerVar[ticket]]
  42.  
  43. $async[]
  44. $createChannel[Soporte;category]
  45. $createChannel[ticket-$var[N];text;$categoryID[Soporte]]
  46. $endasync
  47. $await[]
  48.  
  49. $useChannel[$channelID[ticket-$var[N]]]
  50. $c[AYUDENME]
  51. $editChannelPerms[$channelID[ticket-$var[N]];$guildID;-readmessages]
  52. $editChannelPerms[$channelID[ticket-$var[N]];$authorID;+readmessages]
  53. $var[A;$sendEmbedMessage[$findChannel[ticket-$var[N]];;$replaceText[$replaceText[$checkCondition[$getServerVar[titulo]==];true;Ticket;1];false;$getServerVar[titulo];1];;
  54. $replaceText[$replaceText[$checkCondition[$getServerVar[descripcion]==];true;
  55. Hola, <@$authorID>, ¡este es tu ticket!
  56. Presion el boton de problema y brinde todos los detalles que pueda para que el personal pueda ayudarlo más rápido.
  57. ¡Tenga paciencia hasta que un personal revise su boleto!
  58.  
  59. Si decea cerrar el ticket presione el boton, solo disponible para usted y para administradores.
  60. Gracias por ser parte de $serverName[$guildID]
  61. ;1];false;$getServerVar[descripcion];1]
  62. ;$getServerVar[hex];;;;;;https://cdn.discordapp.com/attachments/1077969202058645552/1114723415174156349/banner.png;;yes]]
  63. $addButton[no;test-$authorID;Soporte;secondary;no;🔨;$var[A]]
  64. $addButton[no;cerrar-$authorID;Cerrar;danger;no;🔒;$var[A]]
  65.  
  66.  
  67.  
  68. $var[>;$sendEmbedMessage[$channelID;;;;$username has abierto un Ticket en <#$findChannel[ticket-$var[N]]>;#bb4fb6;;;;;;;;yes]]
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80. 2.- Interacion de los botones del ticket
  81.  
  82. Trigger: $onInteraction
  83.  
  84. Codigo:
  85.  
  86. $nomention
  87. $if[$customID==test-$authorID]
  88. $newModal[testmodales;Soporte]
  89.  
  90. $addTextInput[moda1;short;Escribe aqui el problema;0;15;yes;;Tema]
  91. $addTextInput[moda2;short;Menciona el Usuario;0;30;yes;;@Izana]
  92. $addTextInput[moda3;paragraph;Proporciona informacion;0;1000;no;;Tengo este problema con este usuario por ejemplo]
  93. $editButton[test-$authorID;Soporte;danger;yes;]
  94.  
  95. $endif
  96.  
  97. $if[$customID==cerrar-$authorID]
  98. $resetUserVar[ticketusario]
  99. $deleteChannels[$channelID]
  100. $endif
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111. 3.- Interacion de los modales
  112.  
  113.  
  114. Trigger: $onInteraction[testmodales]
  115.  
  116.  
  117. Codigo:
  118. $nomention
  119.  
  120. $var[C;$sendEmbedMessage[$getServerVar[soporte];;Solicitud de <@$authorID>;;
  121. Razon: : $replaceText[$replaceText[$checkCondition[$input[moda1]==];true;No proporcionada;1];false;$input[moda1];1]
  122. Usario : $replaceText[$replaceText[$checkCondition[<@$input[moda2]>==];true;No Mencionado;1];false;<@$input[moda2]>;1]
  123. Informacion: $replaceText[$replaceText[$checkCondition[$input[moda3]==];true;No proporcionada;1];false;$input[moda3];1]
  124. ;#e9ebee;;;;;;;;yes]]
  125. $description[Se envio su Soporte los mods lo reciviran Gracias por ser parte de $serverName[$guildID]]
  126. $color[$random[0;999999]]
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. 4.- Setup para configurar y personalizar el ticket
  139.  
  140. Trigger: !set-ticket(o cualquiera)
  141.  
  142.  
  143. Codigo:
  144. $nomention
  145. $var[A;$sendEmbedMessage[$channelID;;Configura tu menu de ayuda;;Elige una de las opciones y escribelas con el valor correcto para evitar errores;#6c9bd0;;;;;;;;yes]]
  146.  
  147. $addButton[no;titulo-$authorID;Titulo;success;no;📰;$var[A]]
  148. $addButton[no;descripcion-$authorID;Descripcion;secondary;no;📰;$var[A]]
  149. $addButton[no;color-$authorID;Color;primary;no;🎨;$var[A]]
  150.  
  151.  
  152. $async[]
  153. $replyIn[1m]
  154. $editButton[titulo-$authorID;TItulo;success;yes;📰;$var[A]]
  155. $editButton[descripcion-$authorID;Descripcion;secondary;yes;📰;$var[A]]
  156. $editButton[color-$authorID;Color;primary;yes;🎨;$var[A]]
  157. $endasync
  158.  
  159.  
  160.  
  161.  
  162.  
  163. 5.- Interacion de los botones del set ticket
  164.  
  165. Trigger: $onInteraction
  166.  
  167. Codigo:
  168. $nomention
  169. $if[$customID==titulo-$authorID]
  170. $deleteIn[15s]
  171. $description[Escribe un titulo no muy largo ok]
  172. $deletecommand
  173. $removeButtons
  174. $ephemeral
  175. $disableSpecialEscaping
  176. $awaitFunc[titulo;$authorID]
  177. $endif
  178.  
  179. $if[$customID==descripcion-$authorID]
  180. $deleteIn[15s]
  181. $description[Escribe una description no muy largo ok]
  182. $deletecommand
  183. $removeButtons
  184. $ephemeral
  185. $disableSpecialEscaping
  186. $awaitFunc[descripcion;$authorID]
  187. $endif
  188.  
  189. $if[$customID==color-$authorID]
  190. $deleteIn[15s]
  191. $description[Escribe el colorHex de tu embed]
  192. $deletecommand
  193. $removeButtons
  194. $ephemeral
  195. $disableSpecialEscaping
  196. $awaitFunc[color;$authorID]
  197. $endif
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206. 6.- Interacion del boton titulo del set ticket
  207.  
  208. Trigger: $awaitedCommand[titulo;]
  209.  
  210. Codigo:
  211. $nomention
  212. $if[$toLowercase[$message]!=;]
  213. $onlyIf[$charCount[$message]<=100;Tu titulo es muy largo intenta otra vez]
  214. $deleteIn[10s]
  215. $description[Cambiando titulo...]
  216. $color[#6A96FC]
  217. $deletecommand
  218. $setServerVar[titulo;$message]
  219. $editEmbedIn[2s;;✅ Titulo cambiado;;#6A96FC]
  220. $endif
  221.  
  222.  
  223.  
  224. 7.- Interacion del boton descripcion del set ticket
  225.  
  226. Trigger: $awaitedCommand[descripcion;]
  227.  
  228. Codigo:
  229. $nomention
  230. $if[$toLowercase[$message]!=;]
  231. $onlyIf[$charCount[$message]<=400;Tu descripcion es muy larga intenta otra vez]
  232. $deleteIn[10s]
  233. $description[Cambiando descripcion...]
  234. $color[#6A96FC]
  235. $deletecommand
  236. $editEmbedIn[2s;;✅ Descripcion cambiada;;#6A96FC]
  237. $setServerVar[descripcion;$message]
  238. $endif
  239.  
  240.  
  241.  
  242. 8.- Interacion del boton color del set ticket
  243.  
  244. Trigger: $awaitedCommand[color;]
  245.  
  246.  
  247. Codigo:
  248. $nomention
  249.  
  250. $if[$toLowercase[$message]!=;]
  251. $onlyIf[$isValidHex[$message]==true; :x: Proporciona un color valido, Intentalo otra vez]
  252. $deleteIn[10s]
  253. $deletecommand
  254. $color[#6A96FC]
  255. $description[Cambiando el color del ticket]
  256. $editEmbedIn[2s;;✅ Color cambiado;;#6A96FC]
  257. $setServerVar[hex;$message]
  258. $c[AYUDA]
  259. $endif
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266. 9.- Mencion del canal donde iran los logs del boton de soporte del ticket
  267.  
  268. Trigger: ?logssoporte(o cualquiera)
  269.  
  270. Codigo:
  271. $nomention
  272. $onlyIf[$channelExists[$mentionedChannels[1]]==true;:x: El canal no existe.]
  273. $description[Los logs de boton de soporte se establecieron en <#$mentionedChannels[1]>]
  274. $setServerVar[soporte;$mentionedChannels[1]]
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. y como regalo este porq ya me aburri, enserio ayudenme.
  283. 10.- Resteear logs del boton de soporte
  284.  
  285. Trigger: ?resetlogsboton(o cualquiera)
  286.  
  287. Codigo:
  288. $nomention
  289. $descripcion[Se reeseteo los logs del boton de soporte]
  290. $resetServerVar[soporte]
Advertisement
Add Comment
Please, Sign In to add comment