Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- discord command -t [<string>] [<text>]:
- trigger:
- if arg-1 is "new":
- if {ticked::created::user::%event-user%} is true:
- make embed:
- set description of embed to ":x: %mention tag of event-user%, You already have ticket!"
- set footer of embed to footer with text "Made with <3 by nUKEmAN4##3346"
- set color of the embed to red
- send last embed to event-channel with "Ticket.ty"
- stop
- set {_ticketname} to "ticket-%event-user%"
- create text channel:
- set name of the channel to "ticket-%event-user%"
- set {ticket.%event-user%} to true
- set the topic of the channel to "%mention tag of event-user%'s Support Ticket"
- set the parent of the channel to category named "TICKETS" in guild with id "620333335776067594"
- create channel in guild with id "620333335776067594" and store it in {_channel}
- set {id::%event-user%} to {_channel}.getId()
- set {channel::name::%{id::%event-user%}%} to "%event-user%"
- set {ticked::created::user::%event-user%} to true
- set {channel::user::id::%event-user%} to {id::%event-user%}
- set {ticked::created::id::channel::%{id::%event-user%}%} to "%event-user%"
- set {ticked::created::user::%event-user%} to true
- set {_send.%{_id::%event-user%}%} to discord id of event-user
- allow event-member the permission view channel in channel with id "%{id::%event-user%}%"
- allow event-member the permission message read in channel with id "%{id::%event-user%}%"
- allow event-member the permission message write in channel with id "%{id::%event-user%}%"
- wait 10 ticks
- make embed:
- set description of embed to "%mention tag of event-user%'s Support Ticket"
- set footer of embed to footer with text "Made with <3 by nUKEmAN4##3346"
- if arg-2 is set:
- set {_reason} to arg-2
- else:
- set {_reason} to "No specific reason"
- add split field named "Message of **%event-user%**: %nl% %{_reason}%" to the embed
- set color of the embed to yellow
- send last embed to channel with id "%{id::%event-user%}%" with "Ticket.ty"
- make embed:
- set description of embed to "%mention tag of event-user%, Your ticket has been created."
- set footer of embed to footer with text "Made with <3 by nUKEmAN4##3346"
- set color of the embed to yellow
- send last embed to event-channel with "Ticket.ty"
- stop
- if arg-1 is "close":
- if discord id of parent of event-channel is "620333892129390605":
- set {_id} to event-channel.getId()
- set {_player} to "%{_channelname}%"
- delete {ticked::created::user::%{channel::name::%{id::%{_id}%}%}%}
- delete {ticked::created::user::%{_player}%}
- wait 5 ticks
- delete event-channel
- else:
- make embed:
- set description of embed to ":x: This is not Ticket channel!"
- set footer of embed to footer with text "Made with <3 by nUKEmAN4##3346"
- set color of the embed to red
- send last embed to event-channel with "Ticket.ty"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement