Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomention
- $allowRoleMentions[] $c[ credits cenzo.tz & catearuwu]
- $c[ join my discord server for api support https://discord.gg/acd2sTKHtW]
- $c[ credits cenzo.tz & catearuwu]
- $if[$customID==custommsg_submit]
- $try
- $jsonParse[$getUserVar[ticketConfig;$botID]]
- $catch
- $jsonParse[{}]
- $endtry
- $jsonSetString[customMessage;$input[msg]]
- $setUserVar[ticketConfig;$jsonStringify;$botID]
- $reply
- Custom message saved.
- $stop
- $endif
- $if[$checkContains[$customID;ticket panel button]]
- $if[$getUserVar[ticketc]==1]
- $ephemeral
- You already have ticket open!
- $removeButtons
- $stop
- $endif
- $setServerVar[untitled;$sum[$getServerVar[untitled];1]]
- $newModal[modal;Why are you creating this ticket?]
- $addTextInput[modalInput1;short;Why do you want to make a ticket?;1;100;yes;;E.g support/help]
- $elseif[$checkContains[$customID;ticket setup]]
- $if[$checkContains[$customID;$authorID]==false]
- $ephemeral
- $removeAllComponents
- This interaction is not for you!! loser!!
- $c[CHANGE THIS ERROR MESSAGE LATER]
- $stop
- $elseif[$checkUserPerms[$authorID;manageserver]==false]
- $c[foiled]
- $ephemeral
- $removeAllComponents
- You don't have enough permissions to interact with this panel!
- $stop
- $endif
- $try
- $jsonParse[$getUserVar[ticketConfig;$botID]]
- $catch
- $jsonParse[{}]
- $endtry
- $if[$checkContains[$customID;customMessage]]
- $newModal[custommsg_submit;Set Custom Ticket]
- $addTextInput[msg;paragraph;Enter ticket message;1;1000;yes;;You can use {username}, {mention}, etc.]
- $elseif[$checkContains[$customID;category]]
- $jsonSetString[ct;$getChannelSelectChannelID[1]]
- $elseif[$checkContains[$customID;staff]]
- $jsonSetString[staff;$getRoleSelectRoleID[1]]
- $elseif[$checkContains[$customID;channel]]
- $jsonSetString[transcriptchannel;$getChannelSelectChannelID[1]]
- $endif
- $setUserVar[ticketConfig;$jsonStringify;$botID]
- $if[$customID!=ticket setup customMessage $authorID]
- $try
- $jsonParse[$getUserVar[ticketConfig;$botID]]
- $catch
- $jsonParse[{}]
- $endtry
- $addContainer[cont]
- $addSection[sec;cont]
- $addTextDisplay[# Ticket Config
- The ticket settings can be configured here.;sec]
- $addThumbnail[$serverIcon[$guildID];;false;sec]
- $addSeparator[true;small;cont]
- $addTextDisplay[**Ticket Category**: $replaceText[$replaceText[$checkCondition[$json[ct]==];true;Not Set];false;<#$json[ct]>];cont]
- $addTextDisplay[* The category where tickets will be created.;cont]
- $addActionRow[row1;cont]
- $addChannelSelect[ticket setup category $authorID;Choose an category;1;1;false;row1;category]
- $addSeparator[true;small;cont]
- $addTextDisplay[**Ticket Staff**: $replaceText[$replaceText[$checkCondition[$json[staff]==];true;Not Set];false;<@&$json[staff]>];cont]
- $addTextDisplay[* The role that takes care of tickets, the role will get mentioned when someone creates a ticket.;cont]
- $addActionRow[row2;cont]
- $addRoleSelect[ticket setup staff $authorID;Choose an staff role;1;1;false;row2]
- $addSeparator[true;small;cont]
- $addTextDisplay[**Transcript Channel**: $replaceText[$replaceText[$checkCondition[$json[transcriptchannel]==];true;Not Set];false;<#$json[transcriptchannel]>];cont]
- $addTextDisplay[* The channel where transcripts will be sent.;cont]
- $addActionRow[row3;cont]
- $addChannelSelect[ticket setup channel $authorID;Choose an channel;1;1;false;row3;text]
- $addSeparator[true;small;cont]
- $addTextDisplay[**Custom Ticket Message**: $replaceText[$replaceText[$checkCondition[$json[customMessage]==];true;Not set];false;Set];cont]
- $addTextDisplay[* This message will be sent inside the ticket.;cont]
- $addActionRow[row4;cont]
- $addButtonCV2[ticket setup customMessage $authorID;Set Custom Message;primary;false;;row4]
- $endif
- $endif
Advertisement
Add Comment
Please, Sign In to add comment