Interface CommandParser


public interface CommandParser
Interface for parsing commands.
  • Method Details

    • newCommandParser

      @NotNull static @NotNull CommandParser newCommandParser(@NotNull @NotNull CommandManager commandManager)
      Static factory method for creating a new CommandParser.
      Parameters:
      commandManager - the CommandManager to be used by the CommandParser
      Returns:
      a new CommandParserImpl instance
    • 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 command
      sender - the User who sent the command
      userInput - the user's input as a String
      message - the Message object containing the user's input
      Returns:
      a Result object containing the parsed command