Interface CommandParser


public interface CommandParser
Interface for parsing commands.
  • 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 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