From cc3978a91e610c9a493b40598bb43b5d1d750b9d Mon Sep 17 00:00:00 2001 From: Joshua Brown Date: Wed, 8 Nov 2023 16:32:14 -0800 Subject: [PATCH] S --- .../java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java b/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java index 7b72f5c..81c76e5 100644 --- a/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java +++ b/src/main/java/com/wylxbot/wylx/Commands/DND/LaTexCommand.java @@ -23,7 +23,12 @@ public LaTexCommand() { @Override public void runCommandThread(CommandContext ctx) { - String latex = ctx.parsedMsg().substring(ctx.parsedMsg().indexOf(' ') + 1); + String latex; + if(ctx.parsedMsg().contains(" ")) { + latex = ctx.parsedMsg().substring(ctx.parsedMsg().indexOf(' ') + 1); + } else { + latex = "\\LaTeX"; + } TeXFormula formula; // Catch any error in the user input and return that to the user