@@ -0,0 +1,2342 @@
+package org.telegram.telegrambots.extensions.bots.commandbot;%0D%0A%0D%0Aimport org.telegram.telegrambots.meta.api.objects.Message;%0D%0A%0D%0A/**%0D%0A * @author Varun Singh%0D%0A * This class adds argument functionality to a given message that a user typed, that also counts as a command%0D%0A */%0D%0Apublic class CommandMessage %7B%0D%0A    /** %0D%0A     * The message associated with the command%0D%0A     */%0D%0A    private Message commandMessage;%0D%0A%0D%0A    /**%0D%0A     * Constructor for CommandMessage%0D%0A     * @param msg The message that represents the command that the user typed%0D%0A     * Preconditions: %0D%0A        * msg.isCommand() is true%0D%0A        * msg.hasText() is true%0D%0A     * Postcondition:%0D%0A        * The developer has the ability to determine which command the message is executing%0D%0A     */%0D%0A    public CommandMessage(Message msg) %7B%0D%0A        commandMessage = msg;%0D%0A    %7D%0D%0A%0D%0A    public Message getCommandMessage() %7B%0D%0A        return commandMessage;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * @return the String representation of the message for ease%0D%0A     */%0D%0A    public String getMessageText() %7B%0D%0A        return commandMessage.getText();%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * Separates the given text after the command into an ordered array of arguments%0D%0A     * @return each argument as a String item in an array%0D%0A     */%0D%0A    public String%5B%5D getArgs() %7B%0D%0A        return getArgsStr().split(%22 %22);%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * @return the text of the command WITHOUT the slash%0D%0A     * For example, if /language English%0D%0A     */%0D%0A    public String getCommandText() %7B%0D%0A        return getCommandText(false).substring(1);     %0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * @return The text of the message from and including the '/' to the space,%0D%0A     * which assumes the end of the command name and start of the command arguments%0D%0A     */%0D%0A    public String getCommandText(boolean includeHandle) %7B%0D%0A        if (includeHandle %7C%7C commandMessage.isUserMessage()) %7B%0D%0A            return getMessageText().substring(0, getMessageText().indexOf(%22 %22));%0D%0A        %7D else%0D%0A            return getMessageText().substring(0, getMessageText().indexOf(%22@%22));%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Singles out the text of the message after the command%0D%0A     * @return all the arguments grouped in one string%0D%0A     */%0D%0A    public String getArgsStr() %7B%0D%0A        return getMessageText().substring(getCommandText(true).length() + 1); // Skip space%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Add CommandMessage class