Skip to content

Commit

Permalink
Removed tickets.
Browse files Browse the repository at this point in the history
  • Loading branch information
EazyFTW committed Aug 23, 2020
1 parent 7115d76 commit 2c87d1c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 252 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import me.TechsCode.TechDiscordBot.objects.Query;
import me.TechsCode.TechDiscordBot.objects.Requirement;
import me.TechsCode.TechDiscordBot.objects.TicketPriority;
import me.TechsCode.TechDiscordBot.tickets.TranscriptBuilder;
import me.TechsCode.TechDiscordBot.util.Plugin;
import me.TechsCode.TechDiscordBot.util.TechEmbedBuilder;
import net.dv8tion.jda.api.Permission;
Expand Down Expand Up @@ -391,15 +390,9 @@ public void onMessageCmd(GuildMessageReceivedEvent e) {
} else if(e.getMessage().getContentDisplay().startsWith("!close")) {
e.getMessage().delete().submit();
if (isTicketCreator) {
TranscriptBuilder.Builder ticket = new TranscriptBuilder.Builder()
.channel(e.getChannel())
.member(e.getMember())
.password()
.upload().
message();

new TechEmbedBuilder("Ticket")
.setText("Thank you for contacting us " + e.getAuthor().getAsMention() + ". Consider writing a review if you enjoyed the support!\n\n**Here is the transcript**:\n" + ticket.getUrl())
.setText("Thank you for contacting us " + e.getAuthor().getAsMention() + ". Consider writing a review if you enjoyed the support!")
.send(e.getChannel());

e.getChannel().delete().completeAfter(15, TimeUnit.SECONDS);
Expand All @@ -423,15 +416,8 @@ public void onMessageCmd(GuildMessageReceivedEvent e) {
String reason = String.join(" ", Arrays.copyOfRange(reasons, 1, reasons.length));
String reasonSend = (hasReason ? " \n \n**Reason**: " + reason : "");

TranscriptBuilder.Builder ticket = new TranscriptBuilder.Builder()
.channel(e.getChannel())
.member(member)
.password()
.upload().
message();

new TechEmbedBuilder("Ticket")
.setText(e.getAuthor().getAsMention() + " has closed this support ticket." + reasonSend + "\n\n**Here is the transcript**:" + ticket.getUrl())
.setText(e.getAuthor().getAsMention() + " has closed this support ticket." + reasonSend)
.send(e.getChannel());

e.getChannel().delete().completeAfter(15, TimeUnit.SECONDS);
Expand Down
29 changes: 0 additions & 29 deletions src/main/java/me/TechsCode/TechDiscordBot/tickets/ChatMessage.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 2c87d1c

Please sign in to comment.