Skip to content

Commit

Permalink
print error to console for command misuse
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Jul 31, 2023
1 parent 145d1fa commit 4859aac
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,12 @@ private void handleCall(IMessageIO io, Supplier<Object> call) {
io.create().append(result.toString()).send();
}
} catch (CommandUsageException e) {
Throwable root = e;
while (root.getCause() != null && root.getCause() != root) {
root = root.getCause();
}
root.printStackTrace();

StringBuilder body = new StringBuilder();

if (e.getMessage() != null && (e.getMessage().contains("`") || e.getMessage().contains("<#") || e.getMessage().contains("</") || e.getMessage().contains("<@"))) {
Expand Down

0 comments on commit 4859aac

Please sign in to comment.