Use a regular expression to split parameters
This commit is contained in:
parent
2c716133aa
commit
17864c6239
@ -97,7 +97,7 @@ public final class CommandRegistry implements ICommandRegistry {
|
||||
String text = message.getText();
|
||||
if (text.startsWith(BotCommand.COMMAND_INIT_CHARACTER)) {
|
||||
String commandMessage = text.substring(1);
|
||||
String[] commandSplit = commandMessage.split(BotCommand.COMMAND_PARAMETER_SEPARATOR);
|
||||
String[] commandSplit = commandMessage.split(BotCommand.COMMAND_PARAMETER_SEPARATOR_REGEXP);
|
||||
|
||||
String command = removeUsernameFromCommandIfNeeded(commandSplit[0]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user