Interface MessageCommand
- All Known Implementing Classes:
HelpMessageCommand
,StopCommand
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for executing commands based on Telegram messages.
Implementations should define how to handle a given message.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(org.telegram.telegrambots.meta.api.objects.message.Message message) Executes the command with the provided message.
-
Method Details
-
execute
void execute(org.telegram.telegrambots.meta.api.objects.message.Message message) throws org.telegram.telegrambots.meta.exceptions.TelegramApiException Executes the command with the provided message.- Parameters:
message
- the Telegram message to process- Throws:
org.telegram.telegrambots.meta.exceptions.TelegramApiException
- if an error occurs while processing the message
-