Class BotCommand
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.objects.commands.BotCommand
-
- All Implemented Interfaces:
Serializable,BotApiObject,Validable
public class BotCommand extends Object implements BotApiObject, Validable
- Version:
- 4.7 This object represents a bot command.
- Author:
- Ruben Bermudez
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BotCommand()BotCommand(String command, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCommand()StringgetDescription()BotCommandsetCommand(String command)BotCommandsetDescription(String description)StringtoString()voidvalidate()Validates that mandatory fields are filled and optional objects
-
-
-
Method Detail
-
getCommand
public String getCommand()
-
setCommand
public BotCommand setCommand(String command)
-
getDescription
public String getDescription()
-
setDescription
public BotCommand setDescription(String description)
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Specified by:
validatein interfaceValidable- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-