public abstract class BotCommand extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMMAND_INIT_CHARACTER |
static String |
COMMAND_PARAMETER_SEPARATOR_REGEXP |
Constructor and Description |
---|
BotCommand(String commandIdentifier,
String description)
Construct a command
|
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(AbsSender absSender,
org.telegram.telegrambots.api.objects.User user,
org.telegram.telegrambots.api.objects.Chat chat,
String[] arguments)
Execute the command
|
String |
getCommandIdentifier()
Get the identifier of this command
|
String |
getDescription()
Get the description of this command
|
String |
toString() |
public static final String COMMAND_INIT_CHARACTER
public static final String COMMAND_PARAMETER_SEPARATOR_REGEXP
public final String getCommandIdentifier()
public final String getDescription()
public abstract void execute(AbsSender absSender, org.telegram.telegrambots.api.objects.User user, org.telegram.telegrambots.api.objects.Chat chat, String[] arguments)
absSender
- absSender to send messages overuser
- the user who sent the commandchat
- the chat, to be able to send repliesarguments
- passed argumentsCopyright © 2018. All rights reserved.