Interface CommandParser
public interface CommandParser
Interface for parsing commands.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull CommandParsernewCommandParser(@NotNull CommandManager commandManager) parse(TelegramBot bot, @NotNull User sender, @NotNull String userInput, Message message) Parses user input into a command.
-
Method Details
-
newCommandParser
@Internal @NotNull static @NotNull CommandParser newCommandParser(@NotNull @NotNull CommandManager commandManager) -
parse
CommandParser.Result parse(TelegramBot bot, @NotNull @NotNull User sender, @NotNull @NotNull String userInput, Message message) Parses user input into a command.- Parameters:
bot- the Bot instance that received the commandsender- the User who sent the commanduserInput- the user's input as a Stringmessage- the Message object containing the user's input- Returns:
- a Result object containing the parsed command
-