Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomention
- $defer
- $onlyBotPerms[embedlinks;managechannels;sendmessages;managemessages;manageroles;$ephemeral **๐ซCommand Error:**The bot not has all permissions that need to run the command.]
- $async[loop1]
- $textSplit[$getUserVar[ticket;1144124427668312126;$guildID];.]
- $var[loop1;2]
- $try $var[is_bl;$hasRole[$authorID;$splitText[$var[loop1]]]] $endtry
- $var[code;%{DOL}%if[%{DOL}%var[is_bl\]!=true\]
- %{DOL}%try %{DOL}%var[is_bl\;%{DOL}%hasRole[%{DOL}%authorID\;%{DOL}%splitText[%{DOL}%var[loop1\]\]\]\] %{DOL}%endtry
- %{DOL}%var[loop1\;%{DOL}%sum[%{DOL}%var[loop1\]\;1\]\]
- %{DOL}%endif]
- $eval[$replaceText[$cropText[$repeatMessage[10;$repeatMessage[10;$repeatMessage[3;0]]];239;];0;$var[code];-1]]
- $endasync
- $async[loop2]
- $textSplit[$getUserVar[ticket;1344668722299928629;$guildID];.]
- $var[loop2;2]
- $try $var[is_staff;$hasRole[$authorID;$splitText[$var[loop2]]]] $endtry
- $var[code2;%{DOL}%if[%{DOL}%var[is_staff\]!=true\]
- %{DOL}%try %{DOL}%var[is_staff\;%{DOL}%hasRole[%{DOL}%authorID\;%{DOL}%splitText[%{DOL}%var[loop2\]\]\]\] %{DOL}%endtry
- %{DOL}%var[loop2\;%{DOL}%sum[%{DOL}%var[loop2\]\;1\]\]
- %{DOL}%endif]
- $eval[$replaceText[$cropText[$repeatMessage[10;$repeatMessage[10;$repeatMessage[3;0]]];239;];0;$var[code2];-1]]
- $endasync
- $await[loop1]
- $if[$var[is_bl]==true]
- $ephemeral
- $title[๐ซ Command Error]
- $description[You cannot use this button because you have ticket blacklist role.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $if[$customID==t.tic.close&save.p]
- $textSplit[$getChannelVar[ticket3;$channelID];.]
- $if[$splitText[1]!=true]
- $ephemeral
- $title[๐ซ Only Channel(s)]
- $description[The channel isn't a ticket.Use this command in a ticket.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $c[here the already close ticket error ]
- $if[$splitText[3]==true]
- $ephemeral
- $title[๐ซ Command Error]
- $description[The ticket is already closed.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
- $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
- $title[๐ซ Mission Permission]
- $description[You don't have enough permission to use this command.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $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]]
- $removeAllComponents
- $addButton[no;t.tic.close&save.p.y.$authorID;Confirm;success;no;โ;$var[id1]]
- $addButton[no;t.tic.close&save.p.n.$authorID;Cancel;danger;no;โ;$var[id1]]
- $endif
- $if[$customID==t.tic.close&save.r]
- $textSplit[$getChannelVar[ticket3;$channelID];.]
- $if[$splitText[1]!=true]
- $ephemeral
- $title[๐ซ Only Channel(s)]
- $description[The channel isn't a ticket.Use this command in a ticket.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $c[here the already close ticket error ]
- $if[$splitText[3]==true]
- $ephemeral
- $title[๐ซ Command Error]
- $description[The ticket is already closed.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
- $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
- $title[๐ซ Mission Permission]
- $description[You don't have enough permission to use this command.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $ephemeral
- $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]]
- $removeAllComponents
- $addButton[no;t.tic.close&save.p.y.$authorID;Confirm;success;no;โ;$var[id1]]
- $addButton[no;t.tic.close&save.p.n.$authorID;Cancel;danger;no;โ;$var[id1]]
- $endif
- $if[$customID==t.tic.close&save.s]
- $textSplit[$getChannelVar[ticket3;$channelID];.]
- $if[$splitText[1]!=true]
- $ephemeral
- $title[๐ซ Only Channel(s)]
- $description[The channel isn't a ticket.Use this command in a ticket.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $c[here the already close ticket error ]
- $if[$splitText[3]==true]
- $ephemeral
- $title[๐ซ Command Error]
- $description[The ticket is already closed.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
- $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
- $title[๐ซ Mission Permission]
- $description[You don't have enough permission to use this command.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $ephemeral
- $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]]
- $removeAllComponents
- $addButton[no;t.tic.close&save.p.y.$authorID;Confirm;success;no;โ;$var[id1]]
- $addButton[no;t.tic.close&save.p.n.$authorID;Cancel;danger;no;โ;$var[id1]]
- $endif
- $if[$checkContains[$customID;t.tic.close&save.p.y]]
- $if[$checkContains[$customID;$authorID]]
- $textSplit[$getChannelVar[ticket3;$channelID];.]
- $if[$splitText[3]==true]
- $ephemeral
- $title[๐ซ Command Error]
- $description[The ticket is already closed.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
- $if[$or[$authorID==$json[author];$var[is_staff]==true]!=true]
- $title[๐ซ Mission Permission]
- $description[You don't have enough permission to use this command.]
- $color[ff0000]
- $removeAllComponents
- $stop
- $endif
- $setChannelVar[ticket3;$getChannelVar[ticket3;$channelID].true;$channelID]
- $textSplit[$getUserVar[ticket3;$authorID];.]
- $editSplitText[2;N/A]
- $setUserVar[ticket3;$joinSplitText[.];$authorID]
- $textSplit[$getChannelVar[ticket3;$channelID];.]
- $deleteMessage[$channelID;$messageID]
- $await[3]
- $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]]
- $endasync
- $await[3]
- $addButton[no;t.tic.open.p;Open;success;no;๐;$var[id2]]
- $addButton[no;t.tic.delete.p;Delete Ticket;danger;no;๐ฎ;$var[id2]]
- $addButton[yes;t.tic.staff.panel;Staff Panel;primary;no;๐ก๏ธ;$var[id2]]
- $async[1]
- $textSplit[$getChannelVar[ticket3;$channelID];.]
- $jsonParse[$getEmbedData[1347937115958280253;$splitText[2];1;description]]
- $setUserVar[ticket3;Value;$json[author];$guildID]
- $editChannelPerms[$channelID;$json[author];-readmessages]
- $endasync
- $else
- $ephemeral
- $title[๐ซ Author Only]
- $color[ff0000]
- $description[The button not owned by you,run the command yourself.]
- $endif
- $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement