Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
fix(commands): Wait till after database errors, move to else branch b…
Browse files Browse the repository at this point in the history
…ecause 0.001% performance boost
  • Loading branch information
Trip-kun committed Mar 20, 2024
1 parent adf0e30 commit aa7acbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public void handle(@NotNull MessageReceivedEvent event, @NotNull JDA api, Thread
if ( event.getAuthor().getIdLong()==api.getSelfUser().getIdLong()) return;
Logger.customLog("Listener", "Prepare");
Prepare(event, api, carriage);
HandleResponse(carriage);
if (carriage.channelStorable.getAutoThread()) {
String name;
if (carriage.message.getContentRaw().length()>50) {
Expand Down Expand Up @@ -73,6 +72,7 @@ public void handle(@NotNull MessageReceivedEvent event, @NotNull JDA api, Thread
Clean(carriage);

} else {
HandleResponse(carriage);
Logger.customLog("Listener", "Message Clean");
Clean(carriage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public void handler(MessageReceivedEvent event, DataCarriage carriage, ThreadMan
Main.dataManager.removeCustomResponseData(Long.valueOf(data.getID()));
}
}
carriage.channel.sendMessage("Added Custom Response!").queue();
CustomResponseData data = Main.dataManager.createCustomResponse(trigger, content, carriage.guildEntity);
Main.dataManager.saveCustomResponseData(data);
carriage.channel.sendMessage("Added Custom Response!").queue();
}
}

Expand Down

0 comments on commit aa7acbc

Please sign in to comment.