Commit 57cb7208 authored by Delorus's avatar Delorus
Browse files

(admin) fix command parsing

parent 0bb77429
Pipeline #430 passed with stages
in 4 minutes and 55 seconds
......@@ -2,14 +2,15 @@ package page.devnet.telegrambot.util;
public class ParserMessage {
private CommandUtils commandUtils = new CommandUtils();
public Command getCommandFromMessage(String message) {
String messageToUpperCase = message.toUpperCase().trim();
String messageToUpperCase = commandUtils.normalizeCmdMsg(message).toUpperCase().trim();
Command command = Command.NONE;
try {
command = Command.valueOf(messageToUpperCase);
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
return command;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment