Fix regex exception occuring on some prefixes in the javacord module (#400)

Bug be gone
This commit is contained in:
Phinner 2022-11-28 19:58:01 +01:00 committed by Jason
parent 72f105014a
commit 6109c3af5a

View file

@ -81,7 +81,7 @@ public class JavacordCommand<C> implements MessageCreateListener {
if (!messageContent.startsWith(commandPrefix)) { if (!messageContent.startsWith(commandPrefix)) {
return; return;
} }
messageContent = messageContent.replaceFirst(commandPrefix, ""); messageContent = messageContent.substring(commandPrefix.length());
final String finalContent = messageContent; final String finalContent = messageContent;
if (((StaticArgument<C>) this.command).getAliases() if (((StaticArgument<C>) this.command).getAliases()