diff --git a/telegrambots-extensions/src/main/java/org/telegram/telegrambots/bots/commandbot/commands/CommandRegistry.java b/telegrambots-extensions/src/main/java/org/telegram/telegrambots/bots/commandbot/commands/CommandRegistry.java index 17da10d3..99858e3f 100644 --- a/telegrambots-extensions/src/main/java/org/telegram/telegrambots/bots/commandbot/commands/CommandRegistry.java +++ b/telegrambots-extensions/src/main/java/org/telegram/telegrambots/bots/commandbot/commands/CommandRegistry.java @@ -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]); @@ -126,4 +126,4 @@ public final class CommandRegistry implements ICommandRegistry { } return command; } -} \ No newline at end of file +}