Skip to content

Commit 96c9504

Browse files
committed
Fixed it hopefully...
1 parent 1ef720c commit 96c9504

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/org/mangorage/mangobotcore/api/command/v1/CommandContext.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ public <T> T getArgument(Argument<T> argument) {
4242
}
4343

4444
public <T> T getArgumentOrElse(OptionalArg<T> optionalArgument) {
45-
final var result = getArgument(optionalArgument);
45+
T result = null;
46+
47+
try {
48+
result = getArgument(optionalArgument);
49+
} catch (Exception ignored) {};
50+
4651
return result == null ? optionalArgument.getDefaultValue() : result;
4752
}
4853

0 commit comments

Comments
 (0)